From patchwork Tue Feb 20 14:23:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13564092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D748C5475B for ; Tue, 20 Feb 2024 14:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SPniUXQFG7im1/rX1YSDsoUMgKBOOeG5ddLJLdGfRKI=; b=cWZ85Jbq2rlj80 d/5WSrJo6xUxf9vO2AcfbNhz1N74GdEDNa+NKCgGKtEtmgtGrb6dG82peu47uKyQh1dh99SFaPesl vSR2ElhNenll2k7avZhxR9ZSQHTyNxLlgDVaPF2YlysyyI1EIIIuPemYFyX5qtPWnZyYHeh9huDAd iGikWhMFsjxu72UORwnH0HjE5ICeZwglsh033ySOc4HvB1ez24l02sfhIrV4C+N09MO3GUyxZo2YZ sopx4mhFA86g5EnJKrEdB8FaeegFksOlKaiJ2/qlUVIFn0CWT6azwhCIF+5KEiaGohUf3BRQkblhd K51loUY3ToQ4/FlUtR/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcR1i-0000000F5SZ-1uSv; Tue, 20 Feb 2024 14:23:18 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcR1e-0000000F5RN-2gA1 for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2024 14:23:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1708438994; x=1739974994; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bhfK3UuyDdGUzQTKDYz+eZKapmcINuEU07EpUYoYLsc=; b=q720pIHfdY4SJL/o5mZWVOh1o4l0b1zzj1ge6kg2NuOcSNOtiP28GQ4c GhS3gQsDxLghgj6Is8a+nxLLllgldlMwIEb3IGgG8tS5ai32VSsaf6CXQ QmkUucBhw7JhQPOHbiwGWdfYq01xwEK2ykOJqP9LaF555X+JBRomuRzSB xSRfPyHKs/a9BaRPj4lQvVKqizISX2MlRRIuyEtaCqlPAlHBNvh7WlKrt tF74hTiJB8ll8Yl0BE316GDxyaZaAY3nl5AzWxbA+/95B1Y2ACJ0tzgAw HlusOHgzhWXdF8VdevQl1WqPx2ggoBbX/rt2qw4FldhTJXhf1oe/AC93S w==; X-IronPort-AV: E=Sophos;i="6.06,172,1705359600"; d="scan'208";a="35502265" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 20 Feb 2024 15:23:09 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E217C16F4E6; Tue, 20 Feb 2024 15:23:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1708438985; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=bhfK3UuyDdGUzQTKDYz+eZKapmcINuEU07EpUYoYLsc=; b=NkvhTdXRzl8z1ROKmwv89PEo/AUxIhvct3Ui7rdk72l2O0Uq+vKcJ4YxlecY736HNWDrAJ rjAhL5vsfQesjR0jlJRq38B/xsqtSZWzRw4wrflPmDB02F1kks9/Mu++Fcy4D3c3cKteFc N1LaIOYvkKRoNNB8e7E7RGDA/aa3XAyU1p3jNmY0hLUIzr8ttXiQcH1cgCqYqhV2kiiPXO 1lR5El/rc+jNst7RADbWZhB4+0wYky2BmcsPNiEJ2EAl29rG2XhMAPuxTjQbDXp/kTy8Lw XCiG3LHUml7JDjzuamx9tFKwY8ED+VM/b0APIsamb6Y1WN1ZHuikTbeGhzq7lA== From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , linux@ew.tq-group.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/1] arm64: dts: freescale: imx8mm/imx8mq: mba8mx: Use PCIe clock generator Date: Tue, 20 Feb 2024 15:23:06 +0100 Message-Id: <20240220142306.2514269-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_062315_203099_67EAC928 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org PCIe reference clock is provided by Renesas 9FGV0441. Reference this instead of a fixed-clock. Signed-off-by: Alexander Stein --- I've dropped Geert Uytterhoeven and Magnus Damm from get_maintainers.pl output as they seem to be triggered by 'renesas' keyword only. It's a bit unclear what the clock IMX8MQ_CLK_PCIEx_PHY is actually about. I assume 'pcie_bus' is the reference clock for the PCIe device while 'pcie_phy' is the reference clock for the RC. Both are provided by the external clock generator. .../dts/freescale/imx8mm-tqma8mqml-mba8mx.dts | 14 +++++++---- .../dts/freescale/imx8mq-tqma8mq-mba8mx.dts | 23 +++++-------------- arch/arm64/boot/dts/freescale/mba8mx.dtsi | 19 ++++++++++----- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts index ea6e8b85169f7..01b632b220dc7 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts @@ -5,6 +5,8 @@ /dts-v1/; +#include + #include "imx8mm-tqma8mqml.dtsi" #include "mba8mx.dtsi" @@ -74,19 +76,23 @@ expander2: gpio@27 { }; &pcie_phy { - clocks = <&pcie0_refclk>; + fsl,refclk-pad-mode = ; + fsl,clkreq-unsupported; + clocks = <&pcieclk 2>; + clock-names = "ref"; status = "okay"; }; +/* PCIe slot on X36 */ &pcie0 { reset-gpio = <&expander0 14 GPIO_ACTIVE_LOW>; - clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcie0_refclk>, + clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcieclk 3>, <&clk IMX8MM_CLK_PCIE1_AUX>; assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>, - <&clk IMX8MM_CLK_PCIE1_CTRL>; + <&clk IMX8MM_CLK_PCIE1_CTRL>; assigned-clock-rates = <10000000>, <250000000>; assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>, - <&clk IMX8MM_SYS_PLL2_250M>; + <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts index b302daca4ce64..b2e17d4f335eb 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts @@ -28,18 +28,6 @@ extcon_usbotg: extcon-usbotg0 { id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; }; - pcie0_refclk: pcie0-refclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; - }; - - pcie1_refclk: pcie1-refclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; - }; - reg_otg_vbus: regulator-otg-vbus { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -103,23 +91,24 @@ &led2 { gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; }; +/* PCIe slot on X36 */ &pcie0 { reset-gpio = <&expander0 14 GPIO_ACTIVE_LOW>; clocks = <&clk IMX8MQ_CLK_PCIE1_ROOT>, - <&pcie0_refclk>, - <&clk IMX8MQ_CLK_PCIE1_PHY>, + <&pcieclk 3>, + <&pcieclk 2>, <&clk IMX8MQ_CLK_PCIE1_AUX>; status = "okay"; }; /* - * miniPCIe, also usable for cards with USB. Therefore configure the reset as + * miniPCIe on X28, also usable for cards with USB. Therefore configure the reset as * static gpio hog. */ &pcie1 { clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>, - <&pcie1_refclk>, - <&clk IMX8MQ_CLK_PCIE2_PHY>, + <&pcieclk 1>, + <&pcieclk 0>, <&clk IMX8MQ_CLK_PCIE2_AUX>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/mba8mx.dtsi b/arch/arm64/boot/dts/freescale/mba8mx.dtsi index e2bc53b8d39a8..c82af672d1834 100644 --- a/arch/arm64/boot/dts/freescale/mba8mx.dtsi +++ b/arch/arm64/boot/dts/freescale/mba8mx.dtsi @@ -29,6 +29,12 @@ chosen { stdout-path = &uart3; }; + clk_xtal25: clk-xtal25 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -100,12 +106,6 @@ panel_in_lvds: endpoint { }; }; - pcie0_refclk: pcie0-refclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; - }; - reg_12v: regulator-12v { compatible = "regulator-fixed"; regulator-name = "MBA8MX_12V"; @@ -264,6 +264,13 @@ eeprom3: eeprom@57 { pagesize = <16>; vcc-supply = <®_vcc_3v3>; }; + + pcieclk: clk@68 { + compatible = "renesas,9fgv0441"; + reg = <0x68>; + clocks = <&clk_xtal25>; + #clock-cells = <1>; + }; }; &i2c3 {