Re: [PATCH v2 5/5] PCI: spacemit-k1: Add Spacemit K3 PCIe host controller support

From: Alex Elder

Date: Tue Jun 09 2026 - 12:19:35 EST


On 6/9/26 9:18 AM, Manivannan Sadhasivam wrote:
On Sun, May 17, 2026 at 09:48:40AM +0800, Inochi Amaoto wrote:
The PCIe controller on Spacemit K3 is almost a standard Synopsys
DesignWare PCIe IP with extra link and reset control. Unlike
the PCIe controller on K1, this controller supports external MSI
interrupt controller and can use multiple PHYs at the same time.

Add driver to support PCIe controller on Spacemit K3 PCIe.

Signed-off-by: Inochi Amaoto <inochiama@xxxxxxxxx>
---
drivers/pci/controller/dwc/Kconfig | 4 +-
drivers/pci/controller/dwc/pcie-spacemit-k1.c | 169 ++++++++++++++++++
2 files changed, 171 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index f2fde13107f2..fae971ecd876 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -439,7 +439,7 @@ config PCIE_SOPHGO_DW
Sophgo SoCs.
config PCIE_SPACEMIT_K1
- tristate "SpacemiT K1 PCIe controller (host mode)"
+ tristate "SpacemiT K1/K3 PCIe controller (host mode)"

Can you just say 'SpacemiT PCIe controller (host mode)"? I believe I asked Alex
while adding K1 support and he said this driver might not support future IP
revisions, but here we are.

(Sorry if I said that in error.) Will this be K1 and K3 only?
If so what you say is fine, but I agree with Mani, if it's going
to also form the basis of K5 (or whatever) just make it "SpacemiT".
And probably change the Kconfig symbol to PCIE_SPACEMIT.

-Alex

depends on ARCH_SPACEMIT || COMPILE_TEST
depends on HAS_IOMEM
select PCIE_DW_HOST
@@ -447,7 +447,7 @@ config PCIE_SPACEMIT_K1
default ARCH_SPACEMIT
help
Enables support for the DesignWare based PCIe controller in
- the SpacemiT K1 SoC operating in host mode. Three controllers
+ the SpacemiT K1/K3 SoC operating in host mode. Three controllers
are available on the K1 SoC; the first of these shares a PHY
with a USB 3.0 host controller (one or the other can be used).
. . .