Skip to contentSkip to conversation

colibri_imx6: set gpr1 ENET_CLK_SEL

PATCH New Igor Opaniuk 2 participants 2 messages Mar 12, 2020 – Mar 13, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 colibri_imx6: set gpr1 ENET_CLK_SEL

From: Igor Opaniuk <[email protected]>

This fixes the issue when PHY auto negotiation never completes.

Fixes 431cd76dd8("colibri_imx6: migrate to DM_ETH")

---

 board/toradex/colibri_imx6/colibri_imx6.c | 3 +++
 1 file changed, 3 insertions(+)
board/toradex/colibri_imx6/colibri_imx6.c +3 -0
index f04b749311..d11401ecab 100644
@@ -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;
 }
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 colibri_imx6: set gpr1 ENET_CLK_SEL

Quoted 7 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

This fixes the issue when PHY auto negotiation never completes.

Fixes 431cd76dd8("colibri_imx6: migrate to DM_ETH")
Quoted 28 lines

---

 board/toradex/colibri_imx6/colibri_imx6.c | 3 +++
 1 file changed, 3 insertions(+)
board/toradex/colibri_imx6/colibri_imx6.c +3 -1
index f04b749311..d11401ecab 100644
@@ -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;
 }
 
--

2.17.1

Signature · 5 lines
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00