Other Parts Discussed in Thread: DP83640
Hi Champs.
There're questions from Customer who wants to activate PRUETH.
They have tried to test PRUETH with TDMSICE3359 and their custom board as well.
Please clarify about the questions below.
1. It's required to switch the mode between PRP and HSR. Do they have to reset the board every time?
2. They use the DP83640 PHY for their custom board. But it does not work even after device is recognized.
Can you check their schematic?
They used the source code of SDK. Is ther any other driver in addion to below?
am335x-evm-linux-sdk-arago-src-07.03.00.005.tar.xz
drivers/net/phy/dp83640.c
drivers/net/phy/dp83640_reg.h
3. Please check if DTS is OK.
They checked below.
- If boot with am335x_icev2.dtb, they identified Ethernet works fine on Dual EMAC mode.
- If they used am335x-icev2-prueth.dtb, the receied packets are not available. Packet receiving is checked by tcpdump.
- They said that am335x-pru0-prueth-fw.elf, am335x-pru1-pruprp-fw.elf, am335x-pru1-pruhsr-fw.elf firmwares are used.
- They tried to activate eth0 as below.
# ip a a 192.168.219.2/24 dev eth0
# ip l s eth0 up
The following logs are captured.
a) IP config 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 68:9e:19:77:72:bb brd ff:ff:ff:ff:ff:ff inet 192.168.219.2/24 scope global eth0 valid_lft forever preferred_lft forever 3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 68:9e:19:77:72:bd brd ff:ff:ff:ff:ff:ff b) driver/hardware config Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: MII PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0) Link detected: no c) Kernel Logs: SDK: Arago 07.03.00.005 Linux am3359-hem 5.4.106 #9 PREEMPT Fri Feb 11 00:29:07 KST 2022 armv7l armv7l armv7l GNU/Linux [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] OF: fdt: Machine model: TI AM335x Hyundai Electric [ 0.956428] mdio_bus fixed-0: GPIO lookup for consumer reset [ 0.956440] mdio_bus fixed-0: using lookup tables for GPIO lookup [ 0.956446] mdio_bus fixed-0: No GPIO consumer reset found [ 0.956468] libphy: Fixed MDIO Bus: probed [ 0.964393] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset [ 0.964403] mdio_bus 4a101000.mdio: using device tree for GPIO lookup [ 0.964452] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000[0]' - status (0) [ 1.019141] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000 [ 1.026847] libphy: 4a101000.mdio: probed [ 1.031797] mdio_bus 4a101000.mdio:00: GPIO lookup for consumer reset [ 1.031805] mdio_bus 4a101000.mdio:00: using device tree for GPIO lookup [ 1.031832] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@1[0]' [ 1.031848] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@1[0]' [ 1.031858] mdio_bus 4a101000.mdio:00: using lookup tables for GPIO lookup [ 1.031865] mdio_bus 4a101000.mdio:00: No GPIO consumer reset found [ 1.033339] mdio_bus 4a101000.mdio:03: GPIO lookup for consumer reset [ 1.033348] mdio_bus 4a101000.mdio:03: using device tree for GPIO lookup [ 1.033368] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@3[0]' [ 1.033383] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@3[0]' [ 1.033392] mdio_bus 4a101000.mdio:03: using lookup tables for GPIO lookup [ 1.033398] mdio_bus 4a101000.mdio:03: No GPIO consumer reset found [ 1.033821] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver NatSemi DP83640 [ 1.042643] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver NatSemi DP83640 [ 1.051565] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT. [ 1.058037] cpsw 4a100000.ethernet: Using 1 as Reserved VLAN for 0 slave [ 1.064862] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT. [ 1.071367] cpsw 4a100000.ethernet: Using 2 as Reserved VLAN for 1 slave [ 1.078116] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4 [ 1.084526] cpsw 4a100000.ethernet: ALE Table size 1024 [ 1.089888] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies) [ 1.097110] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:77:72:bb [ 1.104434] cpsw 4a100000.ethernet: cpsw: Detected MACID = 68:9e:19:77:72:bd [ 1.119219] cpuidle: enable-method property 'ti,am3352' found operations [ 1.857984] systemd[1]: systemd 244.5+ running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) [ 8.140449] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers [ 8.733023] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 243196 [ 8.889545] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192 [ 13.309769] net eth1: initializing cpsw version 1.12 (0) [ 13.525880] NatSemi DP83640 4a101000.mdio:00: master PTP_STS 0x0100 [ 13.606253] NatSemi DP83640 4a101000.mdio:00: master PTP_ESTS 0x00fd [ 13.728927] NatSemi DP83640 4a101000.mdio:03: slave PTP_STS 0x0000 [ 13.885873] NatSemi DP83640 4a101000.mdio:03: slave PTP_ESTS 0x0000 [ 13.986946] NatSemi DP83640 4a101000.mdio:03: slave offset 1755040 nanoseconds [ 14.165849] NatSemi DP83640 4a101000.mdio:03: attached PHY driver [NatSemi DP83640] (mii_bus:phy_addr=4a101000.mdio:03, irq=POLL) [ 14.834847] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0) [ 15.108289] NatSemi DP83640 4a101000.mdio:00: master PTP_STS 0x0100 [ 15.155430] NatSemi DP83640 4a101000.mdio:00: master PTP_ESTS 0x00fd [ 15.290326] NatSemi DP83640 4a101000.mdio:03: slave PTP_STS 0x0000 [ 15.417471] NatSemi DP83640 4a101000.mdio:03: slave PTP_ESTS 0x0000 [ 15.559278] NatSemi DP83640 4a101000.mdio:03: slave offset 1755040 nanoseconds [ 15.712503] NatSemi DP83640 4a101000.mdio:00: attached PHY driver [NatSemi DP83640] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL) [ 20.945470] using random self ethernet address [ 20.965551] using random host ethernet address [ 21.029479] using random self ethernet address [ 21.033964] using random host ethernet address [ 21.038523] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 [ 21.085056] g_ether gadget: g_ether ready [ 21.685231] g_ether gadget: high-speed config #1: CDC Ethernet (ECM) [ 21.853095] remoteproc remoteproc1: 4a334000.pru is available [ 21.859016] pru-rproc 4a334000.pru: PRU rproc node /ocp/interconnect@4a000000/segment@0/target-module@300000/pruss@0/pru@34000 probed successfully [ 22.117983] remoteproc remoteproc2: 4a338000.pru is available [ 22.159492] pru-rproc 4a338000.pru: PRU rproc node /ocp/interconnect@4a000000/segment@0/target-module@300000/pruss@0/pru@38000 probed successfully [ 23.800650] smsc95xx 1-1.1:1.0 eth2: hardware isn't capable of remote wakeup root@am3359-hem:~# lsmod Module Size Used by smsc95xx 28672 0 usbnet 32768 1 smsc95xx pru_rproc 24576 0 icss_iep 20480 0 prueth_ecap 16384 0 irq_pruss_intc 16384 1 pru_rproc usb_f_ecm 16384 1 musb_dsps 20480 0 musb_hdrc 106496 1 musb_dsps usbcore 221184 3 usbnet,musb_hdrc,smsc95xx phy_am335x 16384 2 phy_am335x_control 16384 1 phy_am335x phy_generic 16384 1 phy_am335x pruss 16384 1 pru_rproc pm33xx 16384 0 omap_aes_driver 24576 0 crypto_engine 16384 1 omap_aes_driver omap_crypto 16384 1 omap_aes_driver libaes 16384 1 omap_aes_driver omap_sham 32768 0 ti_emif_sram 16384 1 pm33xx wkup_m3_ipc 16384 1 pm33xx g_ether 16384 0 usb_f_rndis 24576 2 g_ether u_ether 20480 3 usb_f_ecm,g_ether,usb_f_rndis libcomposite 53248 3 usb_f_ecm,g_ether,usb_f_rndis udc_core 28672 5 usb_f_ecm,musb_hdrc,u_ether,usb_f_rndis,libcomposite usb_common 16384 6 phy_am335x,udc_core,musb_hdrc,libcomposite,musb_dsps,usbcore omap_wdt 16384 0 rtc_omap 20480 4 pm33xx wkup_m3_rproc 16384 1 musb_am335x 16384 0 sch_fq_codel 20480 5
Regards,
Jack