diff mbox series

[v1] colibri_imx6: set gpr1 ENET_CLK_SEL

Message ID 20200312213738.29319-1-igor.opaniuk@gmail.com
State Superseded
Headers show
Series [v1] colibri_imx6: set gpr1 ENET_CLK_SEL | expand

Commit Message

Igor Opaniuk March 12, 2020, 9:37 p.m. UTC
From: Igor Opaniuk <igor.opaniuk at toradex.com>

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 at toradex.com>
---

 board/toradex/colibri_imx6/colibri_imx6.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Oleksandr Suvorov March 13, 2020, 10:16 a.m. UTC | #1
On Thu, Mar 12, 2020 at 11:37 PM Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk at toradex.com>
>
> 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 at toradex.com>

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov at toradex.com>

> ---
>
>  board/toradex/colibri_imx6/colibri_imx6.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
> index f04b749311..d11401ecab 100644
> --- a/board/toradex/colibri_imx6/colibri_imx6.c
> +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> @@ -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
>
diff mbox series

Patch

diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index f04b749311..d11401ecab 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -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;
 }