From: Oleksij Rempel <o.rempel@pengutronix.de> To: Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam <festevam@gmail.com>, David Jander <david@protonic.nl>, Russell King <linux@armlinux.org.uk>, Philippe Schenker <philippe.schenker@toradex.com> Subject: [PATCH v1 4/7] ARM i.MX6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs Date: Wed, 3 Feb 2021 10:18:54 +0100 [thread overview] Message-ID: <20210203091857.16936-5-o.rempel@pengutronix.de> (raw) In-Reply-To: <20210203091857.16936-1-o.rempel@pengutronix.de> This configuration should be set over device tree. If this patch breaks network functionality on your system, enable the AT803X_PHY driver and set following device tree property in the PHY node: qca,clk-out-frequency = <125000000>; Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- arch/arm/mach-imx/mach-imx6q.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 4c840e116003..d12b571a61ac 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -68,25 +68,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 int ar8031_phy_fixup(struct phy_device *dev) -{ - u16 val; - - /* To enable AR8031 output a 125MHz clk from CLK_25M */ - phy_write(dev, 0xd, 0x7); - phy_write(dev, 0xe, 0x8016); - phy_write(dev, 0xd, 0x4007); - - val = phy_read(dev, 0xe); - val &= 0xffe3; - val |= 0x18; - phy_write(dev, 0xe, val); - - return 0; -} - -#define PHY_ID_AR8031 0x004dd074 - static int ar8035_phy_fixup(struct phy_device *dev) { u16 val; @@ -101,15 +82,6 @@ static int ar8035_phy_fixup(struct phy_device *dev) val = phy_read(dev, 0xe); phy_write(dev, 0xe, val & ~(1 << 8)); - /* - * Enable 125MHz clock from CLK_25M on the AR8031. This - * is fed in to the IMX6 on the ENET_REF_CLK (V22) pad. - * Also, introduce a tx clock delay. - * - * This is the same as is the AR8031 fixup. - */ - ar8031_phy_fixup(dev); - return 0; } @@ -120,8 +92,6 @@ 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); - phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffef, - ar8031_phy_fixup); phy_register_fixup_for_uid(PHY_ID_AR8035, 0xffffffef, ar8035_phy_fixup); } -- 2.30.0
WARNING: multiple messages have this Message-ID (diff)
From: Oleksij Rempel <o.rempel@pengutronix.de> To: Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com> Cc: Philippe Schenker <philippe.schenker@toradex.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk>, Oleksij Rempel <o.rempel@pengutronix.de>, linux-imx@nxp.com, kernel@pengutronix.de, David Jander <david@protonic.nl>, Fabio Estevam <festevam@gmail.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 4/7] ARM i.MX6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs Date: Wed, 3 Feb 2021 10:18:54 +0100 [thread overview] Message-ID: <20210203091857.16936-5-o.rempel@pengutronix.de> (raw) In-Reply-To: <20210203091857.16936-1-o.rempel@pengutronix.de> This configuration should be set over device tree. If this patch breaks network functionality on your system, enable the AT803X_PHY driver and set following device tree property in the PHY node: qca,clk-out-frequency = <125000000>; Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- arch/arm/mach-imx/mach-imx6q.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 4c840e116003..d12b571a61ac 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -68,25 +68,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 int ar8031_phy_fixup(struct phy_device *dev) -{ - u16 val; - - /* To enable AR8031 output a 125MHz clk from CLK_25M */ - phy_write(dev, 0xd, 0x7); - phy_write(dev, 0xe, 0x8016); - phy_write(dev, 0xd, 0x4007); - - val = phy_read(dev, 0xe); - val &= 0xffe3; - val |= 0x18; - phy_write(dev, 0xe, val); - - return 0; -} - -#define PHY_ID_AR8031 0x004dd074 - static int ar8035_phy_fixup(struct phy_device *dev) { u16 val; @@ -101,15 +82,6 @@ static int ar8035_phy_fixup(struct phy_device *dev) val = phy_read(dev, 0xe); phy_write(dev, 0xe, val & ~(1 << 8)); - /* - * Enable 125MHz clock from CLK_25M on the AR8031. This - * is fed in to the IMX6 on the ENET_REF_CLK (V22) pad. - * Also, introduce a tx clock delay. - * - * This is the same as is the AR8031 fixup. - */ - ar8031_phy_fixup(dev); - return 0; } @@ -120,8 +92,6 @@ 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); - phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffef, - ar8031_phy_fixup); phy_register_fixup_for_uid(PHY_ID_AR8035, 0xffffffef, ar8035_phy_fixup); } -- 2.30.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-03 9:20 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-03 9:18 [PATCH v1 0/7] remove different PHY fixups Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:18 ` [PATCH v1 1/7] ARM i.MX6q: remove PHY fixup for KSZ9031 Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 10:24 ` Philippe Schenker 2021-02-03 10:24 ` Philippe Schenker 2021-02-03 9:18 ` [PATCH v1 2/7] ARM i.MX6q: remove TX clock delay of ar8031_phy_fixup() Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:18 ` [PATCH v1 3/7] ARM i.MX6q: remove hand crafted PHY power up in ar8035_phy_fixup() Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel [this message] 2021-02-03 9:18 ` [PATCH v1 4/7] ARM i.MX6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs Oleksij Rempel 2021-02-03 9:18 ` [PATCH v1 5/7] ARM i.MX6q: remove Atheros AR8035 SmartEEE fixup Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:56 ` Russell King - ARM Linux admin 2021-02-03 9:56 ` Russell King - ARM Linux admin 2021-02-08 9:20 ` Oleksij Rempel 2021-02-08 9:20 ` Oleksij Rempel 2021-02-08 14:21 ` Russell King - ARM Linux admin 2021-02-08 14:21 ` Russell King - ARM Linux admin 2021-02-03 9:18 ` [PATCH v1 6/7] ARM: imx6sx: remove Atheros AR8031 PHY fixup Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:18 ` [PATCH v1 7/7] ARM: imx7d: " Oleksij Rempel 2021-02-03 9:18 ` Oleksij Rempel 2021-02-03 9:28 ` [PATCH v1 0/7] remove different PHY fixups Russell King - ARM Linux admin 2021-02-03 9:28 ` Russell King - ARM Linux admin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210203091857.16936-5-o.rempel@pengutronix.de \ --to=o.rempel@pengutronix.de \ --cc=andrew@lunn.ch \ --cc=david@protonic.nl \ --cc=f.fainelli@gmail.com \ --cc=festevam@gmail.com \ --cc=hkallweit1@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=netdev@vger.kernel.org \ --cc=philippe.schenker@toradex.com \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.