From patchwork Wed Mar 8 05:48:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1753893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PWhFy1dQtz1yWr for ; Wed, 8 Mar 2023 16:49:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EF0C085C51; Wed, 8 Mar 2023 06:48:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id E0C3185C42; Wed, 8 Mar 2023 06:48:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by phobos.denx.de (Postfix) with ESMTP id 5FBB585C61 for ; Wed, 8 Mar 2023 06:48:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com 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 61BBE24E143; Wed, 8 Mar 2023 13:48:35 +0800 (CST) Received: from EXMBX071.cuchost.com (172.16.6.81) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 8 Mar 2023 13:48:35 +0800 Received: from ubuntu.localdomain (183.27.97.46) by EXMBX071.cuchost.com (172.16.6.81) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 8 Mar 2023 13:48:34 +0800 From: Minda Chen To: Simon Glass , Stefan Roese , Andrew Scull , =?utf-8?q?Pali_Roh=C3=A1r?= , "Mark Kettenis" CC: , Rick Chen , Leo , Mason Huo , Yanhong Wang , Leyfoon Tan , Minda Chen Subject: [PATCH v2 0/3] Add StarFive JH7110 PCIe drvier support Date: Wed, 8 Mar 2023 13:48:30 +0800 Message-ID: <20230308054833.95730-1-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [183.27.97.46] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX071.cuchost.com (172.16.6.81) X-YovoleRuleAgent: yovoleflag X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This patchset needs to apply after patchset in [1]. These PCIe series patches are based on the JH7110 RISC-V SoC and VisionFive V2 board. [1] https://patchwork.ozlabs.org/project/uboot/cover/20230303032432.7837-1-yanhong.wang@starfivetech.com/ The PCIe driver depends on gpio, pinctrl, clk and reset driver to do init. The PCIe dts configuation includes all these setting. The PCIe drivers codes has been tested on the VisionFive V2 boards. The test devices includes M.2 NVMe SSD and Realtek 8169 Ethernet adapter. previous patch version v1: https://patchwork.ozlabs.org/project/uboot/cover/20230223105240.15180-1-minda.chen@starfivetech.com/ changes v1->v2 1. remove clock commit. The pcie clocks change has been includeded in [1]. 2. Using GENMASK marco1 in patch1. 3. remove the syscon dts node in patch3. The syscon dts dts node has been included in [1]. --- The JH7110 minimal system patchset upstream is in progress. PCIe driver patches is based on this patchset. The JH7110 minimal system patchset details are listed in [1]. For more JH7110 and visionFive v2 information and support, you can visit RVspace wiki[2]. [2] https://wiki.rvspace.org/ Mason Huo (3): starfive: pci: Add StarFive JH7110 pcie driver configs: starfive-jh7110: Add support for PCIe host driver riscv: dts: starfive: Enable PCIe host controller .../dts/jh7110-starfive-visionfive-2.dtsi | 99 ++++ arch/riscv/dts/jh7110.dtsi | 75 +++ configs/starfive_visionfive2_defconfig | 9 + drivers/pci/Kconfig | 11 + drivers/pci/Makefile | 1 + drivers/pci/pcie_starfive_jh7110.c | 478 ++++++++++++++++++ 6 files changed, 673 insertions(+) create mode 100644 drivers/pci/pcie_starfive_jh7110.c base-commit: b0eda49bc9b00503366f2ec431be0178caf9e9b5 prerequisite-patch-id: a84452ba131408ff842b65ae19a3a05f64b3ff60 prerequisite-patch-id: bb320a2102f46d2b2d08b4467cbcdb92050767b8 prerequisite-patch-id: ef5e9d61f7392c7d2e5321aa8a10996ca8eae5fc prerequisite-patch-id: 26dfdb401d680ecd9449acf09131cf4790e987b7 prerequisite-patch-id: a0cfa5d8cdb49bbe9d4739afa90991f882950881 prerequisite-patch-id: a0509f01172e24b3d163f4701496b0349435bdc0 prerequisite-patch-id: d834ece14ffb525b8c3e661e78736692f33fca9b prerequisite-patch-id: aa95c1c047d0b7dae469586873a42932d613411d prerequisite-patch-id: ebc26ed3f97f7babc0fc805152acb578f5eff922 prerequisite-patch-id: 81a83d6fc1e71ce190f9151577deb0c5cd382a20 prerequisite-patch-id: ff5bd799e4cb905fef6cf1cd0ce757980e1d34b7 prerequisite-patch-id: a341d4e8a8e25cb711309123939235fcb3c10c1a prerequisite-patch-id: 749e4eafb431857ee2bec4ac8e78a682f6a57588 prerequisite-patch-id: 04cd7779c7464c7be683cd2718baee8c6554791d prerequisite-patch-id: 25cb7c602018ec89abce43d8835926ac3356f5db prerequisite-patch-id: cf1af96990b01e1025ec50d0b49c79f92f64f352 prerequisite-patch-id: cc5878da5f03e7e1d2c15e88537fd2a93bf47e53