Cannot enable M2X ethernet on mainline kernel

Which Khadas SBC do you use?


Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

Self-built (mainline u-boot and linux)

Please describe your issue below:

I’m trying to enable the M2X ethernet port on a mainline kernel. I have switched the portmode to PCI, and I’m using the following overlay:


/ {
        compatible = "khadas,vim3\0amlogic,a311d\0amlogic,g12b";
        fragment@0 {
                target = <&ethmac>;

                __overlay__ {
                        status = "okay";
                        phy-handle = <&internal_ephy>;

        __fixups__ {
                ethmac = "/fragment@0:target:0";

However this causes the meson8b-dwmac to be unable to find the phy:

[    8.691214] meson8b-dwmac ff3f0000.ethernet end0: validation of rgmii with support 0000000,00000000,00006280 and advertisement 0000000,00000000,00006280 failed: -22
[    8.691631] meson8b-dwmac ff3f0000.ethernet end0: no phy at addr -1
[    8.692271] meson8b-dwmac ff3f0000.ethernet end0: stmmac_open: Cannot attach to PHY (error: -19)

What am I missing?

Hello @kangaroo

Mainline kernel doesn’t support such overlays.