Skip to contentSkip to conversation

Add and fix ESM nodes

PATCH Applied Judith Mendez 3 participants 9 messages Aug 15, 2024 – Sep 1, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add and fix ESM nodes

The following patch adds ESM nodes and fixes ESM source interrupts for Sitara K3 platforms. Currently watchdog cannot reset the CPU because of misconfiguration or missing ESM node in DT.

ESM node was added for am62ax and am65x. For am62px ESM source interrupts are fixed. Comments were also added for clarity on what source interrupts are routed to ESM based on device TRM.

ESM nodes like MCU ESM for am65x are added for device completion, currently, some ESM0 events are not routed to MCU ESM, so watchdog cannot reset the CPU using the current implementation.

Changes since v2:
- Fix commit message for patch 6/6
- cc linux-arm-kernel

Judith Mendez (5):
arm64: dts: ti: k3-am62a: Add ESM nodes
arm64: dts: ti: k3-am62p: Fix ESM interrupt sources
arm64: dts: ti: k3-am62: Add comments to ESM nodes
arm64: dts: ti: k3-am64: Add more ESM interrupt sources
arm64: dts: ti: k3-am65: Add ESM nodes

Santhosh Kumar K (1):
arm64: dts: ti: k3-am62p: Remove 'reserved' status for ESM

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi               | 1 +
 arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi                | 1 +
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi              | 8 ++++++++
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi               | 8 ++++++++
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 3 ++-
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi  | 4 ++--
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi               | 3 ++-
 arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi                | 3 ++-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi               | 8 ++++++++
 arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi                | 8 ++++++++
 10 files changed, 42 insertions(+), 5 deletions(-)
Signature · 1 line
2.46.0
#1 lore raw

PATCH v3 1/6 arm64: dts: ti: k3-am62a: Add ESM nodes

Add Error Signaling Module (ESM) instances in MCU and MAIN domains, set ESM interrupt sources for rti as per TRM [0] 10.4 Interrupt Sources.

Add comments to describe what interrupt sources are routed to ESM modules.

[0] https://www.ti.com/lit/ug/spruj16b/spruj16b.pdf

---
Changes since v2:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 8 ++++++++
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi  | 8 ++++++++
 2 files changed, 16 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +8 -0
index 916fcf3cc57d1..8c35293c3d2b0 100644
@@ -265,6 +265,14 @@ main_pmx0: pinctrl@f4000 {
 		pinctrl-single,function-mask = <0xffffffff>;
 	};
 
+	main_esm: esm@420000 {
+		compatible = "ti,j721e-esm";
+		reg = <0x0 0x420000 0x0 0x1000>;
+		/* Interrupt sources: rti0, rti1, wrti0, rti4, rti2, rti3 */
+		ti,esm-pins = <192>, <193>, <195>, <204>, <209>, <210>;
+		bootph-pre-ram;
+	};
+
 	main_timer0: timer@2400000 {
 		compatible = "ti,am654-timer";
 		reg = <0x00 0x2400000 0x00 0x400>;
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +8 -0
index 8c36e56f41388..a5ca4ce523a46 100644
@@ -15,6 +15,14 @@ mcu_pmx0: pinctrl@4084000 {
 		status = "disabled";
 	};
 
+	mcu_esm: esm@4100000 {
+		compatible = "ti,j721e-esm";
+		reg = <0x0 0x4100000 0x0 0x1000>;
+		/* Interrupt sources: esm0_cfg, esm0_hi, esm0_low, mrti0 */
+		ti,esm-pins = <0>, <1>, <2>, <85>;
+		bootph-pre-ram;
+	};
+
 	/*
 	 * The MCU domain timer interrupts are routed only to the ESM module,
 	 * and not currently available for Linux. The MCU domain timers are
Signature · 1 line
2.46.0
#4 lore raw

PATCH v3 4/6 arm64: dts: ti: k3-am62: Add comments to ESM nodes

In reply to Judith Mendez

Add comments to describe what interrupt sources are routed to ESM modules.

There is no functional change.

---
Changes since v2:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 +
 arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +1 -0
index 328929c740dc0..5b92aef5b284b 100644
@@ -241,6 +241,7 @@ main_esm: esm@420000 {
 		bootph-pre-ram;
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x420000 0x00 0x1000>;
+		/* Interrupt sources: rti0, rti1, rti15, wrti0, rti2, rti3 */
 		ti,esm-pins = <160>, <161>, <162>, <163>, <177>, <178>;
 	};
 
arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi +1 -0
index e66d486ef1f21..bb43a411f59b2 100644
@@ -19,6 +19,7 @@ mcu_esm: esm@4100000 {
 		bootph-pre-ram;
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x4100000 0x00 0x1000>;
+		/* Interrupt sources: esm0_cfg, esm0_hi, esm0_low, mrti0 */
 		ti,esm-pins = <0>, <1>, <2>, <85>;
 	};
 
Signature · 1 line
2.46.0
#5 lore raw

PATCH v3 5/6 arm64: dts: ti: k3-am64: Add more ESM interrupt sources

In reply to Judith Mendez

Add ESM interrupt sources for rti as per TRM [0] in 9.4 Interrupt Sources.

[0] https://www.ti.com/lit/ug/spruim2h/spruim2h.pdf

---
Changes since v2:
- No change

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 3 ++-
 arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +2 -1
index f8370dd033502..652653bb24f26 100644
@@ -389,7 +389,8 @@ main_esm: esm@420000 {
 		bootph-pre-ram;
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x420000 0x00 0x1000>;
-		ti,esm-pins = <160>, <161>;
+		/* Interrupt sources: rti0, rti1, rti8, rti9, rti10, rti11 */
+		ti,esm-pins = <160>, <161>, <162>, <163>, <164>, <165>;
 	};
 
 	main_uart0: serial@2800000 {
arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi +2 -1
index ec17285869da6..ad4bed5d3f9eb 100644
@@ -158,6 +158,7 @@ mcu_esm: esm@4100000 {
 		bootph-pre-ram;
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x4100000 0x00 0x1000>;
-		ti,esm-pins = <0>, <1>;
+		/* Interrupt sources: esm0_cfg, esm0_hi, esm0_low, mrti0 */
+		ti,esm-pins = <0>, <1>, <2>, <85>;
 	};
 };
Signature · 1 line
2.46.0
#6 lore raw

PATCH v3 6/6 arm64: dts: ti: k3-am65: Add ESM nodes

In reply to Judith Mendez

Add Error Signaling Module (ESM) instances in MCU and MAIN domains, set ESM interrupt sources for rti as per TRM [0] 9.4 Interrupt Sources.

There are no ESM0_ESM_INT* events routed to MCU ESM, so it is not possible to reset the CPU using watchdog and ESM0 configuration. However add ESM instances for device completion.

Add comments to describe what interrupt sources are routed to ESM modules.

[0] https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf

---
Changes since v2:
- Fix commit message for patch 6/6

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 8 ++++++++
 arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi  | 8 ++++++++
 2 files changed, 16 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +8 -0
index 1af3dedde1f67..07c9f043dac0b 100644
@@ -54,6 +54,14 @@ gic_its: msi-controller@1820000 {
 		};
 	};
 
+	main_esm: esm@700000 {
+		compatible = "ti,j721e-esm";
+		reg = <0x00 0x700000 0x00 0x1000>;
+		/* Interrupt sources: rti0, rti1, rti2, rti3 */
+		ti,esm-pins = <224>, <225>, <226>, <227>;
+		bootph-pre-ram;
+	};
+
 	serdes0: serdes@900000 {
 		compatible = "ti,phy-am654-serdes";
 		reg = <0x0 0x900000 0x0 0x2000>;
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +8 -0
index 43c6118d2bf0f..e10cb9f483698 100644
@@ -440,6 +440,14 @@ mcu_r5fss0_core1: r5f@41400000 {
 		};
 	};
 
+	mcu_esm: esm@40800000 {
+		compatible = "ti,j721e-esm";
+		reg = <0x00 0x40800000 0x00 0x1000>;
+		/* Interrupt sources: mrti0, mrti1 */
+		ti,esm-pins = <104>, <105>;
+		bootph-pre-ram;
+	};
+
 	mcu_rti1: watchdog@40610000 {
 		compatible = "ti,j7-rti-wdt";
 		reg = <0x0 0x40610000 0x0 0x100>;
Signature · 1 line
2.46.0
#3 lore raw

PATCH v3 3/6 arm64: dts: ti: k3-am62p: Remove 'reserved' status for ESM

In reply to Judith Mendez

From: Santhosh Kumar K <[email protected]>

Remove 'reserved' status for MCU ESM node. Watchdog reset is propagated through ESM0 to MCU ESM to reset the CPU, so enable MCU ESM to reset the CPU with watchdog timeout.

[Judith: Fix commit message]

---
Changes since v2:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi +0 -1
index 49dda340752aa..625d353b97600 100644
@@ -29,7 +29,6 @@ mcu_esm: esm@4100000 {
 		/* Interrupt sources: esm0_cfg, esm0_hi, esm0_low, mrti0, wrti0 */
 		ti,esm-pins = <0>, <1>, <2>, <85>, <86>;
 		bootph-pre-ram;
-		status = "reserved";
 	};
 
 	/*
Signature · 1 line
2.46.0
#2 lore raw

PATCH v3 2/6 arm64: dts: ti: k3-am62p: Fix ESM interrupt sources

In reply to Judith Mendez

Fix interrupt sources for rti routed to the ESM0 as per [0], in 10.4 Interrupt Sources

Add comments to describe what interrupt sources are routed to ESM modules.

[0] https://www.ti.com/lit/ug/spruj83/spruj83.pdf

Fixes b5080c7c1f7e ("arm64: dts: ti: k3-am62p: Add nodes for more IPs")

---
Changes since v2:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 3 ++-
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi  | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +2 -1
index 9701fc69aed94..7941aab09cf72 100644
@@ -260,7 +260,8 @@ main_pmx0: pinctrl@f4000 {
 	main_esm: esm@420000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x420000 0x00 0x1000>;
-		ti,esm-pins = <160>, <161>, <162>, <163>, <177>, <178>;
+		/* Interrupt sources: rti0, rti1, wrti0 rti2, rti3, rti15 */
+		ti,esm-pins = <224>, <225>, <227>, <241>, <242>, <248>;
 		bootph-pre-ram;
 	};
 
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi +3 -2
index df7945156397b..49dda340752aa 100644
@@ -26,9 +26,10 @@ mcu_pmx_range: gpio-range {
 	mcu_esm: esm@4100000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x00 0x4100000 0x00 0x1000>;
-		ti,esm-pins = <0>, <1>, <2>, <85>;
-		status = "reserved";
+		/* Interrupt sources: esm0_cfg, esm0_hi, esm0_low, mrti0, wrti0 */
+		ti,esm-pins = <0>, <1>, <2>, <85>, <86>;
 		bootph-pre-ram;
+		status = "reserved";
 	};
 
 	/*
Signature · 1 line
2.46.0
Reviewed-by on the v3 series
#7 lore raw
In reply to Judith Mendez

On August 15, 2024 thus sayeth Judith Mendez:

Quoted 24 lines

The following patch adds ESM nodes and fixes ESM source interrupts for Sitara K3 platforms. Currently watchdog cannot reset the CPU because of misconfiguration or missing ESM node in DT.

ESM node was added for am62ax and am65x. For am62px ESM source interrupts are fixed. Comments were also added for clarity on what source interrupts are routed to ESM based on device TRM.

ESM nodes like MCU ESM for am65x are added for device completion, currently, some ESM0 events are not routed to MCU ESM, so watchdog cannot reset the CPU using the current implementation.

Changes since v2:
- Fix commit message for patch 6/6
- cc linux-arm-kernel

Judith Mendez (5):
arm64: dts: ti: k3-am62a: Add ESM nodes
arm64: dts: ti: k3-am62p: Fix ESM interrupt sources
arm64: dts: ti: k3-am62: Add comments to ESM nodes
arm64: dts: ti: k3-am64: Add more ESM interrupt sources
arm64: dts: ti: k3-am65: Add ESM nodes

Quoted 3 lines

Santhosh Kumar K (1):
arm64: dts: ti: k3-am62p: Remove 'reserved' status for ESM

Thanks for sending these out Judith!

For the series:

~Bryan

maintainer Applied
#8 lore raw
In reply to Judith Mendez

Hi Judith Mendez,

Quoted 10 lines · Judith Mendez

The following patch adds ESM nodes and fixes ESM source interrupts for Sitara K3 platforms. Currently watchdog cannot reset the CPU because of misconfiguration or missing ESM node in DT.

ESM node was added for am62ax and am65x. For am62px ESM source interrupts are fixed. Comments were also added for clarity on what source interrupts are routed to ESM based on device TRM.

[...]

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

[1/6] arm64: dts: ti: k3-am62a: Add ESM nodes

      commit: 54ed32742a2b722a9eeeca601b5d9b715423381b
[2/6] arm64: dts: ti: k3-am62p: Fix ESM interrupt sources
      commit: c94da2159dfdcc44b78a8b1f3ebe4909d4efc9ec
[3/6] arm64: dts: ti: k3-am62p: Remove 'reserved' status for ESM
      commit: d4847546b6209876bbbbc00f5b8583387e80b731
[4/6] arm64: dts: ti: k3-am62: Add comments to ESM nodes
      commit: cc3a295ebb659a56534a2baea9040dc0dec1980d
[5/6] arm64: dts: ti: k3-am64: Add more ESM interrupt sources
      commit: 633bcfa502591103b5d5c4429d90bf10ac9bfd52
[6/6] arm64: dts: ti: k3-am65: Add ESM nodes
      commit: 50f368a0c166ebac9301b834aed729b2bb901e6a

NOTE: There were minor reodering fixups I did (e.g.: removes should probably precede fixes which precede additions in a patch series unless there is a specific reason not to; trm urls should be the canonical urls; Follow the dt coding style in ordering properties) - please cross check and let me know if you disagree and I can drop the series from my branch.

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