u-boot: RGMII transmit fails at 1000 Mbps but works at 100 #76
Labels
No labels
blocked-physical
cleanup
hardware
infra
kernel
P1-critical
P2-high
P3-normal
P4-later
reliability
security
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tiagoagueda/a80#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of #39, which is about getting a MAC driver and TFTP boot and is no longer blocked by
this.
What is established
u-boot transmits correctly at 100 Mbps and not at all at 1000 Mbps. Same board, same boot,
minutes apart:
So the MAC, the descriptor rings, the DMA engine, the pinmux, the drive strength, the MDIO path
and the PHY are all sound. The fault is confined to the 1000 Mbps RGMII clock domain - the
125 MHz DDR transmit path.
Note this also retires the "put a scope on TXCK" step that #39 was parked on: at 100 Mbps that
same pin carries 25 MHz and works, so a clock is present and the pin drives.
Eliminated, with the method
gmac_tx_clk0x008000300x00000006in both u-boot and a Linux carrying gigabitPA CFG0/1/2andDRV0/1identical to Linuxconf = 0x00202800, full duplex, GMII/10000x584,0x588,0x590,0x594and matching resets). Applied Linux's exact values withmwbefore the ping - no change0xa4reg0x1creads0xBD75in bothLinux drives the same MAC and the same PHY at a stable 1 Gbps continuously, so this is not a
hardware defect - it is something u-boot does differently that is not visible in any register
either side exposes.
Where to look next
The remaining candidate is RGMII transmit timing at 125 MHz rather than configuration.
Specifically worth testing, in rough order of cost:
rgmii-id, so both internal delays are on. A board thatactually wants
rgmii-txid(or no internal TX delay, with the skew in the trace) would lookexactly like this: fine at 25 MHz where the timing budget is large, broken at 125 MHz where
it is not. Cheap to test - change the delay bits and ping, no rebuild.
stmmacdoes something to the transmit path that u-boot'sdesignwaredriver does not, that is not a register either exposes - e.g. ordering around
CLK_BUS_GMAC/RST_BUS_GMACrelative to the PHY coming up.⚠️ Read this before touching the PHY
Writing the whole delay register, rather than read-modify-writing the delay bits, broke gigabit
autonegotiation until the board was physically power cycled. The RTL8211E's reserved field
(bits 10:0) holds Realtek test/debug settings that survive a warm reboot and a BMCR soft reset,
and there is no PHY reset GPIO in the device tree. Restoring the original value over MDIO did not
help.
Detail in #39. Rules: read-modify-write only, verify the page-select took before trusting a paged
access, and do this work while someone can reach the board - or after #5.