This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DP83867IR: DP83867IR: ping fails to TX, near-end and far-end loopback tests pass

Part Number: DP83867IR

I am debugging a design with Intel socfpga MAC connected to DP83867IRRGZ PHY (RGMII interface).  My problem is that ping messages from the target HW (u-boot and linux net drivers) are not seen on the ethernet line (using wireshark running on host PC).  The MII interface seems to be working correctly.  When connecting to a host PC the ethernet link is automatically established (autoneg) and remains connected.  The PHY ACT LED blinks correctly with each ping request being sent from target HW (also blinks when ping sent from host PC).  I have written a simple loopback test in u-boot and followed the DP83867 Troubleshooting Guide (snla246a.pdf) to manually put the PHY into digital loopback mode and the loopback test can be run successfully using random payload data.  I have also manually put the PHY into far-end loopback mode and sent ping requests from the host PC and captured (wireshark) both the sent ping and loopback response from the PHY (data matches for both ping and response).  My question is what else could be preventing the PHY from sending data to the network?  

The FPGA pins seem to add a small pullup load on the PHY signals which causes the PHY MII addr to be 0x0a even without any strapping resistors applied (signals are 0.83V at reset).  The RX_CTRL line is strapped to be mode3 but with the FPGA pullup loading the voltage is 0.94V at reset (top end of the mode3 voltage range).  (The u-boot and linux net drivers do have the "rxctrl_strap_quick" dts setting enabled.)  All the rest of the strap configuration pins are 0V at reset.  The PHY is powered with the following supplies: 3V3 (VCCIO), 2v5, 1v0 (really 1v1); not using 1v8.  The 25MHz clk looks clean.  I have also verified that the host PC can communicate with other embedded boards (different vendor then the target HW) over ethernet.

The DP83867 net drivers talk about a port mirroring configuration pin issue where if put into a N/A mode then the PHY can be placed into an internal test mode (disabling RGMII transmission).  I don't see this specific case as a problem but are there other conditions that can place the device into internal test mode (preventing TX)?  Is there some group of MII registers I can check to verify the PHY is in normal operation mode?  Does the PHY ACT LED indicate data is without error or just the RX/TX_CTRL line is being toggled?  Are there any timing specific issues when writing PHY MII registers that need to be accounted for (the net drivers don't seem to have any added delays between writing MII registers).  Any other items to check would be greatly appreciated.  Thanks.

  • Hi David,

    I will reach out to the team to relay this information. I hope to get back to you by the end of business Friday (6/4).

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (http://www.ti.com/corp/docs/legal/important-notice.shtml)

  • FYI: Here is an instrumented u-boot log showing the MII commands used to setup the PHY.

    dw_mdio_read:  0 ffffffff 2 ffff
    dw_mdio_read:  0 ffffffff 3 ffff
    dw_mdio_read:  1 ffffffff 2 ffff
    dw_mdio_read:  1 ffffffff 3 ffff
    dw_mdio_read:  2 ffffffff 2 ffff
    dw_mdio_read:  2 ffffffff 3 ffff
    dw_mdio_read:  3 ffffffff 2 ffff
    dw_mdio_read:  3 ffffffff 3 ffff
    dw_mdio_read:  4 ffffffff 2 ffff
    dw_mdio_read:  4 ffffffff 3 ffff
    dw_mdio_read:  5 ffffffff 2 ffff
    dw_mdio_read:  5 ffffffff 3 ffff
    dw_mdio_read:  6 ffffffff 2 ffff
    dw_mdio_read:  6 ffffffff 3 ffff
    dw_mdio_read:  7 ffffffff 2 ffff
    dw_mdio_read:  7 ffffffff 3 ffff
    dw_mdio_read:  8 ffffffff 2 ffff
    dw_mdio_read:  8 ffffffff 3 ffff
    dw_mdio_read:  9 ffffffff 2 ffff
    dw_mdio_read:  9 ffffffff 3 ffff
    dw_mdio_read:  a ffffffff 2 2000
    dw_mdio_read:  a ffffffff 3 a231
    dw_mdio_write: a ffffffff 0 8000
    dw_mdio_read:  a ffffffff 0 1140
    dp83867_of_init: found PHY node: ethernet@ff702000
    dp83867_of_init: found PHY node: phy@a
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 6f
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e 100
    PHY has delays via pin strapping, but phy-mode = 'rgmii'
    Should be 'rgmii-id' to use internal delays
    dw_mdio_read:  a ffffffff 1f 0
    dw_mdio_write: a ffffffff 1f 4000
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 31
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e 10b0
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 31
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_write: a ffffffff e 1030
    dw_mdio_read:  a ffffffff 10 5048
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 6e
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e a
    dw_mdio_write: a ffffffff 10 d048
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 32
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e d3
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 32
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_write: a ffffffff e d0
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 86
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_write: a ffffffff e 0
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 170
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e c0e
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 170
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_write: a ffffffff e c1f
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 31
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_read:  a ffffffff e 1030
    dw_mdio_write: a ffffffff d 1f
    dw_mdio_write: a ffffffff e 31
    dw_mdio_write: a ffffffff d 401f
    dw_mdio_write: a ffffffff e 1030
    dw_mdio_read:  a ffffffff 4 1e1
    dw_mdio_read:  a ffffffff 1 7949
    dw_mdio_read:  a ffffffff 9 300
    dw_mdio_write: a ffffffff 9 0
    dw_mdio_read:  a ffffffff 0 1140
    dw_mdio_write: a ffffffff 0 1340

    Warning: ethernet@ff702000 (eth0) using random MAC address - 5e:c3:3d:3a:16:76
    eth0: ethernet@ff702000

  • Hi David,

    I have a couple of questions:

    1. Can you leave the FPGA off or disable it until the PHY voltage is strapped in and PHY is correctly set for RGMII? The register value is not showing any issues but this is worth a try if you think the FGA is creating some contention with the strap voltages.
    2. Register 1 is indicating no link. Is this consistent with both RGMII and MII?
    3. I would also like some clarification on your first two sentences. Is the ping coming from the MAC or cable side?
    4. Are you able to force a link at different speeds? Does the device link up depending on if the speed is being forced or if auto-negotiation is enabled? 

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (www.ti.com/.../important-notice.shtml)

  • Joe,
    Thanks for commenting on my PHY issue.  Here are my answers to your questions:

    1. The FPGA cannot be disabled because we use its internal arm core as our processor.  I did try adding resistive load to the configuration pins to achieve the correct voltage at reset.  I was able to change the PHY addr back to 0x0; but that did not change the PHY behavior.
    2. The configuration log I sent did not show the link being established.  Listed below is the ping command which fails but shows the correct link status.

    => ping 192.168.1.10
    dw_mdio_read: a ffffffff 1 796d
    dw_mdio_read: a ffffffff 0 1140
    Speed: 1000, full duplex
    Using ethernet@ff702000 device

    ARP Retry count exceeded; starting again
    ping failed; host 192.168.1.10 is not alive

    => mii dump 0x0a 1
    dw_mdio_read:  a ffffffff 1 796d
    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

    3. I am trying to verify ethernet on this board by sending a ping from the target HW to a host PC.
    4. I have not tried to force different speeds for the link.  Auto negotiate is set; the link is automatically established with the host PC and remains connected.

    Let me change the questions to be more specific:
    5. Can the ACT LED be used to indicate that a valid message has been sent/received?
    6. By successfully running digital loopback (MAC to PHY) and far-end loopback (cable to PHY) does that indicate that the entire data path (cable to PHY to MAC) should be working?  Is there a part of the PHY that is not being activated in these loopback modes?
    7. Do you have an example for a minimal set of PHY registers I can manually set to create a link to the host PC and run the ping command (similar to the set of registers I manually set for the loopback tests).  Maybe there is a problem with how the driver is performing the mdio writes.

    Thanks, David.

  • Hi David,

    Here are my inputs to your questions:

    • 5. You can monitor the RX_ER via the ACT LED after ensuring that the GPIO Mux Control register 2, address: 0x0172 has the default value of all 0's bits 3:0. This will select the RX_ER.
    • 6. Analog loopback covers more of the PHY data path than digital loopback. The MDI must be terminated with 100 ohm differential termination as well.
      • If both analog and reverse loopback are working fine then the data path should be okay.
    • 7. It looks like the PHY is linking up based on register 0. Is it still unable to ping even though it is linked up and establishes 1G speed? Ping is a higher layer function so debugging from a physical layer perspective becomes difficult. Ideally, if the PHY is correctly powered up, then ping should happen automatically.

    Additionally I would like to know the value of the PHY status register, register 0x0011?

    Are you able to share a schematic for review?

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (www.ti.com/.../important-notice.shtml)

  • 7. Yes after the link is automatically established the ping still fails (and wireshark sees no traffic on the cable during the ping retries).

    8. PHY register 0x11 is 0x6f02
    => mii read 0x0a 0x11
    dw_mdio_read: a ffffffff 11
    6F02

    I will check to see if I can share the applicable schematic pages.

    Thanks, David

  • Hi David,

    Based on your previous post, it seems that the PHY link partner is reporting gigabit speed but PHY register 0x0011 is reporting 100 Mbps.

    What is RX_CLK frequency on the PHY? Can you also confirm that an 8-wire cable is being used?

    I would also like you to provide the values of registers 0x006E and 0x006F and note that these are extended registers and should be accessed as such.

    Could you also provide the value of register 0x0014 which is not an extended register.

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (www.ti.com/.../important-notice.shtml)

  • Joe,

    The speed mismatch was an issue in the u-boot phy driver that was not looking at the autoneg regs to choose the link speed (caused when adding the loopback tests).  That has been corrected so the ping now is reporting the correct link speed but ping still fails without seeing any traffic on the cable (far-end loopback and digital loopback are still successful).  I measured the RX_CLK freq at 25MHz; I am using a 8wire ethernet cable.  Listed below are mii reg values; I need to look into how to change mii read to read the extended registers.  I will continue to investigate driver issues. 

    => ping 192.168.1.10
    dw_mdio_read: a ffffffff 0 1140
    dw_mdio_read: a ffffffff 1 796d
    dw_mdio_read: a ffffffff 1 796d
    dw_mdio_read: a ffffffff 4 1e1
    dw_mdio_read: a ffffffff 5 cde1
    Speed: 100, full duplex
    Using ethernet@ff702000 device

    ARP Retry count exceeded; starting again
    ping failed; host 192.168.1.10 is not alive

    <mii reg values>
    dw_mdio_read: a ffffffff 0 1140
    dw_mdio_read: a ffffffff 1 796d
    dw_mdio_read: a ffffffff 4 1e1
    dw_mdio_read: a ffffffff 5 cde1
    dw_mdio_read: a ffffffff a 0
    dw_mdio_read: a ffffffff 10 d048
    dw_mdio_read: a ffffffff 11 7c02
    dw_mdio_read: a ffffffff 14 29c7

    Thanks, David

  • Here are the requested extended registers values:
    0x006e = 0x000a
    0x006f = 0x0100

  • Hi David,

    Thank you for providing all of that information.

    A clock speed of 25MHz suggests that 100mbps speed is being used. What is your expected/desired link speed? In a previous post, it was 1000 mbps, newer post is 100 mbps.

    Can you also provide the value in register 0x0009? 

    Based on the register values you have provided and the established link, it looks like PHY is working.

    I also want to make sure that I understand that your link partner is a host PC, correct?

    I would like you to try and do an external loopback test:

    • Create external loop by using a cable to short the PHY transmit to the receive pairs.
      • Similarly on the MAC interface, you can short the RX pins to the TX pins.
    • You can enable the PRBS generator in register 0x0016 and count errors in register 0x0015 to confirm PHY function is okay.

    If that works, then we know the PHY is functional.

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (www.ti.com/.../important-notice.shtml)

  • Joe,
    (Sorry I hit the wrong button in responding to your last email reply)..

    I found the issue after looking more closely at the extended registers being written by the driver.  The driver was overwriting default vales in register 0x32 and 0x86 relating to the tx/rx clk delay.  For my implementation I need RGMII_TX_CLK_DELAY and RGMII_RX_CLK_DELAY both set (clock shifted relative to data) and the RGMII_TX_DELAY_CTRL and RGMII_RX_DELAY_CTRL set to 2ns delay (some value in the middle I assume).  This also required that the device tree "phy-mode" be set to "rgmii-id" instead of just "rgmii" and that the device tree phy object contains values for "ti,rx-internal-delay" and "ti,tx-internal-delay".  By making these config changes (and modifying the u-boot driver to support "rgmii-id" mode), the ping request/reply message are now seen at the host PC (wireshark).  I am still curious why the digital loopback test was successful with the rgmii data to clock not aligned properly.  I still need to run additional tests to find the correct range of clock delay range values for register 0x86.  Thank you again for your assistance on this issue.

    Thanks, David

  • Hi David,

    I am glad that we were able to resolve your issue. If you have any further questions please respond to this thread or open a new one.

    Kind Regards,

    Joe

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (www.ti.com/.../important-notice.shtml)