Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3930977pxu; Wed, 9 Dec 2020 04:25:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH+ofbNhtj3PnGnseIvSvqq39U1g451fjYMYDvye9DGO/sfZ5rp0KBFsx9nIxqji+YPJpa X-Received: by 2002:a50:e00b:: with SMTP id e11mr1737394edl.303.1607516724483; Wed, 09 Dec 2020 04:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607516724; cv=none; d=google.com; s=arc-20160816; b=WNkdUyav2GSKvFrRXfZsqFsy7aUEord6uVyC6HH1TiLlA2oIWE+fUN3KEH2nKxHI6o y7fn+u7p/jTZdtvoNRsTvY1Un1DavpS7L5WkB9pWaFIywy3/tyZVDbBLzA8qZs4ryABu zYMR18Vj90uE74fTfr+5cQNq4gn0mmgrHsa5OHwUfM/ULQ5jEkITcid7MmN3tHhq/d+K o7HygwLvQ1g12N5YIwzsemQLl12P1KLl7Uqa+cxpzIlY5Bh7jS/0eZmARz2viqOmhlMv YphYoP2IRuFCRxVbLOU85leEnvwRh6gtVU/O/SJU9NVOPjtK+mEqC4SEUNh+9x562jDF rDUQ== 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 :message-id:date:subject:cc:to:from; bh=QJ1QCh9xbPeTxyCUiuW5Vj87Rbb9WkGbf2UOytn/9yk=; b=IGbk7O0McAQ9nNXU44hefVBgQJOHDGwM7A3aiKhrU2JyCRNml08KSYH93LM8w19QTF 6HJezErm4EgF/E9JU5Apz74tfi1vnWV40kOTvBtrqouFMvCYTs38B+LOvG2KdCkhz9xq KCs/MEoJe6xAlxG+5YXYoFApn06m8QBvSB4vqQCvJF6h4+4AdaN3LCMCmu0cDscEWYkz TG/JrbTFAWEEAodZhmGhDdiHY8MJQcHygvuk7RQcQInoggazr9mDSXUjpwWGsfArKH/Q gvPI76dkq/dyFYsKnNwG/UaDFSD3dKbzOWtjJjF5OIkY8l2JYQrZgR8fIjhPYOqcml5S Y1dg== 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 a12si648596ejg.220.2020.12.09.04.25.01; Wed, 09 Dec 2020 04:25:24 -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 S1731504AbgLIMVv (ORCPT + 99 others); Wed, 9 Dec 2020 07:21:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731495AbgLIMVn (ORCPT ); Wed, 9 Dec 2020 07:21:43 -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 104C2C061794 for ; Wed, 9 Dec 2020 04:21:03 -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 1kmySm-0001Qs-R2; Wed, 09 Dec 2020 13:20:56 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kmySi-0006qb-Q4; Wed, 09 Dec 2020 13:20:52 +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 v1] ARM: imx: mach-imx6ul: remove 14x14 EVK specific PHY fixup Date: Wed, 9 Dec 2020 13:20:51 +0100 Message-Id: <20201209122051.26151-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 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 Remove board specific PHY fixup introduced by commit: | 709bc0657fe6f9f5 ("ARM: imx6ul: add fec MAC refrence clock and phy fixup init") This fixup addresses boards with a specific configuration: a KSZ8081RNA PHY with attached clock source to XI (Pin 8) of the PHY equal to 50MHz. For the KSZ8081RND PHY, the meaning of the reg 0x1F bit 7 is different (compared to the KSZ8081RNA). A set bit means: - KSZ8081RNA: clock input to XI (Pin 8) is 50MHz for RMII - KSZ8081RND: clock input to XI (Pin 8) is 25MHz for RMII In other configurations, for example a KSZ8081RND PHY or a KSZ8081RNA with 25Mhz clock source, the PHY will glitch and stay in not recoverable state. It is not possible to detect the clock source frequency of the PHY. And it is not possible to automatically detect KSZ8081 PHY variant - both have same PHY ID. It is not possible to overwrite the fixup configuration by providing proper device tree description. The only way is to remove this fixup. If this patch breaks network functionality on your board, fix it by adding PHY node with following properties: ethernet-phy@x { ... micrel,led-mode = <1>; clocks = <&clks IMX6UL_CLK_ENET_REF>; clock-names = "rmii-ref"; ... }; The board which was referred in the initial patch is already fixed. See: arch/arm/boot/dts/imx6ul-14x14-evk.dtsi Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6ul.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c index e018e716735f..eabcd35c01a5 100644 --- a/arch/arm/mach-imx/mach-imx6ul.c +++ b/arch/arm/mach-imx/mach-imx6ul.c @@ -27,30 +27,9 @@ static void __init imx6ul_enet_clk_init(void) pr_err("failed to find fsl,imx6ul-iomux-gpr regmap\n"); } -static int ksz8081_phy_fixup(struct phy_device *dev) -{ - if (dev && dev->interface == PHY_INTERFACE_MODE_MII) { - phy_write(dev, 0x1f, 0x8110); - phy_write(dev, 0x16, 0x201); - } else if (dev && dev->interface == PHY_INTERFACE_MODE_RMII) { - phy_write(dev, 0x1f, 0x8190); - phy_write(dev, 0x16, 0x202); - } - - return 0; -} - -static void __init imx6ul_enet_phy_init(void) -{ - if (IS_BUILTIN(CONFIG_PHYLIB)) - phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK, - ksz8081_phy_fixup); -} - static inline void imx6ul_enet_init(void) { imx6ul_enet_clk_init(); - imx6ul_enet_phy_init(); } static void __init imx6ul_init_machine(void) -- 2.29.2