Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2473135pxb; Tue, 9 Mar 2021 03:30:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/KzkDvDsdHJIMOiTzMO2iLYq3/sYElN2MoglTmdZdtfoOvxZL+gLqgvhMeuyEOpVHDMtt X-Received: by 2002:a17:906:f296:: with SMTP id gu22mr19310791ejb.20.1615289441000; Tue, 09 Mar 2021 03:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615289440; cv=none; d=google.com; s=arc-20160816; b=BlhxSE2VGbQQpfV0BuWI0heYLiUH4p8BcKWJmRPkxtX/yRZdNxaqIZJNXjhJbwyJVR otJ+jgdiT7I9HlxouReNh1yKKw3r/CMD06gRfD/5co+kIKBIotxG67qynuOKJ6BMUsT3 Uk5ne7pDSRJOebhdXfIO9lREH6QZC6xhBa2lYHjlN9Yo2D7hhxKw8euFjjb7jLqgstNl mO2+j3KXEy4wVI+sQMn98AWhI3qShYpts71Ut3f4cjpISrE33exNDkjhgrrMnxehYmFP xkwxQkcN+dUDl+9aFGksKtkG1ASUUD3DbssXTcMay+Uc9Ec9lv5WpIJ1Ocz3VVWzdvi7 kWKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=99klpUokTDBYGHuncE5ZKbqvs6spU8fueGDGvMVgX44=; b=icHG7mtXAlkxhwYZjyo1OZqcs1b1UY02Zd7yz6bd4QK0ythxrQThYKrCQNwNxr2wql 5VTeJ6+Jaijy01MN8lNafJiUQ8JyARdqAp5Zc4sU3y2e+/u9BXusLD+aV8xZ9/JYDF4l j1PhSB/bWuPVlGdmsBR0DKp3Ae5BLr8X1SfsK97rHQ07B5KA3NHDKcOIgKldmN11L2Fu aAMKI06/bfBEGN2fkOr+9Gbym/trB/uoxcBI3SxPz3MtJGm8Uu8bsnB16Ro1rV201VD3 WD22+cpkUjtEh1TGrSpV6zyXVqFSesWWdCgoFD6pUBe0kAb2skC8ZCXuwjqnTgs79Cvn V7tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si5240182ejo.22.2021.03.09.03.30.18; Tue, 09 Mar 2021 03:30:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbhCIL1U (ORCPT + 99 others); Tue, 9 Mar 2021 06:27:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbhCIL0q (ORCPT ); Tue, 9 Mar 2021 06:26:46 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55837C06175F for ; Tue, 9 Mar 2021 03:26:45 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJaVF-0006wg-8H; Tue, 09 Mar 2021 12:26:17 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lJaVE-0000Bf-4Y; Tue, 09 Mar 2021 12:26:16 +0100 From: Oleksij Rempel To: Shawn Guo , Sascha Hauer , Andrew Lunn , Florian Fainelli , Heiner Kallweit Cc: Oleksij Rempel , kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam , David Jander , Russell King , Philippe Schenker Subject: [PATCH v2 4/7] ARM: imx6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs Date: Tue, 9 Mar 2021 12:26:12 +0100 Message-Id: <20210309112615.625-5-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210309112615.625-1-o.rempel@pengutronix.de> References: <20210309112615.625-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm/boot/dts/imx6dl-riotboard.dts | 2 ++ arch/arm/mach-imx/mach-imx6q.c | 30 -------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl-riotboard.dts b/arch/arm/boot/dts/imx6dl-riotboard.dts index 065d3ab0f50a..e7d9bfbfd0e4 100644 --- a/arch/arm/boot/dts/imx6dl-riotboard.dts +++ b/arch/arm/boot/dts/imx6dl-riotboard.dts @@ -106,6 +106,8 @@ rgmii_phy: ethernet-phy@4 { reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>; reset-deassert-us = <1000>; + qca,smarteee-tw-us-1g = <24>; + qca,clk-out-frequency = <125000000>; }; }; }; 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.29.2