SPRADS2 August 2025 DRA821U , TDA4VH-Q1 , TDA4VM , TDA4VM-Q1
The Ethernet Firmware debug guide provides a structured approach for troubleshooting Ethernet Firmware issues during integration with custom boards and enabling custom configurations. This outlines key debugging steps, configurations checks, and diagnostics procedures to make sure of seamless working of network functionality.
Check Debug Logs
See the following failure logs from Ethernet firmware (ETHFW) corresponding to various errors.
Case 1: Mismatch of CPSW MAC port interface configured and the interface selected in CTRL MMR register corresponding to the MAC port.
ETHFW Log:
CpswMacPort_open: MAC 5: MII mismatch with SoC setting
EnetMod_open: cpsw9g.macport5: Failed to open: -3
Fix: Make sure the interface of the Ethernet port is selected from the board specifically and is the same as the configuration of the port.
Case 2: SerDes PLL lock failure.
ETHFW Log:
CpswMacPort_setSgmiiInterface: MAC 8: SERDES PLL is not locked
CpswMacPort_setSgmiiInterface
Assertion at Line: 2287 in src/mod/cpsw_macport.c: false
Fix: Make sure the Ethernet Port configured with Serial Interface is the same as the SerDes Instance, Lane selected (IP instance) from the SerDes configuration.
Case 3: gPTP Sync Failure
ETHFW Log:
Cpsw_ioctl: No PHY for MAC port 1
-1
ERR:cbase:Failed to get link info: -1
ERR:cbase:cbl_query_response:failed to get speed and duplex : tilld1
INF:cbase:cbl_query_response:tilld1: link UP, speed=0, duplex=0 !!!!
Fix: Make Sure the CPSW MAC Port is mapped to gPTP has a valid link. If using a MAC 2 MAC connection, integrate the patch shared in the link.
Case 4: Failure to open PHY
ETHFW Log:
Cpsw_openPortLinkWithPhy: Port 8 : Failed to open PHY.
Fix: Make sure the PHY driver is added to ENET as per the PHY Integration Guide from the TI PDK API Guide and MDIO mode configuration.
Configuration Validation
Basic register set to be checked while debugging the any networking issue as per configuration.
Registers related to CPSW port specific configuration, link control, and status
| Register Name | Address | Description |
|---|---|---|
| CTRL_MMR_ENETx_CTRL | 0x00104044 + (x × 0x4) | For checking
the functional mode selected for CPSW MAC Port x x: CPSW MAC Port number (0 to 7) Check whether RGMII delay is enabled or not from the MAC in case of the RGMII interface. |
See the How to configure RGMII clock delay on J7 devices for RGMII delay-related configuration.
| Register Name | Offset Address | Description |
|---|---|---|
| SGMII CTRL | 0x110 + (x × 0x100) | Configuration
register for Master Mode and Auto-negotiation corresponding to CPSW
MAC Port x x : CPSW MAC Port number (0 to 7) |
| SGMII STATUS | 0x114 + (x × 0x100) | Status
register indicates Link status, SerDes PLL lock status corresponding
to CPSW MAC Port x x: CPSW MAC Port number (0 to 7) |
| SGMII Advertise Ability | 0x118 + (x × 0x100) | SGMII
Advertise ability to set speed mode, Duplexity, and Link status
corresponding to CPSW MAC Port x x: CPSW MAC Port number (0 to 7) |
| RGMII STATUS | 0x30 + (x × 0x4) | Status
register indicates Link speed, Duplexity, and Link status
corresponding to CPSW MAC Port x
x: CPSW MAC Port number (0 to 7) |
| XGMII Link Register | 0x74 | XGMII Link
status of XGMII-enabled Ports. Bit 0: CPSW MAC Port-1 Bit 1: CPSW MAC Port-2. |
| CPSW MAC CTRL | 0x22330 + (x × 0x1000) | MAC control
register holds the Speed, Duplex Mode, GMII/XGMII Enable, and mode
of CPSW MAC Port x
x: CPSW MAC Port number (0 to 7) |
Refer to the CPSW register specifications for more register details related to ALE, CPSW Statistics, and control registers
Registers related to SerDes clock selection, lane mapping and configuration.
| Register Name | Address | Description |
|---|---|---|
| CTRL_MMR_SERDESx_LNy_CTRL | 0x00104080 + (x × 0x10) + (y × 0x04) | For checking
the functional mode selected for SerDesx Laney x: SerDes Instance y: SerDes lane number |
| CTRL_MMR_SERDESx_CLKSEL | 0x00108400 + (x × 0x10) | For checking
the clock source selected for the SerDesx core_refclk
input x: SerDes Instance MAIN_PLL3_HSDIV4_CLKOUT/ MAIN_PLL2_HSDIV4_CLKOUT is preferable. |
| CTRL_MMR_SERDESx_CLK1SEL | 0x00108404 + (x × 0x10) | -For checking
the clock source selected for the SerDesx
core_refclk1input x: SerDes Instance MAIN_PLL3_HSDIV4_CLKOUT/ MAIN_PLL2_HSDIV4_CLKOUT is preferable. |
| Register Name | Offset Address | Description |
|---|---|---|
| SERDES_TOP_CTRL | 0x408 | Clock mode configuration |
| SERDES_RST | 0x40C | Reference clock selection |
| LANECTLx | 0x480 + (x × 0x40) | Lanex
configuration x: SerDes lane number |
| LANESTSx | 0x48C + (x × 0x40) | Lanex
state x: SerDes lane number |
| PHY_PMA_CMN_REGISTER | 0xE000 | PLL lock status |
Registers related to CPSW port specific configuration, link control, and link status
This guide serves as a comprehensive resource for Ethernet Firmware troubleshooting, making sure of smooth custom board integration, configuration management, and SDK migrations. Follow these systematic checks to efficiently diagnose and resolve Ethernet-related issues.