From nobody Wed Dec 17 11:24:54 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41129CDB47E for ; Fri, 20 Oct 2023 10:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377123AbjJTKpA (ORCPT ); Fri, 20 Oct 2023 06:45:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377108AbjJTKoE (ORCPT ); Fri, 20 Oct 2023 06:44:04 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 792B5D6B; Fri, 20 Oct 2023 03:44:01 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 01BFF24E37C; Fri, 20 Oct 2023 18:44:00 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 20 Oct 2023 18:44:00 +0800 Received: from ubuntu.localdomain (183.27.99.123) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 20 Oct 2023 18:43:58 +0800 From: Minda Chen To: Conor Dooley , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , "Daire McNamara" , Emil Renner Berthing , Krzysztof Kozlowski CC: , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v9 20/20] riscv: dts: starfive: add PCIe dts configuration for JH7110 Date: Fri, 20 Oct 2023 18:43:41 +0800 Message-ID: <20231020104341.63157-21-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231020104341.63157-1-minda.chen@starfivetech.com> References: <20231020104341.63157-1-minda.chen@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [183.27.99.123] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add PCIe dts configuraion for JH7110 SoC platform. Signed-off-by: Minda Chen Reviewed-by: Hal Feng --- .../jh7110-starfive-visionfive-2.dtsi | 64 ++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 86 +++++++++++++++++++ 2 files changed, 150 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi= b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 12ebe9792356..2e7bec59c3b8 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -232,6 +232,22 @@ status =3D "okay"; }; =20 +&pcie0 { + perst-gpios =3D <&sysgpio 26 GPIO_ACTIVE_LOW>; + phys =3D <&pciephy0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie0_pins>; + status =3D "okay"; +}; + +&pcie1 { + perst-gpios =3D <&sysgpio 28 GPIO_ACTIVE_LOW>; + phys =3D <&pciephy1>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie1_pins>; + status =3D "okay"; +}; + &qspi { #address-cells =3D <1>; #size-cells =3D <0>; @@ -402,6 +418,54 @@ }; }; =20 + pcie0_pins: pcie0-0 { + clkreq-pins { + pinmux =3D ; + bias-pull-down; + drive-strength =3D <2>; + input-enable; + input-schmitt-disable; + slew-rate =3D <0>; + }; + + wake-pins { + pinmux =3D ; + bias-pull-up; + drive-strength =3D <2>; + input-enable; + input-schmitt-disable; + slew-rate =3D <0>; + }; + }; + + pcie1_pins: pcie1-0 { + clkreq-pins { + pinmux =3D ; + bias-pull-down; + drive-strength =3D <2>; + input-enable; + input-schmitt-disable; + slew-rate =3D <0>; + }; + + wake-pins { + pinmux =3D ; + bias-pull-up; + drive-strength =3D <2>; + input-enable; + input-schmitt-disable; + slew-rate =3D <0>; + }; + }; + spi0_pins: spi0-0 { mosi-pins { pinmux =3D ; power-domains =3D <&pwrc JH7110_PD_VOUT>; }; + + pcie0: pcie@940000000 { + compatible =3D "starfive,jh7110-pcie"; + reg =3D <0x9 0x40000000 0x0 0x1000000>, + <0x0 0x2b000000 0x0 0x100000>; + reg-names =3D "cfg", "apb"; + linux,pci-domain =3D <0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + #interrupt-cells =3D <1>; + ranges =3D <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>, + <0xc3000000 0x9 0x00000000 0x9 0x00000000 0x0 0x40000000>; + interrupts =3D <56>; + interrupt-map-mask =3D <0x0 0x0 0x0 0x7>; + interrupt-map =3D <0x0 0x0 0x0 0x1 &pcie_intc0 0x1>, + <0x0 0x0 0x0 0x2 &pcie_intc0 0x2>, + <0x0 0x0 0x0 0x3 &pcie_intc0 0x3>, + <0x0 0x0 0x0 0x4 &pcie_intc0 0x4>; + msi-controller; + device_type =3D "pci"; + starfive,stg-syscon =3D <&stg_syscon>; + bus-range =3D <0x0 0xff>; + clocks =3D <&syscrg JH7110_SYSCLK_NOC_BUS_STG_AXI>, + <&stgcrg JH7110_STGCLK_PCIE0_TL>, + <&stgcrg JH7110_STGCLK_PCIE0_AXI_MST0>, + <&stgcrg JH7110_STGCLK_PCIE0_APB>; + clock-names =3D "noc", "tl", "axi_mst0", "apb"; + resets =3D <&stgcrg JH7110_STGRST_PCIE0_AXI_MST0>, + <&stgcrg JH7110_STGRST_PCIE0_AXI_SLV0>, + <&stgcrg JH7110_STGRST_PCIE0_AXI_SLV>, + <&stgcrg JH7110_STGRST_PCIE0_BRG>, + <&stgcrg JH7110_STGRST_PCIE0_CORE>, + <&stgcrg JH7110_STGRST_PCIE0_APB>; + reset-names =3D "mst0", "slv0", "slv", "brg", + "core", "apb"; + status =3D "disabled"; + + pcie_intc0: interrupt-controller { + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + interrupt-controller; + }; + }; + + pcie1: pcie@9c0000000 { + compatible =3D "starfive,jh7110-pcie"; + reg =3D <0x9 0xc0000000 0x0 0x1000000>, + <0x0 0x2c000000 0x0 0x100000>; + reg-names =3D "cfg", "apb"; + linux,pci-domain =3D <1>; + #address-cells =3D <3>; + #size-cells =3D <2>; + #interrupt-cells =3D <1>; + ranges =3D <0x82000000 0x0 0x38000000 0x0 0x38000000 0x0 0x08000000>, + <0xc3000000 0x9 0x80000000 0x9 0x80000000 0x0 0x40000000>; + interrupts =3D <57>; + interrupt-map-mask =3D <0x0 0x0 0x0 0x7>; + interrupt-map =3D <0x0 0x0 0x0 0x1 &pcie_intc1 0x1>, + <0x0 0x0 0x0 0x2 &pcie_intc1 0x2>, + <0x0 0x0 0x0 0x3 &pcie_intc1 0x3>, + <0x0 0x0 0x0 0x4 &pcie_intc1 0x4>; + msi-controller; + device_type =3D "pci"; + starfive,stg-syscon =3D <&stg_syscon>; + bus-range =3D <0x0 0xff>; + clocks =3D <&syscrg JH7110_SYSCLK_NOC_BUS_STG_AXI>, + <&stgcrg JH7110_STGCLK_PCIE1_TL>, + <&stgcrg JH7110_STGCLK_PCIE1_AXI_MST0>, + <&stgcrg JH7110_STGCLK_PCIE1_APB>; + clock-names =3D "noc", "tl", "axi_mst0", "apb"; + resets =3D <&stgcrg JH7110_STGRST_PCIE1_AXI_MST0>, + <&stgcrg JH7110_STGRST_PCIE1_AXI_SLV0>, + <&stgcrg JH7110_STGRST_PCIE1_AXI_SLV>, + <&stgcrg JH7110_STGRST_PCIE1_BRG>, + <&stgcrg JH7110_STGRST_PCIE1_CORE>, + <&stgcrg JH7110_STGRST_PCIE1_APB>; + reset-names =3D "mst0", "slv0", "slv", "brg", + "core", "apb"; + status =3D "disabled"; + + pcie_intc1: interrupt-controller { + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + interrupt-controller; + }; + }; }; }; --=20 2.17.1