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.

DP83825I: DP83825I in omap-L138

Part Number: DP83825I

Tool/software:

Hi, I configured my device tree to look like this, and I'm using the dp83825I phy chip, but I'm getting this error 
net eth0: could not connect to phy /soc@1c00000/mdio@224000/ethernet-phy@0

&mdio {		
    pinctrl-names = "default";		
    pinctrl-0 = <&mdio_pins>;		
    bus_freq = <2200000>;		
    status = "okay";
    phy: ethernet-phy@0 {
        compatible = "ti,dp83822";
		reg = <0x0>; /* PHY address */
		interrupt-parent = <&gpio>;
		interrupts  = <127 IRQ_TYPE_LEVEL_LOW>;
	};	
};

&eth0  {		
    pinctrl-names = "default";		
    pinctrl-0 = <&rmii_pins>;
	ti,davinci-rmii-en = /bits/ 8 <1>;
	phy-mode = "rmii";
	phy-handle = <&phy>;
    status = "okay";
};	

&pmx_core {
    status = "okay";
    rmii_pins: pinmux_rmii_pins {		
        pinctrl-single,bits = <		
        /*		
        * RMII_RXER, RMII_RXD_0, RMII_RXD_1		
        * RMII_TXEN, RMII_TXD_0, RMII_TXD_1		
        */		
        0x38 0x88888800 0xffffff00		
        /*		
        * RMII_CRS, RMII_50MHZ_CLK		
        */		
        0x3c 0x00000080 0x000000ff		
        >;		
    };

    mdio_pins: pinmux_mdio_pins {		
        pinctrl-single,bits = <		
        /* MDIO_CLK, MDIO_D */		
        0x10 0x00000088 0x000000ff		
        >;
    };
};

# ifconfig
lo Link encap:Local Loopback
inet addr:124.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5520 (5.3 KiB) TX bytes:5520 (5.3 KiB)

# dmesg | grep eth0
# [ 26.996342] random: crng init done
dmseg | grep mdio
-/bin/sh: dmseg: not found
# dmesg | grep mdio
<6>[ 1.496225] davinci_mdio davinci_mdio.0: davinci mdio revision 1.5, bus freq 2200000
<6>[ 1.504035] libphy: davinci_mdio.0: probed
# dmesg | grep phy
<6>[ 0.000000] Booting Linux on physical CPU 0x0
<6>[ 1.430878] libphy: Fixed MDIO Bus: probed
<6>[ 1.504035] libphy: davinci_mdio.0: probed
# dmesg

  • After modifying the compatible flag from compatible = "ti,dp83822"; to compatible = "ethernet-phy-id2000.a150";

    I'm able to see the phy was u,p but not sure why it gets initialized twice. 

    However, when i try to perform the ping test, it fails.


    #
    # ifconfig eth0 up
    [ 167.054827] Weihan Phy Reset
    [ 167.058163] Weihan : Weihan wait_for_user_access
    [ 167.064952] davinci_mdio davinci_mdio.0: resetting idled controller
    [ 167.073388] Weihan dp83825_config_init
    [ 167.078375] Weihan dp8382x_config_rmii_mode
    [ 167.086841] Weihan dp83825_config_init
    [ 167.091166] Weihan dp8382x_config_rmii_mode
    [ 167.097348] Weihan: dp83822_resume
    # ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 52:1B:96:17:CC:AF
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:33

    # ifconfig eth0 192.168.3.4
    # if ^Hco^H^H
    >
    > if
    > ifconfig
    > eth0
    > ^C
    # ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 52:1B:96:17:CC:AF
    inet addr:192.168.3.4 Bcast:192.168.3.255 Mask:255.255.255.0
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:33

    # dmesg | grep mdio
    <6>[ 1.496753] davinci_mdio davinci_mdio.0: davinci mdio revision 1.5, bus freq 2200000
    <6>[ 1.504561] libphy: davinci_mdio.0: probed
    <6>[ 1.758139] davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio.0:00, driver TI DP83825I
    <4>[ 167.064952] davinci_mdio davinci_mdio.0: resetting idled controller
    # ^C
    # [ 413.608324] davinci_emac davinci_emac.1 eth0: Link is Up - 10Mbps/Full - flow control off
    [ 416.728011] davinci_emac davinci_emac.1 eth0: Link is Up - 100Mbps/Full - flow control rx/tx

    # ping^H^H^H
    -/bin/sh: p: not found
    # ping 192.168.3.244
    PING 192.168.3.244 (192.168.3.24[ 476.840260] Weihan : emac_tx_handler
    4): 56 data bytes
    [ 477.846936] Weihan : emac_tx_handler
    [ 478.886893] Weihan : emac_tx_handler

  • Hello,

    It is unclear why this occuring from the initial data provided. Could you please provide a register dump using PHYTOOL for Reg 0x0 - 0x1F? Also, could you please provide an ETHTOOL log for ETH0 after a failed ping? This will be able to provide more insight.

    What is the link partner and cable (type and length) being used here?

    Sincerely,

    Gerome

  • Hi. Thanks for your reply.

    Here is attached the phy read register value. I'm using RJ45 cable with less than 1 meter.

    # phytool read eth0/0/0
    0x3100
    # phytool read eth0/0/1
    0x786d
    # phytool read eth0/0/2
    0x2000
    # phytool read eth0/0/3
    0xa140
    # ^C
    # phytool read eth0/0/4
    0x01e1
    # phytool read eth0/0/5
    0xcde1
    # phytool read eth0/0/6
    0x000f
    # phytool read eth0/0/7
    0x2001
    # phytool read eth0/0/8
    0000
    # phytool read eth0/0/9
    0000
    # phytool read eth0/0/a
    0x3100
    # phytool read eth0/0/b
    0x3100
    # phytool read eth0/0/c
    0x3100
    # phytool read eth0/0/d
    0x3100
    # phytool read eth0/0/e
    0x3100
    # phytool read eth0/0/f
    0x3100
    # phytool read eth0/0/0x10
    0x4215
    # phytool read eth0/0/0x11
    0x0108
    # phytool read eth0/0/0x12
    0x6400
    # phytool read eth0/0/0x13
    0x2800
    # phytool read eth0/0/0x14
    0000
    # phytool read eth0/0/0x15
    0000
    # phytool read eth0/0/0x16
    0x0100
    # phytool read eth0/0/0x17
    0x0065
    # phytool read eth0/0/0x18
    0x0480
    # phytool read eth0/0/0x19
    0x8c00
    # phytool read eth0/0/0x1a
    0000
    # phytool read eth0/0/0x1b
    0x007d
    # phytool read eth0/0/0x1c
    0x05ee
    # phytool read eth0/0/0x1d
    0000
    # phytool read eth0/0/0x1e
    0x0102
    # phytool read eth0/0/0x1f
    0000


    # phytool read eth0/0/0x467
    0xffea
    # phytool read eth0/0/0x468
    0xffea

    # ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 92:D9:C7:B6:59:EC
    inet addr:150.168.3.20 Bcast:150.168.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:33

    # ping 150.168.3.30
    PING 150.168.3.30 (150.168.3.30)[ 968.946214] Weihan : emac_tx_handler
    : 56 data bytes
    [ 970.007016] Weihan : emac_tx_handler
    [ 971.046916] Weihan : emac_tx_handler
    [ 972.954130] Weihan : emac_tx_handler
    ^C
    --- 150.168.3.30 ping statistics ---
    5 packets transmitted, 0 packets received, 100% packet loss
    # [ 974.007351] Weihan : emac_tx_handler
    [ 975.046943] Weihan : emac_tx_handler
    ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 92:D9:C7:B6:59:EC
    inet addr:150.168.3.20 Bcast:150.168.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:360 (360.0 B)
    Interrupt:33

    And 1 more question ya, regarding the ethtool and ip, how can i enable it in my kernel linux ya?

  • Hello,

    From PHY level standpoint, the device looks properly linked up and is in RMII master mode. The ping may be failing due to the local MAC interface on-board, or on the MAC interface of the link partner. What is the link partner in this scenario?

    Regarding utilities question, please refer to our SW troubleshooting guides.

    Sincerely,

    Gerome

  • Hi, 

    Im trying to ping my personal laptop ehich connect with a LAN cable vis the rj45 port.

    i see the register 17 value is 0x65 which contain underflow error. Do you have any clue on this?

  • Hello,

    Underflow is typically associated with issues where clock health is suspect. As the MAC and DUT PHY are running off of the same clock (DUT in RMII Master), perhaps this gives information on the link partner's clock health. However, I do not see Reg 0x15 incrementing which would be a tell-tale sign of this functionally affecting the application. 

    I see that from the latest ping log that TX packets are corrupted. Could you please check the setup and hold time of these MAC lines against the reference clock?

    Sincerely,

    Gerome

  • Hi 

    Thanks for your reply. The Clock output looks correct as the PHY chip is configured as master with 25MHz and outputs 50MHz to freon.

    Besides this, can you share with me the config that needs to be enabled for this phy chip (dp83825I), RMII, and emac to work properly? I want to confirm that none of the configurations are being missed.

    Regards,

    Wei Han

  • Hello,

    From SW side, the registers indicate that the PHY is properly configured. With the MAC configurations, you will need to take this up with the MAC vendor (this forum is for Ethernet PHYs). Could you please provide scopeshot of TX and RX setup and hold time analysis?

    Sincerely,
    Gerome

  • Hi Gerome, 

    We do try to measure the RMII setup and hold time for TX.

    Tx RMII setup time is 8.4ns while the RxRMII hold time is 10.4ns

    Tx Hold Time

    Tx RMII setup time

    Best Regards,

    Wei Han

  • Hello,

    Thank you for the TX measurements. This indicates that the requirements for MAC to PHY should be okay. What about the RX measurement?

    Sincerely,

    Gerome

  • Hi Gerome,

    thanks for your reply. Regarding the receive (RX) functionality, we have not detected any incoming signals so far. Could you please provide insights into possible causes for this behavior?

    Regards,

    Wei Han

  • Hi Wei,

    You are referring that RX_D0 and _D1 are not toggling?

    Sincerely,

    Gerome

  • Hi Gerome,

    Thanks for your reply. We are not detecting any signals on the RX_D0, RX_D1, or CRS_DV lines, despite no error packets being reported by the system.

    Regards,

    Wei Han

  • Hello,

    Traffic needs to be generated going into the PHY's MDI in order for RX lines to toggle. Else, if left idle, these will not toggle. Could you please provide MDI data on MDI and check again? Ping may only generate a handful of traffic at a time, so it may be better to utilize IPERF if that is available.

    Sincerely,

    Gerome