Tool/software: Linux
Hello,
We have a custom hardware design that utilizes the AM4376 processor. We have two Ethernet ports, one that goes to the RMII interface on CPSW and the other that goes to PRUETH1 MII interface. We are unable to get the PRUETH1 interface to work with using the TI processor SDK Linux kernel. The kernel version that we are using is from:
Repo: git.ti.com/.../processor-sdk-linux.git
Version: e29b786ec0983504ed240b333243314fec44d6ef
Branch: processor-sdk-linux-04.03.00
From reading the device tree bindings for the PRUETH driver, it appears that both ethernet-mii0 and ethernet-mii1 are required for this version of the driver. However, our hardware design only uses ethernet-mii1. The console output from the prueth driver shows up twice with appears to mean that the PRUETH driver is deferring initialization because ethernet-mii0 isn't valid. Here is the console output:
[ 2.983417] prueth pruss1_eth: pruss MC Mask 0:0:0:0:0:0 [ 2.989119] prueth pruss1_eth: could not get ptp tx irq [ 2.994405] prueth pruss1_eth: port 1: using random MAC addr: d6:fa:03:b7:03:cd [ 3.003401] ALSA device list: [ 3.006459] No soundcards found. [ 3.012618] Freeing unused kernel memory: 1024K [ 3.461984] net eth0: initializing cpsw version 1.15 (0) [ 3.467394] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4 [ 3.474219] cpsw 4a100000.ethernet: ALE Table size 1024 [ 3.480947] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1) [ 3.491718] prueth pruss1_eth: pruss MC Mask 0:0:0:0:0:0 [ 3.491897] prueth pruss1_eth: could not get ptp tx irq [ 3.491921] prueth pruss1_eth: port 1: using random MAC addr: 4a:3e:9b:42:57:70
What is required in the device tree bindings for the PRUETH single MAC mode to work correctly? We have used the ti2018.00 tag from git.ti.com/.../ti-linux-kernel.git and were able to get it work correctly.
Here are our PRUETH device tree bindings for the processor-sdk-linux:
pruss1_eth { compatible = "ti,am4376-prueth"; pruss = <&pruss1>; firmware-name = "", "ti-pruss/am437x-pru1-prueth-fw.elf"; sram = <&ocmcram>; interrupt-parent = <&pruss1_intc>; pinctrl-0 = <&pr1_mii1_pins>; pinctrl-names = "default"; pruss1_emac1: ethernet-mii1 { phy-handle = <&pruss1_eth1_phy>; phy-mode = "mii"; interrupts = <21>, <23>; interrupt-names = "rx", "tx"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; /* NOT USED */ 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]; }; }; /* snip */ pr1_mii1_pins: pr1_mii1_pins { pinctrl-single,pins = < 0x58 ( PIN_INPUT | MUX_MODE5 ) /* (E8) gpmc_a6.pr1_mii_mt1_clk */ 0x54 ( PIN_OUTPUT | MUX_MODE5 ) /* (E7) gpmc_a5.pr1_mii1_txd0 */ 0x50 ( PIN_OUTPUT | MUX_MODE5 ) /* (D7) gpmc_a4.pr1_mii1_txd1 */ 0x4c ( PIN_OUTPUT | MUX_MODE5 ) /* (A4) gpmc_a3.pr1_mii1_txd2 */ 0x48 ( PIN_OUTPUT | MUX_MODE5 ) /* (C6) gpmc_a2.pr1_mii1_txd3 */ 0x6c ( PIN_INPUT | MUX_MODE5 ) /* (D8) gpmc_a11.pr1_mii1_rxd0 */ 0x68 ( PIN_INPUT | MUX_MODE5 ) /* (G8) gpmc_a10.pr1_mii1_rxd1 */ 0x64 ( PIN_INPUT | MUX_MODE5 ) /* (B4) gpmc_a9.pr1_mii1_rxd2 */ 0x60 ( PIN_INPUT | MUX_MODE5 ) /* (F7) gpmc_a8.pr1_mii1_rxd3 */ 0x40 ( PIN_OUTPUT | MUX_MODE5 ) /* (C3) gpmc_a0.pr1_mii1_txen */ 0x5c ( PIN_INPUT | MUX_MODE5 ) /* (F6) gpmc_a7.pr1_mii_mr1_clk */ 0x44 ( PIN_INPUT | MUX_MODE5 ) /* (C5) gpmc_a1.pr1_mii1_rxdv */ 0x74 ( PIN_INPUT | MUX_MODE5 ) /* (B3) gpmc_wpn.pr1_mii1_rxer */ 0x24c ( PIN_INPUT | MUX_MODE5 ) /* (E24) gpio5_13.pr1_mii1_rxlink */ 0x244 ( PIN_INPUT | MUX_MODE5 ) /* (F23) gpio5_11.pr1_mii1_crs */ 0x23c ( PIN_INPUT | MUX_MODE5 ) /* (F24) gpio5_9.pr1_mii1_col */ >; }; pr1_mdio_pins: pr1_mdio_pins { pinctrl-single,pins = < 0x14c ( PIN_OUTPUT | MUX_MODE8 ) /* (B17) mdio_clk.pr1_mdio_mdclk */ 0x148 ( PIN_INPUT | MUX_MODE8 ) /* (A17) mdio_data.pr1_mdio_data */ 0x1ac ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (L24) mcasp0_ahclkx.gpio3[21] */ >; }; /* snip */ &pruss_soc_bus { status = "okay"; pruss1: pruss@54400000 { status = "okay"; pru1_0: pru@54434000 { status = "okay"; }; pru1_1: pru@54438000 { status = "okay"; }; }; }; &pruss1_mdio { pinctrl-0 = <&pr1_mdio_pins>; pinctrl-names = "default"; status = "okay"; reset-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>; reset-delay-us = <500>; /* PHY datasheet states 500us min */ pruss1_eth1_phy: ethernet-phy@1 { reg = <0>; }; /* DOESN"T EXIST */ pruss1_eth0_phy: ethernet-phy@0 { reg = <1>; }; };