summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mach-imx7d.c
diff options
context:
space:
mode:
authorFugang Duan <b38611@freescale.com>2015-12-21 17:58:42 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:20:42 +0300
commit31716591e562910b4d2e458470724623402e9f22 (patch)
tree5fd275f35500650f11ca47276c25f20653e47799 /arch/arm/mach-imx/mach-imx7d.c
parent958851194208720795183ac4ac06a198a8445249 (diff)
MLK-12065 ARM: imx: imx7d: enable enet mdio open drain
The management data input/output (MDIO) bus where often high-speed, open-drain operation is required. i.MX7D TO1.0 ENET MDIO pin has no open drain as IC ticket number: TKT252980, i.MX7D TO1.1 fix the issue. Signed-off-by: Fugang Duan <B38611@freescale.com> (cherry picked from commit: a747abd5f01d278b91d1b6ee6628e1935cb7b23c) Conflicts: arch/arm/mach-imx/mach-imx7d.c
Diffstat (limited to 'arch/arm/mach-imx/mach-imx7d.c')
-rw-r--r--arch/arm/mach-imx/mach-imx7d.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 3b9796aabcbd..8a4e893ae601 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -68,6 +68,23 @@ static void __init imx7d_enet_phy_init(void)
}
}
+static void __init imx7d_enet_mdio_fixup(void)
+{
+ struct regmap *gpr;
+
+ /* The management data input/output (MDIO) bus where often high-speed,
+ * open-drain operation is required. i.MX7D TO1.0 ENET MDIO pin has no
+ * open drain as IC ticket number: TKT252980, i.MX7D TO1.1 fix the issue.
+ * GPR1[8:7] are reserved bits at TO1.0, there no need to add version check.
+ */
+ gpr = syscon_regmap_lookup_by_compatible("fsl,imx7d-iomuxc-gpr");
+ if (!IS_ERR(gpr))
+ regmap_update_bits(gpr, IOMUXC_GPR0, IMX7D_GPR0_ENET_MDIO_OPEN_DRAIN_MASK,
+ IMX7D_GPR0_ENET_MDIO_OPEN_DRAIN_MASK);
+ else
+ pr_err("failed to find fsl,imx7d-iomux-gpr regmap\n");
+}
+
static void __init imx7d_enet_clk_sel(void)
{
struct regmap *gpr;
@@ -84,6 +101,7 @@ static void __init imx7d_enet_clk_sel(void)
static inline void imx7d_enet_init(void)
{
imx6_enet_mac_init("fsl,imx7d-fec", "fsl,imx7d-ocotp");
+ imx7d_enet_mdio_fixup();
imx7d_enet_phy_init();
imx7d_enet_clk_sel();
}