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.

AM3359: DP83867 not working at 1Gbps

Part Number: AM3359

Hello all,

                      We are working on a custom board based on am335x ice v2.We have 2 dp83876 phys in our board.Both are working at 10/100Mbps.But its not working in 1G mode.What could the the reason?

  • Please post what OS you are using, and which version. 

  • Hi Biser,

                             We are working on linux v4.14.67.

  • In this case, please complete this checklist and post the results here: processors.wiki.ti.com/.../5x_CPSW

  • hi biser,

                             Here is the ouput of the checklist.

    root@am335x-evm:~# ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr C4:F3:12:E6:BD:2A  
              inet addr:192.168.1.17  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::c6f3:12ff:fee6:bd2a%3069134232/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:4706 (4.5 KiB)
              Interrupt:47

    root@am335x-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: 43
         Broadcast Tx Frames: 16
         Multicast Tx Frames: 27
         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: 5384
         Rx + Tx 64 Octet Frames: 0
         Rx + Tx 65-127 Octet Frames: 36
         Rx + Tx 128-255 Octet Frames: 0
         Rx + Tx 256-511 Octet Frames: 7
         Rx + Tx 512-1023 Octet Frames: 0
         Rx + Tx 1024-Up Octet Frames: 0
         Net Octets: 5384
         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: 43
         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: 11
         Tx DMA chan 0: empty_dequeue: 43
         Tx DMA chan 0: busy_dequeue: 0
         Tx DMA chan 0: good_dequeue: 43
         Tx DMA chan 0: requeue: 0
         Tx DMA chan 0: teardown_dequeue: 0

    dts section related to ethernet :


    &davinci_mdio {
            pinctrl-names = "default", "sleep";
            pinctrl-0 = <&davinci_mdio_default>;
            pinctrl-1 = <&davinci_mdio_sleep>;
            status = "okay";
    /*
            max24287: ethernet-phy@4 {
            reg = <4>;
        };
    */

            dp83867_0: ethernet-phy@0 {
            reg = <0>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_4_00_NS>;
            ti,tx-internal-delay = <DP83867_RGMIIDCTL_4_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
            ti,min-output-impedance;
            ti,dp83867-rxctrl-strap-quirk;
        };

            dp83867_3: ethernet-phy@3 {
            reg = <3>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_3_50_NS>;
            ti,tx-internal-delay = <DP83867_RGMIIDCTL_4_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
            ti,min-output-impedance;
            ti,dp83867-rxctrl-strap-quirk;
        };

    };

    &cpsw_emac0 {
            phy_id = <&davinci_mdio>, <3>;
            phy-mode = "rgmii-id";
            dual_emac_res_vlan = <1>;
    };


    &cpsw_emac1 {
            phy_id = <&davinci_mdio>, <0>;
            phy-mode = "rgmii-id";
            dual_emac_res_vlan = <2>;
    };

  • Hi,

    Could you please post the output of ethtool eth0? What is the link partner capable of? The speed is set by the PHY during auto-negotiation with the link partner. If the two link partners are not negotiating to highest advertised rate then there is something around the PHY that is causing the limitation. 

    How is the IP address getting assigned here? Is the ip address set statically? The reason I ask is the HW statistics are not showing any RX packets. 

    Best Regards,

    Schuyler

  • Hi Schuyler,

     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: 43
         Broadcast Tx Frames: 16
         Multicast Tx Frames: 27
         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: 5384
         Rx + Tx 64 Octet Frames: 0
         Rx + Tx 65-127 Octet Frames: 36
         Rx + Tx 128-255 Octet Frames: 0
         Rx + Tx 256-511 Octet Frames: 7
         Rx + Tx 512-1023 Octet Frames: 0
         Rx + Tx 1024-Up Octet Frames: 0
         Net Octets: 5384
         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: 43
         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: 11
         Tx DMA chan 0: empty_dequeue: 43
         Tx DMA chan 0: busy_dequeue: 0
         Tx DMA chan 0: good_dequeue: 43
         Tx DMA chan 0: requeue: 0

                                                      Our link partner is 20 port ethernet switch.After booting the 1Gbps link is established by autonegotiation.We are using static I.P address.

  • Hi,

    Thank you for the ethtool output, there are not any packets being received. Using ping on your board does wireshark show packets coming out when the PHY is linked at 1G? And being returned? Just to verify again that both transmit and receive from an ethtool -S are showing packets being received?

    Does the clocking with a scope between the CPSW MAC and the PHY to verify expected clocks?

    Do the messages on the console show a link being established? Can you please attach (not cut and paste) the boot log?

    Best Regards,

    Schuyler

  • Hi,

    I have not heard back after the previous post, is the 1G bit rate still an issue for you?

    Best Regards,

    Schuyler

  • Hi,

    Since we have not heard back from we will assume that you were able to move past the problem. I will mark the thread as resolved for now, you can re-open it later or file a new thread. 

    Best Regards,

    Schuyler