Skip to contentSkip to conversation

Add the STM and the SWT descriptions for the s32g2 and s32g3

PATCH Superseded Daniel Lezcano 2 participants 18 messages Jul 30, 2025 – Aug 1, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add the STM and the SWT descriptions for the s32g2 and s32g3

The NXP S32 SoC family includes timers and watchdogs that can be dedicated to the CPUs present in the system. The documentation refers to them as the System Timer Module (STM) and the Software Watchdog Timer (SWT). This design originates from the automotive domain, where the SoC can be partitioned, and a group of CPUs may run different operating systems or firmware.

On the S32G2, we found 8 timers and 7 watchdogs. On the S32G3, there are 12 timers and 12 watchdogs. Please note that the 8th timer (STM_07) is not described here, as it is coupled with a specific STM instance used for timestamping. This makes it somewhat special and requires custom handling in the driver. It will be added later.

All timers and watchdogs are disabled by default, and are selectively enabled depending on the platform configuration, which may include different combinations of Cortex-M7 and Cortex-A53 cores.

This patch series introduces support for the SoC and enables both the s32g274a-rdb2 and s32g399a-rdb3 platforms.

Testing was done only on the s32g274a-rdb2, as I do not have access to a s32g399a-rdb3 board.

Daniel Lezcano (8):
arm64: dts: s32g2: Add the STM description
arm64: dts: s32g274-rd2: Enable the STM timers
arm64: dts: s32g3: Add the STM descriptions
arm64: dts: s32g399a-rdb3: Enable the STM timers
arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) description
arm64: dts: s32g274-rd2: Enable the SWT watchdog
arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) description
arm64: dts: s32g399a-rdb3: Enable the SWT watchdog

 arch/arm64/boot/dts/freescale/s32g2.dtsi      | 119 +++++++++++
 .../boot/dts/freescale/s32g274a-rdb2.dts      |  20 ++
 arch/arm64/boot/dts/freescale/s32g3.dtsi      | 195 ++++++++++++++++++
 .../boot/dts/freescale/s32g399a-rdb3.dts      |  36 ++++
 4 files changed, 370 insertions(+)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/8 arm64: dts: s32g2: Add the STM description

The s32g2 has a STM module containing 8 timers. Each timer has a dedicated interrupt and share the same clock.

Add the timers STM0->STM6 description for the s32g2 SoC. The STM7 is not added because it is slightly different and needs an extra property which will be added later when supported by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g2.dtsi | 63 ++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +63 -0
index ea1456d361a3..3e775d030e37 100644
@@ -503,5 +503,68 @@ gic: interrupt-controller@50800000 {
 			interrupt-controller;
 			#interrupt-cells = <3>;
 		};
+
+		stm0: timer@4011c000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm1: timer@40120000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40120000 0x3000>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm2: timer@40124000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40124000 0x3000>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm3: timer@40128000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40128000 0x3000>;
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm4: timer@4021c000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4021c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm5: timer@40220000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40220000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm6: timer@40224000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40224000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [PATCH 1/8] arm64: dts: s32g2: Add the STM description

On Wed, Jul 30, 2025 at 09:50:14PM +0200, Daniel Lezcano wrote:

I think replace all 'description' with 'node' is easy to read.

Quoted 19 lines

The s32g2 has a STM module containing 8 timers. Each timer has a dedicated interrupt and share the same clock.

Add the timers STM0->STM6 description for the s32g2 SoC. The STM7 is not added because it is slightly different and needs an extra property which will be added later when supported by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g2.dtsi | 63 ++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +0 -0
index ea1456d361a3..3e775d030e37 100644

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 507

Quoted 5 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +2 -0
@@ -503,5 +503,68 @@ gic: interrupt-controller@50800000 {
 			interrupt-controller;
 			#interrupt-cells = <3>;
 		};
+
+		stm0: timer@4011c000 {

keep order according to address.

4011c000 should less than 50800000.

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 513

Quoted 6 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +6 -0
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";

why not default enable.

Frank

Quoted 60 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +55 -1
+		};
+
+		stm1: timer@40120000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40120000 0x3000>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm2: timer@40124000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40124000 0x3000>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm3: timer@40128000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40128000 0x3000>;
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm4: timer@4021c000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4021c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm5: timer@40220000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40220000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm6: timer@40224000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40224000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
 	};
 };
--

2.43.0

#3 lore raw

Re: [PATCH 1/8] arm64: dts: s32g2: Add the STM description

Hi Frank,

thanks for the reviews,

Quoted 3 lines · Frank Li

On Wed, Jul 30, 2025 at 09:50:14PM +0200, Daniel Lezcano wrote:

I think replace all 'description' with 'node' is easy to read.

Sure

Quoted 27 lines
Quoted 19 lines

The s32g2 has a STM module containing 8 timers. Each timer has a dedicated interrupt and share the same clock.

Add the timers STM0->STM6 description for the s32g2 SoC. The STM7 is not added because it is slightly different and needs an extra property which will be added later when supported by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
  arch/arm64/boot/dts/freescale/s32g2.dtsi | 63 ++++++++++++++++++++++++
  1 file changed, 63 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +0 -0
index ea1456d361a3..3e775d030e37 100644

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 507

Quoted 5 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +2 -0
@@ -503,5 +503,68 @@ gic: interrupt-controller@50800000 {
  			interrupt-controller;
  			#interrupt-cells = <3>;
  		};
+
+		stm0: timer@4011c000 {

keep order according to address.

Quoted 1 line

4011c000 should less than 50800000.

Ah, sure. I'll fix that.

Quoted 8 lines

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 513

Quoted 6 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +6 -0
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";

why not default enable.

The S32G2 and S32G3 can have different variants with 2, 4, 8 Cortex-A53 and 3 or 4 Cortex-M7. We enable the same number of CPUs present on the system.

AFAIU:

	S32G233A : 2 x Cortex-A53
	S32G274A : 4 x Cortex-A53

	S32G399A : 8 x Cortex-A53
	S32G379A : 4 x Cortex-A53

Otherwise we would have to do the opposite, that is disable the unused ones in the s32g274a-rdb2.dts, s32g399a-rdb3.dts and other dts which include the s32g2.dtsi and s32g3.dtsi.

Quoted 60 lines
Quoted 60 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +55 -1
+		};
+
+		stm1: timer@40120000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40120000 0x3000>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm2: timer@40124000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40124000 0x3000>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm3: timer@40128000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40128000 0x3000>;
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm4: timer@4021c000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4021c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm5: timer@40220000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40220000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm6: timer@40224000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40224000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
  	};
  };
--

2.43.0

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
maintainer
#4 lore raw

Re: [PATCH 1/8] arm64: dts: s32g2: Add the STM description

Quoted 62 lines · Daniel Lezcano

Hi Frank,

thanks for the reviews,

Quoted 3 lines · Frank Li

On Wed, Jul 30, 2025 at 09:50:14PM +0200, Daniel Lezcano wrote:

I think replace all 'description' with 'node' is easy to read.

Sure

Quoted 27 lines
Quoted 19 lines

The s32g2 has a STM module containing 8 timers. Each timer has a dedicated interrupt and share the same clock.

Add the timers STM0->STM6 description for the s32g2 SoC. The STM7 is not added because it is slightly different and needs an extra property which will be added later when supported by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
  arch/arm64/boot/dts/freescale/s32g2.dtsi | 63 ++++++++++++++++++++++++
  1 file changed, 63 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +0 -0
index ea1456d361a3..3e775d030e37 100644

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 507

Quoted 5 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +2 -0
@@ -503,5 +503,68 @@ gic: interrupt-controller@50800000 {
  			interrupt-controller;
  			#interrupt-cells = <3>;
  		};
+
+		stm0: timer@4011c000 {

keep order according to address.

Quoted 1 line

4011c000 should less than 50800000.

Ah, sure. I'll fix that.

Quoted 8 lines

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 513

Quoted 6 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +6 -0
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";

why not default enable.

The S32G2 and S32G3 can have different variants with 2, 4, 8 Cortex-A53 and 3 or 4 Cortex-M7. We enable the same number of CPUs present on the system.

AFAIU:

	S32G233A : 2 x Cortex-A53
	S32G274A : 4 x Cortex-A53

	S32G399A : 8 x Cortex-A53
	S32G379A : 4 x Cortex-A53
Quoted 4 lines

Otherwise we would have to do the opposite, that is disable the unused ones in the s32g274a-rdb2.dts, s32g399a-rdb3.dts and other dts which include the s32g2.dtsi and s32g3.dtsi.

That's fine by default disabled. but what's impact if it is enable but no one use it?

Frank

Quoted 69 lines
Quoted 53 lines
Quoted 53 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +52 -0
+		};
+
+		stm1: timer@40120000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40120000 0x3000>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm2: timer@40124000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40124000 0x3000>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm3: timer@40128000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40128000 0x3000>;
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		stm4: timer@4021c000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4021c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm5: timer@40220000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40220000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm6: timer@40224000 {
+			compatible = "nxp,s32g2-stm";
+			reg = <0x40224000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +3 -1
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
  	};
  };
--

2.43.0

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

#5 lore raw

Re: [PATCH 1/8] arm64: dts: s32g2: Add the STM description

Quoted 1 line · Frank Li

On Wed, Jul 30, 2025 at 11:15:40PM +0200, Daniel Lezcano wrote:

[ ... ]

Quoted 19 lines
Quoted 19 lines
Quoted 8 lines

arch/arm64/boot/dts/freescale/s32g2.dtsi gic: interrupt-controller@50800000 { · line 513

Quoted 6 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +6 -0
+			compatible = "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";

why not default enable.

The S32G2 and S32G3 can have different variants with 2, 4, 8 Cortex-A53 and 3 or 4 Cortex-M7. We enable the same number of CPUs present on the system.

AFAIU:

	S32G233A : 2 x Cortex-A53
	S32G274A : 4 x Cortex-A53

	S32G399A : 8 x Cortex-A53
	S32G379A : 4 x Cortex-A53
Quoted 7 lines
Quoted 4 lines

Otherwise we would have to do the opposite, that is disable the unused ones in the s32g274a-rdb2.dts, s32g399a-rdb3.dts and other dts which include the s32g2.dtsi and s32g3.dtsi.

That's fine by default disabled. but what's impact if it is enable but no one use it?

At the first glance I would say we call the probe function for nothing, so adding an extra overhead. When repeated into multiple drivers that increases the boot time significantly. It is certainly a good practice as a rule of thumb to enable only the ones we really need.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#6 lore raw

PATCH 2/8 arm64: dts: s32g274-rd2: Enable the STM timers

In reply to Daniel Lezcano

Enable the timers STM0 -> STM3 on the s32g274-rd2

The platform has 4 CPUs and the Linux STM timer driver is per CPU. Enable 4 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +16 -0
index b5ba51696f43..505776d19151 100644
@@ -40,6 +40,22 @@ &uart1 {
 	status = "okay";
 };
 
+&stm0 {
+	status = "okay";
+};
+
+&stm1 {
+	status = "okay";
+};
+
+&stm2 {
+	status = "okay";
+};
+
+&stm3 {
+	status = "okay";
+};
+
 &usdhc0 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc0>;
Signature · 1 line
2.43.0
maintainer
#7 lore raw

Re: [PATCH 2/8] arm64: dts: s32g274-rd2: Enable the STM timers

Quoted 5 lines · Daniel Lezcano

Enable the timers STM0 -> STM3 on the s32g274-rd2

The platform has 4 CPUs and the Linux STM timer driver is per CPU. Enable 4 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

S32 have not ARM local timer? It is quite strange!

Frank

Quoted 38 lines
Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +16 -1
index b5ba51696f43..505776d19151 100644
@@ -40,6 +40,22 @@ &uart1 {
 	status = "okay";
 };
 
+&stm0 {
+	status = "okay";
+};
+
+&stm1 {
+	status = "okay";
+};
+
+&stm2 {
+	status = "okay";
+};
+
+&stm3 {
+	status = "okay";
+};
+
 &usdhc0 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc0>;
--

2.43.0

#8 lore raw

Re: [PATCH 2/8] arm64: dts: s32g274-rd2: Enable the STM timers

Quoted 8 lines · Frank Li
Quoted 5 lines · Daniel Lezcano

Enable the timers STM0 -> STM3 on the s32g274-rd2

The platform has 4 CPUs and the Linux STM timer driver is per CPU. Enable 4 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

S32 have not ARM local timer? It is quite strange!

I'm not saying there is no architected timers but there are the STM. May be I can reword the sentence to prevent this ambiguity.

Quoted 37 lines
Quoted 37 lines
Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
  arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +16 -1
index b5ba51696f43..505776d19151 100644
@@ -40,6 +40,22 @@ &uart1 {
  	status = "okay";
  };
 
+&stm0 {
+	status = "okay";
+};
+
+&stm1 {
+	status = "okay";
+};
+
+&stm2 {
+	status = "okay";
+};
+
+&stm3 {
+	status = "okay";
+};
+
  &usdhc0 {
  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
  	pinctrl-0 = <&pinctrl_usdhc0>;
--

2.43.0

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
maintainer
#9 lore raw

Re: [PATCH 2/8] arm64: dts: s32g274-rd2: Enable the STM timers

Quoted 4 lines · Daniel Lezcano
Quoted 3 lines · Frank Li
Quoted 2 lines · Daniel Lezcano

Enable the timers STM0 -> STM3 on the s32g274-rd2

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

The platform has 4 CPUs and the Linux STM timer driver is per CPU. Enable 4 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

S32 have not ARM local timer? It is quite strange!

I'm not saying there is no architected timers but there are the STM. May be I can reword the sentence to prevent this ambiguity.

if there are local timer, why need STM for each core here?

Frank

Quoted 46 lines
Quoted 30 lines
Quoted 30 lines
Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
  arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +14 -0
index b5ba51696f43..505776d19151 100644
@@ -40,6 +40,22 @@ &uart1 {
  	status = "okay";
  };
 
+&stm0 {
+	status = "okay";
+};
+
+&stm1 {
+	status = "okay";
+};
+
+&stm2 {
+	status = "okay";
+};
+
+&stm3 {
+	status = "okay";
Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +2 -1
+};
+
  &usdhc0 {
  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
  	pinctrl-0 = <&pinctrl_usdhc0>;
--

2.43.0

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

#10 lore raw

Re: [PATCH 2/8] arm64: dts: s32g274-rd2: Enable the STM timers

Quoted 9 lines · Frank Li
Quoted 8 lines · Daniel Lezcano
Quoted 7 lines · Frank Li
Quoted 5 lines · Daniel Lezcano

Enable the timers STM0 -> STM3 on the s32g274-rd2

The platform has 4 CPUs and the Linux STM timer driver is per CPU. Enable 4 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

S32 have not ARM local timer? It is quite strange!

I'm not saying there is no architected timers but there are the STM. May be I can reword the sentence to prevent this ambiguity.

if there are local timer, why need STM for each core here?

Yes, I had initially the same question when upstreaming the STM timer. Ghennadi explained the automotive designs can partition the system by running a firmware and several instances of Linux. By using the STM, it is then possible to have the firmware to read the STM counters or to stop the timers when the board switches to debug mode.

Ghennadi can elaborate more on this if you need more context.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#11 lore raw

PATCH 3/8 arm64: dts: s32g3: Add the STM descriptions

In reply to Daniel Lezcano

The s32g3 has a STM module containing 12 timers. Each timer has a dedicated interrupt and share the same clock.

Add the STM0->STM11 description for the s32g3 SoC. The STM7 is not added because it is slightly different and needs an extra property which will be added later when supported by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g3.dtsi | 99 ++++++++++++++++++++++++
 1 file changed, 99 insertions(+)
arch/arm64/boot/dts/freescale/s32g3.dtsi +99 -0
index 991dbfbfa203..77ef75bad4be 100644
@@ -571,6 +571,105 @@ gic: interrupt-controller@50800000 {
 			      <0x50420000 0x2000>;
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
+
+		stm0: timer@4011c000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x4011c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm1: timer@40120000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40120000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm2: timer@40124000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40124000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm3: timer@40128000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40128000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm4: timer@4021c000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x4021c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm5: timer@40220000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40220000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm6: timer@40224000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40224000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm8: timer@40520000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40520000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm9: timer@40524000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40524000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm10: timer@40528000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x40528000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		stm11: timer@4052c000 {
+			compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
+			reg = <0x4052c000 0x3000>;
+			clocks = <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>;
+			clock-names = "counter", "module", "register";
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
 	};
 
 	timer {
Signature · 1 line
2.43.0
#12 lore raw

PATCH 4/8 arm64: dts: s32g399a-rdb3: Enable the STM timers

In reply to Daniel Lezcano

Enable the timers STM0 -> STM6, STM8 on the s32g399a-rdb3.

The platform has 8 CPUs and the Linux STM timer driver is per CPU. Enable 8 timers which will be used, other timers are useless for the Linux kernel and there is no benefit to enable them.

The STM7 is skipped as it is slightly different and needs an extra property to be handled by the driver.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 .../boot/dts/freescale/s32g399a-rdb3.dts      | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts +32 -0
index 802f543cae4a..467e0c105c3f 100644
@@ -40,6 +40,38 @@ &uart1 {
 	status = "okay";
 };
 
+&stm0 {
+	status = "okay";
+};
+
+&stm1 {
+	status = "okay";
+};
+
+&stm2 {
+	status = "okay";
+};
+
+&stm3 {
+	status = "okay";
+};
+
+&stm4 {
+	status = "okay";
+};
+
+&stm5 {
+	status = "okay";
+};
+
+&stm6 {
+	status = "okay";
+};
+
+&stm8 {
+	status = "okay";
+};
+
 &i2c4 {
 	current-sensor@40 {
 		compatible = "ti,ina231";
Signature · 1 line
2.43.0
#13 lore raw

PATCH 5/8 arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) description

In reply to Daniel Lezcano

Referred in the documentation as the Software Timer Watchdog (SWT), the s32g2 has 7 watchdogs. The number of watchdogs is designed to allow dedicating one watchdog per Cortex-M7/A53 present on the SoC.

Describe them in the device tree.

---
 arch/arm64/boot/dts/freescale/s32g2.dtsi | 56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +56 -0
index 3e775d030e37..12ce02525ae1 100644
@@ -566,5 +566,61 @@ stm6: timer@40224000 {
 			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
 			status = "disabled";
 		};
+
+		swt0: watchdog@40100000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40100000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt1: watchdog@40104000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40104000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt2: watchdog@40108000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40108000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt3: watchdog@4010c000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x4010c000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt4: watchdog@40200000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40200000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt5: watchdog@40204000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40204000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt6: watchdog@40208000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40208000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.43.0
maintainer
#14 lore raw

Re: [PATCH 5/8] arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) description

Quoted 16 lines · Daniel Lezcano

Referred in the documentation as the Software Timer Watchdog (SWT), the s32g2 has 7 watchdogs. The number of watchdogs is designed to allow dedicating one watchdog per Cortex-M7/A53 present on the SoC.

Describe them in the device tree.

---
 arch/arm64/boot/dts/freescale/s32g2.dtsi | 56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/freescale/s32g2.dtsi +0 -0
index 3e775d030e37..12ce02525ae1 100644

arch/arm64/boot/dts/freescale/s32g2.dtsi stm6: timer@40224000 { · line 570

Quoted 5 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +2 -0
@@ -566,5 +566,61 @@ stm6: timer@40224000 {
 			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
 			status = "disabled";
 		};
+
+		swt0: watchdog@40100000 {

keep order according to hex address.

Frank

Quoted 59 lines
arch/arm64/boot/dts/freescale/s32g2.dtsi +54 -1
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40100000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt1: watchdog@40104000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40104000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt2: watchdog@40108000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40108000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt3: watchdog@4010c000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x4010c000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt4: watchdog@40200000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40200000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt5: watchdog@40204000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40204000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt6: watchdog@40208000 {
+			compatible = "nxp,s32g2-swt";
+			reg = <0x40208000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
 	};
 };
--

2.43.0

#15 lore raw

PATCH 6/8 arm64: dts: s32g274-rd2: Enable the SWT watchdog

In reply to Daniel Lezcano

The SWT0 is directly connected to the reset line and only one instance is useful for its purpose. Let's enable it for the s32g274-rd2.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +4 -0
index 505776d19151..4f58be68c818 100644
@@ -56,6 +56,10 @@ &stm3 {
 	status = "okay";
 };
 
+&swt0 {
+	status = "okay";
+};
+
 &usdhc0 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc0>;
Signature · 1 line
2.43.0
#16 lore raw

PATCH 7/8 arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) description

In reply to Daniel Lezcano

Referred in the documentation as the Software Timer Watchdog (SWT), the s32g3 has 12 watchdogs. The number of watchdogs is designed to allow dedicating one watchdog per Cortex-M7/A53 present on the SoC.

Describe them in the device tree.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g3.dtsi | 96 ++++++++++++++++++++++++
 1 file changed, 96 insertions(+)
arch/arm64/boot/dts/freescale/s32g3.dtsi +96 -0
index 77ef75bad4be..dabad071bf81 100644
@@ -670,6 +670,102 @@ stm11: timer@4052c000 {
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			status = "disabled";
 		};
+
+		swt0: watchdog@40100000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40100000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt1: watchdog@40104000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40104000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt2: watchdog@40108000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40108000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt3: watchdog@4010c000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x4010c000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt4: watchdog@40200000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40200000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt5: watchdog@40204000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40204000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt6: watchdog@40208000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40208000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt7: watchdog@4020C000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x4020C000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt8: watchdog@40500000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <40500000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt9: watchdog@40504000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40504000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt10: watchdog@40508000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x40508000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
+
+		swt11: watchdog@4050c000 {
+			compatible = "nxp,s32g3-swt", "nxp,s32g2-swt";
+			reg = <0x4050c000 0x1000>;
+			clocks = <&clks 0x3a>, <&clks 0x3b>, <&clks 0x3b>;
+			clock-names = "counter", "module", "register";
+			status = "disabled";
+		};
 	};
 
 	timer {
Signature · 1 line
2.43.0
#17 lore raw

PATCH 8/8 arm64: dts: s32g399a-rdb3: Enable the SWT watchdog

In reply to Daniel Lezcano

The SWT0 is directly connected to the reset line and only one instance is useful for its purpose. Let's enable it on the s32g399a-rdb3.

Cc Ghennadi Procopciuc <[email protected]>
Cc Thomas Fossati <[email protected]>
---
 arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts +4 -0
index 467e0c105c3f..e94f70ad82d9 100644
@@ -72,6 +72,10 @@ &stm8 {
 	status = "okay";
 };
 
+&swt0 {
+	status = "okay";
+};
+
 &i2c4 {
 	current-sensor@40 {
 		compatible = "ti,ina231";
Signature · 1 line
2.43.0