ARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY
Subsystems (3)
PATCH 1/1 ARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY
When using External PHY, reset the mux to use the external PHY in case U-Boot was chainloaded from a misconfigured bootloader.
Fixes 33e3378091 ("ARM: meson: rework soc arch file to prepare for new SoC")
Signed-off-by Neil Armstrong <[email protected]>
--- arch/arm/mach-meson/board-gx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
arch/arm/mach-meson/board-gx.c +12 -5
@@ -112,6 +112,11 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags)GX_ETH_REG_0_TX_RATIO (4 ) |GX_ETH_REG_0_PHY_CLK_EN | GX_ETH_REG_0_CLK_EN); + +/* Reset to external PHY */ +if (!IS_ENABLED (CONFIG_MESON_GXBB )) +writel (0x2009087f ,GX_ETH_REG_3 ); +break ;case PHY_INTERFACE_MODE_RMII :
@@ -119,11 +124,13 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags)out_le32 (GX_ETH_REG_0 ,GX_ETH_REG_0_INVERT_RMII_CLK |GX_ETH_REG_0_CLK_EN ); -/* Use GXL RMII Internal PHY */ -if (IS_ENABLED (CONFIG_MESON_GXL ) && - (flags &MESON_USE_INTERNAL_RMII_PHY )) { -writel (0x10110181 ,GX_ETH_REG_2 ); -writel (0xe40908ff ,GX_ETH_REG_3 ); +/* Use GXL RMII Internal PHY (also on GXM) */ +if (!IS_ENABLED (CONFIG_MESON_GXBB )) { +if ((flags &MESON_USE_INTERNAL_RMII_PHY )) { +writel (0x10110181 ,GX_ETH_REG_2 ); +writel (0xe40908ff ,GX_ETH_REG_3 ); + }else +writel (0x2009087f ,GX_ETH_REG_3 ); }break ;
Signature · 1 line
2.21.0
PATCH 1/1 ARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY
Quoted 35 lines · Neil Armstrong
When using External PHY, reset the mux to use the external PHY in case U-Boot was chainloaded from a misconfigured bootloader.
Fixes 33e3378091 ("ARM: meson: rework soc arch file to prepare for new SoC")Signed-off-by Neil Armstrong <[email protected]>--- arch/arm/mach-meson/board-gx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)arch/arm/mach-meson/board-gx.c +5
-5@@ -112,6 +112,11 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags)GX_ETH_REG_0_TX_RATIO (4 ) |GX_ETH_REG_0_PHY_CLK_EN | GX_ETH_REG_0_CLK_EN); + +/* Reset to external PHY */ +if (!IS_ENABLED (CONFIG_MESON_GXBB )) +writel (0x2009087f ,GX_ETH_REG_3 ); +break ;case PHY_INTERFACE_MODE_RMII :@@ -119,11 +124,13 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags)out_le32 (GX_ETH_REG_0 ,GX_ETH_REG_0_INVERT_RMII_CLK |GX_ETH_REG_0_CLK_EN ); -/* Use GXL RMII Internal PHY */ -if (IS_ENABLED (CONFIG_MESON_GXL ) && - (flags &MESON_USE_INTERNAL_RMII_PHY )) { -writel (0x10110181 ,GX_ETH_REG_2 ); -writel (0xe40908ff ,GX_ETH_REG_3 );
arch/arm/mach-meson/board-gx.c void meson_eth_init(phy_interface_t mode, unsigned int flags) · line 136
Quoted 10 lines
arch/arm/mach-meson/board-gx.c +7
-0+/* Use GXL RMII Internal PHY (also on GXM) */ +if (!IS_ENABLED (CONFIG_MESON_GXBB )) { +if ((flags &MESON_USE_INTERNAL_RMII_PHY )) { +writel (0x10110181 ,GX_ETH_REG_2 ); +writel (0xe40908ff ,GX_ETH_REG_3 ); + }else +writel (0x2009087f ,GX_ETH_REG_3 ); }break ;
Applied to u-boot-amlogic