Other Parts Discussed in Thread: DP83869
I want to test the MAC<->PHY communication by setting the PHY in near-end loopback mode.
The interface speed is 1000M (RGMII), OP MODE copper.
I tried to follow the description in the datasheet, but this is unclear.
https://www.ti.com/lit/ds/symlink/dp83869hm.pdf
Following section 9.3.4.1, I should write 0xE720 in register 0x00FE (LOOPCR), the problem is that there is not such a register, what am I missing?
The Methods I tried: (without success)
Method 1
1) Write 0x4140 into 0x0 (Set loopback, disable A/N, set 1000M speed)
2) Write 0x1 Into 0x16 (PCS Loopback select, loop before scrambler)
3) Write 0X4000 into 0x1F (SW reset).
Method 2
1) Just writing 0x1 to register 0x16 (PCS Loopback select, loop before scrambler)
Method 3
1) Write 0x8000 into 0x1f (Reset, clear registers)
2) Write 0x40 Into 0x00 (set 1000M mode)
3) Write 0x1 Into 0X16 (PCS Loopback select, loop before scrambler)
4) Write 0X4000 into 0x1F (SW reset, keep register values).
Can you please provide clear steps on how to configure the PHY as near-end loopback (PCS Loopback), 1000M?
Thanks
I have another question, how can I test the communication (MAC<->PHY, when PHY is in loopback) with Linux? seems that both MACs I'm using (CPSW, ICSSG) don't support test mode
# ethtool -i eth0
driver: am65-cpsw-nuss
version: 5.10.41-00009-g2b4dcfa8d633-dir
firmware-version:
expansion-rom-version:
bus-info: 8000000.ethernet
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
--------------------------------------------------------------------------------
# ethtool -i eth1
driver: icssg-prueth
version: 5.10.41-00009-g2b4dcfa8d633-dir
firmware-version:
expansion-rom-version:
bus-info: icssg1-eth
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
How can I test the communication?
I was thinking maybe to add a function in the kernel driver to write to PHY registers, so PHY will enter Loopback mode, then just using the interface normal, and the data will be looped back to RX. Can this work?
Thanks again