Tool/software: Linux
Hello,
I have a custom design using K2G running Linux. We have a gigabit phy (DP83867) connected to the K2G using RGMII. When the PHY autodetects the link as gigabit, no data seems to get transferred. If I connect the PHY to a 10/100 port, the link gets established as 100Mb and everything works normally. For the majority of my testing, I have been using the same switch, but with one port configured as 10/100 only and one as 10/100/1000. I have tried the system with a 10/100 only switch and everything works properly. For the purposes of this post, when I refer to a 1Gb port and a 10/100 port, I am talking about ports on the same switch that are configured for different speeds.
Here's a summary of what I'm running:
Processor SDK K2G Linux 4.2.0.9
U-Boot 2017.01
Linux 4.9.59
66AK2G12 ARM + DSP
DP83867 Gigabit PHY
Netgear GS108T Managed Gigabit Switch
Here is what I have added to the U-Boot DTS (keystone-k2g-evm.dts):
&mdio { status = "okay"; ethphy0: ethernet-phy@0 { reg = <0>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>; ti,min-output-impedance; //ti,dp83867-rxctrl-strap-quirk; }; }; &gbe0 { phy-handle = <ðphy0>; };
And the Linux DTS (keystone-k2g-evm.dts):
&mdio { status = "okay"; ethphy0: ethernet-phy@0 { reg = <0>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; //phy-mode = "rgmii-id"; ti,min-output-impedance; /* ti,dp83867-rxctrl-strap-quirk; */ //compatible="ethernet-phy-ieee802.3-c22"; }; }; &gbe0 { phy-handle = <ðphy0>; };
It is difficult to do much diagnostic work from the Linux side of things because I am running everything through NFS. If I break the network connection, the system goes unresponsive until I reconnect to a 100Mb port. It MUST be NFS because I do not have a viable local filesystem for this system becuase the NAND driver for this part is unusable (an unfortunate fact we learned after ordering prototypes). While connected to a 1Gb port, the console shows that NFS is attempting to reconnect to the server. I tried a wireshark capture and saw no traffic that seemed to be from my unit. This seems to indicate that the ethernet traffic is not making it out of the box when in 1Gb mode.
On the U-Boot side of things, I can do register dumps through "mii dump". Another post on a similar topic asked for mii dump 0 0 and mii dump 0 1, so those are below:
mii dump 0 0 0. (1140) -- PHY control register -- (8000:0000) 0.15 = 0 reset (4000:0000) 0.14 = 0 loopback (2040:0040) 0. 6,13 = b10 speed selection = 1000 Mbps (1000:1000) 0.12 = 1 A/N enable (0800:0000) 0.11 = 0 power-down (0400:0000) 0.10 = 0 isolate (0200:0000) 0. 9 = 0 restart A/N (0100:0100) 0. 8 = 1 duplex = full (0080:0000) 0. 7 = 0 collision test enable (003f:0000) 0. 5- 0 = 0 (reserved) => mii dump 0 1 1. (796d) -- PHY status register -- (8000:0000) 1.15 = 0 100BASE-T4 able (4000:4000) 1.14 = 1 100BASE-X full duplex able (2000:2000) 1.13 = 1 100BASE-X half duplex able (1000:1000) 1.12 = 1 10 Mbps full duplex able (0800:0800) 1.11 = 1 10 Mbps half duplex able (0400:0000) 1.10 = 0 100BASE-T2 full duplex able (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able (0100:0100) 1. 8 = 1 extended status (0080:0000) 1. 7 = 0 (reserved) (0040:0040) 1. 6 = 1 MF preamble suppression (0020:0020) 1. 5 = 1 A/N complete (0010:0000) 1. 4 = 0 remote fault (0008:0008) 1. 3 = 1 A/N able (0004:0004) 1. 2 = 1 link status (0002:0000) 1. 1 = 0 jabber detect (0001:0001) 1. 0 = 1 extended capabilities
and when connected to a 10/100 port on the switch, I get the same output. It's worth noting that autonegotiation completes in both cases and the device (and drivers) indicate that the link is up. That said, when I try to do DHCP from U-Boot when connected to a 1Gb port, the request just times out repeatedly.
On the hardware side of things, a data rate change can be seen on the RMGII lines when switching from 10/100 to 1Gb, but it is difficult to judge the signal integrity with our 300MHz oscilloscopes. The 10/100 RGMII waveforms look pretty clean, and we tried to stick to the TI recommended PCB layout for the PHY design. When running at 100Mb, the RGMII clocks are 25MHz, and at 1Gb the clocks are 125MHz.
In summary, on the Linux side, the driver reports that the link is up when connected to a 1Gb port, but the NFS driver cannot find the server. I do not see any clear network traffic from the unit on a wireshark capture. In U-Boot, the MII registers seem to report that the link is up, but DHCP does not work. I have confirmed that the PHY is operating at a different speed in both cases.
Thank you for any help you can offer. I'm happy to provide any information that may help solve the problem.
Jeff