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.

DP83822HF: Interfacing DP83822HF with Zynq7000

Part Number: DP83822HF

Hello,

I am new to ethernet and PHY. So please excuse wrong questions.

I am trying to interface the above part with Zynq 7000. PFA schematic for further reference. I am trying to configure the ethernet in RGMII mode but the ethernet does not come up. I verified the registers from u-boot and they look ok.

Zynq> mdio list
eth0:
1f - Generic PHY <--> ethernet@e000b000
Zynq> mii device
MII devices: 'eth0'
Current device: 'eth0'
Zynq> mii dump 1F 0
0. (3100) -- PHY control register --
(8000:0000) 0.15 = 0 reset
(4000:0000) 0.14 = 0 loopback
(2040:2000) 0. 6,13 = b01 speed selection = 100 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)


Zynq> mii dump 1F 1
1. (7849) -- 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:0000) 1. 8 = 0 extended status
(0080:0000) 1. 7 = 0 (reserved)
(0040:0040) 1. 6 = 1 MF preamble suppression
(0020:0000) 1. 5 = 0 A/N complete
(0010:0000) 1. 4 = 0 remote fault
(0008:0008) 1. 3 = 1 A/N able
(0004:0000) 1. 2 = 0 link status
(0002:0000) 1. 1 = 0 jabber detect
(0001:0001) 1. 0 = 1 extended capabilities


Zynq> mii dump 1F 2
2. (2000) -- PHY ID 1 register --
(ffff:2000) 2.15- 0 = 8192 OUI portion


Zynq> mii dump 1F 3
3. (a240) -- PHY ID 2 register --
(fc00:a000) 3.15-10 = 40 OUI portion
(03f0:0240) 3. 9- 4 = 36 manufacturer part number
(000f:0000) 3. 3- 0 = 0 manufacturer rev. number


Zynq>

When the petalinux boots up I see the TI drivers being loaded in the boot up log.

TI DP83822 e000b000.ethernet-ffffffff:1f: attached PHY driver [TI DP83822] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:1f, irq=POLL)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 27 (xx:yy:zz:00:00:00)

I verified the device tree also looks ok.

I have 2 questions:

1. What will be the connections from the magnetic chip to the ethernet cable?

I ask this because if I connect 1-1 (RX+ - RX+and so on ) I do not see any output. But when I swap just the RX+ and TX+ wires I see in the zynq terminal the ethernet is up and some basic TX transactions. Also the D900 LED on the board glows yellow.

2. The voltage on the RX_ER pin is always 0. I read in this post, pin 28 should be in Mode 2 or 3. The output of the voltage divider is set for MODE 3 but this pin is somehow driving it low. I thought RX_ER pin connected to FPGA was driving it low which I disconnected. I see the output voltage on voltage divider circuit to be ~0.419 V which is within the range for MODE 3. But the DP83822HF is driving it low.

Please guide me.

Thank you in advance.

Shashank

  • Hi Shashank,

    1. Could you double check with the vender on the M12 connection on the MDI side? I cannot really see it really clearly from the schematics you shared with me.
    2. Regarding for the second question. the voltage will only change when you power up the PHY or hard rest the PHY to read in the latch in voltage. This occur in millisecond and that is when you should read the voltage value from the voltage divider. In the normal condition, the voltage is driven by the driver inside the PHY which is independence on the strap resistors.

    --

    Regards,

    Hillman Lin

  • Hi Hillman,

    Thank you for your reply!

    1. Actually I forgot to mention I am not using the connector. I have directly soldered wires on the U900 magnetics IC. (Pin 16 (TX+), 14 (TX-), 11 (RX+), 9 (RX-). Also 1.8V_ETH_AVD is pulled to 3.3V. )

    2. Got you.

    But the behavior is very strange when I physically short RX+ and TX+ and RX- and TX- (by jumper connected on magnetics U900) I see in the terminal eth0 link up message.

    macb e000b000.ethernet eth0: link up (100/Full)

    I also see the same message, as I mentioned before, when I just swap the RX+ and TX+ on the magnetics side.

    I am using this netgear switch (https://www.downloads.netgear.com/files/GDC/GS108EV3/GS108Ev3_IG_EN.pdf) to connect to ethernet.

    So when I see the eth0 up msg none of the LEDs on this switch are blinking. But in few minutes the link goes down (I see the message in the console) and I see the left LED on this netgear switch to start blinking. According to the Netgear switch pdf, left port led blinking green and right port led off means it is transmitting and receiving at 100 Mbps speed. 

  • Hi Shashank,

    From the issue you describe earlier, seems like you did not enable the MDIX mode. I double check with your strapping on RX_ER you need a 6.2k ohms pull up resistor and 1.96 ohms pull down resistor. Did you have them in your strapping session in your schematics? I did not see your strapping session in your PHY. 

    If you did not have it in the schematics, Could you check the register 0019 bit 15 rather you have enable the auto MDIX? 

    --

    Regards,

    Hillman Lin

  • Hi Hillman,

    I have the RX_ER connected as required. It is on the bottom left corner of the schematic. I will zoom in for you. ETH_COL is not connected and ETH_CRS has 0V on it.

  • Hi Shashank,

    Could you check the register 0019? I would like to see does the PHY latch in the strap propertly.

    --

    Thank you,

    Hillman Lin

  • Hi Hillman,

    Can you tell me how to read that? Sorry I am new to this and tried finding it online

  • I tried to understand it. It is basically mii read <phy address> <reg address>. If 0019 is the register address, I am not sure what the physical address is.

    Thanks,

    Shashank

  • Ok I was able to figure it out... My bad! I should have known it. But here is the output:

    mii read 1f 0x0019

    843F

  • Hi Shashank,

    From the strapping and register, I am able to see you have the MDIX enable so this might not be the issue.

    I was still no clear on how you physically short RX+ and TX+ and RX- and TX-? Could you draw it our for me to have a better understand on how you get link up for further debug?

    --

    Thank you,

    Hillman Lin

  • Physically shorting as in connect a wire/jumper between RX+ and TX+ & RX- and TX-. This shorting I am doing on the output of magnetics.

    Thanks,

    Shashank

  • U-Boot 2020.01 (May 20 2022 - 17:14:13 +0000)

    CPU: Zynq 7z020
    Silicon: v3.1
    DRAM: ECC disabled 1 GiB
    MMC: mmc@e0100000: 0
    Loading Environment from SPI Flash... unrecognized JEDEC id bytes: 00, 00, 00
    *** Warning - spi_flash_probe_bus_cs() failed, using default environment

    In: serial@e0001000
    Out: serial@e0001000
    Err: serial@e0001000
    Net:
    ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 31, interface rgmii-id

    Warning: ethernet@e000b000 using MAC address from DT
    eth0: ethernet@e000b000
    Hit any key to stop autoboot: 0
    Zynq>
    Zynq> mii info
    PHY 0x1F: OUI = 0x80028, Model = 0x24, Rev = 0x00, 10baseT, HDX
    Zynq> mii device
    MII devices: 'eth0'
    Current device: 'eth0'
    Zynq> mii read 1f 0x0000
    3100
    Zynq> mii read 1f 0x0001
    7849
    Zynq> mii read 1f 0x0002
    2000
    Zynq> mii read 1f 0x0003
    A240
    Zynq> mii read 1f 0x0004
    01E1
    Zynq> mii read 1f 0x0005
    0000
    Zynq> mii read 1f 0x0006
    0004
    Zynq> mii read 1f 0x0007
    2001
    Zynq> mii read 1f 0x0008
    0000
    Zynq> mii read 1f 0x0009
    0000
    Zynq> mii read 1f 0x000A
    0100
    Zynq> mii read 1f 0x000B
    1000
    Zynq> mii read 1f 0x000D
    0000
    Zynq> mii read 1f 0x000E
    0000
    Zynq> mii read 1f 0x000F
    0000
    Zynq> mii read 1f 0x0010
    4002
    Zynq> mii read 1f 0x0011
    0108
    Zynq> mii read 1f 0x0012
    0000
    Zynq> mii read 1f 0x0013
    0800
    Zynq> mii read 1f 0x0014
    0000
    Zynq> mii read 1f 0x0015
    0000
    Zynq> mii read 1f 0x0016
    0100
    Zynq> mii read 1f 0x0017
    02C1
    Zynq> mii read 1f 0x0018
    0400
    Zynq> mii read 1f 0x0019
    803F
    Zynq> mii dump 1f 0
    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 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)


    Zynq> mii dump 1f 1
    1. (7849) -- 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:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities


    Zynq> mii dump 1f 2
    2. (2000) -- PHY ID 1 register --
    (ffff:2000) 2.15- 0 = 8192 OUI portion


    Zynq> mii dump 1f 3
    3. (a240) -- PHY ID 2 register --
    (fc00:a000) 3.15-10 = 40 OUI portion
    (03f0:0240) 3. 9- 4 = 36 manufacturer part number
    (000f:0000) 3. 3- 0 = 0 manufacturer rev. number


    Zynq>

  • Hi Shashank,

    Is this how you connect the wire for link up?

    --

    Regards,

    Hillman Lin

  • Yes that is correct! Also when I connect the ethernet cable in the following manner I see the link up message:

    Ethernet Cable                              Magentics

    RX+  (White Orange)       <->            TX+

    TX+   (White Green)        <->             RX+

    RX-    (Green)                  <->            RX-

    TX-     (Orange)                <->            TX-

    I am using Ethernet CAT5 TIA 568B cable. 

  • Hi Shashank,

    It seems that you are physically enable the loopback and the problems seems to be in the MDI side

    • Could you double check on the U900 connection? rather it has the inductors that TI recommended in section 9.2 in the datasheet?
    • How long is the cable length?
    • What is your link partner?
    • Could you try to run the TDR test in the following appnote to see your Cable quality: 

    --

    Thank you,

    Hillman Lin