We have a instability on detection of Ethernet PHYs with wrong behavior of RJ-45 led indicators.
Bellow we collect some messages from Linux startup and the Device tree configuration for validation
a) Below we have the messages from Linux startup during a process of wrong detection
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Kernel Logging Service.
[ OK ] Started D-Bus System Message Bus.
Starting Network Manager...
Starting Load eth0...
[ OK ] Started Network Time Service (one-shot ntpdate mode).
[ OK ] Started Load power supply driver.
[ 26.626634] net eth0: initializing cpsw version 1.12 (0)
[ 26.635634] net eth0: phy found : id is : 0x7c0f1
[ 26.641209] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ OK ] Started Network Manager.
[ OK ] Started Login Service.
[ OK ] Reached target Network.
Starting WPA supplicant...
Starting Authorization Manager...
b) Below we have the Device Tree (archive am335x-mfe-common.dtsi) with all configuration of Ethernet PHY
cpsw_mfc1: cpsw_mfc1 {
pinctrl-single,pins = <
/* Slave 1 */
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* (H17) RMII1_CRS_DV gmii1_crs.rmii1_crs_dv */
0x110 (PIN_INPUT_PULLUP | MUX_MODE1) /* (J15) RMII1_RXERR gmii1_rxer.rmii1_rxer */
0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (J16) RMII1_TXEN gmii1_txen.rmii1_txen */
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K17) RMMI1_TXD0 gmii1_txd0.rmii1_txd0 */
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K16) RMMI1_TXD1 gmii1_txd1.rmii1_txd1 */
0x140 (PIN_INPUT_PULLUP | MUX_MODE1) /* (M16) RMMI1_RXD0 gmii1_rxd0.rmii1_rxd0 */
0x13c (PIN_INPUT_PULLUP | MUX_MODE1) /* (L15) RMII1_RXD1 gmii1_rxd1.rmii1_rxd1 */
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* (H18) RMII1_REFCLK rmii1_refclk.rmii1_refclk */
>;
};
cpsw_mfc1_sleep: cpsw_mfc1_sleep {
pinctrl-single,pins = <
/* Slave 1 reset value */
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
cpsw_mfc2: cpsw_mfc2 {
pinctrl-single,pins = <
/* Slave 2 */
0x070 (PIN_INPUT_PULLDOWN | MUX_MODE3 ) /* (T17) RMII2_CRS_DV gpmc_wait0.rmii2_crs_dv */
0x074 (PIN_INPUT_PULLUP | MUX_MODE3 ) /* (U17) RMII2_RXER gpmc_wpn.rmii2_rxer */
0x040 (PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (R13) RMII2_TXEN gpmc_a0.rmii2_txen */
0x054 (PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (V15) RMII2_TXD0 gpmc_a5.rmii2_txd0 */
0x050 (PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (R14) RMII2_TXD1 gpmc_a4.rmii2_txd1 */
0x06c (PIN_INPUT_PULLUP | MUX_MODE3 ) /* (V17) RMII2_RXD0 gpmc_a11.rmii2_rxd0 */
0x068 (PIN_INPUT_PULLUP | MUX_MODE3 ) /* (T16) RMII2_RXD1 gpmc_a10.rmii2_rxd1 */
0x108 (PIN_INPUT_PULLDOWN | MUX_MODE1 ) /* (H16) RMII2_REFCLK gmii1_col.rmii2_refclk */
>;
};
cpsw_mfc2_sleep: cpsw_mfc2_sleep {
pinctrl-single,pins = <
/* Slave 2 reset value */
0x070 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x074 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x040 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x054 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x050 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x06c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x068 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
davinci_mdio_default: davinci_mdio_default {
pinctrl-single,pins = <
/* MDIO */
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* (M17) MDIO_DATA mdio_data.mdio_data */
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* (M18) 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)
>;
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
};
&phy_sel {
rmii-clock-ext;
};
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_mfc1 &cpsw_mfc2>;
pinctrl-1 = <&cpsw_mfc1_sleep &cpsw_mfc1_sleep>;
status = "okay";
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};
Thanks in advance.
ROFINO