Skip to contentSkip to conversation

Add PCIe Gen2x1 controller support for RK3528

PATCH Applied Yao Zi 3 participants 7 messages Sep 18, 2025 – Oct 20, 2025

Subsystems (4)
lore
Share & tools
lore

Yao Zi

author
#0 lore raw

v2 cover Add PCIe Gen2x1 controller support for RK3528

Rockchip RK3528 ships one PCIe Gen2x1 controller that operates in RC mode only. The SoC doesn't provide a separate MSI controller, thus the one integrated in designware PCIe IP must be used. This series documents the PCIe controller in dt-binding and describes it in the SoC devicetree.

Radxa E20C board is used for testing, whose LAN GbE port is provided through an RTL8111H chip connected to PCIe controller. Its devicetree is adjusted to enable the controller, and IPERF3 shows the interface runs at full-speed. A typical result looks like

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.01  sec  1.10 GBytes   941 Mbits/sec                  receiver

This series is based on next-20250917, thanks for your time and review.

Changed from v1
- Collect review tags
- SoC devicetree
- Drop redundant PCLK_PCIE_PHY clock for PCIe node
- Use 32-bit DBI address, adjust SoC ranges property and reorder nodes
- Align cells of reg and ranges properties
- board devicetree
- drop redundant pinconf pcie_reset_g
- Add missing vpcie3v3-supply
- Link to v1: https://lore.kernel.org/all/[email protected]/

Yao Zi (3):
dt-bindings: PCI: dwc: rockchip: Add RK3528 variant
arm64: dts: rockchip: Add PCIe Gen2x1 controller for RK3528
arm64: dts: rockchip: Enable PCIe controller on Radxa E20C

 .../bindings/pci/rockchip-dw-pcie.yaml        |  3 +
 .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 12 ++++
 arch/arm64/boot/dts/rockchip/rk3528.dtsi      | 56 ++++++++++++++++++-
 3 files changed, 70 insertions(+), 1 deletion(-)
Signature · 1 line
2.50.1
author
#1 lore raw

PATCH v2 1/3 dt-bindings: PCI: dwc: rockchip: Add RK3528 variant

RK3528 ships a PCIe Gen2x1 controller that operates in RC mode only. Since the SoC has no separate MSI controller, the one integrated in the DWC PCIe IP must be used, and thus its interrupt scheme is similar to variants found in RK3562 and RK3576.

Older BSP code claimed its integrated MSI controller supports only 8 MSIs[1], but this has been changed in newer BSP[2] and testing proves the controller works correctly with more than 8 MSIs allocated, suggesting the controller should be compatible with the RK3568 variant. Let's document its compatible string.

---
 Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml +3 -0
index 6c6d828ce964..67f1a5502048 100644
@@ -22,6 +22,7 @@ properties:
       - const: rockchip,rk3568-pcie
       - items:
           - enum:
+              - rockchip,rk3528-pcie
               - rockchip,rk3562-pcie
               - rockchip,rk3576-pcie
               - rockchip,rk3588-pcie
@@ -78,6 +79,7 @@ allOf:
           compatible:
             contains:
               enum:
+                - rockchip,rk3528-pcie
                 - rockchip,rk3562-pcie
                 - rockchip,rk3576-pcie
     then:
@@ -89,6 +91,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - rockchip,rk3528-pcie
               - rockchip,rk3562-pcie
               - rockchip,rk3576-pcie
     then:
Signature · 1 line
2.50.1
maintainer Acked-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] dt-bindings: PCI: dwc: rockchip: Add RK3528 variant

Am Donnerstag, 18. September 2025, 17:30:55 Mitteleuropäische Sommerzeit schrieb Yao Zi:

Quoted 11 lines

RK3528 ships a PCIe Gen2x1 controller that operates in RC mode only. Since the SoC has no separate MSI controller, the one integrated in the DWC PCIe IP must be used, and thus its interrupt scheme is similar to variants found in RK3562 and RK3576.

Older BSP code claimed its integrated MSI controller supports only 8 MSIs[1], but this has been changed in newer BSP[2] and testing proves the controller works correctly with more than 8 MSIs allocated, suggesting the controller should be compatible with the RK3568 variant. Let's document its compatible string.

Quoted 4 lines

This likely should to go through the PCI tree.
(or needs an Ack from PCI maintainers, for me to pick it up)

Heiko

author
#3 lore raw

PATCH v2 2/3 arm64: dts: rockchip: Add PCIe Gen2x1 controller for RK3528

In reply to Yao Zi

Describes the PCIe Gen2x1 controller integrated in RK3528 SoC. The SoC doesn't provide a separate MSI controller, thus the one integrated in designware PCIe IP must be used.

---
 arch/arm64/boot/dts/rockchip/rk3528.dtsi | 56 +++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3528.dtsi +55 -1
index d5f8f7b9bf01..d402f2828814 100644
@@ -7,6 +7,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/clock/rockchip,rk3528-cru.h>
 #include <dt-bindings/power/rockchip,rk3528-power.h>
@@ -278,10 +279,63 @@ gmac0_clk: clock-gmac50m {
 
 	soc {
 		compatible = "simple-bus";
-		ranges = <0x0 0xfe000000 0x0 0xfe000000 0x0 0x2000000>;
+		ranges = <0x0 0xfc000000 0x0 0xfc000000 0x0 0x44000000>;
 		#address-cells = <2>;
 		#size-cells = <2>;
 
+		pcie: pcie@fe000000 {
+			compatible = "rockchip,rk3528-pcie",
+				     "rockchip,rk3568-pcie";
+			reg = <0x0 0xfe000000 0x0 0x400000>,
+			      <0x0 0xfe4f0000 0x0 0x010000>,
+			      <0x0 0xfc000000 0x0 0x100000>;
+			reg-names = "dbi", "apb", "config";
+			bus-range = <0x0 0xff>;
+			clocks = <&cru ACLK_PCIE>, <&cru HCLK_PCIE_SLV>,
+				 <&cru HCLK_PCIE_DBI>, <&cru PCLK_PCIE>,
+				 <&cru CLK_PCIE_AUX>;
+			clock-names = "aclk_mst", "aclk_slv",
+				      "aclk_dbi", "pclk",
+				      "aux";
+			device_type = "pci";
+			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "sys", "pmc", "msg", "legacy", "err",
+					  "msi";
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 7>;
+			interrupt-map = <0 0 0 1 &pcie_intc 0>,
+					<0 0 0 2 &pcie_intc 1>,
+					<0 0 0 3 &pcie_intc 2>,
+					<0 0 0 4 &pcie_intc 3>;
+			linux,pci-domain = <0>;
+			max-link-speed = <2>;
+			num-lanes = <1>;
+			phys = <&combphy PHY_TYPE_PCIE>;
+			phy-names = "pcie-phy";
+			power-domains = <&power RK3528_PD_VPU>;
+			ranges = <0x01000000 0x0 0xfc100000 0x0 0xfc100000 0x0 0x00100000>,
+				 <0x02000000 0x0 0xfc200000 0x0 0xfc200000 0x0 0x01e00000>,
+				 <0x03000000 0x1 0x00000000 0x1 0x00000000 0x0 0x40000000>;
+			resets = <&cru SRST_PCIE_POWER_UP>, <&cru SRST_P_PCIE>;
+			reset-names = "pwr", "pipe";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			status = "disabled";
+
+			pcie_intc: legacy-interrupt-controller {
+				interrupt-controller;
+				interrupt-parent = <&gic>;
+				interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+				#address-cells = <0>;
+				#interrupt-cells = <1>;
+			};
+		};
+
 		gic: interrupt-controller@fed01000 {
 			compatible = "arm,gic-400";
 			reg = <0x0 0xfed01000 0 0x1000>,
Signature · 1 line
2.50.1
author
#4 lore raw

PATCH v2 3/3 arm64: dts: rockchip: Enable PCIe controller on Radxa E20C

In reply to Yao Zi

Radxa E20C provides one of its GbE ports through RTL8111H connected to SoC's PCIe controller. Let's enable the controller and the PHY used by it to allow usage of the port.

---
 arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +12 -0
index 12eec2c1db22..b32452756155 100644
@@ -171,6 +171,10 @@ vdd_logic: regulator-vdd-logic {
 	};
 };
 
+&combphy {
+	status = "okay";
+};
+
 &cpu0 {
 	cpu-supply = <&vdd_arm>;
 };
@@ -229,6 +233,14 @@ rgmii_phy: ethernet-phy@1 {
 	};
 };
 
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pciem1_pins>;
+	reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc_3v3>;
+	status = "okay";
+};
+
 &pinctrl {
 	ethernet {
 		gmac1_rstn_l: gmac1-rstn-l {
Signature · 1 line
2.50.1
maintainer Applied
#5 lore raw

Re: (subset) [PATCH v2 0/3] Add PCIe Gen2x1 controller support for RK3528

In reply to Yao Zi
Quoted 11 lines · Yao Zi

Rockchip RK3528 ships one PCIe Gen2x1 controller that operates in RC mode only. The SoC doesn't provide a separate MSI controller, thus the one integrated in designware PCIe IP must be used. This series documents the PCIe controller in dt-binding and describes it in the SoC devicetree.

Radxa E20C board is used for testing, whose LAN GbE port is provided through an RTL8111H chip connected to PCIe controller. Its devicetree is adjusted to enable the controller, and IPERF3 shows the interface runs at full-speed. A typical result looks like

[...]

Applied, thanks!

[1/3] dt-bindings: PCI: dwc: rockchip: Add RK3528 variant

      commit: dfbf19c47a01eda5df4d476d64a273e1188ea5a1

Best regards,

Signature · 1 line
Manivannan Sadhasivam <[email protected]>
maintainer Applied
#6 lore raw

Re: (subset) [PATCH v2 0/3] Add PCIe Gen2x1 controller support for RK3528

In reply to Yao Zi
Quoted 11 lines · Yao Zi

Rockchip RK3528 ships one PCIe Gen2x1 controller that operates in RC mode only. The SoC doesn't provide a separate MSI controller, thus the one integrated in designware PCIe IP must be used. This series documents the PCIe controller in dt-binding and describes it in the SoC devicetree.

Radxa E20C board is used for testing, whose LAN GbE port is provided through an RTL8111H chip connected to PCIe controller. Its devicetree is adjusted to enable the controller, and IPERF3 shows the interface runs at full-speed. A typical result looks like

[...]

Applied, thanks!

[2/3] arm64: dts: rockchip: Add PCIe Gen2x1 controller for RK3528

      commit: 263fac6b09b42a1b077c21354370d38758237ab0
[3/3] arm64: dts: rockchip: Enable PCIe controller on Radxa E20C
      commit: 047bac0be317e68b89d0deed4f659f8e080df6e8

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>