devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms
@ 2025-10-31 10:00 Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 1/4] ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi Gatien Chevallier
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gatien Chevallier @ 2025-10-31 10:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

The IWDG1 can be used to monitor the Cortex-A7's activity on stm32mp13x
SoCs. Add the IWDG1 node in the stm32mp131.dtsi SoC device tree file
in case this peripheral is configured as non-secure and managed by the
Linux kernel.

Add the arm_wdt node in the stm32mp131.dtsi SoC device tree file in
case the ARM SMC watchdog driver is necessary to interact with the
platform watchdog (e.g: the IWDG1 is configured as secure).

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Changes in v2:
- Moved the IWDG1 under the ETZPC as is it securable. It should be
  managed by the ETZPC bus.
- Link to v1: https://lore.kernel.org/r/20250918-iwdg1-v1-0-02c2543c01a5@foss.st.com

---
Gatien Chevallier (4):
      ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi
      ARM: dts: stm32: add the ARM SMC watchdog in stm32mp131.dtsi
      ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk
      ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi

 arch/arm/boot/dts/st/stm32mp131.dtsi    | 17 +++++++++++++++++
 arch/arm/boot/dts/st/stm32mp135f-dk.dts |  5 +++++
 2 files changed, 22 insertions(+)
---
base-commit: 53c18dc078bb6d9e9dfe2cc0671ab78588c44723
change-id: 20250918-iwdg1-0f7ea155135e

Best regards,
-- 
Gatien Chevallier <gatien.chevallier@foss.st.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/4] ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi
  2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
@ 2025-10-31 10:00 ` Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 2/4] ARM: dts: stm32: add the ARM SMC watchdog " Gatien Chevallier
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gatien Chevallier @ 2025-10-31 10:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

Add the IWDG1 node in the stm32mp131.dtsi SoC device tree file. It can
be used by Linux as the Cortex-A7 watchdog when it's configured as
non-secure.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp131.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi
index fd730aa37c22..a18da1a04fe3 100644
--- a/arch/arm/boot/dts/st/stm32mp131.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp131.dtsi
@@ -1657,6 +1657,16 @@ usbphyc_port1: usb-phy@1 {
 					reg = <1>;
 				};
 			};
+
+			iwdg1: watchdog@5c003000 {
+				compatible = "st,stm32mp1-iwdg";
+				reg = <0x5c003000 0x400>;
+				interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&rcc IWDG1>, <&scmi_clk CK_SCMI_LSI>;
+				clock-names = "pclk", "lsi";
+				access-controllers = <&etzpc 12>;
+				status = "disabled";
+			};
 		};
 
 		/*

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/4] ARM: dts: stm32: add the ARM SMC watchdog in stm32mp131.dtsi
  2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 1/4] ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi Gatien Chevallier
@ 2025-10-31 10:00 ` Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 3/4] ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk Gatien Chevallier
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gatien Chevallier @ 2025-10-31 10:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

Add the arm_wdt node in the stm32mp131.dtsi SoC device tree file. When
the platform watchdog is managed by the secure world, SMC calls are used
to interact with it.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp131.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi
index a18da1a04fe3..6506b9109b90 100644
--- a/arch/arm/boot/dts/st/stm32mp131.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp131.dtsi
@@ -29,6 +29,12 @@ arm-pmu {
 		interrupt-parent = <&intc>;
 	};
 
+	arm_wdt: watchdog {
+		compatible = "arm,smc-wdt";
+		arm,smc-id = <0xbc000000>;
+		status = "disabled";
+	};
+
 	firmware {
 		optee {
 			method = "smc";

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/4] ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk
  2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 1/4] ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 2/4] ARM: dts: stm32: add the ARM SMC watchdog " Gatien Chevallier
@ 2025-10-31 10:00 ` Gatien Chevallier
  2025-10-31 10:00 ` [PATCH v2 4/4] ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi Gatien Chevallier
  2025-11-14  8:43 ` [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Alexandre TORGUE
  4 siblings, 0 replies; 6+ messages in thread
From: Gatien Chevallier @ 2025-10-31 10:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

On the stm32mp135f-dk board, the IWDG1 is secured and used to monitor
the cortex-A7. Use the ARM SMC watchdog to communicate with it.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp135f-dk.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
index 9764a6bfa5b4..f894ee35b3db 100644
--- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
@@ -161,6 +161,11 @@ channel@12 {
 	};
 };
 
+&arm_wdt {
+	timeout-sec = <32>;
+	status = "okay";
+};
+
 &crc1 {
 	status = "okay";
 };

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi
  2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
                   ` (2 preceding siblings ...)
  2025-10-31 10:00 ` [PATCH v2 3/4] ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk Gatien Chevallier
@ 2025-10-31 10:00 ` Gatien Chevallier
  2025-11-14  8:43 ` [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Alexandre TORGUE
  4 siblings, 0 replies; 6+ messages in thread
From: Gatien Chevallier @ 2025-10-31 10:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

Add the interrupt line that can be used for the early interrupt of
the IWDG2 to the IWDG2 node

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp131.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi
index 6506b9109b90..b9657ff91c23 100644
--- a/arch/arm/boot/dts/st/stm32mp131.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp131.dtsi
@@ -1006,6 +1006,7 @@ usbh_ehci: usb@5800d000 {
 		iwdg2: watchdog@5a002000 {
 			compatible = "st,stm32mp1-iwdg";
 			reg = <0x5a002000 0x400>;
+			interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
 			clock-names = "pclk", "lsi";
 			status = "disabled";

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms
  2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
                   ` (3 preceding siblings ...)
  2025-10-31 10:00 ` [PATCH v2 4/4] ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi Gatien Chevallier
@ 2025-11-14  8:43 ` Alexandre TORGUE
  4 siblings, 0 replies; 6+ messages in thread
From: Alexandre TORGUE @ 2025-11-14  8:43 UTC (permalink / raw)
  To: Gatien Chevallier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel

Hi Gatien

On 10/31/25 11:00, Gatien Chevallier wrote:
> The IWDG1 can be used to monitor the Cortex-A7's activity on stm32mp13x
> SoCs. Add the IWDG1 node in the stm32mp131.dtsi SoC device tree file
> in case this peripheral is configured as non-secure and managed by the
> Linux kernel.
> 
> Add the arm_wdt node in the stm32mp131.dtsi SoC device tree file in
> case the ARM SMC watchdog driver is necessary to interact with the
> platform watchdog (e.g: the IWDG1 is configured as secure).
> 
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> ---
> Changes in v2:
> - Moved the IWDG1 under the ETZPC as is it securable. It should be
>    managed by the ETZPC bus.
> - Link to v1: https://lore.kernel.org/r/20250918-iwdg1-v1-0-02c2543c01a5@foss.st.com
> 
> ---
> Gatien Chevallier (4):
>        ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi
>        ARM: dts: stm32: add the ARM SMC watchdog in stm32mp131.dtsi
>        ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk
>        ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi
> 
>   arch/arm/boot/dts/st/stm32mp131.dtsi    | 17 +++++++++++++++++
>   arch/arm/boot/dts/st/stm32mp135f-dk.dts |  5 +++++
>   2 files changed, 22 insertions(+)
> ---
> base-commit: 53c18dc078bb6d9e9dfe2cc0671ab78588c44723
> change-id: 20250918-iwdg1-0f7ea155135e
> 
> Best regards,

Series applied on stm32-next.

Thanks
Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-14  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 10:00 [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Gatien Chevallier
2025-10-31 10:00 ` [PATCH v2 1/4] ARM: dts: stm32: add iwdg1 node in stm32mp131.dtsi Gatien Chevallier
2025-10-31 10:00 ` [PATCH v2 2/4] ARM: dts: stm32: add the ARM SMC watchdog " Gatien Chevallier
2025-10-31 10:00 ` [PATCH v2 3/4] ARM: dts: stm32: enable the ARM SMC watchdog node in stm32mp135f-dk Gatien Chevallier
2025-10-31 10:00 ` [PATCH v2 4/4] ARM: dts: stm32: add the IWDG2 interrupt line in stm32mp131.dtsi Gatien Chevallier
2025-11-14  8:43 ` [PATCH v2 0/4] ARM: dts: stm32: watchdog updates on stm32mp13x platforms Alexandre TORGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).