[PATCH v21 0/9] PCI: EP: Add RC-to-EP doorbell with platform MSI controller
Niklas Cassel
cassel at kernel.org
Fri Jul 11 00:45:28 PDT 2025
On Thu, Jul 10, 2025 at 03:13:46PM -0400, Frank Li via B4 Relay wrote:
> Frank Li (9):
> PCI: imx6: Add helper function imx_pcie_add_lut_by_rid()
> PCI: imx6: Add LUT configuration for MSI/IOMMU in Endpoint mode
> PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller
> PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check
> PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment
> PCI: endpoint: pci-epf-test: Add doorbell test support
> misc: pci_endpoint_test: Add doorbell test case
> selftests: pci_endpoint: Add doorbell test case
> arm64: dts: imx95: Add msi-map for pci-ep device
>
> Documentation/PCI/endpoint/pci-test-howto.rst | 14 +++
> arch/arm64/boot/dts/freescale/imx95.dtsi | 1 +
> drivers/misc/pci_endpoint_test.c | 85 ++++++++++++-
> drivers/pci/controller/dwc/pci-imx6.c | 25 ++--
> drivers/pci/endpoint/Kconfig | 8 ++
> drivers/pci/endpoint/Makefile | 1 +
> drivers/pci/endpoint/functions/pci-epf-test.c | 136 +++++++++++++++++++++
> drivers/pci/endpoint/pci-ep-msi.c | 98 +++++++++++++++
> drivers/pci/endpoint/pci-epf-core.c | 36 ++++++
> include/linux/pci-ep-msi.h | 28 +++++
> include/linux/pci-epf.h | 18 +++
> include/uapi/linux/pcitest.h | 1 +
> .../selftests/pci_endpoint/pci_endpoint_test.c | 28 +++++
> 13 files changed, 470 insertions(+), 9 deletions(-)
> ---
> base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
> change-id: 20241010-ep-msi-8b4cab33b1be
>
> Best regards,
> --
> Frank Li <Frank.Li at nxp.com>
>
>
Tested on rock5b (which uses the rk3588 SoC), by adding the same msi-map to
the pcie3x4_ep DT node as (what already exists in) the pcie3x4 (RC) DT node:
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
index 90414486e466..c0121aea791d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
@@ -389,6 +389,7 @@ pcie3x4_ep: pcie-ep at fe150000 {
interrupt-names = "sys", "pmc", "msg", "legacy", "err",
"dma0", "dma1", "dma2", "dma3";
max-link-speed = <3>;
+ msi-map = <0x0000 &its1 0x0000 0x1000>;
num-lanes = <4>;
phys = <&pcie30phy>;
phy-names = "pcie-phy";
The new selftest passes:
# RUN pcie_ep_doorbell.DOORBELL_TEST ...
# OK pcie_ep_doorbell.DOORBELL_TEST
ok 17 pcie_ep_doorbell.DOORBELL_TEST
Thus:
Tested-by: Niklas Cassel <cassel at kernel.org>
More information about the linux-arm-kernel
mailing list