Hi,
My customer run the below link-up sequence but Link-up may not success. (He judges the link-up status from interrupt and 0x0010 register)
Could you please give me advice which user sequence should be changed to success link - up?
I think it is strange which the interrupt is happened after #5. Please check if procedure for 4. disable auto-negotiation and 5. Set interrupt is correct.
Below is customer procedure to link-up:
1.Reset PHY
phy_write 0x00 0x8000(PHY Software Reset)
phy_read 0x00 -> 0x3100
2. Check PHY vender
phy_read 0x02 -> 0x2000
phy_read 0x03 -> 0xA240
3. Auto negotiation
phy_read 0x04 -> 0x01E1
phy_write 0x04 0x5E1 (Advertise asymmetric pause ability, …)
phy_read 0x04 -> 0x05E1
4. Disable auto-negotiation
phy_read 0x00 -> 0x3100
phy_write 0x00 -> 0x2100(100F)
5. Set Interrupt
phy_read 0x12 -> 0x6400 (Change of energy detected, Change of link status interrupt is pending, Auto-negotiation complete interrupt is pending.)
phy_read 0x11 -> 0x0108 (5 nibbles FIFO, Normal operation is 1 logic and during interrupt is 0 logic.)
-------------------------------------------------------
--- Interrupt is happened after #5 steps ---
phy_read 0x10 -> 0x4994 (MDI Pairs swapped, False Carrier event has occurre, A new Link Code Word Page has been received, Indicates that and internal interrupt is pending, Auto-negotiation complete, Full-Duplex mode)
phy_read 0x12 -> 0x0600 ( Change of energy detected, Change of link status interrupt is pending)
phy_read 0x11 -> 0x0108
-------------------------------------------------------
6. Set interrupt ( Continue from #5 step)
phy_write 0x11 0x0003 ( Interrupt Enable, Interrupt Output Enable)
phy_write 0x12 0x0024 (Enable interrupt on change of link status, Enable Interrupt on Auto-negotiation complete event)
7. Start Auto negotiation
phy_write 0x00 0x1200 (Auto-Negotiation Enable, Restart Auto-Negotiation)
… Customer expects Interrupt will be happened after Link – up. But the interrupt be never happened after #7.
For Auto-MDIX, customer set the 28 pin (RX_ER) in bootstrap and Mode4. As he checed 0x0019 register, It is 0x8001(Auto-MDIX Enable, Phy Address 0x01)
Regards,
Nagata.