Other Parts Discussed in Thread: TLK105L, , AM4372
Tool/software: Linux
Our custom board based on the AM4376 as a network adapter uses a PHY TLK105L connected to the module PRU-ICSS.
Wiring PHY to the CPU has been borrowed from the design board AM437x-IDK-EVM as well as part of DeviceTree.
For the past two weeks, we tried in vain to start the adapter, but without success.
So, what we have?
SDK – 03.02.00.05
CPSW – not used in kernel config settings
PRUETH, REMOTEPROC, RPMSG, PRU_RPROC – used as modules in kernel config settings
TI-PRUSS firmware we used same version as used in SDK 03.02
PHY uses default configuration (PHYADDR = 0х01).
*_CLK - signals checked by oscilloscope
DeviceTree:
When we inspect prueth driver source code we found need to have property compatibility with the IDK-EVM board, so we added the following code in our DT:
compatible = "ti,am437x-idk-evm","ti,am4372","ti,am43"; /* ti,am437x-idk-evm - for loading TI-PRUSS firmware */
Also we added pinmuxing the same as on IDK board and other important parts look like:
pruss1_eth { compatible = "ti,am4372-prueth"; pruss = <&pruss1>; sram = <&ocmcram_nocache>; interrupt-parent = <&pruss1_intc>; pinctrl-0 = <&pruss1_eth_default>; pinctrl-names = "default"; pruss1_emac0: ethernet-mii0 { phy-handle = <&pruss1_eth0_phy>; phy-mode = "mii"; interrupts = <20>, <22>; interrupt-names = "rx", "tx"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; &pruss1_mdio { pinctrl-0 = <&pruss1_mdio_default>; pinctrl-names = "default"; status = "okay"; reset-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>; reset-delay-us = <2>;<->/* PHY datasheet states 1uS min */ pruss1_eth0_phy: ethernet-phy@0 { compatible = "ethernet-phy-id2000.a210"; reg = <1>; }; };
DEBUG LOG_LEVEL=5.
PRUSS1 successfully starts as demonstrated this portion of the log:
[ 5.947389] ti-pruss 54400000.pruss: creating PRU cores and other child platform devices
[ 5.996855] remoteproc0: 54434000.pru0 is available
[ 6.048258] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 6.101832] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 6.132115] pru-rproc 54434000.pru0: PRU rproc node /ocp/pruss_wrapper@54426000/pruss@54400000/pru0@54434000 probed successfully
[ 6.162941] remoteproc1: 54438000.pru1 is available
[ 6.167941] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 6.231940] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 6.262041] pru-rproc 54438000.pru1: PRU rproc node /ocp/pruss_wrapper@54426000/pruss@54400000/pru1@54438000 probed successfully
PRUSS_MDIO also starts without errors and we have log messages about it:
[ 6.452744] davinci_mdio 54432400.mdio: GPIO lookup for consumer reset
[ 6.459316] davinci_mdio 54432400.mdio: using device tree for GPIO lookup
[ 6.522226] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/pruss_wrapper@54426000/pruss@500[0]' - status (0)
[ 6.643179] davinci_mdio 54432400.mdio: davinci mdio revision 1.6
[ 6.649305] libphy: 54432400.mdio: probed
[ 6.740488] davinci_mdio 54432400.mdio: phy[1]: device 54432400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
But ... when Linux attempts loading PRUETH driver before loading PRUSS core
It's strange and generate log message:
[ 5.922416] prueth pruss1_eth: unable to get pruss handle
[ 5.947389] ti-pruss 54400000.pruss: creating PRU cores and other child platform devices
After OS start we reload module from console
# rmmod -f prueth && sleep 1 && modprobe prueth
and now have another type of message:
[ 978.682339] prueth pruss1_eth: couldn't connect to phy /ocp/pruss_wrapper@54426000/pruss@54400000/mdio@54432400/
[ 978.693990] prueth pruss1_eth: netdev init ethernet-mii0 failed: -19
[ 978.700403] prueth pruss1_eth: no ethernet-mii1 node
Network stack works fine because we have worked WLAN and USB RNDIS gadget
# ls /sys/class/net
lo usb0 wlan0
We examined contents of the site and this forum but did not find the answers.
First at all, because source code of TI-PRUSS Ethernet firmware not accessible, we must know what firmware works on boards other than the IDK!
If it's works than, since we no longer have ideas "why this does not work", appeal to you for help.
Thank you.