Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Linux/AM3352: DP83867 PHY configuration issue

$
0
0

Part Number:AM3352

Tool/software: Linux

Hi.

In our board used schematic (Scheamtic and PCB) from TIDA-00204 in case of RGMII PHY connections.

I read a lot of threads, but still can not confugre PHY in .dts file correctly (or, may be, trouble in somewhere else) and ethernet link not worked.

This is kernel log:

....

[    4.482862] libphy: Fixed MDIO Bus: probed
[    4.570438] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    4.576600] davinci_mdio 4a101000.mdio: detected phy mask fffefffe
[    4.598556] libphy: 4a101000.mdio: probed
[    4.602910] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver TI DP83867
[    4.612643] davinci_mdio 4a101000.mdio: phy[16]: device 4a101000.mdio:10, driver TI DP83867
[    4.625478] cpsw 4a100000.ethernet: Detected MACID = 50:f1:4a:0b:83:c3
[    4.634173] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
.....
Configuring network interfaces...
[   17.639502] net eth0: initializing cpsw version 1.12 (0)
[   17.674958] net eth0: initialized cpsw ale version 1.4
[   17.680158] net eth0: ALE Table size 1024
[   17.705193] net eth0: phy"4a101000.mdio:00" not found on slave 0, err -19
[   17.714481] TI DP83867 4a101000.mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=4a101000.mdio:00, irq=-1)
[   17.768872] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   17.776365] 8021q: adding VLAN 0 to HW filter on device eth0
udhcpc (v1.24.1) started
Sending discover...
[   19.841857] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   19.852736] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending discover...
No lease, forking to background
done.


This is ifconfig response:

eth0      Link encap:Ethernet  HWaddr 50:f1:4a:0b:83:c3   
         inet6 addr: fe80::52f1:4aff:fe0b:83c3/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000  
         RX bytes:0 (0.0 B)  TX bytes:20330 (19.8 KiB)
         Interrupt:172  

lo        Link encap:Local Loopback   
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:65536  Metric:1
         RX packets:2 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1  
         RX bytes:140 (140.0 B)  TX bytes:140 (140.0 B)

Response of "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: 126
    Broadcast Tx Frames: 110
    Multicast Tx Frames: 16
    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: 39372
    Rx + Tx 64 Octet Frames: 0
    Rx + Tx 65-127 Octet Frames: 16
    Rx + Tx 128-255 Octet Frames: 0
    Rx + Tx 256-511 Octet Frames: 110
    Rx + Tx 512-1023 Octet Frames: 0
    Rx + Tx 1024-Up Octet Frames: 0
    Net Octets: 39372
    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: 126
    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: 126
    Tx DMA chan 0: busy_dequeue: 0
    Tx DMA chan 0: good_dequeue: 126
    Tx DMA chan 0: requeue: 0
    Tx DMA chan 0: teardown_dequeue: 0


This is .dts piece:

&mac {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
	status = "okay";
};

&davinci_mdio {
	pinctrl-names = "default", "sleep";
	compatible = "ti,cpsw-mdio","ti,davinci_mdio";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
	ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
	ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
	ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
	ti,min-output-impedance;
	status = "okay";
};

&cpsw_emac0 {
	phy_id = <&davinci_mdio>, <0>;
	phy-mode = "rgmii-txid";
};

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


Link to tida schematic (used only PHYs connections): http://www.ti.com/lit/df/tidrdr0a/tidrdr0a.pdf

Full .dts file: (Please visit the site to view this file)

Full kernel log: (Please visit the site to view this file)

Kernel sources patch (with thread https://e2e.ti.com/support/arm/sitara_arm/f/791/p/584221/2146292): 

diff a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index df43cf8b65f..6688fc242a2 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -23,7 +23,7 @@
#include <dt-bindings/net/ti-dp83867.h>

#define DP83867_PHY_ID 0x2000a231
-#define DP83867_DEVADDR 0x1f
+#define DP83867_DEVADDR 0x00

#define MII_DP83867_PHYCTRL 0x10
#define MII_DP83867_MICR 0x12

Kernel config:  (Please visit the site to view this file)

I will be grateful for any help.

Thanks!


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>