Skip to contentSkip to conversation

arm64: dts: ti: Introduce AM62P5 SoC and board

PATCH Applied Vignesh Raghavendra 4 participants 13 messages Aug 11, 2023 – Aug 16, 2023

Subsystems (2)
lore
Share & tools
lore

Vignesh Raghavendra

author maintainer
#0 lore raw

v2 cover arm64: dts: ti: Introduce AM62P5 SoC and board

This series adds basic support for AM62P family of SoCs and specifically AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

Bootlog:
https://gist.github.com/r-vignesh/edae006877fe8e51370f3cea9bf8ddfc

Change log
v2:
* Fix binding doc to talk about SoC and board
* Fix comments by Andrew on v1, enable main pmx by default, use bootph-all and move it to dtsi as appropriate etc
* Collect Acks and R-bys

Bryan Brattlof (3):
dt-bindings: arm: ti: Add bindings for AM62P5 SoCs
arm64: dts: ti: Introduce AM62P5 family of SoCs
arm64: dts: ti: Add support for the AM62P5 Starter Kit

 .../devicetree/bindings/arm/ti/k3.yaml        |   6 +
 arch/arm64/boot/dts/ti/Makefile               |   3 +
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi     | 136 ++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi      |  15 ++
 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi   |  32 +++++
 arch/arm64/boot/dts/ti/k3-am62p.dtsi          | 122 ++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts       | 117 +++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5.dtsi         | 107 ++++++++++++++
 arch/arm64/boot/dts/ti/k3-pinctrl.h           |   3 +
 9 files changed, 541 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5.dtsi
Signature · 1 line
2.41.0
author maintainer
#1 lore raw

PATCH v2 1/3 dt-bindings: arm: ti: Add bindings for AM62P5 SoCs

From: Bryan Brattlof <[email protected]>

Add bindings for TI's AM62P5 family of devices.

---
 Documentation/devicetree/bindings/arm/ti/k3.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/ti/k3.yaml +6 -0
index 5ca6af492507..03d2a0d79fb0 100644
@@ -25,6 +25,12 @@ properties:
               - ti,am62a7-sk
           - const: ti,am62a7
 
+      - description: K3 AM62P5 SoC and Boards
+        items:
+          - enum:
+              - ti,am62p5-sk
+          - const: ti,am62p5
+
       - description: K3 AM625 SoC PHYTEC phyBOARD-Lyra
         items:
           - const: phytec,am625-phyboard-lyra-rdk
Signature · 1 line
2.41.0
author maintainer
#2 lore raw

PATCH v2 2/3 arm64: dts: ti: Introduce AM62P5 family of SoCs

In reply to Vignesh Raghavendra

From: Bryan Brattlof <[email protected]>

The AM62Px is an extension of the existing Sitara AM62x low-cost family of application processors built for Automotive and Linux Application development. Scalable Arm Cortex-A53 performance and embedded features, such as: multi high-definition display support, 3D-graphics acceleration, 4K video acceleration, and extensive peripherals make the AM62Px well-suited for a broad range of automation and industrial application, including automotive digital instrumentation, automotive displays, industrial HMI, and more.

Some highlights of AM62P SoC are:
* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Dual/Single core variants are provided in the same package to allow HW compatible designs.
* One Device manager Cortext-R5F for system power and resource management, and one Cortex-R5F for Functional Safety or general-purpose usage.
* One 3D GPU up to 50 GLFOPS
* H.264/H.265 Video Encode/Decode.
* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or 2x OLDI-SL), DSI, or DPI. Up to 3840x1080@60fps resolution
* Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized Hardware Security Module with support for secure boot, debug security and crypto acceleration and trusted execution environment.
* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, enabling battery powered system design.

For those interested, more details about this SoC can be found in the Technical Reference Manual here:

    https://www.ti.com/lit/pdf/spruj83
---
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi   | 136 ++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi    |  15 +++
 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi |  32 +++++
 arch/arm64/boot/dts/ti/k3-am62p.dtsi        | 122 ++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5.dtsi       | 107 +++++++++++++++
 arch/arm64/boot/dts/ti/k3-pinctrl.h         |   3 +
 6 files changed, 415 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5.dtsi
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi new file +136 -0
new file mode 100644
index 000000000000..c24ff905437f
@@ -0,0 +1,136 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P main domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_main {
+	oc_sram: sram@70000000 {
+		compatible = "mmio-sram";
+		reg = <0x00 0x70000000 0x00 0x10000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x00 0x00 0x70000000 0x10000>;
+	};
+
+	gic500: interrupt-controller@1800000 {
+		compatible = "arm,gic-v3";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0x00 0x01800000 0x00 0x10000>,	/* GICD */
+		      <0x00 0x01880000 0x00 0xc0000>,	/* GICR */
+		      <0x01 0x00000000 0x00 0x2000>,    /* GICC */
+		      <0x01 0x00010000 0x00 0x1000>,    /* GICH */
+		      <0x01 0x00020000 0x00 0x2000>;    /* GICV */
+		/*
+		 * vcpumntirq:
+		 * virtual CPU interface maintenance interrupt
+		 */
+		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+		gic_its: msi-controller@1820000 {
+			compatible = "arm,gic-v3-its";
+			reg = <0x00 0x01820000 0x00 0x10000>;
+			socionext,synquacer-pre-its = <0x1000000 0x400000>;
+			msi-controller;
+			#msi-cells = <1>;
+		};
+	};
+
+	dmss: bus@48000000 {
+		bootph-all;
+		compatible = "simple-mfd";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		dma-ranges;
+		ranges = <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>;
+
+		ti,sci-dev-id = <25>;
+
+		secure_proxy_main: mailbox@4d000000 {
+			bootph-all;
+			compatible = "ti,am654-secure-proxy";
+			#mbox-cells = <1>;
+			reg-names = "target_data", "rt", "scfg";
+			reg = <0x00 0x4d000000 0x00 0x80000>,
+			      <0x00 0x4a600000 0x00 0x80000>,
+			      <0x00 0x4a400000 0x00 0x80000>;
+			interrupt-names = "rx_012";
+			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+		};
+	};
+
+	dmsc: system-controller@44043000 {
+		bootph-all;
+		compatible = "ti,k2g-sci";
+		ti,host-id = <12>;
+		mbox-names = "rx", "tx";
+		mboxes = <&secure_proxy_main 12>,
+			 <&secure_proxy_main 13>;
+		reg-names = "debug_messages";
+		reg = <0x00 0x44043000 0x00 0xfe0>;
+
+		k3_pds: power-controller {
+			bootph-all;
+			compatible = "ti,sci-pm-domain";
+			#power-domain-cells = <2>;
+		};
+
+		k3_clks: clock-controller {
+			bootph-all;
+			compatible = "ti,k2g-sci-clk";
+			#clock-cells = <2>;
+		};
+
+		k3_reset: reset-controller {
+			bootph-all;
+			compatible = "ti,sci-reset";
+			#reset-cells = <2>;
+		};
+	};
+
+	main_pmx0: pinctrl@f4000 {
+		bootph-all;
+		compatible = "pinctrl-single";
+		reg = <0x00 0xf4000 0x00 0x2ac>;
+		#pinctrl-cells = <1>;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0xffffffff>;
+	};
+
+	main_timer0: timer@2400000 {
+		bootph-all;
+		compatible = "ti,am654-timer";
+		reg = <0x00 0x2400000 0x00 0x400>;
+		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&k3_clks 36 2>;
+		clock-names = "fck";
+		assigned-clocks = <&k3_clks 36 2>;
+		assigned-clock-parents = <&k3_clks 36 3>;
+		power-domains = <&k3_pds 36 TI_SCI_PD_EXCLUSIVE>;
+		ti,timer-pwm;
+	};
+
+	main_uart0: serial@2800000 {
+		compatible = "ti,am64-uart", "ti,am654-uart";
+		reg = <0x00 0x02800000 0x00 0x100>;
+		interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 146 0>;
+		clock-names = "fclk";
+		status = "disabled";
+	};
+
+	main_uart1: serial@2810000 {
+		compatible = "ti,am64-uart", "ti,am654-uart";
+		reg = <0x00 0x02810000 0x00 0x100>;
+		interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 152 0>;
+		clock-names = "fclk";
+		status = "disabled";
+	};
+};
arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi new file +15 -0
new file mode 100644
index 000000000000..27ca1c9c6d13
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P MCU domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_mcu {
+	mcu_pmx0: pinctrl@4084000 {
+		compatible = "pinctrl-single";
+		reg = <0x00 0x04084000 0x00 0x88>;
+		#pinctrl-cells = <1>;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0xffffffff>;
+	};
+};
arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi new file +32 -0
new file mode 100644
index 000000000000..aaf4b793b58e
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P wakeup domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_wakeup {
+	wkup_conf: bus@43000000 {
+		bootph-all;
+		compatible = "simple-bus";
+		reg = <0x00 0x43000000 0x00 0x20000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x00 0x00 0x43000000 0x20000>;
+
+		chipid: chipid@14 {
+			bootph-all;
+			compatible = "ti,am654-chipid";
+			reg = <0x14 0x4>;
+		};
+	};
+
+	wkup_uart0: serial@2b300000 {
+		compatible = "ti,am64-uart", "ti,am654-uart";
+		reg = <0x00 0x2b300000 0x00 0x100>;
+		interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 114 0>;
+		clock-names = "fclk";
+		status = "disabled";
+	};
+};
arch/arm64/boot/dts/ti/k3-am62p.dtsi new file +122 -0

122 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-am62p5.dtsi new file +107 -0

107 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-pinctrl.h +3 -0
index 6004e0967ec5..2a4e0e084d69 100644
@@ -41,6 +41,9 @@
 #define AM62AX_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62AX_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
 
+#define AM62PX_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
+#define AM62PX_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
+
 #define AM62X_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62X_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
 
Signature · 1 line
2.41.0
#3 lore raw

Re: [PATCH v2 2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs

Quoted 104 lines · Vignesh Raghavendra

From: Bryan Brattlof <[email protected]>

The AM62Px is an extension of the existing Sitara AM62x low-cost family of application processors built for Automotive and Linux Application development. Scalable Arm Cortex-A53 performance and embedded features, such as: multi high-definition display support, 3D-graphics acceleration, 4K video acceleration, and extensive peripherals make the AM62Px well-suited for a broad range of automation and industrial application, including automotive digital instrumentation, automotive displays, industrial HMI, and more.

Some highlights of AM62P SoC are:
* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Dual/Single core variants are provided in the same package to allow HW compatible designs.
* One Device manager Cortext-R5F for system power and resource management, and one Cortex-R5F for Functional Safety or general-purpose usage.
* One 3D GPU up to 50 GLFOPS
* H.264/H.265 Video Encode/Decode.
* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or 2x OLDI-SL), DSI, or DPI. Up to 3840x1080@60fps resolution
* Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized Hardware Security Module with support for secure boot, debug security and crypto acceleration and trusted execution environment.
* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, enabling battery powered system design.

For those interested, more details about this SoC can be found in the Technical Reference Manual here:

    https://www.ti.com/lit/pdf/spruj83
---
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi   | 136 ++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi    |  15 +++
 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi |  32 +++++
 arch/arm64/boot/dts/ti/k3-am62p.dtsi        | 122 ++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5.dtsi       | 107 +++++++++++++++
 arch/arm64/boot/dts/ti/k3-pinctrl.h         |   3 +
 6 files changed, 415 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5.dtsi
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi new file +41 -0
new file mode 100644
index 000000000000..c24ff905437f
@@ -0,0 +1,136 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P main domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_main {
+	oc_sram: sram@70000000 {
+		compatible = "mmio-sram";
+		reg = <0x00 0x70000000 0x00 0x10000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x00 0x00 0x70000000 0x10000>;
+	};
+
+	gic500: interrupt-controller@1800000 {
+		compatible = "arm,gic-v3";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0x00 0x01800000 0x00 0x10000>,	/* GICD */
+		      <0x00 0x01880000 0x00 0xc0000>,	/* GICR */
+		      <0x01 0x00000000 0x00 0x2000>,    /* GICC */
+		      <0x01 0x00010000 0x00 0x1000>,    /* GICH */
+		      <0x01 0x00020000 0x00 0x2000>;    /* GICV */
+		/*
+		 * vcpumntirq:
+		 * virtual CPU interface maintenance interrupt
+		 */
+		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+		gic_its: msi-controller@1820000 {
+			compatible = "arm,gic-v3-its";
+			reg = <0x00 0x01820000 0x00 0x10000>;
+			socionext,synquacer-pre-its = <0x1000000 0x400000>;
+			msi-controller;
+			#msi-cells = <1>;
+		};
+	};

arch/arm64/boot/dts/ti/k3-am62p-main.dtsi line 51

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi new file +10 -0
+
+	dmss: bus@48000000 {
+		bootph-all;
+		compatible = "simple-mfd";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		dma-ranges;
+		ranges = <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>;
+
+		ti,sci-dev-id = <25>;

My v1 concerns are still valid.

arch/arm64/boot/dts/ti/k3-am62p-main.dtsi line 64

Quoted 13 lines
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi new file +13 -0
+
+		secure_proxy_main: mailbox@4d000000 {
+			bootph-all;
+			compatible = "ti,am654-secure-proxy";
+			#mbox-cells = <1>;
+			reg-names = "target_data", "rt", "scfg";
+			reg = <0x00 0x4d000000 0x00 0x80000>,
+			      <0x00 0x4a600000 0x00 0x80000>,
+			      <0x00 0x4a400000 0x00 0x80000>;
+			interrupt-names = "rx_012";
+			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+		};
+	};

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#4 lore raw

PATCH v2 3/3 arm64: dts: ti: Add support for the AM62P5 Starter Kit

In reply to Vignesh Raghavendra

From: Bryan Brattlof <[email protected]>

Add basic support for the AM62P5 SK with UART console and ramdisk as rootfs.

Schematics is at https://www.ti.com/lit/zip/sprr487

---
 arch/arm64/boot/dts/ti/Makefile         |   3 +
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 117 ++++++++++++++++++++++++
 2 files changed, 120 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
arch/arm64/boot/dts/ti/Makefile +3 -0
index 437a3d7e8e3a..5a09cad74c44 100644
@@ -23,6 +23,9 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
 # Boards with AM62Ax SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb
 
+# Boards with AM62Px SoC
+dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
+
 # Boards with AM64x SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts new file +117 -0

117 lines not on this page · raw message

Signature · 1 line
2.41.0
Acked-by on v2 3/3
#5 lore raw

Re: [PATCH v2 3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit

Quoted 113 lines · Vignesh Raghavendra

From: Bryan Brattlof <[email protected]>

Add basic support for the AM62P5 SK with UART console and ramdisk as rootfs.

Schematics is at https://www.ti.com/lit/zip/sprr487

---
  arch/arm64/boot/dts/ti/Makefile         |   3 +
  arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 117 ++++++++++++++++++++++++
  2 files changed, 120 insertions(+)

create mode 100644 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts

arch/arm64/boot/dts/ti/Makefile +3 -0
index 437a3d7e8e3a..5a09cad74c44 100644
@@ -23,6 +23,9 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
  # Boards with AM62Ax SoC
  dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb
 
+# Boards with AM62Px SoC
+dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
+
  # Boards with AM64x SoC
  dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts new file +77 -0
new file mode 100644
index 000000000000..17edfb19e819
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P5-SK
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ * Schematics: https://www.ti.com/lit/zip/sprr487
+ */
+
+/dts-v1/;
+
+#include "k3-am62p5.dtsi"
+
+/ {
+	compatible = "ti,am62p5-sk", "ti,am62p5";
+	model = "Texas Instruments AM62P5 SK";
+
+	aliases {
+		serial0 = &wkup_uart0;
+		serial2 = &main_uart0;
+		serial3 = &main_uart1;
+	};
+
+	chosen {
+		stdout-path = &main_uart0;
+	};
+
+	memory@80000000 {
+		/* 8G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
+		      <0x00000008 0x80000000 0x00000001 0x80000000>;
+		device_type = "memory";
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		secure_tfa_ddr: tfa@9e780000 {
+			reg = <0x00 0x9e780000 0x00 0x80000>;
+			no-map;
+		};
+
+		secure_ddr: optee@9e800000 {
+			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
+			no-map;
+		};
+
+		wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x9c900000 0x00 0x01e00000>;
+			no-map;
+		};
+	};
+};
+
+&main_pmx0 {
+	main_uart0_pins_default: main-uart0-default-pins {
+		bootph-all;
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x1c8, PIN_INPUT, 0)	/* (A22) UART0_RXD */
+			AM62PX_IOPAD(0x1cc, PIN_OUTPUT, 0)	/* (B22) UART0_TXD */
+			AM62PX_IOPAD(0x1d0, PIN_INPUT, 0)	/* (A23) UART0_CTSn */
+			AM62PX_IOPAD(0x1d4, PIN_OUTPUT, 0)	/* (C22) UART0_RTSn */
+		>;
+	};
+
+	main_uart1_pins_default: main-uart1-default-pins {
+		bootph-all;
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x194, PIN_INPUT, 2)	/* (D25) MCASP0_AXR3 */
+			AM62PX_IOPAD(0x198, PIN_OUTPUT, 2)	/* (E25) MCASP0_AXR2 */
+			AM62PX_IOPAD(0x1ac, PIN_INPUT, 2)	/* (G23) MCASP0_AFSR */
+			AM62PX_IOPAD(0x1b0, PIN_OUTPUT, 2)	/* (G20) MCASP0_ACLKR */
+		>;
+	};
+};

arch/arm64/boot/dts/ti/k3-am62p5-sk.dts line 87

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts new file +10 -0
+
+&main_uart0 {
+	bootph-all;
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart0_pins_default>;
+	status = "okay";
+};
+
+&main_uart1 {
+	/* Main UART1 is used by TIFS firmware */

These comments really belong right before the "status" line to explain why we set it to "reserved".

Otherwise,

Quoted 30 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts new file +30 -0
+	bootph-all;
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart1_pins_default>;
+	status = "reserved";
+};
+
+&cbass_mcu {
+	bootph-all;
+};
+
+&mcu_pmx0 {
+	bootph-all;
+	wkup_uart0_pins_default: wkup-uart0-default-pins {
+		bootph-all;
+		pinctrl-single,pins = <
+			AM62PX_MCU_IOPAD(0x02c, PIN_INPUT, 0)	/* (C7) WKUP_UART0_CTSn */
+			AM62PX_MCU_IOPAD(0x030, PIN_OUTPUT, 0)	/* (C6) WKUP_UART0_RTSn */
+			AM62PX_MCU_IOPAD(0x024, PIN_INPUT, 0)	/* (D8) WKUP_UART0_RXD */
+			AM62PX_MCU_IOPAD(0x028, PIN_OUTPUT, 0)	/* (D7) WKUP_UART0_TXD */
+		>;
+	};
+};
+
+&wkup_uart0 {
+	/* WKUP UART0 is used by DM firmware */
+	bootph-all;
+	pinctrl-names = "default";
+	pinctrl-0 = <&wkup_uart0_pins_default>;
+	status = "reserved";
+};
maintainer Applied
#6 lore raw
In reply to Vignesh Raghavendra

Hi Vignesh Raghavendra,

Quoted 10 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs

      commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273
[2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
      commit: 29075cc09f43a024d962da66d2e4f9eb577713d0
[3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
      commit: 935c4047d42e53a06ec768ddc495a44f6869209c

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
[2] https://lore.kernel.org/all/[email protected]/

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

Hi Vignesh Raghavendra,

Quoted 10 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

Quoted 7 lines

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs

      commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273
[2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
      commit: 29075cc09f43a024d962da66d2e4f9eb577713d0
[3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
      commit: 935c4047d42e53a06ec768ddc495a44f6869209c

A bit too fast. simple-mfd *is not allowed* on its own.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#8 lore raw
Quoted 1 line · Krzysztof Kozlowski

On 12/08/2023 00:49, Nishanth Menon wrote:

Looping in Vinod

[...]

Quoted 3 lines

A bit too fast. simple-mfd *is not allowed* on its own.

Actually dtbs_check comes up clean, but more I dug at it, looks like we should probably cleanup.

(everything):
https://gist.github.com/nmenon/5f5f689333c66697969f5d80ad94cfca
(am62p alone):
https://gist.github.com/nmenon/9aaa2067a619b12af338647d19b4cf9b

$ git grep 'compatible = "simple-mfd";' arch/arm64/boot/dts/ti/
arch/arm64/boot/dts/ti/k3-am62-main.dtsi:               compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi:              compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-am64-main.dtsi:               compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-am65-main.dtsi:               compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi:                compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j7200-main.dtsi:              compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi:                compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi:              compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi:                compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi:             compatible = "simple-mfd";
arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi:               compatible = "simple-mfd";

It is all over our k3 dts folder for dma. Digging further, it looks to have been explicitly permitted by the bindings:

$ git grep 'compatible = "simple-mfd";'  Documentation/devicetree/bindings/
Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml:            compatible = "simple-mfd";
Documentation/devicetree/bindings/dma/ti/k3-pktdma.yaml:            compatible = "simple-mfd";
Documentation/devicetree/bindings/dma/ti/k3-udma.yaml:            compatible = "simple-mfd";

Looks like we will have to cleanup the yaml bindings and the dts nodes in a manner that doesn't break the platforms.

I am not saying that simple-mfd usage is correct, but it was explicitly permitted by schema in these instances, are you OK that we clean that in the upcoming merge window as the very first thing we do and let this series through?

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw
In reply to Krzysztof Kozlowski
Quoted 31 lines · Krzysztof Kozlowski
Quoted 22 lines · Nishanth Menon

Hi Vignesh Raghavendra,

Quoted 10 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

Quoted 7 lines

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs

       commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273
[2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
       commit: 29075cc09f43a024d962da66d2e4f9eb577713d0
[3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
       commit: 935c4047d42e53a06ec768ddc495a44f6869209c
Quoted 2 lines

A bit too fast. simple-mfd *is not allowed* on its own.

We have the rule against ['syscon', 'simple-mfd'], which requires a 3rd specific compatible, but it seems 'simple-mfd' is allowed in the same way as "simple-bus" (not sure how or why, I would expect a failed to match any schema with compatible, but I'm not getting that either?).

We can add something like simple-mfd.yaml for this to explicitly check that the compatible has minItems: 2.

But in this case these seem to be just a typo and we meant "simple-bus" here, then it got copy/pasted over our k3 tree.

So as Nishanth suggested, we can clean this up first thing next cycle, then add a rule to prevent it from happening for anyone else again while we are at it.

Andrew

Quoted 3 lines

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#10 lore raw
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Krzysztof Kozlowski
Quoted 30 lines · Nishanth Menon

Hi Vignesh Raghavendra,

Quoted 11 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically
AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs
       commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273 [2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
       commit: 29075cc09f43a024d962da66d2e4f9eb577713d0 [3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
       commit: 935c4047d42e53a06ec768ddc495a44f6869209c

Quoted 7 lines
Quoted 2 lines

A bit too fast. simple-mfd *is not allowed* on its own.

We have the rule against ['syscon', 'simple-mfd'], which requires a 3rd specific compatible, but it seems 'simple-mfd' is allowed in the same way as "simple-bus" (not sure how or why, I would expect a failed to match any schema with compatible, but I'm not getting that either?).

Indeed, I didn't see any warnings from dtbs_check so far

Quoted 7 lines

We can add something like simple-mfd.yaml for this to explicitly check that the compatible has minItems: 2.

But in this case these seem to be just a typo and we meant "simple-bus" here,
then it got copy/pasted over our k3 tree.

I dont think "simple-bus" is enough due to presence to TI specific property (ti,sci-dev-id). So this will warrant a separate yaml bindings.
I will work towards adding such a file.

Quoted 9 lines

So as Nishanth suggested, we can clean this up first thing next cycle, then add a rule to prevent it from happening for anyone else again while we are at it.

Andrew

Quoted 3 lines

Best regards,
Krzysztof

Signature · 7 lines
Regards
Vignesh

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#11 lore raw
Quoted 49 lines · Vignesh Raghavendra
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Krzysztof Kozlowski
Quoted 30 lines · Nishanth Menon

Hi Vignesh Raghavendra,

Quoted 11 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically
AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs
       commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273
[2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
       commit: 29075cc09f43a024d962da66d2e4f9eb577713d0
[3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
       commit: 935c4047d42e53a06ec768ddc495a44f6869209c

Quoted 7 lines
Quoted 2 lines

A bit too fast. simple-mfd *is not allowed* on its own.

We have the rule against ['syscon', 'simple-mfd'], which requires a 3rd specific compatible, but it seems 'simple-mfd' is allowed in the same way as "simple-bus" (not sure how or why, I would expect a failed to match any schema with compatible, but I'm not getting that either?).

Indeed, I didn't see any warnings from dtbs_check so far

Quoted 3 lines

We can add something like simple-mfd.yaml for this to explicitly check that the compatible has minItems: 2.

Quoted 7 lines
Quoted 4 lines

But in this case these seem to be just a typo and we meant "simple-bus" here,
then it got copy/pasted over our k3 tree.

I dont think "simple-bus" is enough due to presence to TI specific property (ti,sci-dev-id). So this will warrant a separate yaml bindings.

What does that property actually do for us? I know the DMASS has a device ID, but many of the child devices have their own. Do we need the top level ID and would it be easier to just drop that property here instead?

Andrew

Quoted 12 lines

I will work towards adding such a file.

Quoted 9 lines

So as Nishanth suggested, we can clean this up first thing next cycle, then add a rule to prevent it from happening for anyone else again while we are at it.

Andrew

Quoted 3 lines

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#12 lore raw
In reply to Vignesh Raghavendra
Quoted 49 lines · Vignesh Raghavendra
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Krzysztof Kozlowski
Quoted 30 lines · Nishanth Menon

Hi Vignesh Raghavendra,

Quoted 11 lines · Vignesh Raghavendra

This series adds basic support for AM62P family of SoCs and specifically
AM62P5 variant. Also adds AM62P5-SK support with basic peripheral like UART.

TRM at [0] and Schematics is at [1]

[0]: https://www.ti.com/lit/pdf/spruj83
[1]: https://www.ti.com/lit/zip/sprr487

[...]

Note: since the changes were trivial, I incorporated the cosmetic fixup suggested by Andrew locally when I applied. I have also dropped bootph property from board's reserved nodes inline with what we did for j721s2[2]. Thanks for the bootlog.

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

[1/3] dt-bindings: arm: ti: Add bindings for AM62P5 SoCs
       commit: b57fc5cbdbdfd04d44697800a9d59aeb3be2f273 [2/3] arm64: dts: ti: Introduce AM62P5 family of SoCs
       commit: 29075cc09f43a024d962da66d2e4f9eb577713d0 [3/3] arm64: dts: ti: Add support for the AM62P5 Starter Kit
       commit: 935c4047d42e53a06ec768ddc495a44f6869209c

Quoted 7 lines
Quoted 2 lines

A bit too fast. simple-mfd *is not allowed* on its own.

We have the rule against ['syscon', 'simple-mfd'], which requires a 3rd specific compatible, but it seems 'simple-mfd' is allowed in the same way as "simple-bus" (not sure how or why, I would expect a failed to match any schema with compatible, but I'm not getting that either?).

Indeed, I didn't see any warnings from dtbs_check so far

Quoted 3 lines

We can add something like simple-mfd.yaml for this to explicitly check that the compatible has minItems: 2.

Quoted 8 lines
Quoted 4 lines

But in this case these seem to be just a typo and we meant "simple-bus" here,
then it got copy/pasted over our k3 tree.

I dont think "simple-bus" is enough due to presence to TI specific property (ti,sci-dev-id). So this will warrant a separate yaml bindings.
I will work towards adding such a file.

Unfortunately that cannot be dropped, it indicates the navss instance to be used during PSIL pairing [0] (PSIL proxy to use).

Looking again at simple-bus.yaml in dt-schema repo, I do see arbitrary properties are accepted [1]. But I am not sure if its means device specific properties are acceptable?

[0] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/rm/rm_psil.html
[1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/simple-bus.yaml#L60

Quoted 1 line
Signature · 7 lines
Regards
Vignesh

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel