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.

DP83869HM: MII loopback setup

Part Number: DP83869HM
Other Parts Discussed in Thread: DP83869

Dear all!

I would like to know how to correctly make a MII loopback test. My setup is a sgmii->copper  the phy is connected to a NXP ls1046a processor SGMII serdes lane. From the datasheet I see that I have to configure the BMCR(0x00) reg to autoneg disable and mii loopback on and than make a software reset with the GEN_CTRL(0x1f) reg by writing 0x4000 to it. As far as I know I should ping from the interface that is connected to the phy (called fm1-mac5 in my setup) a broadcast address (10.97.0.255).

My interface config:

Ping command and the results:

The ping is not successful and the rx counter doesnt increase as well.

Am I misunderstanding loopback testing? Or is the DP83869 loopback configuration bad?

Thanks,

Kristóf

  • Sorry my console log:

    ifconfig 
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:d3:69:82:24  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    fm1-mac5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 10.97.24.165  netmask 255.0.0.0  broadcast 10.255.255.255
            ether 00:04:9f:04:fd:00  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 18  bytes 1188 (1.1 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device memory 0x1ae8000-1ae8fff  
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 5392  bytes 387008 (387.0 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 5392  bytes 387008 (387.0 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    mac5@localhost:/sys/bus/mdio_bus/devices/1afd000:00# ping -b 10.97.0.255 -I fm1-m
    PING 10.97.0.255 (10.97.0.255) from 10.97.24.165 fm1-mac5: 56(84) bytes of data.
    ^C
    --- 10.97.0.255 ping statistics ---
    2 packets transmitted, 0 received, 100% packet loss, time 1023ms
    
    root@localhost:/sys/bus/mdio_bus/devices/1afd000:00# cd /
    root@localhost:/# ping -b 10.97.0.255 -I fm1-mac5
    PING 10.97.0.255 (10.97.0.255) from 10.97.24.165 fm1-mac5: 56(84) bytes of data.
    ^C
    --- 10.97.0.255 ping statistics ---
    10 packets transmitted, 0 received, 100% packet loss, time 9200ms
    pipe 3
    root@localhost:/# ifconfig 
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:d3:69:82:24  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    fm1-mac5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 10.97.24.165  netmask 255.0.0.0  broadcast 10.255.255.255
            ether 00:04:9f:04:fd:00  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 18  bytes 1188 (1.1 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device memory 0x1ae8000-1ae8fff  
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 5564  bytes 399712 (399.7 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 5564  bytes 399712 (399.7 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    

  • Hi,


    To answer you specific question, the few exception for loopback are mentioned in datasheet, other than that are working.

    I could not see the images you attached in the request. I would go in following sequence to isolate the problem;

    a. confirmed that PHY is configured in SGMII to Cu mode. This can be done using the OpMode register available in PHY

    b. Confirm SGMII auto-negotiation is complete. Refer to SGMII status register set

    c. Confirm that PHY link-up with link-partner. 

    Regards,

    Geet

  • Thanks.

    The SGMII interface was the source of the problem. The phy sends the signals on the SGMII interface with ~1,25Vp-p and the receiver on the processor is able to recieve up-to 1200mV maximum. As I can see on the datasheet, the output differential voltage of the phy can be set via configuration bits(section 8.5), but I cant find the register which includes these config bits. Could you please tell me how to get the phy to set its sgmii trancieve voltage level around 800mV?

    Regards,

    Kristóf

  • Hi,

    Please use below to adjust the SGMII Voltage swing.

    Regards,
    Geet

  • What should I use?

    Regards,

    Kristóf

  • Hi,

    I have checked those registers. SGMII autoneg completed and phy link is up accordig to SGMII_STAT and BMSR registers, but I still cant ping anything. Do you have any idea what should I check still?

    Regards,

    Kristóf

  • Hello Kristof,

    Is this issue still open?

    --

    Regards,

    Vikram

  • Hello Kristof,

    I am closing this issue for now as I hope that it has got resolved at your end. Kindly open it up again if you need any further inputs from our side.

    --

    Regards,

    Vikram