[v1,05/20] ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC node
Message ID | 20230113142718.3038265-6-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp303003wrt; Fri, 13 Jan 2023 06:35:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXttMhjrRf+yQNETljAZf6N/w2X0tSO8ZqPJLUMQGnTh5Egv4gm1JkVzPXvrhtllPE7dFhn8 X-Received: by 2002:a17:907:7fa7:b0:866:6b08:946b with SMTP id qk39-20020a1709077fa700b008666b08946bmr7912802ejc.39.1673620516130; Fri, 13 Jan 2023 06:35:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673620516; cv=none; d=google.com; s=arc-20160816; b=X7TE8yEGcgz6YgixfwAIftb82wUISP46v2QhJ1uUF90MW5y9i1Z6pkNhlQjULu7+oG kOf5EVWKhsBxw4qSKBCSJmHz2NwzFJOTpj79V1H1cde921d3rQWpOzhmnFeG0494sDYD KCdSlfpePs8bYag2q0KHHo63EISZ6kYjkxzHW/ANbi0oR+8TECjDtex766EcpEpoOpp2 +I/cW+VFq0MKHDM/lrvXX6I4Uep8jKFi5HhfSQrVG2bdJBreA+0yBZHDal6fqjg3uhPo fGlq8AMQWjebgXsviKtd1cFjC97sZcXSTG7vHz4FrlVcpewbS0w0Du2UGEfVra/Fs/Hr ZnUw== 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=hBrCgVGRusIcY7u2DnlVJKVaPNEdeQll6rowglQyKOU=; b=Hi0y2QdMcRI9alaNUyF7vN0OCXHKeqojR+KWCVoS6OKLoWDOSNKGSskMJoft60SQsP HkSTiZ8noDgVAFzQV3BxMy2WrqUqjQ0ujWZ1vw+8gQMOQ6PgsBMvub77eKY68k0MUy2O im97J0sHk9PEa6niEY9RRVaB9aKwcngcGohC9HH6f2ma5kX1QGALBI8adNSWwLLF1ZtO w487VXRWS8NoalWFG2y5Qshpphgx9+zVA5nsZPQg0lH1AMjtAtz2QI48JMOgIfD+vXhm ZS5KdOqwu4u6prWetwjlqXRQryuL0bZvbY5YqfrW5Gtcb9GhOPZemdCep1vuqEReF41a Oc9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds4-20020a170907724400b0081a9c3ca4bcsi23163857ejc.379.2023.01.13.06.34.52; Fri, 13 Jan 2023 06:35:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjAMOe2 (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Fri, 13 Jan 2023 09:34:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbjAMOdS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Jan 2023 09:33:18 -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 6906548CD0 for <linux-kernel@vger.kernel.org>; Fri, 13 Jan 2023 06:27:53 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1pGL1e-0006Dw-Pw; Fri, 13 Jan 2023 15:27:22 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pGL1d-005myg-U6; Fri, 13 Jan 2023 15:27:21 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pGL1b-00CkQD-Ch; Fri, 13 Jan 2023 15:27:19 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Abel Vesa <abelvesa@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Richard Cochran <richardcochran@gmail.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Lee Jones <lee@kernel.org>, Russell King <linux@armlinux.org.uk>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 05/20] ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC node Date: Fri, 13 Jan 2023 15:27:03 +0100 Message-Id: <20230113142718.3038265-6-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230113142718.3038265-1-o.rempel@pengutronix.de> References: <20230113142718.3038265-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754918306443140322?= X-GMAIL-MSGID: =?utf-8?q?1754918306443140322?= |
Series |
ARM: imx: make Ethernet refclock configurable
|
|
Commit Message
Oleksij Rempel
Jan. 13, 2023, 2:27 p.m. UTC
Old imx6q machine code makes RGMII/RMII clock direction decision based on
configuration of "ptp" clock. "enet_out" is not used and make no real
sense, since we can't configure it as output or use it as clock
provider.
Instead of "enet_out" use "enet_clk_ref" which is actual selector to
choose between internal and external clock source:
FEC MAC <---------- enet_clk_ref <--------- SoC PLL
\
^------<-> refclock PAD (bi directional)
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/boot/dts/imx6qdl.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi Oleksij, On 1/13/2023 10:27 PM, Oleksij Rempel wrote: > Old imx6q machine code makes RGMII/RMII clock direction decision based on > configuration of "ptp" clock. "enet_out" is not used and make no real > sense, since we can't configure it as output or use it as clock > provider. > > Instead of "enet_out" use "enet_clk_ref" which is actual selector to > choose between internal and external clock source: > > FEC MAC <---------- enet_clk_ref <--------- SoC PLL > \ > ^------<-> refclock PAD (bi directional) > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- > arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > index ff1e0173b39b..71522263031a 100644 > --- a/arch/arm/boot/dts/imx6qdl.dtsi > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > @@ -1050,8 +1050,8 @@ fec: ethernet@2188000 { > clocks = <&clks IMX6QDL_CLK_ENET>, > <&clks IMX6QDL_CLK_ENET>, > <&clks IMX6QDL_CLK_ENET_REF>, > - <&clks IMX6QDL_CLK_ENET_REF>; > - clock-names = "ipg", "ahb", "ptp", "enet_out"; > + <&clks IMX6QDL_CLK_ENET_REF_SEL>; > + clock-names = "ipg", "ahb", "ptp", "enet_clk_ref"; Please also update fec binding, otherwise there will be dtbs check error. Thanks, Peng. > fsl,stop-mode = <&gpr 0x34 27>; > status = "disabled"; > };
On Mon, Jan 16, 2023 at 09:01:08AM +0800, Peng Fan wrote: > Hi Oleksij, > > On 1/13/2023 10:27 PM, Oleksij Rempel wrote: > > Old imx6q machine code makes RGMII/RMII clock direction decision based on > > configuration of "ptp" clock. "enet_out" is not used and make no real > > sense, since we can't configure it as output or use it as clock > > provider. > > > > Instead of "enet_out" use "enet_clk_ref" which is actual selector to > > choose between internal and external clock source: > > > > FEC MAC <---------- enet_clk_ref <--------- SoC PLL > > \ > > ^------<-> refclock PAD (bi directional) > > > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > > --- > > arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > > index ff1e0173b39b..71522263031a 100644 > > --- a/arch/arm/boot/dts/imx6qdl.dtsi > > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > > @@ -1050,8 +1050,8 @@ fec: ethernet@2188000 { > > clocks = <&clks IMX6QDL_CLK_ENET>, > > <&clks IMX6QDL_CLK_ENET>, > > <&clks IMX6QDL_CLK_ENET_REF>, > > - <&clks IMX6QDL_CLK_ENET_REF>; > > - clock-names = "ipg", "ahb", "ptp", "enet_out"; > > + <&clks IMX6QDL_CLK_ENET_REF_SEL>; > > + clock-names = "ipg", "ahb", "ptp", "enet_clk_ref"; > > > Please also update fec binding, otherwise there will be dtbs check error. Hm, there is no restriction on enet_clk_ref use or requirements to use enet_out in Documentation/devicetree/bindings/net/fsl,fec.yaml Do I missing something? Regards, Oleksij
On 1/16/2023 1:26 PM, Oleksij Rempel wrote: > On Mon, Jan 16, 2023 at 09:01:08AM +0800, Peng Fan wrote: >> Hi Oleksij, >> >> On 1/13/2023 10:27 PM, Oleksij Rempel wrote: >>> Old imx6q machine code makes RGMII/RMII clock direction decision based on >>> configuration of "ptp" clock. "enet_out" is not used and make no real >>> sense, since we can't configure it as output or use it as clock >>> provider. >>> >>> Instead of "enet_out" use "enet_clk_ref" which is actual selector to >>> choose between internal and external clock source: >>> >>> FEC MAC <---------- enet_clk_ref <--------- SoC PLL >>> \ >>> ^------<-> refclock PAD (bi directional) >>> >>> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> >>> --- >>> arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi >>> index ff1e0173b39b..71522263031a 100644 >>> --- a/arch/arm/boot/dts/imx6qdl.dtsi >>> +++ b/arch/arm/boot/dts/imx6qdl.dtsi >>> @@ -1050,8 +1050,8 @@ fec: ethernet@2188000 { >>> clocks = <&clks IMX6QDL_CLK_ENET>, >>> <&clks IMX6QDL_CLK_ENET>, >>> <&clks IMX6QDL_CLK_ENET_REF>, >>> - <&clks IMX6QDL_CLK_ENET_REF>; >>> - clock-names = "ipg", "ahb", "ptp", "enet_out"; >>> + <&clks IMX6QDL_CLK_ENET_REF_SEL>; >>> + clock-names = "ipg", "ahb", "ptp", "enet_clk_ref"; >> >> >> Please also update fec binding, otherwise there will be dtbs check error. > > Hm, there is no restriction on enet_clk_ref use or requirements to use > enet_out in Documentation/devicetree/bindings/net/fsl,fec.yaml > > Do I missing something? After check, seems using enet_out would trigger dtbs_check error, using enet_clk_ref would not as what you did in this patch. So your patch is fine. clock-names: minItems: 2 maxItems: 5 items: enum: - ipg - ahb - ptp - enet_clk_ref - enet_out - enet_2x_txclk Regards, Peng. > > Regards, > Oleksij
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index ff1e0173b39b..71522263031a 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1050,8 +1050,8 @@ fec: ethernet@2188000 { clocks = <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET_REF>, - <&clks IMX6QDL_CLK_ENET_REF>; - clock-names = "ipg", "ahb", "ptp", "enet_out"; + <&clks IMX6QDL_CLK_ENET_REF_SEL>; + clock-names = "ipg", "ahb", "ptp", "enet_clk_ref"; fsl,stop-mode = <&gpr 0x34 27>; status = "disabled"; };