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.

Linux/AM5718: cpsw configuration issue

Part Number: AM5718

Tool/software: Linux

Hi,

we have developed a custom board with AM5718 using ti-processor-sdk-linux-am57xx-evm-05.02.00.10. we have an issue with Ethernet, almost every thing is over in bringing up the som except this Ethernet issue, Please try to help us to what things we need to change in the dts file below to resolve this issue.

In our board

1. One port realized with RMI and another port is relaized with PCIe using i210 and this is also RMI
2. ENET-REF-50MHz is connected between processor and PHY
3. We are using internal clock from the processor
4. The phy address is 9, which is depend on hardware.

davinci_mdio_pins: pinmux_davinci_mdio_pins {
            pinctrl-single,pins = <
                /* MDIO */
            DRA7XX_CORE_IOPAD(0x363c, PIN_OUTPUT_PULLUP | MUX_MODE0)                /* mdio_mclk */
            DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLUP | MUX_MODE0)                  /* mdio_d */

            
        >;
        };

       davinci_mdio_pins_sleep: pinmux_davinci_mdio_pins_sleep {
        pinctrl-single,pins = <
                /* MDIO reset value */
            
            DRA7XX_CORE_IOPAD(0x363c, PIN_INPUT_PULLDOWN | MUX_MODE7)                /* mdio_mclk */
            DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLDOWN | MUX_MODE7)                  /* mdio_d */

        >;
        };

    cpsw_pins_default: cpsw_pins_default {
         pinctrl-single,pins = <

            DRA7XX_CORE_IOPAD(0x3644, PIN_INPUT | MUX_MODE0)    /* rmii1_tclk---RMII_MHZ_50_CLK */
            DRA7XX_CORE_IOPAD(0x3654, PIN_INPUT | MUX_MODE2)    /* rmii1_rxd0 */
            DRA7XX_CORE_IOPAD(0x3650, PIN_INPUT | MUX_MODE2)    /* rmii1_rxd1 */
            DRA7XX_CORE_IOPAD(0x364c, PIN_INPUT | MUX_MODE2)    /* rmii1_rer */
            DRA7XX_CORE_IOPAD(0x3648, PIN_INPUT | MUX_MODE2)    /* rmii1_crs */
            DRA7XX_CORE_IOPAD(0x3670, PIN_OUTPUT | MUX_MODE2)    /* rmii1_txd0 */
            DRA7XX_CORE_IOPAD(0x366c, PIN_OUTPUT | MUX_MODE2)    /* rmii1_txd1 */
            DRA7XX_CORE_IOPAD(0x3668, PIN_OUTPUT | MUX_MODE2)    /* rmii1_txen*/

>;

};

   
    cpsw_pins_sleep: cpsw_pins_sleep {
         pinctrl-single,pins = <
        
        
            DRA7XX_CORE_IOPAD(0x3644, PIN_INPUT | MUX_MODE7)    /* rmii1_tclk---RMII_MHZ_50_CLK */
            DRA7XX_CORE_IOPAD(0x3654, PIN_INPUT | MUX_MODE7)    /* rmii1_rxd0 */
            DRA7XX_CORE_IOPAD(0x3650, PIN_INPUT | MUX_MODE7)    /* rmii1_rxd1 */
            DRA7XX_CORE_IOPAD(0x364c, PIN_INPUT | MUX_MODE7)    /* rmii1_rer */
            DRA7XX_CORE_IOPAD(0x3648, PIN_INPUT | MUX_MODE7)    /* rmii1_crs */
            DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE7)    /* rmii1_txd0 */
            DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE7)    /* rmii1_txd1 */
            DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE7)    /* rmii1_txen*/


                    >;
};

&mac {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cpsw_pins_default>;
    pinctrl-1 = <&cpsw_pins_sleep>;
    //dual_emac;
    slaves = <1>;
    };   

&cpsw_emac0 {
    
                phy_id = <&davinci_mdio>, <9>;
                phy-mode = "rmii";
};

&davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&davinci_mdio_pins>;
    pinctrl-1 = <&davinci_mdio_pins_sleep>;
    status = "okay";
 
    
};    

Thanks and Regards,

A.Mounika.

       

  • Hi,

    Please fill out the following info requested by this link. Please describe what the issue is that you are experiencing with Ethernet. The link will ask that you please attach a copy of the boot log. Also please attach the results of ifconfig -a and ethtool of the interface. 

    You are listing two interfaces, lets concentrate on the cpsw interface first. 

    Link to checklist

    Best Regards,

    Schuyler

  • Hi,

    Firstly our main focus is on cpsw interface and we are unable to make the phy detected and also the ethernet link is not up. The related ckecklist is attached below.

    root@am57xx-evm:~#
    root@am57xx-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:9A:2E:74  
              inet addr:10.0.0.5  Bcast:10.0.0.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:93

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1%775872/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:166 errors:0 dropped:0 overruns:0 frame:0
              TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:12540 (12.2 KiB)  TX bytes:12540 (12.2 KiB)


    root@am57xx-evm:~# dmesg | grep eth
    [    2.045563] cpsw 48484000.ethernet: Detected MACID = 98:5d:ad:9a:2e:74
    [    2.052186] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    2.058568] cpsw 48484000.ethernet: ALE Table size 1024
    [    2.063840] cpsw 48484000.ethernet: device node lookup for pps timer failed
    [    2.070881] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [   11.170570] net eth0: initializing cpsw version 1.15 (0)
    [   12.118269] net eth0: phy "48485000.mdio:09" not found on slave 0, err -19
    [   12.321520] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    root@am57xx-evm:~#                 

    root@am57xx-evm:~#
    root@am57xx-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
    [    1.727621] libphy: Fixed MDIO Bus: probed
    [    1.798551] davinci_mdio 48485000.mdio: no live phy, scanning all
    [   12.038107] libphy: PHY 48485000.mdio:09 not found
    [   12.118269] net eth0: phy "48485000.mdio:09" not found on slave 0, err -19
    root@am57xx-evm:~#

    root@am57xx-evm:~#
    root@am57xx-evm:~# dmesg | grep davinci
    [    1.790858] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.798551] davinci_mdio 48485000.mdio: no live phy, scanning all
    [    1.900975] davinci_mdio 48485000.mdio: timed out waiting for user access
    [    2.007868] davinci_mdio 48485000.mdio: timed out waiting for idle
    [    2.014124] davinci_mdio: probe of 48485000.mdio failed with error -5
    root@am57xx-evm:~#
    root@am57xx-evm:~#


    root@am57xx-evm:~# ethtool eth0
    Settings for eth0:
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000000 (0)
                                   
            Link detected: no


    root@am57xx-evm:~# ethtool -S eth0
    NIC statistics:
         Good Rx Frames: 0
         Broadcast Rx Frames: 0
         Multicast Rx Frames: 0
         Pause Rx Frames: 0
         Rx CRC Errors: 0
         Rx Align/Code Errors: 0
         Oversize Rx Frames: 0
         Rx Jabbers: 0
         Undersize (Short) Rx Frames: 0
         Rx Fragments: 0
         Rx Octets: 0
         Good Tx Frames: 0
         Broadcast Tx Frames: 0
         Multicast Tx Frames: 0
         Pause Tx Frames: 0
         Deferred Tx Frames: 0
         Collisions: 0
         Single Collision Tx Frames: 0
         Multiple Collision Tx Frames: 0
         Excessive Collisions: 0
         Late Collisions: 0
         Tx Underrun: 0
         Carrier Sense Errors: 0
         Tx Octets: 0
         Rx + Tx 64 Octet Frames: 0
         Rx + Tx 65-127 Octet Frames: 0
         Rx + Tx 128-255 Octet Frames: 0
         Rx + Tx 256-511 Octet Frames: 0
         Rx + Tx 512-1023 Octet Frames: 0
         Rx + Tx 1024-Up Octet Frames: 0
         Net Octets: 0
         Rx Start of Frame Overruns: 0
         Rx Middle of Frame Overruns: 0
         Rx DMA Overruns: 0
         Rx DMA chan 0: head_enqueue: 1
         Rx DMA chan 0: tail_enqueue: 127
         Rx DMA chan 0: pad_enqueue: 0
         Rx DMA chan 0: misqueued: 0
         Rx DMA chan 0: desc_alloc_fail: 0
         Rx DMA chan 0: pad_alloc_fail: 0
         Rx DMA chan 0: runt_receive_buf: 0
         Rx DMA chan 0: runt_transmit_bu: 0
         Rx DMA chan 0: empty_dequeue: 0
         Rx DMA chan 0: busy_dequeue: 0
         Rx DMA chan 0: good_dequeue: 0
         Rx DMA chan 0: requeue: 0
         Rx DMA chan 0: teardown_dequeue: 0
         Tx DMA chan 0: head_enqueue: 0
         Tx DMA chan 0: tail_enqueue: 0
         Tx DMA chan 0: pad_enqueue: 0
         Tx DMA chan 0: misqueued: 0
         Tx DMA chan 0: desc_alloc_fail: 0
         Tx DMA chan 0: pad_alloc_fail: 0
         Tx DMA chan 0: runt_receive_buf: 0
         Tx DMA chan 0: runt_transmit_bu: 0
         Tx DMA chan 0: empty_dequeue: 0
         Tx DMA chan 0: busy_dequeue: 0
         Tx DMA chan 0: good_dequeue: 0
         Tx DMA chan 0: requeue: 0
         Tx DMA chan 0: teardown_dequeue: 0
    root@am57xx-evm:~#

    Thanks and Regards,

    A.Mounika.

  • Hi,

    You are getting an IO error when trying to talk with the PHY. Until the PHY can be communicated with to determine if there is a valid link partner there will not be any network traffic. This is typically a board level hardware issue regarding the viability of the MDIO bus.

    davinci_mdio: probe of 48485000.mdio failed with error -5

    Best Regards,

    Schuyler

  • Hi,

    This is a redundant thread to this filed recently.

    MDIO IO error thread

    I am closing this thread. We can continue debug on the other thread.

    Best Regards,

    Schuyler