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: Establish link in the Downstream Phy

Part Number: DP83869HM
Other Parts Discussed in Thread: DP83869

Tool/software:


&main_cpsw0 {
  status = "okay";
};

&main_cpsw0_mdio {
  status = "okay";
  pinctrl-names = "default";
  pinctrl-0 = <&main_cpsw9x1_mdio_pins_default>;
  pinctrl-1 = <&main_pmx_gpio_vddshv20_pins_default>; 

 

  /* DP83869 Bridge PHY - Connected to CPSW SGMII port */
  bridge_phy: ethernet-phy@3 {
    reg = <3>;// DP83869 address
  };

 

  /* ADIN1100 - Connected via RGMII to DP83869 bridge */
  adin1100: ethernet-phy@0 {
    reg = <0>;  // ADIN1100 behind DP83869
    phy-mode = "rgmii";
  };

 

};

&main_cpsw0_port5 {
  status = "okay";
  phy-mode = "sgmii";
  phy-handle = <&adin1100>;
  phys = <&cpsw0_phy_gmii_sel 5>, <&serdes2_sgmii_link>;
  phy-names = "mac", "serdes";

};


 

The above is the dts node which i am using for bringing up the adin1100 to link up status, but the output will be as below




But instead of ADIN1100 if i connect ADIN1300 the output is as below.





It shows the link is up but the ip address is not popping.

Can you explain me what is happening here?


  • Hi, 

    It is weird that the ifconfig shows the link is up when ethtool says link is down. It seems like the linux is misinterpreting. For ADIN1300, you are getting ipv6 ip address so it seems like the network is not using ipv4 address. 

    Best,
    J

  • How can I set the ip address to ipv4.

    Regards, 

    Kowshika

  • And another doubt i have regarding this is that why even though when i connect the ADIN1300 as the downstream phy and its link status is yes, but why it didn't propagate to the MAC side.

    Is there any issue with the DP83869 or with the MAC side. How can I debug this further?

  • The ifconfig will show the link as up once the interface is popping right.


    Is it related to the link status in ethtool?


    Regards,
    Kowshika

  • Hi Kowshika, 

    You can set a permanent ipv4 address for your device. 
    You can do 
    ip addr add <ip addr> dev <interface name> // adds ip address
    ip route add default via <base ip address> // adds default route so your packets can be transferred

    Note that this will only add ip address for the current boot. Once the board power cycles, you will have to do this again. 

    You can control the RGMII delay to see if that improves anything. This can be RGMII timing issue, 

    Which link status are you talking about in ethtool?
    Ifconfig shows the overall link status and ethtool should reflect that. 

    Best,
    J

  • ip route add default via <base ip address>




    Facing this error.

    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

    I am talking about the above line whenever the interface is popping up, it will be shouwing the UP status right. Or what does that mean?

    Which link status are you talking about in ethtool?
  • Hi Kowshika, 

    UP flag means that the interface is operation, not necessarily the link is up. 

    The route doesn't have to be added if Linux can resolve the routing itself. 

    Can you ping without the default route?

    Best,
    J

  • When I was trying to ping the below addresses, I got the below results can you confirm me whether you are asking about the same,

    root@j784s4-evm:/opt/edgeai-gst-apps# ifconfig
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.72.10 netmask 255.255.255.255 broadcast 0.0.0.0
    inet6 fe80::985f:60ff:fe76:eb31 prefixlen 64 scopeid 0x20<link>
    ether 9a:5f:60:76:eb:31 txqueuelen 1000 (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

    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 92 bytes 7654 (7.4 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 92 bytes 7654 (7.4 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    root@j784s4-evm:/opt/edgeai-gst-apps# ping 127.0.0.1
    PING 127.0.0.1 (127.0.0.1): 56 data bytes
    64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.108 ms
    64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.046 ms
    64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.029 ms
    [ 280.223820] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:268412 dql_avail:-90 free_desc:515
    64 bytes from 127.0.0.1: seq=3 ttl=64 time=0.039 ms
    64 bytes from 127.0.0.1: seq=4 ttl=64 time=0.029 ms
    64 bytes from 127.0.0.1: seq=5 ttl=64 time=0.027 ms
    ^C
    --- 127.0.0.1 ping statistics ---
    6 packets transmitted, 6 packets received, 0% packet loss
    round-trip min/avg/max = 0.027/0.046/0.108 ms

    root@j784s4-evm:/opt/edgeai-gst-apps# ping 192.168.72.10
    PING 192.168.72.10 (192.168.72.10): 56 data bytes
    64 bytes from 192.168.72.10: seq=0 ttl=64 time=0.097 ms
    64 bytes from 192.168.72.10: seq=1 ttl=64 time=0.039 ms
    64 bytes from 192.168.72.10: seq=2 ttl=64 time=0.030 ms
    64 bytes from 192.168.72.10: seq=3 ttl=64 time=0.026 ms
    [ 312.223821] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:300412 dql_avail:-90 free_desc:515
    64 bytes from 192.168.72.10: seq=4 ttl=64 time=0.039 ms
    64 bytes from 192.168.72.10: seq=5 ttl=64 time=0.027 ms
    ^C
    --- 192.168.72.10 ping statistics ---
    6 packets transmitted, 6 packets received, 0% packet loss
    round-trip min/avg/max = 0.026/0.043/0.097 ms

    root@j784s4-evm:/opt/edgeai-gst-apps# ip route
    root@j784s4-evm:/opt/edgeai-gst-apps#

    Regards,
    Kowshika

  • Hi Kowshika, 

    I see. 

    Could you try this DTS:

    &main_cpsw0_mdio {
      status = "okay";
      pinctrl-names = "default";
      pinctrl-0 = <&main_cpsw9x1_mdio_pins_default>;
      pinctrl-1 = <&main_pmx_gpio_vddshv20_pins_default>; 

     

      /* DP83869 Bridge PHY - Connected to CPSW SGMII port */
      bridge_phy: ethernet-phy@3 {
        reg = <3>;// DP83869 address
      };

     

      /* ADIN1100 - Connected via RGMII to DP83869 bridge */
      adin1100: ethernet-phy@0 {
        reg = <0>;  // ADIN1100 behind DP83869
        phy-mode = "rgmii";
      };

     

    };

    &main_cpsw0_port5 {
      status = "okay";
      phy-mode = "sgmii";
      phy-handle = <&dp83869>;
           managed = "in-band-status:;
      phys = <&cpsw0_phy_gmii_sel 5>, <&serdes2_sgmii_link>;
      phy-names = "mac", "serdes";

    Best,
    J

  • For the above dts, I got the below output:

    root@j784s4-evm:/opt/edgeai-gst-apps# dmesg | grep cpsw

    [ 1.347180] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000

    [ 1.360040] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4

    [ 1.367247] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64

    [ 1.377563] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1

    [ 1.463605] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000

    [ 1.887190] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000

    [ 1.900059] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4

    [ 1.907266] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64

    [ 1.917605] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1

    [ 1.927699] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48

    [ 2.011433] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000

    [ 2.025292] am65-cpsw-nuss c000000.ethernet: Use random MAC address

    [ 2.031556] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.5

    [ 2.038677] am65-cpsw-nuss c000000.ethernet: ALE Table size 512

    [ 2.044936] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010c, freq:250000000, add_val:3 pps:0

    [ 2.056288] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 82

    [ 7.073440] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:03] driver [TI DP83869] (irq=POLL)

    [ 7.082750] am65-cpsw-nuss c000000.ethernet eth1: configuring for inband/sgmii link mode

    root@j784s4-evm:/opt/edgeai-gst-apps# ifconfig

    eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    ether ba:89:36:c7:7b:c4 txqueuelen 1000 (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

    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 92 bytes 7654 (7.4 KiB)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 92 bytes 7654 (7.4 KiB)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    root@j784s4-evm:/opt/edgeai-gst-apps# ethtool eth1

    Settings for eth1:

    Supported ports: [ TP MII ]

    Supported link modes: 10baseT/Half 10baseT/Full

    100baseT/Half 100baseT/Full

    1000baseT/Full

    1000baseX/Full

    Supported pause frame use: Symmetric

    Supports auto-negotiation: Yes

    Supported FEC modes: Not reported

    Advertised link modes: 10baseT/Half 10baseT/Full

    100baseT/Half 100baseT/Full

    1000baseT/Full

    1000baseX/Full

    Advertised pause frame use: Symmetric

    Advertised auto-negotiation: Yes

    Advertised FEC modes: Not reported

    Speed: Unknown!

    Duplex: Unknown! (255)

    Auto-negotiation: on

    master-slave cfg: forced slave

    master-slave status: unknown

    Port: Twisted Pair

    PHYAD: 3

    Transceiver: external

    MDI-X: Unknown

    Supports Wake-on: ubgs

    Wake-on: d

    SecureOn password: 00:00:00:00:00:00

    Current message level: 0x000020f7 (8439)

    drv probe link ifdown ifup rx_err tx_err hw

    Link detected: no

    root@j784s4-evm:/opt/edgeai-gst-apps#


    root@j784s4-evm:/opt/edgeai-gst-apps# phytool read eth1/0x00/0x01

    0x796d

    Eventhough the Adin1300 link status is up, the ethtool shows the dp83869 as down.

    What is the reason behind this?

    Regards, 
    Kowshika

  • Hi Kowshika, 

    If you do

    ethtool -s eth0 autoneg off speed 1000 duplex full

    does link go up on Linux?

    I wonder if this can be RGMII delay mismatch issue. 

    Best,
    J