This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5716: davinci_mdio: no live phy, scanning all & probe of 48485000.mdio failed with error -5

Part Number: AM5716

Team,

We are trying to bring OOB support for AM5716 based custom switch with Linux v4.14.
We are seeing the below errors in the dmesg logs.

[    9.998133] libphy: Fixed MDIO Bus: probed

[   10.047837] tun: Universal TUN/TAP device driver, 1.6

[   10.167197] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000

[   10.259724] davinci_mdio 48485000.mdio: no live phy, scanning all

[   10.334710] davinci_mdio: probe of 48485000.mdio failed with error -5

[   10.413064] cpsw 48484000.ethernet: Detected MACID = a8:10:87:91:2a:fe

[   10.492677] cpsw 48484000.ethernet: cpsw: Detected MACID = a8:10:87:91:2a:ff

Below are the dtsi file changes for your reference.

rgmii0_switch_pins: rgmii0_switch_pins {
pinctrl-single,pins = <
0x260 (INPUT_EN | MUX_MODE3) /* rgmii0_txd1.rgmii0_txd1 */
0x254 (PIN_INPUT | MUX_MODE3) /* rgmii0_txctl.rgmii0_txctl */
0x250 (INPUT_EN | MUX_MODE3) /* rgmii0_txc.rgmii0_txc */
0x264 (INPUT_EN | MUX_MODE3) /* rgmii0_txd0.rgmii0_txd0 */
0x248 (PIN_INPUT_SLEW | MUX_MODE3) /* uart3_rxd.gpio5_18 */
0x24C (PIN_INPUT_SLEW | MUX_MODE3) /* uart3_txd.gpio5_19 */
0x268 (INPUT_EN | MUX_MODE3) /* rgmii0_rxc.rgmii0_rxc */
0x27C (MUX_MODE3) /* rgmii0_rxd0.rgmii0_rxd0 */
0x278 (MUX_MODE3) /* rgmii0_rxd1.rgmii0_rxd1 */
0x270 (MUX_MODE3) /* rgmii0_rxd3.rgmii0_rxd3 */
0x26C (MUX_MODE3) /* rgmii0_rxctl.rgmii0_rxctl */
0x240 (PIN_INPUT | MUX_MODE3) /* mdio_d.mdio_d */
0x25C (INPUT_EN | MUX_MODE3) /* rgmii0_txd2.rgmii0_txd2 */
0x23C (PIN_INPUT | MUX_MODE3) /* mdio_mclk.mdio_mclk */
0x258 (INPUT_EN | MUX_MODE3) /* rgmii0_txd3.rgmii0_txd3 */
0x274 (MUX_MODE3) /* rgmii0_rxd2.rgmii0_rxd2 */
>;
};

davinci_mdio_pins_default: davinci_mdio_pins_default {
pinctrl-single,pins = <
/* MDIO */
0x190 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* vin2a_d10.mdio_mclk */
0x194 (PIN_INPUT_PULLUP | MUX_MODE3) /* vin2a_d11.mdio_d */
>;
};

&mac {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii0_switch_pins>;
dual_emac;
};

&davinci_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&davinci_mdio_pins_default>;
};

&cpsw_emac0 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "mii";
dual_emac_res_vlan = <1>;
};

&cpsw_emac1 {
phy_id = <&davinci_mdio>, <2>;
phy-mode = "mii";
dual_emac_res_vlan = <2>;
};


Do we need to do additional dtsi configuration or any other code changes to resolve this error ?

Please let us know your suggestions.

Note: uname -a output: 

Linux 4.14.115-rt59 #1 SMP Fri Aug 6 15:21:58 UTC 2021 armv7l GNU/Linux