Skip to contentSkip to conversation

Add PCIe Endpoint overlays for J721E and J721S2

PATCH Applied Siddharth Vadapalli 3 participants 6 messages Dec 11, 2023 – Dec 13, 2023

Subsystems (2)

v3 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add PCIe Endpoint overlays for J721E and J721S2

Hello,

This series adds device-tree overlays for enabling PCIe in Endpoint mode of operation on J721E-EVM and J721S2-EVM.

NOTE: This series is based on linux-next tagged next-20231211.

v2:
https://lore.kernel.org/r/[email protected]/
Changes since v2:
- Rebased series on linux-next tagged next-20231211.
- Collected Reviewed-by tag from:
Ravi Gunasekaran <[email protected]>
- Updated Makefile based on Andrew's suggestion to build the DTBs corresponding to the overlays only with an OF_ALL_DTBS build config since the generated DTBs are not required except to ensure that the overlays apply on the base DTB.
Reference:
https://lore.kernel.org/r/[email protected]

v1:
https://lore.kernel.org/r/[email protected]/
Changes since v1:
- Rebased series on linux-next tagged next-20231114.

Regards,
Siddharth.

Siddharth Vadapalli (2):
arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode
arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode

 arch/arm64/boot/dts/ti/Makefile               | 10 +++-
 .../boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso    | 53 +++++++++++++++++++
 .../boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso   | 53 +++++++++++++++++++
 3 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso
 create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/2 arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode

Add overlay to enable the PCIE0 instance of PCIe on J721E-EVM in Endpoint mode of operation.

---
 arch/arm64/boot/dts/ti/Makefile               |  6 ++-
 .../boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso    | 53 +++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso
arch/arm64/boot/dts/ti/Makefile +5 -1
index 1ac47876bc99..c6606b7678a3 100644
@@ -67,6 +67,7 @@ k3-j721e-evm-dtbs := k3-j721e-common-proc-board.dtb k3-j721e-evm-quad-port-eth-e
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-beagleboneai64.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-gesi-exp-board.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-pcie0-ep.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-sk.dtb
 
 # Boards with J721s2 SoC
@@ -103,6 +104,8 @@ k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
 	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
 k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
 	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
+k3-j721e-evm-pcie0-ep-dtbs := k3-j721e-common-proc-board.dtb \
+	k3-j721e-evm-pcie0-ep.dtbo
 dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
 	k3-am625-beagleplay-csi2-tevi-ov5640.dtb \
 	k3-am625-sk-csi2-imx219.dtb \
@@ -113,7 +116,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
 	k3-am62a7-sk-csi2-imx219.dtb \
 	k3-am62a7-sk-csi2-ov5640.dtb \
 	k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb \
-	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb
+	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb \
+	k3-j721e-evm-pcie0-ep.dtb
 
 # Enable support for device-tree overlays
 DTC_FLAGS_k3-am625-beagleplay += -@
arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode

Quoted 16 lines · Siddharth Vadapalli

Add overlay to enable the PCIE0 instance of PCIe on J721E-EVM in Endpoint mode of operation.

---
  arch/arm64/boot/dts/ti/Makefile               |  6 ++-
  .../boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso    | 53 +++++++++++++++++++
  2 files changed, 58 insertions(+), 1 deletion(-)

create mode 100644 arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 1ac47876bc99..c6606b7678a3 100644

arch/arm64/boot/dts/ti/Makefile k3-j721e-evm-dtbs := k3-j721e-common-proc-board.dtb k3-j721e-evm-quad-port-eth-e · line 70

Quoted 4 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -67,6 +67,7 @@ k3-j721e-evm-dtbs := k3-j721e-common-proc-board.dtb k3-j721e-evm-quad-port-eth-e
  dtb-$(CONFIG_ARCH_K3) += k3-j721e-beagleboneai64.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-gesi-exp-board.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-pcie0-ep.dtbo

See, much easier :)

Quoted 81 lines
arch/arm64/boot/dts/ti/Makefile +4 -1
  dtb-$(CONFIG_ARCH_K3) += k3-j721e-sk.dtb
 
  # Boards with J721s2 SoC
@@ -103,6 +104,8 @@ k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
  	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
  k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
  	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
+k3-j721e-evm-pcie0-ep-dtbs := k3-j721e-common-proc-board.dtb \
+	k3-j721e-evm-pcie0-ep.dtbo
  dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
  	k3-am625-beagleplay-csi2-tevi-ov5640.dtb \
  	k3-am625-sk-csi2-imx219.dtb \
@@ -113,7 +116,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
  	k3-am62a7-sk-csi2-imx219.dtb \
  	k3-am62a7-sk-csi2-ov5640.dtb \
  	k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb \
-	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb
+	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb \
+	k3-j721e-evm-pcie0-ep.dtb
 
  # Enable support for device-tree overlays
  DTC_FLAGS_k3-am625-beagleplay += -@
arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso new file +53 -0
new file mode 100644
index 000000000000..0c82a13b65a4
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for enabling PCIE0 instance in Endpoint Configuration with the
+ * J7 common processor board.
+ *
+ * J7 Common Processor Board Product Link: https://www.ti.com/tool/J721EXCPXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+#include "k3-pinctrl.h"
+
+/*
+ * Since Root Complex and Endpoint modes are mutually exclusive
+ * disable Root Complex mode.
+ */
+&pcie0_rc {
+	status = "disabled";
+};
+
+&cbass_main {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic500>;
+
+	pcie0_ep: pcie-ep@2900000 {
+		compatible = "ti,j721e-pcie-ep";
+		reg = <0x00 0x02900000 0x00 0x1000>,
+		      <0x00 0x02907000 0x00 0x400>,
+		      <0x00 0x0d000000 0x00 0x00800000>,
+		      <0x00 0x10000000 0x00 0x08000000>;
+		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
+		interrupt-names = "link_state";
+		interrupts = <GIC_SPI 318 IRQ_TYPE_EDGE_RISING>;
+		ti,syscon-pcie-ctrl = <&scm_conf 0x4070>;
+		max-link-speed = <3>;
+		num-lanes = <1>;
+		power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 239 1>;
+		clock-names = "fck";
+		max-functions = /bits/ 8 <6>;
+		max-virtual-functions = /bits/ 8 <4 4 4 4 0 0>;
+		dma-coherent;
+		phys = <&serdes0_pcie_link>;
+		phy-names = "pcie-phy";
+	};
+};
#3 lore raw

PATCH v3 2/2 arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode

In reply to Siddharth Vadapalli

Add overlay to enable the PCIE1 instance of PCIe on J721S2-EVM in Endpoint mode of operation.

---
 arch/arm64/boot/dts/ti/Makefile               |  6 ++-
 .../boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso   | 53 +++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso
arch/arm64/boot/dts/ti/Makefile +5 -1
index c6606b7678a3..52c1dc910308 100644
@@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-gesi-exp-board.dtbo
 k3-j721s2-evm-dtbs := k3-j721s2-common-proc-board.dtb k3-j721s2-evm-gesi-exp-board.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-pcie1-ep.dtbo
 
 # Boards with J784s4 SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
@@ -106,6 +107,8 @@ k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
 	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
 k3-j721e-evm-pcie0-ep-dtbs := k3-j721e-common-proc-board.dtb \
 	k3-j721e-evm-pcie0-ep.dtbo
+k3-j721s2-evm-pcie1-ep-dtbs := k3-j721s2-common-proc-board.dtb \
+	k3-j721s2-evm-pcie1-ep.dtbo
 dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
 	k3-am625-beagleplay-csi2-tevi-ov5640.dtb \
 	k3-am625-sk-csi2-imx219.dtb \
@@ -117,7 +120,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
 	k3-am62a7-sk-csi2-ov5640.dtb \
 	k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb \
 	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb \
-	k3-j721e-evm-pcie0-ep.dtb
+	k3-j721e-evm-pcie0-ep.dtb \
+	k3-j721s2-evm-pcie1-ep.dtb
 
 # Enable support for device-tree overlays
 DTC_FLAGS_k3-am625-beagleplay += -@
arch/arm64/boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v3 2/2
#4 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode

Quoted 6 lines · Siddharth Vadapalli

Add overlay to enable the PCIE1 instance of PCIe on J721S2-EVM in Endpoint mode of operation.

---

Quoted 95 lines
  arch/arm64/boot/dts/ti/Makefile               |  6 ++-
  .../boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso   | 53 +++++++++++++++++++
  2 files changed, 58 insertions(+), 1 deletion(-)

create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso

arch/arm64/boot/dts/ti/Makefile +5 -1
index c6606b7678a3..52c1dc910308 100644
@@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-gesi-exp-board.dtbo
  k3-j721s2-evm-dtbs := k3-j721s2-common-proc-board.dtb k3-j721s2-evm-gesi-exp-board.dtbo
  dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-pcie1-ep.dtbo
 
  # Boards with J784s4 SoC
  dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
@@ -106,6 +107,8 @@ k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
  	k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
  k3-j721e-evm-pcie0-ep-dtbs := k3-j721e-common-proc-board.dtb \
  	k3-j721e-evm-pcie0-ep.dtbo
+k3-j721s2-evm-pcie1-ep-dtbs := k3-j721s2-common-proc-board.dtb \
+	k3-j721s2-evm-pcie1-ep.dtbo
  dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
  	k3-am625-beagleplay-csi2-tevi-ov5640.dtb \
  	k3-am625-sk-csi2-imx219.dtb \
@@ -117,7 +120,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
  	k3-am62a7-sk-csi2-ov5640.dtb \
  	k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb \
  	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb \
-	k3-j721e-evm-pcie0-ep.dtb
+	k3-j721e-evm-pcie0-ep.dtb \
+	k3-j721s2-evm-pcie1-ep.dtb
 
  # Enable support for device-tree overlays
  DTC_FLAGS_k3-am625-beagleplay += -@
arch/arm64/boot/dts/ti/k3-j721s2-evm-pcie1-ep.dtso new file +53 -0
new file mode 100644
index 000000000000..43568eb67d93
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for enabling PCIE1 instance in Endpoint Configuration with the
+ * J7 common processor board.
+ *
+ * J7 Common Processor Board Product Link: https://www.ti.com/tool/J721EXCPXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+#include "k3-pinctrl.h"
+
+/*
+ * Since Root Complex and Endpoint modes are mutually exclusive
+ * disable Root Complex mode.
+ */
+&pcie1_rc {
+	status = "disabled";
+};
+
+&cbass_main {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic500>;
+
+	pcie1_ep: pcie-ep@2910000 {
+		compatible = "ti,j7200-pcie-ep", "ti,j721e-pcie-ep";
+		reg = <0x00 0x02910000 0x00 0x1000>,
+		      <0x00 0x02917000 0x00 0x400>,
+		      <0x00 0x0d800000 0x00 0x00800000>,
+		      <0x00 0x18000000 0x00 0x08000000>;
+		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
+		interrupt-names = "link_state";
+		interrupts = <GIC_SPI 330 IRQ_TYPE_EDGE_RISING>;
+		ti,syscon-pcie-ctrl = <&scm_conf 0x074>;
+		max-link-speed = <3>;
+		num-lanes = <1>;
+		power-domains = <&k3_pds 276 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 276 41>;
+		clock-names = "fck";
+		max-functions = /bits/ 8 <6>;
+		max-virtual-functions = /bits/ 8 <4 4 4 4 0 0>;
+		dma-coherent;
+		phys = <&serdes0_pcie_link>;
+		phy-names = "pcie-phy";
+	};
+};
maintainer Applied
#5 lore raw
In reply to Siddharth Vadapalli

Hi Siddharth Vadapalli,

Quoted 18 lines · Siddharth Vadapalli

This series adds device-tree overlays for enabling PCIe in Endpoint mode of operation on J721E-EVM and J721S2-EVM.

NOTE: This series is based on linux-next tagged next-20231211.

v2:
https://lore.kernel.org/r/[email protected]/
Changes since v2:
- Rebased series on linux-next tagged next-20231211.
- Collected Reviewed-by tag from:
Ravi Gunasekaran <[email protected]>
- Updated Makefile based on Andrew's suggestion to build the DTBs corresponding to the overlays only with an OF_ALL_DTBS build config since the generated DTBs are not required except to ensure that the overlays apply on the base DTB.
Reference:
https://lore.kernel.org/r/[email protected]

Quoted 1 line

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/2] arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode

      commit: 3942697901eb5340dc51202352f035ae191c37f2
[2/2] arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode
      commit: 729cfcf8ac2447f175eb4b6a0604983618ba07d5

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D