From patchwork Thu Feb 23 10:52:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1746901 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 4PMtN43KlVz245y for ; Thu, 23 Feb 2023 23:57:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10E3885764; Thu, 23 Feb 2023 13:56:36 +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 9A42385B14; Thu, 23 Feb 2023 11:52:50 +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=ham 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 77C9D8574F for ; Thu, 23 Feb 2023 11:52:45 +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 C61F024E29D; Thu, 23 Feb 2023 18:52:42 +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; Thu, 23 Feb 2023 18:52:42 +0800 Received: from ubuntu.localdomain (113.72.147.165) by EXMBX071.cuchost.com (172.16.6.81) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 23 Feb 2023 18:52:41 +0800 From: Minda Chen To: Simon Glass , Stefan Roese , Andrew Scull , =?utf-8?q?Pali_Roh=C3=A1r?= CC: , Lukasz Majewski , Sean Anderson , Rick Chen , Leo , Mason Huo , Yanhong Wang , Leyfoon Tan , Minda Chen Subject: [PATCH 0/4] Add StarFive JH7110 PCIe drvier support Date: Thu, 23 Feb 2023 18:52:36 +0800 Message-ID: <20230223105240.15180-1-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [113.72.147.165] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX071.cuchost.com (172.16.6.81) X-YovoleRuleAgent: yovoleflag X-Mailman-Approved-At: Thu, 23 Feb 2023 13:55:57 +0100 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.6 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. 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. Mason Huo (4): starfive: pci: Add StarFive JH7110 pcie driver clk: starfive: Add PCIe clocks for PCIe controller configs: starfive-jh7110: Add support for PCIe host driver riscv: dts: starfive: Enable PCIe host controller 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]. [1] https://patchwork.ozlabs.org/project/uboot/cover/20230118081132.31403-1-yanhong.wang@starfivetech.com/ For more JH7110 and visionFive v2 information and support, you can visit RVspace wiki[2]. [2] https://wiki.rvspace.org/ arch/riscv/dts/jh7110.dtsi | 79 ++++ arch/riscv/dts/starfive_visionfive2.dts | 104 +++++ configs/starfive_visionfive2_defconfig | 9 + drivers/clk/starfive/clk-jh7110.c | 27 ++ drivers/pci/Kconfig | 11 + drivers/pci/Makefile | 1 + drivers/pci/pcie_starfive_jh7110.c | 482 ++++++++++++++++++++++++ 7 files changed, 713 insertions(+) create mode 100644 drivers/pci/pcie_starfive_jh7110.c