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.

DP83867E: RGMII connection issues - ARP Retry count exceeded, Tx buffer not ready

Part Number: DP83867E

Hello. We are bringing up the custom board based on the NXP LS1046A. We have
4 x TI DP83867. 2 of them are using the SGMII and are connected as 1Gb and
those work correctly (at least simple ping / dhcp in U-Boot works).
The other 2 use RGMII and are connected as 100Mb (4 wires).

The U-Boot ti.c driver is used for the PHY:
source.codeaurora.org/.../ti.c

During the ping test, the RGMII interfaces fail at (when executed for the first
time):

```
=> ping 192.168.10.1
Using FM1@DTSEC3 device

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

and at (for consecutive executions):

```
=> ping 192.168.10.1
Using FM1@DTSEC3 device
FM1@DTSEC3: Tx error, txbd->status = 0x8800
FM1@DTSEC3: Tx buffer not ready, txbd->status = 0x8800
FM1@DTSEC3: Tx buffer not ready, txbd->status = 0x8800
FM1@DTSEC3: Tx buffer not ready, txbd->status = 0x8800

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

The MDIO communication with the chip works flawlessly. The RGMII mode and PHY
addresses are verified.

For the test purpose, we have prepared isolated network. We have the 100Mb-capable
link partner connected on the other end. We have the ability dump the packets on the other
end, but we were unable to send a single packet via the RGMII interfaces yet.

We have tried the far-end reverse loopback on the MII inside the PHY and the
packets sent from the link partner were being received back.

I suspect the issue is on the MAC-PHY RGMII interface.
We have tried various TX_DELAY values with no success.

We have checked that the RGMII mode is enabled:

* STRAP_STS1 (0x0e) register:

```
=> mii write 0 000d 001f
=> mii write 0 000e 006e
=> mii write 0 000d 401f
=> mii read 0 000e
0000
```

- RGMII strapped to enable (bit 12 is 0)
- SGMII strapped to disable (bit 11 is 0)
- address is 0x0 (bits 0:1)

* PHYCR (0x10) register

```
mii write 0 000d 001f
mii write 0 000e 0010
mii write 0 000d 401f
mii read 0 000e
4040
```

- SGMII is disabled (bit 11 is 0)

* RGMIICTL (0x32) register

```
mii write 0 000d 001f
mii write 0 000e 0032
mii write 0 000d 401f
mii read 0 000e
00D3
```
- RGMII is enabled (bit 7 is 1)

* 0x6f register dump:

=> mii write 0 000d 001f
=> mii write 0 000e 006f
=> mii write 0 000d 401f
=> mii read 0 e
0000

Standard registers:

* 0x00 - 0x1f registers dump:

```
=> mii read 0 0-1f
addr=00 reg=00 data=1140
addr=00 reg=01 data=796D
addr=00 reg=02 data=2000
addr=00 reg=03 data=A231
addr=00 reg=04 data=01E1
addr=00 reg=05 data=C1E1
addr=00 reg=06 data=006F
addr=00 reg=07 data=2001
addr=00 reg=08 data=6801
addr=00 reg=09 data=0200
addr=00 reg=0a data=0C00
addr=00 reg=0b data=0000
addr=00 reg=0c data=0000
addr=00 reg=0d data=0000
addr=00 reg=0e data=0000
addr=00 reg=0f data=3000
addr=00 reg=10 data=4040
addr=00 reg=11 data=7C02
addr=00 reg=12 data=0000
addr=00 reg=13 data=9C40
addr=00 reg=14 data=29C7
addr=00 reg=15 data=0000
addr=00 reg=16 data=0000
addr=00 reg=17 data=0040
addr=00 reg=18 data=6150
addr=00 reg=19 data=4444
addr=00 reg=1a data=0002
addr=00 reg=1b data=0000
addr=00 reg=1c data=0000
addr=00 reg=1d data=0000
addr=00 reg=1e data=0002
addr=00 reg=1f data=0000
```

From the register 0x11 we can verify that the autonegotiated speed is 100Mb.
From the registers 0x0/0x1 we can see that the autonegotiation is enabled and
that the link is up. The link LED is also active.

Any more hints how to approach this problem are welcome.

Thanks

Attached is the relevant page from schematics for one of the RGMII interfaces:


  • Hi Maciej,

    From the info you provided, DP83867 is configured into RGMII mode with 2ns clock skew on both TX and RX direction. Depending on whether the NXP LS1046A has internal delay, it could be double delay on the RGMII interface between PHY and MAC.

    You can play around with the PHY delay by using RGMII Delay Control Register (RGMIIDCTL), Address 0x0086 to see if it helps.

    However, it's kind of puzzled me that the timing is very loose for 100M, so even with additional delay, it should work. Can you also probe the RGMII RX pins from the PHY to make sure it sends expected RGMII signals (RX_CLK, RX_DV, RX_D[3:0].

    Regards,

    Hung Nguyen

  • It looks like the NXP LS1046A do not ghave internal delay on the RGMII. On the Reference Board (LS1046ARDB) they are using Realtek chip for the RGMII with the 2ns TX internal delay enabled in the PHY (I have found nothing on the RX delay - at least it is not enabled by the driver).

    We have already played with the RGMIIDCTL. Now we are playing a little bit more, but with the scope attached to the RX_CLK and RX_D[3] lines
    to measure the delays as shown in the http://www.ti.com/lit/an/snla243/snla243.pdf


    In the current state we are getting the CLK signal and data on the RX_[3] lines when using the internal packets generator (in the TI PHY) with loopback.
    When sending packets from external device via Ethernet cable, we are getting the CLK signal, but not getting any data on the RX_[3] line.

  • Hello.

    Some more test results:

    Receive:
    1. When we ping our board, the signal appears only on the RX_CLK. Nothing on RX_D3 (we were be able to connect probe only with this pin at the moment). Delay changes don't help.
    2. Signal appears on tje RX_D3, when we use PRBS generator and internal digital loopback within the PHY.
    3. Delay:
      * When delay on DP83867 is disabled, RX_CLK signal is ahead of the RX_D3 by 2ns (skew is added to RX_D3).



      * When delay on DP83867 is enabled and set to 2ns, there are any clock skew between RX_D3 and RC_CLK.


     
    * When delay on DP83867 is enabled and set to 4ns, RX_D3 signal is ahead of the RX_CLK by 2ns (skew is added to RX_CLK).


    Transmit:
    1. No signal on TX_D3 when we try to ping from our custom board.


    But I believe that our main issue is the fact that there is nothing on the data line when receiving packets from external device.
    There is data flowing on the D3 line when using the internal packets generator. When sending packets from external device,
    the clock appears on the RX_CLK line, but the RX_D3 line is always low.

    The data path from RJ-45 to MII and back to the RJ-45 was already verified using the far-end loopback as described in the http://www.ti.com/lit/an/snla246a/snla246a.pdf

  • Hi Maciej,

    RX_CLK should always output 25MHz clock signal when the device links up in 100M speed.

    When internal packet generator is used, the data is PRBS. So it is expected to have all 3 data lines toggling.

    When sending data from external device, depending on the content of the incoming packets, RX_D3 could be low. For example, you send 5555 data, bit 3 and bit 1 are always 0. However, you should still see RX_D3 toggling at least for 4 bytes CRC field.

    Can you confirm RX_D[2:0] and RX_CTRL are correct RGMII signals?

    Is the behavior the same for 10M and 1G speed?

    Regards,

    Hung Nguyen

  • Does it mean that the RX_CLK should always be operating when the link is established?
    The link status bit is set. But the RX_CLK is only operating when we are transmitting some data from an external device.
    When there is not data being transmitted, the RX_CLK is always low.

    We had some difficulties probing the RX_D[2:0] pins. We will try to arrange that.

    I believe the 1Gb mode is not available since there are only 2 enet pairs routed to the connector.
    The remaining 2 are exposed on the test points.

  • Hi,

    What is your strap on RX_CTRL pin?

    Can you read register 0x31?

    Regards,

    Hung Nguyen

  • Hi,

    There are no straps on the RX_CTRL. All the straps used are visible on the attached schematics.
    I will provide the register reading tomorrow morning.
    Thank you for your feedback.

  • Hi, 

    There is a note, particularly for RX_CTRL, in the datasheet section 8.5.1 you need to follow:

     "Strap modes 1 and 2 are not applicable for RX_CTRL. The RX_CTRL strap must be configured for strap mode 3 or strap mode 4. If the RX_CTRL pin cannot be strapped to mode 3 or mode 4, bit[7] of Configuration Register 4 (address 0x0031) must be cleared to 0."

    Regards,

    Hung Nguyen

  • Hi,

    Thank you for this tip.

    The 0x31 value was 0x10B0. So there are no straps on the RX_CTRL and the reserved bit (7th) was not unset.
    I have enabled the quirk in the ti,c U-Boot driver to unset this bit and now the 0x31 register content is 0x1030.
    This change caused the RX_CLK to be always on (stable 25MHZ). Previously it was only operating when there was
    incoming data stream.

    I also found some issues with the TI driver. When accessing the extended register set from
    within the driver code, it always got 0xFFFF. I was able to fix this by changing:

    "phydev->addr, val" to "MDIO_DEVAD_NONE" in function calls.

    Maybe this upstream commit also fixes that: github.com/.../4c29dc1863e4f739ec2f496352935fd37c123553

    This issue caused that the extended registers read inisde the driver code were always 0xFFFF. The writing was not working
    properly either. So all the configuration done within the driver in the extended registers configuration space was ignored
    and the default values were used.

    Driver code: https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot/tree/drivers/net/phy/ti.c?h=integration#n134


    I was able to capture some traffic on the TX _Dx lines when pinging from the U-Boot shell (tcpdump on the other side still does not show any packets received).
    I was able to capture some data on one of the RX_D lines today, as shown below:

  • Hi Maciej,

    I haven't heard from you. I’m assuming you were able to resolve your issue. I will go ahead and close this thread.

    If you need further support, kindly open a new thread.

    Regards,

    Hung Nguyen