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.

AM4378: linux 5.10 ethernet no longer works

Part Number: AM4378

Linux version 5.10.65-00022-g0f2782ebe1fa-dirty

in 5.4 i was able to have in my dts file for ethernet:

&mac {
slaves = <1>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mii_1_pins_default>;
pinctrl-1 = <&mii_1_pins_sleep>;
status = "okay";
};

&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mdio_1_pins_default>;
pinctrl-1 = <&mdio_1_pins_sleep>;
status = "okay";
};

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

we have a TI phy DP83848 connected to MII1 1 in MII mode 10/100

and that doesn't seem to be allowed anymore. so i followed up with some changes and it seems no matter what i cannot get it to work. some things i have tried:

&mac_sw {
pinctrl-names = "default";
pinctrl-0 = <&mii_1_pins_default>;
status = "okay";
};

&davinci_mdio_sw {
pinctrl-names = "default";
pinctrl-0 = <&mdio_1_pins_default>;

ethphy0: ethernet-phy@0 {
reg = <0>;
};

ethphy1: ethernet-phy@1 {
reg = <1>;
};
};

&cpsw_port1 {
phy-handle = <&ethphy0>;
phy-mode = "mii";
ti,dual-emac-pvid = <1>;
};

&cpsw_port2 {
phy-handle = <&ethphy1>;
phy-mode = "mii";
ti,dual-emac-pvid = <2>;
};

that didn't work

&mac_sw {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mii_1_pins_default>;
pinctrl-1 = <&mii_1_pins_sleep>;
status = "okay";
};

&davinci_mdio_sw {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mdio_1_pins_default>;
pinctrl-1 = <&mdio_1_pins_sleep>;

ethphy1: ethernet-phy@1 {
reg = <1>;
};
};

&cpsw_port1 {
phy-handle = <&ethphy1>;
phy-mode = "rmii";
ti,dual-emac-pvid = <1>;
};

&cpsw_port2 {
status = "disabled";
};

that didn't work

&mac_sw {
slaves = <1>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mii_1_pins_default>;
pinctrl-1 = <&mii_1_pins_sleep>;
status = "okay";
};

&davinci_mdio_sw {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mdio_1_pins_default>;
pinctrl-1 = <&mdio_1_pins_sleep>;
status = "okay";
};

&cpsw_port1 {
phy_id = <&davinci_mdio_sw>, <1>;
phy-mode = "mii";
};

that didn't work

every time when my board boots i get seemingly no error message about networks and when i do ifconfig i get

root@am437x-evm:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:82 errors:0 dropped:0 overruns:0 frame:0
TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6220 (6.0 KiB) TX bytes:6220 (6.0 KiB)

i would really like to know the magic comination to make this work again

  • Hi,

    Could you please attach the boot log to the forum post? Also could you attach the results of ifconfig -a?

    Best Regards,

    Schuyler

  • so my defconfig was pretty old. it turns out that i was missing and has extra some config options

    including these made it work:

    CONFIG_TI_DAVINCI_EMAC=y

    CONFIG_TI_CPSW_SWITCHDEV=y

    with this as my dts file network section:

    &mac_sw {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mii_1_pins_default>;
    pinctrl-1 = <&mii_1_pins_sleep>;
    status = "okay";
    };

    &davinci_mdio_sw {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mdio_1_pins_default>;
    pinctrl-1 = <&mdio_1_pins_sleep>;

    ethphy1: ethernet-phy@1 {
    reg = <1>;
    };
    };

    &cpsw_port1 {
    phy-handle = <&ethphy1>;
    phy-mode = "mii";
    ti,dual-emac-pvid = <1>;
    };

    &cpsw_port2 {
    status = "disabled";
    };