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.

DP83822I: Strange RGMII transmit clock

Part Number: DP83822I

Tool/software:

Greetings,

We have a new HW design which interfaces the DP83822 10/100 Phy to an IMX93 over
RGMII, and are having issues getting a link to one of our older products.

Our older ethernet device has an optical interface, and runs at 10 Mbps, full duplex,
asym. pause flow control, and auto-negotation disabled.

What we have done so far:

Checked all pin muxing and the IMX93, looks good.
Can read/write the standard IEEE MDIO registers (0x00-0x1F)
Can read/write the the MDIO extended registers.
Check the power up sequence, looks good.
Checked the Linux driver reset GPIO operation, looks good.
Verified that the PWRDN signal is high, not power down mode.
Scoped the RGMII signals they all look good, with one exception the RGMII_TX_CLK
Ran some loopback tests.
I use 10 Mbps/FD/AN-disabled for all loopback tests, plus Auto-MDI-X is disabled
Using register 0x16, I can get the PCS loopback, and the Analog loopback to work.
Using register 0x16, I cannot get the Digital loopback to work? Link does not come up?
Using just 0x00 (BMCR) I cannot get MII Loopback to work? Link does not come up? Am I doing MII loopback correctly?

Here is the sequence of MDIO operations I use to setup a test.

0x1F <= 0x8000
0x00 <= 0x0100
0x04 <= 0x0061
0x16 <= 0x000X ## type of loopback

Anyways we have tried to get the new HW and the old HW to link up over a short distance (centimeters),
and we get intermitent link bouncing events, where the link stays up for less than a second, then goes
down for many seconds.

We think that they TX clock is the problem, as when we scoped it, it was not a square wave, picture attached.

We then tried several pin pad setttings, at the IMX93, to see if we had a bad pad configuration value
for the TX clock pin. No luck. We are using a value 0x51E for the RGMII pins, which a lot of
RGMII device trees in the IMX8/IMX9 family use successfully.

We then cut the etc on our board, and then saw that the IMX93 side had a perfect 2.5 Mhz square wave.
Re-connecT the etch, bad clock.

So, we are thinking that somehow the 83822 is also driving the TX clock pin?
Can this be? Usually an input pin to the 83822? Correct?

One thing that we are not doing, is strapping the DP83822.
I see that most designs make use of the HW strapping, but for some reason, our HW designer
chosen not to?

[ 5951.608247] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
[ 5952.630991] imx-dwmac 428a0000.ethernet eth0: Link is Down
[ 5969.016239] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
[ 5970.038965] imx-dwmac 428a0000.ethernet eth0: Link is Down
[ 6044.792263] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
[ 6045.815034] imx-dwmac 428a0000.ethernet eth0: Link is Down


root@draeger-osm-sf-imx93:~# ./phytool dump eth0/1/1
MII [00]: 0x0100
MII [01]: 0x7849
MII [02]: 0x2000
MII [03]: 0xA240
MII [04]: 0x0C61
MII [05]: 0x0000
MII [06]: 0x0004
MII [07]: 0x2001
MII [08]: 0x0000
MII [09]: 0x0000
MII [0A]: 0x0100
MII [0B]: 0x1000
MII [0C]: 0x0000
MII [0D]: 0x4007
MII [0E]: 0x0000
MII [0F]: 0x0000
MII [10]: 0x0006
MII [11]: 0x0108
MII [12]: 0x2000
MII [13]: 0x0800
MII [14]: 0x0000
MII [15]: 0x0000
MII [16]: 0x0100
MII [17]: 0x0049
MII [18]: 0x0400
MII [19]: 0xA021
MII [1A]: 0x0000
MII [1B]: 0x007D
MII [1C]: 0x05EE
MII [1D]: 0x0000
MII [1E]: 0x0002
MII [1F]: 0x0000

Summary:
Link bouncing at 10 Mpbs, FD, !AN
Some loopbacks work, some do not?
Strange RGMII TX clock

Any advice would be appreciated!

Thanks
Ken Carlson

  • Ken

    I would fix the DP83822 strapping first. For example, without HW strapping on RX_ER and RX_DV, the DP83822 default operating mode is MII, not RGMII. And in MII, the TX_CLK is an output, which matches with your observation. 

    You can also enable RGMII from register 0x0017 and to change clock source, please refer to Table 80, 0x0462 IO MUX GPIO Control Register #1 (IOCTRL1).

    Thanks

    David

  • Thank you!

    We will try the strapping, and let you know how it went.

    Ken

  • I cannot find Table 80 ?

    I am looking at the Data sheet - Revision G (August 2023)

    Thanks

    Ken

  • Ken

    I apologize for the typo, the correct table is Table 8-94. Please note the register 0x462 is an extended register and require the usage of access method as shown below.

    Thanks

    David

  • Got it, thanks again!

  • Hello,

    I enabled RGMII in MDIO 0x17 <= 0x60
    I then selected the clock source in 0x462 <= 0x23
    Still no luck, the link is still bouncing up and down.

    I took a stab at a configuration value for 0x462?
    Not sure if its correct, I chose X1 where we are
    suppling an external 25Mhz clock.

    Thanks
    Ken


    root@draeger-osm-sf-imx93:~# cat phytest
    #!/bin/bash

    ./phytool write eth0/1/0x1F 0x8000

    ./phytool write eth0/1/4 0x0841
    ./phytool write eth0/1/0 0x0100
    ./phytool write eth0/1/0xA 0x0001
    ./phytool write eth0/1/0x17 0x0600
    ./phytool write eth0/1/0x19 0x0000
    ./phytool write eth0/1/0x462 0x0023

    #./phytool write eth0/1/0x1F 0x4000

    ##./phytool write eth0/1/0x456 0xA
    ##./phytool write eth0/1/0x4A0 0x1080

    Reg dumps

    MII [00]: 0x0100
    MII [01]: 0x7849
    MII [02]: 0x2000
    MII [03]: 0xA240
    MII [04]: 0x0841
    MII [05]: 0x0000
    MII [06]: 0x0004
    MII [07]: 0x2001
    MII [08]: 0x0000
    MII [09]: 0x0000
    MII [0A]: 0x0001
    MII [0B]: 0x1000
    MII [0C]: 0x0000
    MII [0D]: 0x4007
    MII [0E]: 0x0000
    MII [0F]: 0x0000
    MII [10]: 0x0006
    MII [11]: 0x0108
    MII [12]: 0x2000
    MII [13]: 0x0000
    MII [14]: 0x0000
    MII [15]: 0x0000
    MII [16]: 0x0100
    MII [17]: 0x0600
    MII [18]: 0x0400
    MII [19]: 0x0001
    MII [1A]: 0x0000
    MII [1B]: 0x007D
    MII [1C]: 0x05EE
    MII [1D]: 0x0000
    MII [1E]: 0x0002
    MII [1F]: 0x0000

    MII_EXT [0025]: 0x0000
    MII_EXT [0027]: 0x0000
    MII_EXT [003E]: 0x0000
    MII_EXT [003F]: 0xB4FF
    MII_EXT [0040]: 0xC11D
    MII_EXT [0042]: 0x0000
    MII_EXT [0101]: 0x2002
    MII_EXT [0106]: 0xB0BB
    MII_EXT [0107]: 0x0605
    MII_EXT [010F]: 0x0300
    MII_EXT [0111]: 0x6003
    MII_EXT [0114]: 0x400A
    MII_EXT [0116]: 0x014A
    MII_EXT [0121]: 0x199A
    MII_EXT [0122]: 0x1027
    MII_EXT [0123]: 0x051C
    MII_EXT [0126]: 0x461B
    MII_EXT [0129]: 0x000F
    MII_EXT [0130]: 0x4750
    MII_EXT [0155]: 0x0001
    MII_EXT [0170]: 0x0E52
    MII_EXT [0171]: 0xC85C
    MII_EXT [0173]: 0xFF1E
    MII_EXT [0177]: 0x189B
    MII_EXT [0180]: 0x0000
    MII_EXT [0181]: 0x0000
    MII_EXT [0182]: 0x0000
    MII_EXT [0183]: 0x0000
    MII_EXT [0184]: 0x0000
    MII_EXT [0185]: 0x0000
    MII_EXT [0186]: 0x0000
    MII_EXT [0187]: 0x0000
    MII_EXT [0188]: 0x0000
    MII_EXT [0189]: 0x0000
    MII_EXT [018A]: 0x0000
    MII_EXT [0215]: 0x01AF
    MII_EXT [021D]: 0x0600
    MII_EXT [0403]: 0x9FCF
    MII_EXT [0404]: 0x0020
    MII_EXT [040D]: 0x0008
    MII_EXT [0410]: 0x2000
    MII_EXT [0416]: 0x0870
    MII_EXT [0418]: 0x0000
    MII_EXT [041F]: 0x0000
    MII_EXT [0421]: 0x0004
    MII_EXT [0428]: 0x0000
    MII_EXT [0450]: 0x0F41
    MII_EXT [0456]: 0x0008
    MII_EXT [0460]: 0x0551
    MII_EXT [0461]: 0x0410
    MII_EXT [0462]: 0x0023
    MII_EXT [0463]: 0x0000
    MII_EXT [0465]: 0xFF00
    MII_EXT [0467]: 0x0FC3
    MII_EXT [0468]: 0x0000
    MII_EXT [0469]: 0x0440
    MII_EXT [04A0]: 0x1000
    MII_EXT [04A1]: 0x0000
    MII_EXT [04A2]: 0x0000
    MII_EXT [04A3]: 0x0000
    MII_EXT [04A4]: 0x0000
    MII_EXT [04A5]: 0x0000
    MII_EXT [04A6]: 0x0000
    MII_EXT [04A7]: 0x0000
    MII_EXT [04A8]: 0x0000
    MII_EXT [04A9]: 0x0000
    MII_EXT [04AA]: 0x0000
    MII_EXT [04AB]: 0x0000
    MII_EXT [04AC]: 0x0000
    MII_EXT [04AD]: 0x0000
    MII_EXT [04AE]: 0x0000
    MII_EXT [04AF]: 0x0000
    MII_EXT [04B0]: 0x0000
    MII_EXT [04B1]: 0x0000
    MII_EXT [04B2]: 0x0000
    MII_EXT [04B3]: 0x0000
    MII_EXT [04B4]: 0x0000
    MII_EXT [04B5]: 0x0000
    MII_EXT [04B6]: 0x0000
    MII_EXT [04B7]: 0x0000
    MII_EXT [04B8]: 0x0000
    MII_EXT [04B9]: 0x0000
    MII_EXT [04BA]: 0x0000
    MII_EXT [04BB]: 0x0000
    MII_EXT [04BC]: 0x0000
    MII_EXT [04BD]: 0x0000
    MII_EXT [04BE]: 0x0000
    MII_EXT [04BF]: 0x0000
    MII_EXT [04C0]: 0x0000
    MII_EXT [04C1]: 0x0000
    MII_EXT [04C2]: 0x0000
    MII_EXT [04C3]: 0x0000
    MII_EXT [04C4]: 0x0000
    MII_EXT [04C5]: 0x0000
    MII_EXT [04C6]: 0x0000
    MII_EXT [04C7]: 0x0000
    MII_EXT [04C8]: 0x0000
    MII_EXT [04C9]: 0x0000
    MII_EXT [04CA]: 0x0000
    MII_EXT [04CB]: 0x0000
    MII_EXT [04D0]: 0x0302
    MII_EXT [04D1]: 0x018B
    MII_EXT [3000]: 0x0400
    MII_EXT [3001]: 0x0040
    MII_EXT [3014]: 0x0002
    MII_EXT [3016]: 0x0000


    root@draeger-osm-sf-imx93:~# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes: 10baseT/Half 10baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Full
    Auto-negotiation: off
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: external
    MDI-X: on (forced)
    Supports Wake-on: ug
    Wake-on: d
    Current message level: 0x0000003f (63)
    drv probe link timer ifdown ifup
    Link detected: no
    root@draeger-osm-sf-imx93:~#
    root@draeger-osm-sf-imx93:~# ethtool eth0./phytool extended eth0/1/1ethtool eth0 -S eth0 | grep rx_frame
    mmc_rx_framecount_gb: 26
    mac_rx_frame_ctrl_fifo: 0
    root@draeger-osm-sf-imx93:~#
    root@draeger-osm-sf-imx93:~# [ 1529.880482] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    [ 1530.902992] imx-dwmac 428a0000.ethernet eth0: Link is Down
    [ 1531.928518] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    [ 1532.950964] imx-dwmac 428a0000.ethernet eth0: Link is Down
    [ 1533.976533] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    [ 1534.998992] imx-dwmac 428a0000.ethernet eth0: Link is Down

  • Ken

    If you write 0x0100 to register 0x00000, this will force auto-negotiation to be disabled, and in 10M Full Duplex mode, are you able to get link up?

    Can I also take a look at the connection from DP83822 to the RJ45 connector?

    Thanks

    David

  • Hi David,

    I comes up, and then goes back down (bouncing).

    root@draeger-osm-sf-imx93:~# ./phytool write eth0/1/0 0x0100
    root@draeger-osm-sf-imx93:~#
    root@draeger-osm-sf-imx93:~#
    root@draeger-osm-sf-imx93:~# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes: 10baseT/Half 10baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Full
    Auto-negotiation: off
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: external
    MDI-X: on (forced)
    Supports Wake-on: ug
    Wake-on: d
    Current message level: 0x0000003f (63)
    drv probe link timer ifdown ifup
    Link detected: no
    root@draeger-osm-sf-imx93:~# [56707.096141] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    [56708.118745] imx-dwmac 428a0000.ethernet eth0: Link is Down
    [56709.148277] imx-dwmac 428a0000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    [56710.166750] imx-dwmac 428a0000.ethernet eth0: Link is Down

  • Ken

    Can you share the MDI portion of the schematic?

    Thanks

    David

  • The above schematics show the MDIO connections, they are direct connects between J39 and J28.

    Things that I will try:

    ANAR Next Page (currently zero)

    MDI-X detection without AutoNeg? (Is this possible)

    0x462 try a different clock source

    Ken

  • Ken

    The connection between J28 and J39 is the MAC interface, I am looking for the MDI connection (TD_P/M and RD_P/M). 

    MDI-X is disabled if auto-negotiation is disabled and you can force MDIX using register 0x19 bit 14.

    Thanks

    David

  • This is an optical circuit interfacing to photodiodes for short distance optical communication.

    Ken

  • Ken

    Any chance you can share the schematic in .pdf format? The resolution from the screen-shot is too low that I can't make out the component detail.

    It looks like the AC coupling capacitor is provided on the optical receive, but I don't see AC coupling capacitor on the optical transmit side. Are the capacitor on the receiver side?

    Thanks

    David

  • I realize the above link probably won't work, How can I attach a PDF file?

  • Ken

    You can go "insert" -> "image/video/file", and then upload .pdf file when you respond back.

    Thanks

    David

  • Ken

    Looking at the MDI portion of the schematic, I noticed couple things.

    1. The MAX9203E input common mode voltage in this case is -0.1V to 2.75V. But the external termination network is 3.3V, outside the input common mode voltage. You need to AC couple the MAX9203E and then restore the common mode voltage back, or change the DP83822 AVD and the termination network voltage from 3.3V to 1.8V.

    2. On the DP83822 RX side, you would also need 50ohm termination network to AVD which I don't see from your schematic.

    Once you have done this, I would probe both the TX and RX and compare the waveform between the two. The 10M Ethernet uses Manchester Encoding, so I wonder how the signal would look after going through all these components.

    Any chance you can share the datasheet of this old Ethernet device? 

    Thanks

    David

  • Thank you, we will take a look

    Ken