graugans / meta-udoo

:heartpulse: openembedded meta layer for the UDOO boards
MIT License
31 stars 19 forks source link

ethernet not working on seco A62 #28

Closed modjo756 closed 7 years ago

modjo756 commented 7 years ago

With the new build eth is not working on secoA62, log at boot give this error

_Configuring network interfaces... [    4.182171] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
[    4.189884] libphy: PHY fixed-0:00 not found
[    4.194210] fec 2188000.ethernet eth0: could not attach to PHY
SIOCSIFFLAGS: No such device

[    4.214395] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
[    4.222065] libphy: PHY fixed-0:00 not found
[    4.226354] fec 2188000.ethernet eth0: could not attach to PHY
SIOCSIFFLAGS: No such device_

see the full log here

graugans commented 7 years ago

From a quick check it looks like the device tree entry is looking different:

Old kernel vs. new Kernel

OLD (working) one

        pinctrl_enet: enetgrp {
            fsl,pins = <
                MX6QDL_PAD_ENET_MDIO__ENET_MDIO              0x1b0b0
                MX6QDL_PAD_ENET_MDC__ENET_MDC                0x1b0b0
                MX6QDL_PAD_RGMII_RD0__RGMII_RD0              0x1b0b0
                MX6QDL_PAD_RGMII_RD1__RGMII_RD1              0x1b0b0
                MX6QDL_PAD_RGMII_RD2__RGMII_RD2              0x1b0b0
                MX6QDL_PAD_RGMII_RD3__RGMII_RD3              0x1b0b0
                MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL        0x1b0b0
                MX6QDL_PAD_RGMII_TD0__RGMII_TD0              0x1b0b0
                MX6QDL_PAD_RGMII_TD1__RGMII_TD1              0x1b0b0
                MX6QDL_PAD_RGMII_TD2__RGMII_TD2              0x1b0b0
                MX6QDL_PAD_RGMII_TD3__RGMII_TD3              0x1b0b0
                MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL        0x1b0b0
                MX6QDL_PAD_RGMII_RXC__RGMII_RXC              0x1b0b0
                MX6QDL_PAD_RGMII_TXC__RGMII_TXC              0x1b0b0
                MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK         0x1b0b0

                /*  Phy Interrupt  */
                MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28            0x1f071
                /*  ENET RESET */
                MX6QDL_PAD_EIM_D23__GPIO3_IO23               0x1f071
            >;
        };

New (not working) one

        pinctrl_enet: enetgrp {
            fsl,pins = <
                MX6QDL_PAD_ENET_MDIO__ENET_MDIO     0x1b0b0
                MX6QDL_PAD_ENET_MDC__ENET_MDC       0x1b0b0
                MX6QDL_PAD_RGMII_RD0__RGMII_RD0     0x1b0b0
                MX6QDL_PAD_RGMII_RD1__RGMII_RD1     0x1b0b0
                MX6QDL_PAD_RGMII_RD2__RGMII_RD2     0x1b0b0
                MX6QDL_PAD_RGMII_RD3__RGMII_RD3     0x1b0b0
                MX6QDL_PAD_RGMII_TD0__RGMII_TD0     0x1b0b0
                MX6QDL_PAD_RGMII_TD1__RGMII_TD1     0x1b0b0
                MX6QDL_PAD_RGMII_TD2__RGMII_TD2     0x1b0b0
                MX6QDL_PAD_RGMII_TD3__RGMII_TD3     0x1b0b0
                MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b0b0
                MX6QDL_PAD_RGMII_RXC__RGMII_RXC     0x1b0b0
                MX6QDL_PAD_RGMII_TXC__RGMII_TXC     0x1b0b0
                MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x1b0b0
                MX6QDL_PAD_EIM_D23__GPIO3_IO23          0x80000000
            >;
        };

        phy_running: phy_runningrp {
            fsl,pins = <
                MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b0b0
            >;
        };

        phy_reset: phy_resetgrp {
            fsl,pins = <
                MX6QDL_PAD_RGMII_RX_CTL__GPIO6_IO24 0x80000000
            >;
        };
graugans commented 7 years ago

Maybe one of the guys from Seco/UDOO can assist here.

I am not a device tree pro.

stefano-garzarella commented 7 years ago

I confirm, I have exactly the same problem!

modjo756 commented 7 years ago

I make some research (on google) about this problem this morning and find nothing to help ! This afternoon i will try a build with a patch to come back to old kernel version (only for eth pin) and check if it works ...

graugans commented 7 years ago

@stefano-garzarella what buildsystem/distributio are you using?

For more details about the device tree binding can be found here

graugans commented 7 years ago

Please check with the latest commit. For me it is working within a Gigabit network

modjo756 commented 7 years ago

@graugans , i think your commit works, because i did the same today and it also working for me, see here. In this patch i also added can,spi,i2c ... I also added a secosbca62 folder with uEnv.txt in uboot to build uboot for A62 (if not i need to build it manually !)

graugans commented 7 years ago

Okay, I'll check my uEnv.txt logic tomorrow. I recommend to split the patch for CAN, I2C and SPI. Maybe we can push the Ethernet changes upstream to the UDOO repo.

fmntf commented 7 years ago

Yes, pull requests are welcome!

modjo756 commented 7 years ago

I have split my patch in some modules, see here. Network is ok now, i close this issue.