Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp837953rwb; Thu, 15 Dec 2022 03:11:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6WRPdL/aB/1i+PZ/kC69i/8ei4WZrhSxHbyvXY1dfeYou+6OarRObkDFwGUFYROudIhC8R X-Received: by 2002:a17:906:11d2:b0:7c1:7c3a:ffba with SMTP id o18-20020a17090611d200b007c17c3affbamr11840316eja.35.1671102668385; Thu, 15 Dec 2022 03:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671102668; cv=none; d=google.com; s=arc-20160816; b=z4onIZE5voe5ECoyXM6ksK9baKrHX0MBM07HjKaqmWPk9lkm+qkdmAiYt9BWsSLJPH 4pG4+RkieGc/rl+snNl1mpvp3K40HZYTUirl3/2NNRJ0/MfTrT1IFuPgt4OjyzRMCGq0 0fQDWmP2jhrW+XansSxj8Lg8OtlH2gZRQQseq5cWUuwJ/OCUuh2CKTItM29RKFjaf5PU 3S9QV8mGHLEoKNE7I6tblDsYvEor0OQxgFhVvwd4R9xjaVYNXkbIpOkX5L0uSOXyeB6G cyazb/+bSPjGSu8nmjFAwnqAZufMwfw8rDcmFy5nRL7/5DYgu7SUPwgBnQLCRaLNNnOg A+HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=bpIMkv3486mPI5pHSFuGtazJ7LzRYA6O85qQl5AyvUM=; b=IcoF3dJRj256/6HtsjaHtap8Vkt1et+MfnzIG/39rE2LBKadSGicFjC/a4J3yl9ZZS 5znfQ1Uld47Vmux0ncmlAF+seEc4sn8cuFjQJsSGWNzxqo0prTp5jVfCBXo81i5dBPmE R5DnDXUYFvj7v1L1RN2Vo1ti4Gtmt/E8Aylbtl2vAWoZRZW8eij9fZKlkjH+gJd5RDvM JTTy2KfuKkxX5Gs8yDfWXEnJUJLn0BOQXR5mEwxPLgsgTj2+dHH+d1nyVQC5t+wG9X52 9jD0K2nw49XM8DEHmNj7L/DKVU9xYSjGmu5XCx/1ZCnUCdiYdRvZS9GLw5G91pZMEfIR oIqg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht20-20020a170907609400b00791994dfb9esi16090851ejc.491.2022.12.15.03.10.45; Thu, 15 Dec 2022 03:11:08 -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 S229782AbiLOKjV convert rfc822-to-8bit (ORCPT + 69 others); Thu, 15 Dec 2022 05:39:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiLOKjT (ORCPT ); Thu, 15 Dec 2022 05:39:19 -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 8EAAE2C10A for ; Thu, 15 Dec 2022 02:39:18 -0800 (PST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5ldl-0002Ha-Ud; Thu, 15 Dec 2022 11:39:02 +0100 Message-ID: <19bd825fa0df76e7b1223e34f934acadd32d6cdf.camel@pengutronix.de> Subject: Re: [PATCH v1] arm64: dts: verdin-imx8mp: add pcie support From: Lucas Stach To: Marcel Ziswiler , linux-arm-kernel@lists.infradead.org Cc: Shawn Guo , NXP Linux Team , Richard Zhu , Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Max Krummenacher , Pengutronix Kernel Team , Philippe Schenker , Rob Herring , Sascha Hauer , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 15 Dec 2022 11:38:58 +0100 In-Reply-To: <20221214061354.174072-1-marcel@ziswiler.com> References: <20221214061354.174072-1-marcel@ziswiler.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel, Am Mittwoch, dem 14.12.2022 um 07:13 +0100 schrieb Marcel Ziswiler: > From: Marcel Ziswiler > > Add PCIe support on the Verdin iMX8M Plus. > > Signed-off-by: Marcel Ziswiler > > --- > This has successfully been tested with Lucas' imx8mp-hsio-blk-ctrl high > performance PLL clock exposure patch set [1] a later version thereof > hopefully may land together with my humble patch. Thanks! > > [1] https://lore.kernel.org/all/20221213160112.1900410-1-l.stach@pengutronix.de/ > > .../dts/freescale/imx8mp-verdin-dahlia.dtsi | 9 +++++++- > .../boot/dts/freescale/imx8mp-verdin.dtsi | 22 ++++++++++++++++++- > 2 files changed, 29 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi > index 80db1ad7c230..56b0e4b865c9 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi > @@ -67,7 +67,14 @@ &i2c4 { > /* TODO: Audio Codec */ > }; > > -/* TODO: Verdin PCIE_1 */ > +/* Verdin PCIE_1 */ > +&pcie { > + status = "okay"; > +}; > + > +&pcie_phy { > + status = "okay"; > +}; > > /* Verdin PWM_1 */ > &pwm1 { > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi > index 6a1890a4b5d8..f3a46f4caf49 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi > @@ -749,7 +749,27 @@ eeprom_carrier_board: eeprom@57 { > }; > }; > > -/* TODO: Verdin PCIE_1 */ > +/* Verdin PCIE_1 */ > +&pcie { > + assigned-clocks = <&clk IMX8MP_CLK_PCIE_AUX>; > + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_50M>; > + assigned-clock-rates = <10000000>; > + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, > + <&clk IMX8MP_CLK_PCIE_ROOT>, > + <&clk IMX8MP_CLK_HSIO_AXI>; > + clock-names = "pcie", "pcie_aux", "pcie_bus"; Now that I see this, I realize that those clocks and assignments could move into imx8mp.dtsi. I doubt that anyone would want to configure those clocks in a different way. The real difference between boards is the PCIe PHY reference clock and those differences are fully contained in the PHY node. Regards, Lucas > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pcie>; > + /* PCIE_1_RESET# (SODIMM 244) */ > + reset-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>; > +}; > + > +&pcie_phy { > + clocks = <&hsio_blk_ctrl>; > + clock-names = "ref"; > + fsl,clkreq-unsupported; > + fsl,refclk-pad-mode = ; > +}; > > /* Verdin PWM_1 */ > &pwm1 {