Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4712497pxu; Thu, 10 Dec 2020 03:44:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJza6uM138EcRfTQ5gnQibUIJ7+tuhtmhlkEuXKT4xRux334NofR2qy/dF4kKSy0OcyLiS2t X-Received: by 2002:a17:907:2131:: with SMTP id qo17mr5979349ejb.546.1607600685368; Thu, 10 Dec 2020 03:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607600685; cv=none; d=google.com; s=arc-20160816; b=F65308OE2R5wceVAIaHEAcY2vDLtXqmcpu+IMHwmDT9+5lBsIfBxCGCFpz9lvA3ibf xvzXXXOPzz2d7Cn7dZ5014srQ1XrHpihaa+zFlfPy9Qt6hDmYecMlGcQSzv8w54a2Imb fB7ASJBJcHDoi0q7HqQLE9uQFAG+lkPsgnBMWA3RjfcHqfXnGhlqYB2RmA09zOwJiKIJ 4/GumrMDwmpPb+z7sWSpoQnZWQg4DKi6Bh7cAxO7Zxs9FfA5qaZC1OR42tKA9dPD72dV qmzvJN9VZlaoubR/zqrAIk9k7c0UVHqoGvonywZGymcjhedCDRsWH2ZlKP6+eF5t+7hS 4nUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=nypLho3fMfbAXR8bo7t8Qk6DwPFdkvrsINd+gniVrrM=; b=e09cnCx+XW5j6J+Cz6MOhpVxoou5rGUO7EBsut8Zwtj/IUhRZrgPnWnfI0rq5dsHzT w+0KuMmV8xcB4hU0HlZLGLDjqhdx556/3BWzniGalnR/UTznsys5FFaork/97G5GYWR+ Xo0qmZ5u7fUtF3wMdTQm4uxz3JGJdGD1GQa4OXpfXYhkLD4Rak5zqTNV/TRGFRPnHJci pFaVAV6umrkzm4JShsyGAAWK9q7hnAIVmS3C6IqBbhvDC5/997LW1AoosKgyq/hrZJEv jNr/W3Cx1Y10ly+0SJcOhE9YuX6b4S6j5d9YYNVI6bqDFY3v4TXYw3Ync74OvFfkEZvs DguQ== 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 x2si2361323ejc.177.2020.12.10.03.44.22; Thu, 10 Dec 2020 03:44:45 -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 S2388708AbgLJKlq (ORCPT + 99 others); Thu, 10 Dec 2020 05:41:46 -0500 Received: from 5.mo178.mail-out.ovh.net ([46.105.51.53]:46239 "EHLO 5.mo178.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388426AbgLJKkv (ORCPT ); Thu, 10 Dec 2020 05:40:51 -0500 X-Greylist: delayed 1476 seconds by postgrey-1.27 at vger.kernel.org; Thu, 10 Dec 2020 05:40:49 EST Received: from player728.ha.ovh.net (unknown [10.108.57.76]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 39CFBB5284 for ; Thu, 10 Dec 2020 11:15:27 +0100 (CET) Received: from armadeus.com (lfbn-str-1-77-132.w92-140.abo.wanadoo.fr [92.140.204.132]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player728.ha.ovh.net (Postfix) with ESMTPSA id D2BEC18F28450; Thu, 10 Dec 2020 10:15:08 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G0020d5c1313-f4da-4972-9333-06acb63b90e1, 8EAEE80FF2F1CA12C9851A06ABB588534C704F12) smtp.auth=sebastien.szymanski@armadeus.com To: Oleksij Rempel , Shawn Guo , Sascha Hauer , Andrew Lunn , Florian Fainelli , Heiner Kallweit Cc: Philippe Schenker , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , linux-imx@nxp.com, kernel@pengutronix.de, David Jander , Fabio Estevam , linux-arm-kernel@lists.infradead.org References: <20201209122051.26151-1-o.rempel@pengutronix.de> From: =?UTF-8?Q?S=c3=a9bastien_Szymanski?= Subject: Re: [PATCH v1] ARM: imx: mach-imx6ul: remove 14x14 EVK specific PHY fixup Message-ID: <4650b811-0bd8-74b5-044b-562b287c0e09@armadeus.com> Date: Thu, 10 Dec 2020 11:15:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20201209122051.26151-1-o.rempel@pengutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17671843464484443388 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudektddgudefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepvfhfhffukffffgggjggtgfesthekredttdefjeenucfhrhhomhepuforsggrshhtihgvnhgpufiihihmrghnshhkihcuoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqnecuggftrfgrthhtvghrnhepfedtjeduffegfedvgeeffffhgfffjeejfeevheekgffhkefhgfetjefgleduuddunecukfhppedtrddtrddtrddtpdelvddrudegtddrvddtgedrudefvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejvdekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 12/9/20 1:20 PM, Oleksij Rempel wrote: > 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 OPOS6UL has a KSZ80801RNB. On this PHY variant, bit 7 of reg 0x1F means: 1: RMII 50MHz clock mode; clock input to XI (Pin 9) is 50MHz 0: RMII 25MHz clock mode; clock input to XI (Pin 9) is 25MHz > > 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"; > ... > }; On OPOS6UL, this fix do fixes network breakage introduced by this patch. So, for OPOS6UL, Tested-by: Sébastien Szymanski > > 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) > -- Sébastien Szymanski, Armadeus Systems Software engineer