mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
rtl8224: wait for the PHY to answer instead of a fixed 2.5 s
rtl8224_enable() waits 2.5 s after releasing the RTL8224 reset before anything talks to the PHY. On an SWTGW218AS the chip id already reads back 0x8224 at the first poll, about 265 ms after the release. Remember when the reset was released and, once SMI is up, poll the chip id until it answers, giving up after the same 2.5 s as before. The PHY writes that follow read back the same as before. The reset pulse before it goes from 0.5 s to 20 ms, twice the 10 ms the related RTL8372 and RTL8221B need. The pulse does reset the chip: the MDI reverse register (MMD 30, 0x0a90) still reads its power-on value 0x00f3 just before the init writes 0x00fc, as it does with 0.5 s. Together the console banner comes 3 s sooner. The SerDes write loop in phy_config_8224() waited on the busy bit with no limit, so a PHY that never answers stopped the boot before the network came up. Bound it and report a timeout.
This commit is contained in:
1 parent
40177f6318
commit
682ed861fa
4 files changed
+23
-3
No files matched your search
@@ -1701,6 +1701,8 @@ void main(void)
|
||||
|
||||
REG_SET(RTL837X_PIN_MUX_2, 0x0); // Disable pins for ACL
|
||||
init_smi();
|
||||
if (machine_detected.isRTL8373)
|
||||
rtl8224_wait_ready();
|
||||
|
||||
rtl8373_revision();
|
||||
|
||||
|
||||
Reference in new issue
Block a user