Spaces:

arjun.a
range data
5aefcf4
raw
history blame
6.47 kB
Ticket Name: Linux/TDA2PXEVM: Ethernet PHY1 not working on TDA2Px board
Query Text:
Part Number: TDA2PXEVM Tool/software: Linux Dear TI, I am trying to get ETH1 (ETH0 works fine) phy to work on TDA2Px eva board. The link starts but I can not get IP from the network. The relevant part of the device tree looks like this: &cpsw_emac0 { phy_id = <&davinci_mdio>, <2>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { phy_id = <&davinci_mdio>, <3>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; }; &davinci_mdio { dp83867_0: ethernet-phy@2 { reg = <2>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>; ti,min-output-impedance; ti,dp83867-rxctrl-strap-quirk; }; dp83867_1: ethernet-phy@3 { reg = <3>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>; ti,min-output-impedance; ti,dp83867-rxctrl-strap-quirk; }; }; I have checked the PHY addresses on the schematic and the actual board and they are set corretly. However, the register handling the rgmii1_rxd0 (CTRL_CORE_PAD_VIN2A_D23) is set to the wrong value - devmem2 0x4A00 35C4 0x0004 0005. After I set this to 0x0005 0103, I still cant get IP. This means there are more registers wrongly set. Here is ifconfig output after I plug in the ethernet cable to PHY1: root@dra7xx-evm:~# ifconfig eth0 Link encap:Ethernet HWaddr 0C:B2:B7:94:1C:3C 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:58 eth1 Link encap:Ethernet HWaddr 0C:B2:B7:94:1C:3D inet6 addr: fe80::eb2:b7ff:fe94:1c3d%132400/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:11779 (11.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%132400/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:172 errors:0 dropped:0 overruns:0 frame:0 TX packets:172 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:13408 (13.0 KiB) TX bytes:13408 (13.0 KiB) ..................................................................... root@dra7xx-evm:~# ethtool eth1 Settings for eth1: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 3 Transceiver: external Auto-negotiation: on Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0) Link detected: yes .............................................................................. root@dra7xx-evm:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 2 Transceiver: external Auto-negotiation: on Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0) Link detected: no After I run systemctl status networking, systemctl unmask networking, systemctl enable networking, systemctl start networking and systemctl restart networking, i get: root@dra7xx-evm:~# systemctl restart networking [ 616.666154] net eth0: initializing cpsw version 1.15 (0) [ 616.721462] net eth0: phy found : id is : 0x2000a231 [ 616.730910] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready Meaning... Only eth0 is being detected. Have you encountered this problem and how did you solve it? Regards, Stefan.
Responses:
Stefan Based on your description, it seems you have already cross checked that the PHY address is correct From the logs, above only eth1 shows link status up - may be it is intentional as you are only checking eth1 and eth0 cable is disconnected As you had pointed out, if pin mux configuration is not correct(owing to a conflict for the default use case), we need to review and address this The default init scripts will try and initialize network functionality over eth0. You can retrigger udhcp explicitly over eth1 #udhcpc -i eth1
Hi Sriram, running this command fails to assign IP address. root@dra7xx-evm:~# udhcpc -i eth1 udhcpc (v1.24.1) started Sending discover... Sending discover... Seems like this pinmux has more issues that need to be handled. Do you have any other propositions? Regards, Stefan.
Stefan Yes, would suspect the pin mux configuration for the ethernet data lines in that case. Have you reviewed Can you provide details on the SW code base you are using and if you had carried out any additional changes with respect to the pin mux configuration from SW
Stefan Is the issue resolved, can you revert back with details if it is still a concern
Stefan Will close this thread, we can resume if the issue is still open at your end
Hi Srirama, Stefan is currently on a vacation. We do still have the issue, but unfortunately, I cannot provide you more details. Regarding the SW code base, we are using PROCESSOR SDK 3.2, and Ethernet stack on Linux on A15. Regards, Milena
Hi we need to confirm if there were changes carried out for the pin mux configuration and review those changes. The pin mux configuration when Linux is used is carried out from the uboot first stage bootloader - please review for ethernet related pin configuration (MDIO, RGMII)
Hi Srirama, we have managed to solve this issue on our custom TDA2P board and we have both ETH PHY running. We are now working on enabling daisy chain ethernet functionality between two SOCs in linux. Thank you for your help. Regards, Stefan.