Hi,
We are trying to bring up the ethernet on a custom board using the latest Sitara SDK. It looks like the phy is detected correctly and the network interface is available, however no packets are sent or received (which has been verified externally with wireshark).
The relevant parts of our DTS file are as follows:
In the pinmux section:
cpsw_default: cpsw_default { pinctrl-single,pins = < /* Slave 1 */ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.mii1_txen */ 0x118 (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxdv.mii1_rxdv */ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.mii1_txd3 */ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.mii1_txd2 */ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.mii1_txd1 */ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.mii1_txd0 */ 0x12c (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_txclk.mii1_txclk */ 0x130 (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxclk.mii1_rxclk */ 0x134 (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd3.mii1_rxd3 */ 0x138 (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd2.mii1_rxd2 */ 0x13c (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd1.mii1_rxd1 */ 0x140 (PIN_INPUT_PULLUP | MUX_MODE2) /* mii1_rxd0.mii1_rxd0 */ >; }; cpsw_sleep: cpsw_sleep { pinctrl-single,pins = < /* Slave 1 reset value */ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) >; }; davinci_mdio_default: davinci_mdio_default { pinctrl-single,pins = < /* MDIO */ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ >; }; davinci_mdio_sleep: davinci_mdio_sleep { pinctrl-single,pins = < /* MDIO reset value */ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) >; };
In the main section at the bottom:
&mac { slaves = <1>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; }; &davinci_mdio { pinctrl-names = "default", "sleep"; pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; }; &cpsw_emac0 { phy_id = <&davinci_mdio>, <4>; phy-mode = "rgmii-txid"; };
Are we missing anything?
An extract from the log output of our board is shown below:
[ 1.883280] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.889775] davinci_mdio 4a101000.mdio: detected phy mask ffffffaf
[ 1.898783] libphy: 4a101000.mdio: probed
[ 1.903081] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver Atheros 8035 ethernet
[ 1.912957] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver Atheros 8035 ethernet
[ 1.924356] Detected MACID = 88:33:14:f6:a5:40
[ 1.932584] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[ 1.952709] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[ 1.960614] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[ 2.405128] EXT4-fs (mmcblk0p2): recovery complete
[ 2.414889] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.423673] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 2.441941] devtmpfs: mounted
[ 2.446572] Freeing unused kernel memory: 344K (c074b000 - c07a1000)
>[ 3.257562] udevd[774]: starting version 182
[ 4.332742] PM: CM3 Firmware Version = 0x186
[ 8.777545] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 9.179152] cryptodev: driver 1.6 loaded.
[ 9.344977] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 10.898297] net eth0: initializing cpsw version 1.12 (0)
[ 10.908485] net eth0: phy found : id is : 0x4dd072
[ 10.930765] 8021q: adding VLAN 0 to HW filter on device eth0
[ 13.904110] libphy: 4a101000.mdio:04 - Link is Up - 100/Full
[ 23.663038] couldn't find an available UDC
As you can see the phy is detected on MDIO address 4 and the link is detected (the second phy on addr 6 is currently unused).
Any help appreciated, we are at a loss!
Thanks in advance,
Rob Connolly