Other Parts Discussed in Thread: DP83869
Tool/software:
Hello, I have trouble with DP83869 PHY
The phy is on a custom Linux board. The goal is to have RGMII to copper 100Mbit/s connection.
I have two switches 8 port on and 4 port different brand. When I connect my device to the 8 port one everything works as expected using the ethtool I can see that they phy is set to 100Mbit/s Half duplex connection. Also If I connect the board through USB to ETH adaptor to a PC and it also works.
When I connect to the 4 port switch (or directly to a PCs) I can see slow blinking light on the switch port and there is no connection. Here is the output of ethtool:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Link detected: no
I can use this command 'ethtool -s eth0 speed 10 duplex half autoneg off' and we can see that we have established 10Mbit/s connection. I have ping and everything.
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Link detected: yes
I would like to have the phy work reliably accross the board. I cannot post schematics, but I can double check on request. However I don't think I the problem is HW since I am able to have 100Mbit/s connections established.
I am able accessing the phy register using phytool. Here are some register that might be of interest. The extended register are being accessed using the method described in AP DP83869 Troubleshooting Guide - 4.2.1 Read (No Post Increment) Operation
BMCR
phytool eth0/0x00/0x00
ieee-phy: reg:BMCR(0x00) val:0x1140
BMSR
phytool eth0/0x00/0x01
ieee-phy: reg:BMSR(0x01) val:0x7949
ANAR
phytool eth0/0x00/0x04
ieee-phy: reg:0x04 val:0x01e1
ALNPAR
phytool eth0/0x00/0x05
ieee-phy: reg:0x05 val:0xc5e1
ANER
phytool eth0/0x00/0x06
ieee-phy: reg:0x06 val:0x006f
ANNPTR
phytool eth0/0x00/0x07
ieee-phy: reg:0x07 val:0x2001
ANLNPTR
phytool eth0/0x00/0x08
ieee-phy: reg:0x08 val:0x4806
GEN_CFG1
phytool eth0/0x00/0x09
ieee-phy: reg:0x09 val:0000
GEN_STATUS1
phytool eth0/0x00/0x0A
ieee-phy: reg:0x0a val:0x0800
PHY_CONTROL
phytool eth0/0x00/0x10
ieee-phy: reg:0x10 val:0x5048
PHY_STATUS
phytool eth0/0x00/0x11
ieee-phy: reg:0x11 val:0x1302
GEN_CFG2
phytool eth0/0x00/0x14
ieee-phy: reg:0x14 val:0x
GEN_STATUS2
phytool eth0/0x00/0x17
ieee-phy: reg:0x17 val:0x0040
GEN_CFG4
phytool eth0/0x00/0x1E
ieee-phy: reg:0x1e val:0x0012
GEN_CFG3
phytool eth0/0x00/0x31
ieee-phy: reg:0x31 val:0x7302
RGMII_CTRL
phytool eth0/0x00/0x32
ieee-phy: reg:0x32 val:0000
RGMII_CTRL2
phytool eth0/0x00/0x33
ieee-phy: reg:0x33 val:0x9c42
STRAP_STS - read as extended
phytool write eth0/0x00/0x0d 0x1f
phytool write eth0/0x00/0x0e 0x6e
phytool write eth0/0x00/0x0d 0x401f
phytool eth0/0x00/0x0e
ieee-phy: reg:0x0e val:0000
OP_MODE_DECODE - read as extended
phytool write eth0/0x00/0x0d 0x1f
phytool write eth0/0x00/0x0e 0x1df
phytool write eth0/0x00/0x0d 0x401f
phytool eth0/0x00/0x0e
ieee-phy: reg:0x0e val:0x0040
This is the driver used:
github.com/.../dp83869.c
It would be great to have a configuration that I can manually test (using phytool) if the phy works across the devices before continuing to fix drivers etc.
I also tried this without success:
• Write 0x0040 to register 1DFh // Set Operation Mode to RGMII to Copper
• Write 0x1140 to register 0h // Reset BMCR
• Write 0x01E1 to register 4h // Advertise 100Base-TX and 10Base-T ability
• Write 0x0300 to register 9h // Reset GEN_CFG1
• Write 0x5048 to register 10h // Reset PHY_CONTROL
• Write 0x4000 to register 1Fh // Software Reset
Best regards.
M