This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDS64GPEVM: CPSW reading registers

Part Number: TMDS64GPEVM

Hello.

I want to read registers values form CPSW peripheral. For this I used command ethtool -d eth0. This give me an output that I'm quite not understand:

root@puma:~# ethtool -d eth0
Offset Values
------ ------
0x0000: 01 00 00 00 48 00 00 00 00 00 00 00 03 09 a0 6b
0x0010: 04 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
0x0020: 0c 00 00 00 00 00 00 00 10 00 00 00 03 00 00 00
0x0030: 14 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00
0x0040: 1c 00 00 00 00 00 00 00 02 00 00 00 48 00 00 00
0x0050: 30 00 00 00 0b 00 00 00 34 00 00 00 03 00 00 00
0x0060: 38 00 00 00 00 00 00 00 3c 00 00 00 00 00 00 00
0x0070: 40 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00
0x0080: 48 00 00 00 00 00 00 00 4c 00 00 00 00 00 00 00
0x0090: 03 00 00 00 08 02 00 00 00 0f 00 00 07 09 07 00
0x00a0: 04 0f 00 00 f9 00 00 81 08 0f 00 00 00 00 00 00
0x00b0: 0c 0f 00 00 00 00 00 00 10 0f 00 00 00 00 00 00
0x00c0: 14 0f 00 00 00 00 00 00 18 0f 00 00 00 00 00 00
0x00d0: 1c 0f 00 00 00 00 00 00 20 0f 00 00 00 00 00 00
0x00e0: 24 0f 00 00 00 00 00 00 28 0f 00 00 00 00 00 00

. . . 

https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/08_05_00_21/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g.html

Here I found description how register values are encoded in memory. But there is something said about parsing tool for this purpose. Where can I get it?

"[..] The TI switch-config tool can be used for CPSW NUSS register dump parsing."

MMIO region header (8 Bytes)
module_id (u32) MMIO region id NUSS = 1, RGMII_STATUS = 2, MDIO = 3, CPSW = 4, CPSW_P0 = 5, CPSW_P1 = 6, CPSW_CPTS = 7, CPSW_ALE = 8, CPSW_ALE_TBL = 9
len (u32) MMIO region dump length, including header
MMIO region registers dump (num_regs * 8 Bytes)
reg_offset (u32) register offset from the start of MCU NAVSS MMIO space
reg_value (u32)

MMIO region dump length, including header

Also I was trying decoded register values by hand but byte values seems not match the description above, let's look:

MMIO regio header = 0x01 ?

module_id  = 0x48 ? (not matching values in table)

len = 0 ?

BR

Jakub

  • Hi,

    I agree the documentation link you are referencing is a little confusing, the current version appears to be the same version.

    Which registers are you interested in? The TRM lists the physical memory addresses of the CPSW registers. Have you tried using devmem2 to access CPSW registers?

    The switch-config tool will print out the ALE entries when using the -d option. 

    I will be out of the office until the first week of Jan

    Best Regards,

    Schuyler