colibri_imx6: set gpr1 ENET_CLK_SEL
authorIgor Opaniuk <igor.opaniuk@toradex.com>
Fri, 27 Mar 2020 10:28:17 +0000 (12:28 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 7 Apr 2020 08:40:19 +0000 (10:40 +0200)
This fixes the issue when PHY auto negotiation never completes.

Fixes: 431cd76dd8("colibri_imx6: migrate to DM_ETH")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
board/toradex/colibri_imx6/colibri_imx6.c

index f04b7493119d9ea2861cb3b6a8d97c15bd684e51..d11401ecab8abffc548b5428e7ec081a00aca3e1 100644 (file)
@@ -354,12 +354,15 @@ int board_phy_config(struct phy_device *phydev)
 int setup_fec(void)
 {
        int ret;
+       struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
 
        /* provide the PHY clock from the i.MX 6 */
        ret = enable_fec_anatop_clock(0, ENET_50MHZ);
        if (ret)
                return ret;
 
+       setbits_le32(&iomuxc_regs->gpr[1], IOMUXC_GPR1_ENET_CLK_SEL_MASK);
+
        return 0;
 }