* [PATCH] ARM: imx6q: remove KSZ9021 PHY fixup
@ 2026-08-15 15:32 Heiner Kallweit
0 siblings, 0 replies; only message in thread
From: Heiner Kallweit @ 2026-08-15 15:32 UTC (permalink / raw)
To: Russell King, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
Tom Rini, Ilias Apalodimas, Stefano Babic, NXP i.MX U-Boot Team
477fce49aef4 ("arm/imx6q-sabrelite: add enet phy ksz9021rn fixup") added
this PHY fixup in 2011. In 2013 954c396756e3 ("net/phy: micrel: Add OF
configuration support for ksz9021") added support for configuring
pad skew parameters via OF, removing the need for the board-level fixup.
Note:
In 2013 14078291d89b ("ARM: i.MX6: call ksz9021 phy fixup for all i.MX6
boards") extended usage of the fixup to nitrogen6x and titanium.
nitrogen6x configures the PHY properly via OF, and titanium has no
mainline Linux support. From u-boot titanium support was removed in 2021.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
arch/arm/mach-imx/mach-imx6q.c | 30 ------------------------------
include/linux/micrel_phy.h | 5 -----
2 files changed, 35 deletions(-)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 7f620092575..58f53fba202 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -20,26 +20,6 @@
#include "cpuidle.h"
#include "hardware.h"
-/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
-static int ksz9021rn_phy_fixup(struct phy_device *phydev)
-{
- if (IS_BUILTIN(CONFIG_PHYLIB)) {
- /* min rx data delay */
- phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
- 0x8000 | MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW);
- phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0x0000);
-
- /* max rx/tx clock delay, min rx/tx control delay */
- phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
- 0x8000 | MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW);
- phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0xf0f0);
- phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
- MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW);
- }
-
- return 0;
-}
-
/*
* fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High
* as they are used for slots1-7 PERST#
@@ -68,14 +48,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, ventana_pciesw_early_fixup);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, ventana_pciesw_early_fixup);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, ventana_pciesw_early_fixup);
-static void __init imx6q_enet_phy_init(void)
-{
- if (IS_BUILTIN(CONFIG_PHYLIB)) {
- phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
- ksz9021rn_phy_fixup);
- }
-}
-
static void __init imx6q_1588_init(void)
{
struct device_node *np;
@@ -179,8 +151,6 @@ static void __init imx6q_init_machine(void)
imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
imx_get_soc_revision());
- imx6q_enet_phy_init();
-
of_platform_default_populate(NULL, NULL, NULL);
imx_anatop_init();
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 9c6f9817383..bb71b2510c2 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -47,11 +47,6 @@
#define MICREL_PHY_FXEN BIT(1)
#define MICREL_KSZ8_P1_ERRATA BIT(2)
-#define MICREL_KSZ9021_EXTREG_CTRL 0xB
-#define MICREL_KSZ9021_EXTREG_DATA_WRITE 0xC
-#define MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW 0x104
-#define MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW 0x105
-
/* Device specific MII_BMCR (Reg 0) bits */
/* 1 = HP Auto MDI/MDI-X mode, 0 = Microchip Auto MDI/MDI-X mode */
#define KSZ886X_BMCR_HP_MDIX BIT(5)
--
2.55.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-15 15:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15 15:32 [PATCH] ARM: imx6q: remove KSZ9021 PHY fixup Heiner Kallweit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox