Other Parts Discussed in Thread: TLK105L, TLK105, USB-2-MDIO
Hi ,
I am working on a custom AM437x board where i obtained MYD_C437x module, and a simple PCB design that includes 1 CPSW and 1 PRU ethernet ports.
As i did my research, i found out that the single PRU is supported after Lİnux SDK 5.3 or later, so i decided to use latest Linux RT SDK 6.03 (with linux-rt-4.19.94) rather than the one provided by 3rd party(4.1).
Referencing the topic: "https://e2e.ti.com/support/processors/f/791/t/854235?tisearch=e2e-sitesearch&keymatch=single%20pru%20am437x
aliases { //ethernet2 = &pruss1_emac0; ethernet3 = &pruss1_emac1; }; ... /* Dual-MAC Ethernet application node on PRU-ICSS1 */ pruss1_eth: pruss1_eth { compatible = "ti,am4376-prueth"; prus = <&pru1_0>, <&pru1_1>; firmware-name = "", "ti-pruss/am437x-pru1-prueth-fw.elf"; sram = <&ocmcram>; interrupt-parent = <&pruss1_intc>; mii-rt = <&pruss1_mii_rt>; pinctrl-0 = <&pruss1_eth_default>; pinctrl-names = "default"; interrupts = <20>, <21>; interrupt-names = "rx_red_hp", "rx_red_lp"; /* pruss1_emac0: ethernet-mii0 { phy-handle = <&pruss1_eth0_phy>; phy-mode = "mii"; interrupts = <20>, <22>, <23>, <26>; interrupt-names = "rx", "tx", "hsrprp_ptp_tx", "emac_ptp_tx"; local-mac-address = [00 00 00 00 00 00]; }; */ pruss1_emac1: ethernet-mii1 { phy-handle = <&pruss1_eth1_phy>; phy-mode = "mii"; interrupts = <21>, <23>, <24>, <27>; interrupt-names = "rx", "tx", "hsrprp_ptp_tx", "emac_ptp_tx"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; }; ... &pruss_soc_bus { status = "okay"; pruss1: pruss@54400000 { status = "okay"; }; pruss0: pruss@54440000 { status = "okay"; }; }; &pruss1_mdio { pinctrl-0 = <&pruss1_mdio_default>; pinctrl-names = "default"; status = "okay"; reset-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>; reset-delay-us = <2>; /* PHY datasheet states 1uS min */ pruss1_eth0_phy: ethernet-phy@0 { reg = <0>; }; /* tried also commenting out pruss1_eth0_phy node */ pruss1_eth1_phy: ethernet-phy@1 { reg = <1>; }; };
However, although it succesfully probes, i keep getting kernel error after boot up, and it fails.
[ 1.138111] libphy: Fixed MDIO Bus: probed [ 1.214208] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000 [ 1.221917] davinci_mdio 4a101000.mdio: detected phy mask ffffffef [ 1.229281] libphy: 4a101000.mdio: probed [ 1.233335] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver Atheros 8035 ethernet [ 1.243746] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property [ 1.252147] cpsw 4a100000.ethernet: Detected MACID = 04:79:b7:e8:e5:42 [ 1.258885] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4 [ 1.265304] cpsw 4a100000.ethernet: ALE Table size 1024 [ 1.270600] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies) ... [ 11.634844] davinci_mdio 54432400.mdio: davinci mdio revision 1.6, bus freq 1000000 [ 11.642563] libphy: 54432400.mdio: probed [ 11.919187] davinci_mdio 54432400.mdio: phy[0]: device 54432400.mdio:00, driver unknown [ 12.048374] davinci_mdio 54432400.mdio: phy[1]: device 54432400.mdio:01, driver unknown [ 12.419793] remoteproc remoteproc1: 54434000.pru is available [ 12.551503] pru-rproc 54434000.pru: PRU rproc node pru@54434000 probed successfully [ 12.632842] remoteproc remoteproc2: 54438000.pru is available [ 12.754420] pru-rproc 54438000.pru: PRU rproc node pru@54438000 probed successfully [ 12.834908] remoteproc remoteproc3: 54474000.pru is available [ 12.840826] pru-rproc 54474000.pru: PRU rproc node pru@54474000 probed successfully [ 13.051221] remoteproc remoteproc4: 54478000.pru is available [ 13.093693] pru-rproc 54478000.pru: PRU rproc node pru@54478000 probed successfully [ 13.104547] net eth0: initializing cpsw version 1.15 (0) [ 13.205299] Atheros 8035 ethernet 4a101000.mdio:04: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=4a101000.mdio:04, irq=POLL) [ 13.205495] libphy: PHY not found [ 13.205510] net eth0: phy "" not found on slave 1, err -19 [ 13.225694] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 13.842386] prueth pruss1_eth: port 2: using random MAC addr: 4a:43:b8:50:65:33 [ 14.015496] prueth pruss1_eth: pruss_fw_drop_untagged_vlan 0 [ 14.021212] prueth pruss1_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff [ 14.234410] prueth pruss1_eth: TI PRU ethernet (type 0) driver initialized _____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . | . | | __| _| . | | | -_| _| _| |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___| Arago Project http://arago-project.org am437x-evm ttyS0 Arago 2019.11 am437x-evm ttyS0 am437x-evm login:
[ 27.114767] iep ptp bc clkid -1 [ 27.118012] remoteproc remoteproc2: powering up 54438000.pru [ 27.164373] remoteproc remoteproc2: Booting fw image ti-pruss/am437x-pru1-prueth-fw.elf, size 7712 [ 27.173559] pruss 54400000.pruss: configured system_events[63-0] = 00600000,08a00000 [ 27.238011] pruss 54400000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa [ 27.267016] remoteproc remoteproc2: remote processor 54438000.pru is now up [ 27.286679] net eth1: started [ 27.296721] Unable to handle kernel NULL pointer dereference at virtual address 00000064 [ 27.304874] pgd = 42842c44 [ 27.307597] [00000064] *pgd=00000000 [ 27.311198] Internal error: Oops: 5 [#1] PREEMPT ARM [ 27.311204] Modules linked in: ti_prueth pru_rproc pruss irq_pruss_intc pm33xx omap_des des_generic omap_aes_driver omap_sham crypto_engine omap_crypto pruss_soc_bus ti_emif_sram dwc3_omap wkup_m3_ipc wkup_m3_rproc remoteproc rtc_omap omap_wdt sch_fq_codel [ 27.311265] CPU: 0 PID: 10 Comm: ktimersoftd/0 Not tainted 4.19.94-rt39-ga242ccf3f1 #2 [ 27.311269] Hardware name: Generic AM43 (Flattened Device Tree) [ 27.311417] PC is at prueth_timer+0x94/0x1d8 [ti_prueth] [ 27.311423] LR is at 0x6 [ 27.311429] pc : [<bf0d062c>] lr : [<00000006>] psr: a00f0113 [ 27.311434] sp : dc489e38 ip : 00000000 fp : dc489e6c [ 27.311438] r10: 600f0113 r9 : d91b68c4 r8 : 0000000c [ 27.311443] r7 : d91b68c0 r6 : 0000000a r5 : d91b6900 r4 : 00000000 [ 27.311447] r3 : 00000004 r2 : 00000006 r1 : 00000000 r0 : 00000001 [ 27.311457] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 27.311463] Control: 10c53c7d Table: 9bbf4059 DAC: 00000051 [ 27.311470] Process ktimersoftd/0 (pid: 10, stack limit = 0xcbdea4eb) [ 27.311477] Stack: (0xdc489e38 to 0xdc48a000) [ 27.311484] 9e20: 00989680 00000000 [ 27.311496] 9e40: dc489e6c c0d1a570 d91b6900 c0d1a520 ffffe000 00000000 00000060 600f0113 [ 27.311507] 9e60: dc489ec4 dc489e70 c0188448 bf0d05a4 c018cf8c c0ac5a00 c0d51b57 00000006 [ 27.311518] 9e80: 5ac3d08f c0d1a480 5ac3d08f c0d1a584 5ac3d08f 00000006 00000000 e899c255 [ 27.311529] 9ea0: 1607167d c0d1a480 600f0113 00000100 00000000 00000008 dc489ee4 dc489ec8 [ 27.311540] 9ec0: c018873c c0188370 00000020 c0d10f54 ffffe000 04208140 dc489f2c dc489ee8 [ 27.311551] 9ee0: c012fdf0 c01886c8 dc4452c0 c08d5690 c0902e20 c0d13c40 c0d52fbc c0d51880 [ 27.311562] 9f00: c0d10f24 ffffe000 ffffe000 00000001 c0d10f24 c0d05888 00000000 dc469df0 [ 27.311573] 9f20: dc489f44 dc489f30 c012fed8 c012fc34 dc445200 ffffe000 dc489f74 dc489f48 [ 27.311584] 9f40: c014e85c c012feb0 dc489f74 b7d43b39 dc4452c0 dc445280 00000000 dc488000 [ 27.311595] 9f60: dc445200 c014e59c dc489fac dc489f78 c014a490 c014e5a8 dc4452d8 dc4452d8 [ 27.311605] 9f80: 00000000 dc445280 c014a338 00000000 00000000 00000000 00000000 00000000 [ 27.311616] 9fa0: 00000000 dc489fb0 c01010f0 c014a344 00000000 00000000 00000000 00000000 [ 27.311625] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 27.311635] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 27.311637] Backtrace: [ 27.311707] [<bf0d0598>] (prueth_timer [ti_prueth]) from [<c0188448>] (__hrtimer_run_queues.constprop.3+0xe4/0x230) [ 27.311720] r10:600f0113 r9:00000060 r8:00000000 r7:ffffe000 r6:c0d1a520 r5:d91b6900 [ 27.311725] r4:c0d1a570 [ 27.311741] [<c0188364>] (__hrtimer_run_queues.constprop.3) from [<c018873c>] (hrtimer_run_softirq+0x80/0x10c) [ 27.311752] r10:00000008 r9:00000000 r8:00000100 r7:600f0113 r6:c0d1a480 r5:1607167d [ 27.311756] r4:e899c255 [ 27.311777] [<c01886bc>] (hrtimer_run_softirq) from [<c012fdf0>] (do_current_softirqs+0x1c8/0x27c) [ 27.311786] r7:04208140 r6:ffffe000 r5:c0d10f54 r4:00000020 [ 27.311798] [<c012fc28>] (do_current_softirqs) from [<c012fed8>] (run_ksoftirqd+0x34/0x54) [ 27.311808] r10:dc469df0 r9:00000000 r8:c0d05888 r7:c0d10f24 r6:00000001 r5:ffffe000 [ 27.311812] r4:ffffe000 [ 27.311832] [<c012fea4>] (run_ksoftirqd) from [<c014e85c>] (smpboot_thread_fn+0x2c0/0x2ec) [ 27.311838] r5:ffffe000 r4:dc445200 [ 27.311858] [<c014e59c>] (smpboot_thread_fn) from [<c014a490>] (kthread+0x158/0x160) [ 27.311869] r9:c014e59c r8:dc445200 r7:dc488000 r6:00000000 r5:dc445280 r4:dc4452c0 [ 27.311884] [<c014a338>] (kthread) from [<c01010f0>] (ret_from_fork+0x14/0x24) [ 27.311890] Exception stack(0xdc489fb0 to 0xdc489ff8) [ 27.311897] 9fa0: 00000000 00000000 00000000 00000000 [ 27.311908] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 27.311916] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 27.311926] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c014a338 [ 27.311930] r4:dc445280 [ 27.311943] Code: e1590007 0a000027 e515301c e4974004 (e5942064) [ 27.694639] ---[ end trace 0000000000000002 ]--- [ 27.700802] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready [ 32.133710] NOHZ: local_softirq_pending 02 [ 32.148646] NOHZ: local_softirq_pending 02 [ 32.173370] NOHZ: local_softirq_pending 02 [ 32.174163] NOHZ: local_softirq_pending 02 [ 32.186483] NOHZ: local_softirq_pending 02 [ 32.191312] NOHZ: local_softirq_pending 02 [ 32.196782] NOHZ: local_softirq_pending 02 [ 32.269381] NOHZ: local_softirq_pending 02 [ 32.272665] NOHZ: local_softirq_pending 02 [ 32.274157] NOHZ: local_softirq_pending 02 [ 32.821220] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
What could be the reason for such error, i am using one TLK105L as PHY. (Same problem occurs when i work with idkam437, applied same dts changes in PRU-wise)
Thanks in advance!
[ 11.634844] davinci_mdio 54432400.mdio: davinci mdio revision 1.6, bus freq 1000000[ 11.642563] libphy: 54432400.mdio: probed[ 11.919187] davinci_mdio 54432400.mdio: phy[0]: device 54432400.mdio:00, driver unknown[ 12.048374] davinci_mdio 54432400.mdio: phy[1]: device 54432400.mdio:01, driver unknown[ 12.419793] remoteproc remoteproc1: 54434000.pru is available[ 12.551503] pru-rproc 54434000.pru: PRU rproc node pru@54434000 probed successfully[ 12.632842] remoteproc remoteproc2: 54438000.pru is available[ 12.754420] pru-rproc 54438000.pru: PRU rproc node pru@54438000 probed successfully[ 12.834908] remoteproc remoteproc3: 54474000.pru is available[ 12.840826] pru-rproc 54474000.pru: PRU rproc node pru@54474000 probed successfully[ 13.051221] remoteproc remoteproc4: 54478000.pru is available[ 13.093693] pru-rproc 54478000.pru: PRU rproc node pru@54478000 probed successfully[ 13.104547] net eth0: initializing cpsw version 1.15 (0)[ 13.205299] Atheros 8035 ethernet 4a101000.mdio:04: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=4a101000.mdio:04, irq=POLL)[ 13.205495] libphy: PHY not found[ 13.205510] net eth0: phy "" not found on slave 1, err -19[ 13.225694] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready[ 13.842386] prueth pruss1_eth: port 2: using random MAC addr: 4a:43:b8:50:65:33[ 14.015496] prueth pruss1_eth: pruss_fw_drop_untagged_vlan 0[ 14.021212] prueth pruss1_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff[ 14.234410] prueth pruss1_eth: TI PRU ethernet (type 0) driver initialized
_____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . | . | | __| _| . | | | -_| _| _||__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___|
Arago Project http://arago-project.org am437x-evm ttyS0
Arago 2019.11 am437x-evm ttyS0
am437x-evm login: [ 27.114767] iep ptp bc clkid -1[ 27.118012] remoteproc remoteproc2: powering up 54438000.pru[ 27.164373] remoteproc remoteproc2: Booting fw image ti-pruss/am437x-pru1-prueth-fw.elf, size 7712[ 27.173559] pruss 54400000.pruss: configured system_events[63-0] = 00600000,08a00000[ 27.238011] pruss 54400000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa[ 27.267016] remoteproc remoteproc2: remote processor 54438000.pru is now up[ 27.286679] net eth1: started[ 27.296721] Unable to handle kernel NULL pointer dereference at virtual address 00000064[ 27.304874] pgd = 42842c44[ 27.307597] [00000064] *pgd=00000000[ 27.311198] Internal error: Oops: 5 [#1] PREEMPT ARM[ 27.311204] Modules linked in: ti_prueth pru_rproc pruss irq_pruss_intc pm33xx omap_des des_generic omap_aes_driver omap_sham crypto_engine omap_crypto pruss_soc_bus ti_emif_sram dwc3_omap wkup_m3_ipc wkup_m3_rproc remoteproc rtc_omap omap_wdt sch_fq_codel[ 27.311265] CPU: 0 PID: 10 Comm: ktimersoftd/0 Not tainted 4.19.94-rt39-ga242ccf3f1 #2[ 27.311269] Hardware name: Generic AM43 (Flattened Device Tree)[ 27.311417] PC is at prueth_timer+0x94/0x1d8 [ti_prueth][ 27.311423] LR is at 0x6[ 27.311429] pc : [<bf0d062c>] lr : [<00000006>] psr: a00f0113[ 27.311434] sp : dc489e38 ip : 00000000 fp : dc489e6c[ 27.311438] r10: 600f0113 r9 : d91b68c4 r8 : 0000000c[ 27.311443] r7 : d91b68c0 r6 : 0000000a r5 : d91b6900 r4 : 00000000[ 27.311447] r3 : 00000004 r2 : 00000006 r1 : 00000000 r0 : 00000001[ 27.311457] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none[ 27.311463] Control: 10c53c7d Table: 9bbf4059 DAC: 00000051[ 27.311470] Process ktimersoftd/0 (pid: 10, stack limit = 0xcbdea4eb)[ 27.311477] Stack: (0xdc489e38 to 0xdc48a000)[ 27.311484] 9e20: 00989680 00000000[ 27.311496] 9e40: dc489e6c c0d1a570 d91b6900 c0d1a520 ffffe000 00000000 00000060 600f0113[ 27.311507] 9e60: dc489ec4 dc489e70 c0188448 bf0d05a4 c018cf8c c0ac5a00 c0d51b57 00000006[ 27.311518] 9e80: 5ac3d08f c0d1a480 5ac3d08f c0d1a584 5ac3d08f 00000006 00000000 e899c255[ 27.311529] 9ea0: 1607167d c0d1a480 600f0113 00000100 00000000 00000008 dc489ee4 dc489ec8[ 27.311540] 9ec0: c018873c c0188370 00000020 c0d10f54 ffffe000 04208140 dc489f2c dc489ee8[ 27.311551] 9ee0: c012fdf0 c01886c8 dc4452c0 c08d5690 c0902e20 c0d13c40 c0d52fbc c0d51880[ 27.311562] 9f00: c0d10f24 ffffe000 ffffe000 00000001 c0d10f24 c0d05888 00000000 dc469df0[ 27.311573] 9f20: dc489f44 dc489f30 c012fed8 c012fc34 dc445200 ffffe000 dc489f74 dc489f48[ 27.311584] 9f40: c014e85c c012feb0 dc489f74 b7d43b39 dc4452c0 dc445280 00000000 dc488000[ 27.311595] 9f60: dc445200 c014e59c dc489fac dc489f78 c014a490 c014e5a8 dc4452d8 dc4452d8[ 27.311605] 9f80: 00000000 dc445280 c014a338 00000000 00000000 00000000 00000000 00000000[ 27.311616] 9fa0: 00000000 dc489fb0 c01010f0 c014a344 00000000 00000000 00000000 00000000[ 27.311625] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000[ 27.311635] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000[ 27.311637] Backtrace: [ 27.311707] [<bf0d0598>] (prueth_timer [ti_prueth]) from [<c0188448>] (__hrtimer_run_queues.constprop.3+0xe4/0x230)[ 27.311720] r10:600f0113 r9:00000060 r8:00000000 r7:ffffe000 r6:c0d1a520 r5:d91b6900[ 27.311725] r4:c0d1a570[ 27.311741] [<c0188364>] (__hrtimer_run_queues.constprop.3) from [<c018873c>] (hrtimer_run_softirq+0x80/0x10c)[ 27.311752] r10:00000008 r9:00000000 r8:00000100 r7:600f0113 r6:c0d1a480 r5:1607167d[ 27.311756] r4:e899c255[ 27.311777] [<c01886bc>] (hrtimer_run_softirq) from [<c012fdf0>] (do_current_softirqs+0x1c8/0x27c)[ 27.311786] r7:04208140 r6:ffffe000 r5:c0d10f54 r4:00000020[ 27.311798] [<c012fc28>] (do_current_softirqs) from [<c012fed8>] (run_ksoftirqd+0x34/0x54)[ 27.311808] r10:dc469df0 r9:00000000 r8:c0d05888 r7:c0d10f24 r6:00000001 r5:ffffe000[ 27.311812] r4:ffffe000[ 27.311832] [<c012fea4>] (run_ksoftirqd) from [<c014e85c>] (smpboot_thread_fn+0x2c0/0x2ec)[ 27.311838] r5:ffffe000 r4:dc445200[ 27.311858] [<c014e59c>] (smpboot_thread_fn) from [<c014a490>] (kthread+0x158/0x160)[ 27.311869] r9:c014e59c r8:dc445200 r7:dc488000 r6:00000000 r5:dc445280 r4:dc4452c0[ 27.311884] [<c014a338>] (kthread) from [<c01010f0>] (ret_from_fork+0x14/0x24)[ 27.311890] Exception stack(0xdc489fb0 to 0xdc489ff8)[ 27.311897] 9fa0: 00000000 00000000 00000000 00000000[ 27.311908] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000[ 27.311916] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000[ 27.311926] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c014a338[ 27.311930] r4:dc445280[ 27.311943] Code: e1590007 0a000027 e515301c e4974004 (e5942064) [ 27.694639] ---[ end trace 0000000000000002 ]---[ 27.700802] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready[ 32.133710] NOHZ: local_softirq_pending 02[ 32.148646] NOHZ: local_softirq_pending 02[ 32.173370] NOHZ: local_softirq_pending 02[ 32.174163] NOHZ: local_softirq_pending 02[ 32.186483] NOHZ: local_softirq_pending 02[ 32.191312] NOHZ: local_softirq_pending 02[ 32.196782] NOHZ: local_softirq_pending 02[ 32.269381] NOHZ: local_softirq_pending 02[ 32.272665] NOHZ: local_softirq_pending 02[ 32.274157] NOHZ: local_softirq_pending 02[ 32.821220] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)