* [PATCH v2 1/8] arm64: dts: s32g2: Add the System Timer Module nodes
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 2/8] arm64: dts: s32g274-rd2: Enable the STM timers Daniel Lezcano
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
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 nodes for the s32g2 SoC. The STM7 node is
not added because it is slightly different and needs an extra property
which will be added later when supported by the driver.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g2.dtsi | 63 ++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi
index ea1456d361a3..1783edb81350 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -317,6 +317,42 @@ usdhc0-200mhz-grp4 {
};
};
+ 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";
+ };
+
edma0: dma-controller@40144000 {
compatible = "nxp,s32g2-edma";
reg = <0x40144000 0x24000>,
@@ -409,6 +445,33 @@ i2c2: i2c@401ec000 {
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";
+ };
+
edma1: dma-controller@40244000 {
compatible = "nxp,s32g2-edma";
reg = <0x40244000 0x24000>,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/8] arm64: dts: s32g274-rd2: Enable the STM timers
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 1/8] arm64: dts: s32g2: Add the System Timer Module nodes Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 3/8] arm64: dts: s32g3: Add the System Timer Module nodes Daniel Lezcano
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
Enable the timers STM0 -> STM3 on the s32g274-rd2
The platform has 4 CPUs, and the Linux STM timer driver is
instantiated per CPU. Enable 4 STM timers that can be used as
replacements for the ARM architected timers. The remaining STM timers
are not useful to the Linux kernel and provide no benefit, so they are
left disabled.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
index b5ba51696f43..505776d19151 100644
--- a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
+++ b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
@@ -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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/8] arm64: dts: s32g3: Add the System Timer Module nodes
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 1/8] arm64: dts: s32g2: Add the System Timer Module nodes Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 2/8] arm64: dts: s32g274-rd2: Enable the STM timers Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 4/8] arm64: dts: s32g399a-rdb3: Enable the STM timers Daniel Lezcano
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
The s32g3 has a STM module containing 12 timers. Each timer has a
dedicated interrupt and share the same clock.
Add the STM0->STM11 nodes for the s32g3 SoC. The STM7 node is not
added because it is slightly different and needs an extra property
which will be added later when supported by the driver.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g3.dtsi | 99 ++++++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index 991dbfbfa203..c2c986f03986 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -374,6 +374,42 @@ usdhc0-200mhz-grp4 {
};
};
+ 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";
+ };
+
edma0: dma-controller@40144000 {
compatible = "nxp,s32g3-edma", "nxp,s32g2-edma";
reg = <0x40144000 0x24000>,
@@ -471,6 +507,33 @@ i2c2: i2c@401ec000 {
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";
+ };
+
edma1: dma-controller@40244000 {
compatible = "nxp,s32g3-edma", "nxp,s32g2-edma";
reg = <0x40244000 0x24000>,
@@ -560,6 +623,42 @@ usdhc0: mmc@402f0000 {
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";
+ };
+
gic: interrupt-controller@50800000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/8] arm64: dts: s32g399a-rdb3: Enable the STM timers
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (2 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 3/8] arm64: dts: s32g3: Add the System Timer Module nodes Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 5/8] arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) nodes Daniel Lezcano
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
The platform has 8 CPUs, and the Linux STM timer driver is
instantiated per CPU. Enable 8 STM timers that can be used as
replacements for the ARM architected timers. The remaining STM timers
are not useful to the Linux kernel and provide no benefit, so they are
left disabled.
Enable STM0 to STM6 and STM8 on the s32g399a-rdb3 platform.
STM7 is skipped, as it differs slightly from the others and requires
an additional property to be properly handled by the driver.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
.../boot/dts/freescale/s32g399a-rdb3.dts | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
index 802f543cae4a..467e0c105c3f 100644
--- a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
+++ b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
@@ -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";
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 5/8] arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) nodes
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (3 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 4/8] arm64: dts: s32g399a-rdb3: Enable the STM timers Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 6/8] arm64: dts: s32g274-rd2: Enable the SWT watchdog Daniel Lezcano
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel
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.
Add the SWT nodes in the device tree.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g2.dtsi | 56 ++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi
index 1783edb81350..478899d4dd06 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -317,6 +317,38 @@ usdhc0-200mhz-grp4 {
};
};
+ 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";
+ };
+
stm0: timer@4011c000 {
compatible = "nxp,s32g2-stm";
reg = <0x4011c000 0x3000>;
@@ -445,6 +477,30 @@ i2c2: i2c@401ec000 {
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";
+ };
+
stm4: timer@4021c000 {
compatible = "nxp,s32g2-stm";
reg = <0x4021c000 0x3000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 6/8] arm64: dts: s32g274-rd2: Enable the SWT watchdog
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (4 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 5/8] arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) nodes Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 7/8] arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) nodes Daniel Lezcano
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
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.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
index 505776d19151..4f58be68c818 100644
--- a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
+++ b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts
@@ -56,6 +56,10 @@ &stm3 {
status = "okay";
};
+&swt0 {
+ status = "okay";
+};
+
&usdhc0 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc0>;
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 7/8] arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) nodes
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (5 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 6/8] arm64: dts: s32g274-rd2: Enable the SWT watchdog Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-07-31 14:01 ` [PATCH v2 8/8] arm64: dts: s32g399a-rdb3: Enable the SWT watchdog Daniel Lezcano
2025-08-22 8:26 ` [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Shawn Guo
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
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.
Add the SWT nodes in the device tree.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g3.dtsi | 96 ++++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index c2c986f03986..0ceb0807537a 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -374,6 +374,38 @@ usdhc0-200mhz-grp4 {
};
};
+ 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";
+ };
+
stm0: timer@4011c000 {
compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
reg = <0x4011c000 0x3000>;
@@ -507,6 +539,38 @@ i2c2: i2c@401ec000 {
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";
+ };
+
stm4: timer@4021c000 {
compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
reg = <0x4021c000 0x3000>;
@@ -623,6 +687,38 @@ usdhc0: mmc@402f0000 {
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";
+ };
+
stm8: timer@40520000 {
compatible = "nxp,s32g3-stm", "nxp,s32g2-stm";
reg = <0x40520000 0x3000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 8/8] arm64: dts: s32g399a-rdb3: Enable the SWT watchdog
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (6 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 7/8] arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) nodes Daniel Lezcano
@ 2025-07-31 14:01 ` Daniel Lezcano
2025-08-22 8:26 ` [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Shawn Guo
8 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2025-07-31 14:01 UTC (permalink / raw)
To: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer
Cc: s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel, Ghennadi Procopciuc,
Thomas Fossati
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.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Cc: Thomas Fossati <thomas.fossati@linaro.org>
---
arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
index 467e0c105c3f..e94f70ad82d9 100644
--- a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
+++ b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts
@@ -72,6 +72,10 @@ &stm8 {
status = "okay";
};
+&swt0 {
+ status = "okay";
+};
+
&i2c4 {
current-sensor@40 {
compatible = "ti,ina231";
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3
2025-07-31 14:01 [PATCH v2 0/8] Add the STM and the SWT nodes for the s32g2 and s32g3 Daniel Lezcano
` (7 preceding siblings ...)
2025-07-31 14:01 ` [PATCH v2 8/8] arm64: dts: s32g399a-rdb3: Enable the SWT watchdog Daniel Lezcano
@ 2025-08-22 8:26 ` Shawn Guo
8 siblings, 0 replies; 10+ messages in thread
From: Shawn Guo @ 2025-08-22 8:26 UTC (permalink / raw)
To: Daniel Lezcano
Cc: mbrugger, chester62515, ghennadi.procopciuc, shawnguo, s.hauer,
s32, kernel, festevam, robh, krzk+dt, conor+dt, linux-arm-kernel,
imx, devicetree, linux-kernel
On Thu, Jul 31, 2025 at 04:01:33PM +0200, Daniel Lezcano wrote:
> Daniel Lezcano (8):
> arm64: dts: s32g2: Add the System Timer Module nodes
> arm64: dts: s32g274-rd2: Enable the STM timers
> arm64: dts: s32g3: Add the System Timer Module nodes
> arm64: dts: s32g399a-rdb3: Enable the STM timers
> arm64: dts: s32g2: Add the Software Timer Watchdog (SWT) nodes
> arm64: dts: s32g274-rd2: Enable the SWT watchdog
> arm64: dts: s32g3: Add the Software Timer Watchdog (SWT) nodes
> arm64: dts: s32g399a-rdb3: Enable the SWT watchdog
Applied all, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread