From patchwork Tue Feb 27 10:35:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 13573531 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 EF46CC5478C for ; Tue, 27 Feb 2024 10:37:43 +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:References:In-Reply-To: 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: List-Owner; bh=IcZ0hXFtBzp1b4imVs9iajYAByEzcZaYP+cg3As8r+4=; b=gh+EQB79YVjeUW ZWgWbggLp2+ASel/YsWxbwH/t6kAak6icF9mCIFNQwfMb1aOLZTOrzvFb+cPQFliiBH0WsvnOsjNh bYZxvuIiiArm7yCIMYrmXjP8foSrDpGXWpzCjYFvZsWtg8KCZswGeN9zVv1ybDa3Ri4eEQtYzNt07 TN8Jl0i1+GDRXyDiIHFgjkta9CReTrFJ6JQvpgWFI+ln4WHRNHUZ+Zf1yj2iOVD3ucNev92nJq6Yx l+L6fWxMiQIgb33LLz0UmuO2QZh3wrLVOgIxBtyzn8709ALWvLLuDujYn3v3DKedAEi645jTajI2q E2iW63vVi92hOYJWEZ6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reuqB-00000004mnS-3PZa; Tue, 27 Feb 2024 10:37:39 +0000 Received: from mail-sh0chn02on2072e.outbound.protection.partner.outlook.cn ([2406:e500:4420:2::72e] helo=CHN02-SH0-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1reuog-00000004lN4-3Kjp for linux-riscv@lists.infradead.org; Tue, 27 Feb 2024 10:36:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TT4GKAgjdhXv9pb/Pu0cbvSs59aczwh+PcdYN8y+pQBKCW+lVN8SzG6XZRGG9cs6RSLRwVGUtmS8CTYjNDjDq+F+e31rzTlZviCXKOxGOSP04vY0iud+vVQZnWD2x0Jwe/i5cw+H5c1/CJGAf8hd7nZVr1DD2+Vk2Wys7XpM4qCxcJlrtuooq0GtMuUxfcHBZ2teN3MwOhqF+UlthivtIFZoW9TWGIA3fSjJ4FbEb0S7qSkpTj20uXMMXT/UeAMbqRH7gzeRnWYfxnhMilQlEXSWr5uaHhblTVhtYwlCJUzph3M95FpxbcdgAgwe/lL2d7wUYqTTWEr658cPKuFOdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wIppChXKdfBPnlczcIvPyd3KB2Im4cgmJK8iWQ76edM=; b=cGnbCe87wXpLHrAqXjmml5uLEd5uuWAt8L3Trbnng9AQjCkW3rZjP/P3J4Hl7GtXn+AVlFZGV5shsd9GEV8oYMPZs28e2RJaSoDlmPHBq14e9dErNxOBIwdw6QRthcJo3qmdipoUiCwZKnXe2rznYM2aLr2St6bEclSYTa+IqdqhWDV75fMNLEK6R4kKHJG2gbfCMIG0qJLh53Ljlr+Few9OKmNNRbCNopG1bKg8ky8049eWTeC2wYKSa8KRrHy8jeTsHHTbME+FH1RRwsoyOHW2DYXvPiDx9S4ViLQuJu5mY3JPhgj5XB3XzwH5oRUwe8F/xNtFNXh/qrvjYk9lWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.47; Tue, 27 Feb 2024 10:35:53 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::5a5a:fa59:15fd:63dc]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::5a5a:fa59:15fd:63dc%3]) with mapi id 15.20.7270.047; Tue, 27 Feb 2024 10:35:53 +0000 From: Minda Chen To: Conor Dooley , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Thomas Gleixner , Daire McNamara , Emil Renner Berthing , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pci@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v15,RESEND 23/23] riscv: dts: starfive: add PCIe dts configuration for JH7110 Date: Tue, 27 Feb 2024 18:35:22 +0800 Message-Id: <20240227103522.80915-24-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240227103522.80915-1-minda.chen@starfivetech.com> References: <20240227103522.80915-1-minda.chen@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0003.CHNPR01.prod.partner.outlook.cn (2406:e500:c510::15) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_ X-MS-Office365-Filtering-Correlation-Id: 259c9233-0771-4d6c-6e18-08dc377fdf83 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BKKmxHvXUGKzE0UUn9rsuZzWzi4np8dIAVuhgthQ9U8ytiUbx5WO2uRghE6zLQ/25IKnaIYWoJ/5jzqvQ293tZK/+qTq8NVVODCap2BMZuWKE3afS+Oa9UHx3ey7nrZ6rjRj2a9uMr1auVDWMXe0p6StrHcBDWj+Y+x+hSJsWGQ7rYSUM29YgbrtWp9XliuZVdSBgz5zw7v7ya6bufTpd4RxlNfPTBVj86rLSOalZXI5njGIIuC6yKIAugoeaS0ZMMlO/7o9LgNLalH5N3jveBhlFFqFfz72dXAgzsX4ujeF2ednhR9oT37M98cqOsDFYs39oobCdvpcqbE9JLG4HCwkt2E/9XCx1LgWpXf4F4vnpKoMrVD2lFIuv0N7q9PJZQpckBnbvFWuKib6bp7/va5yOF7Jc5npAEmKmwezJUuMMV57enSqslX+299nzOmEQc/LmPzwhCqFooxh5yFFBWfdMyZhrzykC2NPtzYoXzoY7ZLb/wM623kbP6ashrIZzUAwZXL7wz+vzwqGAbMtzftysr2offKBVYRpfOqrCUsn5Q5nK6kFdRKED8Hbt5swpCJXqP6wAJOsedSUwh85t8E9MKiSr89sIRlIGYaJNzd7MyCBDAvQzCAmyDXVNRSw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1102; X-MS-Exch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/mUhdoe7LC/KOQuyt/OofOShnuXLWIkjnwAlXu9jythp2mSsO3f8qMhUgzw1C17axkfMy3PkTbypfgkxHy5oRZKl0fmN8MAhS6fC7x2APFZb/e2rMchS5XB7XjO5i8fJ1Yx8gGaY+r5uCVjVMoeIZob7n5SzotYnLTTidK0IuCAVskfbMv5uvRodbv9Qch3vtF2GhjJNxgqq74Um/xQuaJ4K1IleLW8YYde2uphOb9G0JziWl4S88Y7EUY0fUFjSDNAvkeWH9LyIoMPik17nERl+txk+JZy4ieC0IrLwG9EqbVFpMXF6aG1863p8IqN1HnzMSgUrDXTvVCDdfClrkhnJ3dsWaP03A7SvI2ZpX2tu31MisVjiy+vHkiKjHD1iOy0Okp+o0UkRo0cCm5VAT7/tynBh772kkr+N7nnagv4l3tPMSkfuW00Y2ZN3B4Cl7uudeuKoCYOMFJG/vv5ZZJEiP+qWB9Wup/AhnF29lNxiFLsJQpeDSj3g2Mv7dBtPDMuADuRoYTQITjDTk6qphDrpKlIhpW9fAb5J869AXU7dlC+0KhZZP8pNhYqAKi2gFAj2Qm0aZZErFprgXO1Jg== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 259c9233-0771-4d6c-6e18-08dc377fdf83 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 10:35:53.1447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UEVTDFhv9XXOev/SwjPpgPd+wCsa+bDSmGLNTI47xT1ijO6Jhsgl9dcM1xpH87phkO6aJ0J6hbScjw4GATCfwvtkMPK28rjngbeJILE3AdQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0863 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_023606_876420_84477922 X-CRM114-Status: UNSURE ( 8.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 b89e9791efa7..ff55a66d7603 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -281,6 +281,22 @@ status = "okay"; }; +&pcie0 { + perst-gpios = <&sysgpio 26 GPIO_ACTIVE_LOW>; + phys = <&pciephy0>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_pins>; + status = "okay"; +}; + +&pcie1 { + perst-gpios = <&sysgpio 28 GPIO_ACTIVE_LOW>; + phys = <&pciephy1>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie1_pins>; + status = "okay"; +}; + &pwmdac { pinctrl-names = "default"; pinctrl-0 = <&pwmdac_pins>; @@ -497,6 +513,54 @@ }; }; + pcie0_pins: pcie0-0 { + clkreq-pins { + pinmux = ; + bias-pull-down; + drive-strength = <2>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + + wake-pins { + pinmux = ; + bias-pull-up; + drive-strength = <2>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; + + pcie1_pins: pcie1-0 { + clkreq-pins { + pinmux = ; + bias-pull-down; + drive-strength = <2>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + + wake-pins { + pinmux = ; + bias-pull-up; + drive-strength = <2>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; + pwmdac_pins: pwmdac-0 { pwmdac-pins { pinmux = ; power-domains = <&pwrc JH7110_PD_VOUT>; }; + + pcie0: pcie@940000000 { + compatible = "starfive,jh7110-pcie"; + reg = <0x9 0x40000000 0x0 0x1000000>, + <0x0 0x2b000000 0x0 0x100000>; + reg-names = "cfg", "apb"; + linux,pci-domain = <0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges = <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>, + <0xc3000000 0x9 0x00000000 0x9 0x00000000 0x0 0x40000000>; + interrupts = <56>; + interrupt-map-mask = <0x0 0x0 0x0 0x7>; + interrupt-map = <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 = "pci"; + starfive,stg-syscon = <&stg_syscon>; + bus-range = <0x0 0xff>; + clocks = <&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 = "noc", "tl", "axi_mst0", "apb"; + resets = <&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 = "mst0", "slv0", "slv", "brg", + "core", "apb"; + status = "disabled"; + + pcie_intc0: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + + pcie1: pcie@9c0000000 { + compatible = "starfive,jh7110-pcie"; + reg = <0x9 0xc0000000 0x0 0x1000000>, + <0x0 0x2c000000 0x0 0x100000>; + reg-names = "cfg", "apb"; + linux,pci-domain = <1>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges = <0x82000000 0x0 0x38000000 0x0 0x38000000 0x0 0x08000000>, + <0xc3000000 0x9 0x80000000 0x9 0x80000000 0x0 0x40000000>; + interrupts = <57>; + interrupt-map-mask = <0x0 0x0 0x0 0x7>; + interrupt-map = <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 = "pci"; + starfive,stg-syscon = <&stg_syscon>; + bus-range = <0x0 0xff>; + clocks = <&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 = "noc", "tl", "axi_mst0", "apb"; + resets = <&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 = "mst0", "slv0", "slv", "brg", + "core", "apb"; + status = "disabled"; + + pcie_intc1: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; }; };