* [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15
@ 2024-12-16 15:39 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 1/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp13 Fabrice Gasnier
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Counter driver originally had support limited to quadrature interface
and simple counter. It has been improved[1], so populate and enable
stm32 timer counter nodes on stm32mp13 and stm32mp15.
[1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/
Fabrice Gasnier (5):
ARM: dts: stm32: populate all timer counter nodes on stm32mp13
ARM: dts: stm32: populate all timer counter nodes on stm32mp15
ARM: dts: stm32: add counter subnodes on stm32mp135f-dk
ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1
ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards
arch/arm/boot/dts/st/stm32mp131.dtsi | 40 ++++++++++++++++++++++
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 12 +++++++
arch/arm/boot/dts/st/stm32mp151.dtsi | 41 +++++++++++++++++++++++
arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 9 +++++
arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 18 ++++++++++
5 files changed, 120 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp13
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
@ 2024-12-16 15:39 ` Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 2/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp15 Fabrice Gasnier
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Counter driver originally had support limited to quadrature interface
and simple counter. It has been improved[1], so add the remaining
stm32 timer counter nodes.
[1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp131.dtsi | 40 ++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi
index e1a764d269d2..0019d12c3d3d 100644
--- a/arch/arm/boot/dts/st/stm32mp131.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp131.dtsi
@@ -261,6 +261,11 @@ timers6: timer@40004000 {
dma-names = "up";
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
timer@5 {
compatible = "st,stm32h7-timer-trigger";
reg = <5>;
@@ -281,6 +286,11 @@ timers7: timer@40005000 {
dma-names = "up";
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
timer@6 {
compatible = "st,stm32h7-timer-trigger";
reg = <6>;
@@ -1196,6 +1206,11 @@ timers12: timer@4c007000 {
access-controllers = <&etzpc 23>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1221,6 +1236,11 @@ timers13: timer@4c008000 {
access-controllers = <&etzpc 24>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1246,6 +1266,11 @@ timers14: timer@4c009000 {
access-controllers = <&etzpc 25>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1276,6 +1301,11 @@ timers15: timer@4c00a000 {
access-controllers = <&etzpc 26>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1304,6 +1334,11 @@ timers16: timer@4c00b000 {
access-controllers = <&etzpc 27>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1332,6 +1367,11 @@ timers17: timer@4c00c000 {
access-controllers = <&etzpc 28>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp15
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 1/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp13 Fabrice Gasnier
@ 2024-12-16 15:39 ` Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 3/5] ARM: dts: stm32: add counter subnodes on stm32mp135f-dk Fabrice Gasnier
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Counter driver originally had support limited to quadrature interface
and simple counter. It has been improved[1], so add the remaining
stm32 timer counter nodes.
[1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp151.dtsi | 41 ++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp151.dtsi b/arch/arm/boot/dts/st/stm32mp151.dtsi
index 4f878ec102c1..13e172371eac 100644
--- a/arch/arm/boot/dts/st/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp151.dtsi
@@ -576,6 +576,11 @@ timers6: timer@40004000 {
access-controllers = <&etzpc 20>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
timer@5 {
compatible = "st,stm32h7-timer-trigger";
reg = <5>;
@@ -597,6 +602,11 @@ timers7: timer@40005000 {
access-controllers = <&etzpc 21>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
timer@6 {
compatible = "st,stm32h7-timer-trigger";
reg = <6>;
@@ -616,6 +626,11 @@ timers12: timer@40006000 {
access-controllers = <&etzpc 22>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -641,6 +656,11 @@ timers13: timer@40007000 {
access-controllers = <&etzpc 23>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -666,6 +686,11 @@ timers14: timer@40008000 {
access-controllers = <&etzpc 24>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1114,6 +1139,11 @@ timers15: timer@44006000 {
access-controllers = <&etzpc 54>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
@@ -1142,11 +1172,17 @@ timers16: timer@44007000 {
access-controllers = <&etzpc 55>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
status = "disabled";
};
+
timer@15 {
compatible = "st,stm32h7-timer-trigger";
reg = <15>;
@@ -1169,6 +1205,11 @@ timers17: timer@44008000 {
access-controllers = <&etzpc 56>;
status = "disabled";
+ counter {
+ compatible = "st,stm32-timer-counter";
+ status = "disabled";
+ };
+
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] ARM: dts: stm32: add counter subnodes on stm32mp135f-dk
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 1/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp13 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 2/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp15 Fabrice Gasnier
@ 2024-12-16 15:39 ` Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 4/5] ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1 Fabrice Gasnier
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Enable the counter nodes without dedicated pins. With such configuration,
the counter interface can be used on internal clock to generate events.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
index 1af335a39993..c6a5bfe89a38 100644
--- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
@@ -396,6 +396,9 @@ &timers3 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
/* PWM output on pin 7 of the expansion connector (CN8.7) using TIM3_CH4 func */
pinctrl-0 = <&pwm3_pins_a>;
@@ -412,6 +415,9 @@ &timers4 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
/* PWM output on pin 31 of the expansion connector (CN8.31) using TIM4_CH2 func */
pinctrl-0 = <&pwm4_pins_a>;
@@ -428,6 +434,9 @@ &timers8 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
/* PWM output on pin 32 of the expansion connector (CN8.32) using TIM8_CH3 func */
pinctrl-0 = <&pwm8_pins_a>;
@@ -442,6 +451,9 @@ timer@7 {
&timers14 {
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
/* PWM output on pin 33 of the expansion connector (CN8.33) using TIM14_CH1 func */
pinctrl-0 = <&pwm14_pins_a>;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
` (2 preceding siblings ...)
2024-12-16 15:39 ` [PATCH 3/5] ARM: dts: stm32: add counter subnodes on stm32mp135f-dk Fabrice Gasnier
@ 2024-12-16 15:39 ` Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 5/5] ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards Fabrice Gasnier
2024-12-19 8:53 ` [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Alexandre TORGUE
5 siblings, 0 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Enable the counter nodes without dedicated pins. With such configuration,
the counter interface can be used on internal clock to generate events.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp157c-ev1.dts b/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
index 9eb9a1bf4f2c..8f99c30f1af1 100644
--- a/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
+++ b/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
@@ -306,6 +306,9 @@ &timers2 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm2_pins_a>;
pinctrl-1 = <&pwm2_sleep_pins_a>;
@@ -321,6 +324,9 @@ &timers8 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm8_pins_a>;
pinctrl-1 = <&pwm8_sleep_pins_a>;
@@ -336,6 +342,9 @@ &timers12 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm12_pins_a>;
pinctrl-1 = <&pwm12_sleep_pins_a>;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
` (3 preceding siblings ...)
2024-12-16 15:39 ` [PATCH 4/5] ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1 Fabrice Gasnier
@ 2024-12-16 15:39 ` Fabrice Gasnier
2024-12-19 8:53 ` [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Alexandre TORGUE
5 siblings, 0 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2024-12-16 15:39 UTC (permalink / raw)
To: alexandre.torgue
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, fabrice.gasnier,
olivier.moysan
Enable the counter nodes without dedicated pins. With such configuration,
the counter interface can be used on internal clock to generate events.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
index f7634c51efb2..a5511b1f0ce3 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
@@ -570,6 +570,9 @@ &timers1 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm1_pins_a>;
pinctrl-1 = <&pwm1_sleep_pins_a>;
@@ -585,6 +588,9 @@ &timers3 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm3_pins_a>;
pinctrl-1 = <&pwm3_sleep_pins_a>;
@@ -600,6 +606,9 @@ &timers4 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
@@ -615,6 +624,9 @@ &timers5 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm5_pins_a>;
pinctrl-1 = <&pwm5_sleep_pins_a>;
@@ -630,6 +642,9 @@ &timers6 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
timer@5 {
status = "okay";
};
@@ -639,6 +654,9 @@ &timers12 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
+ counter {
+ status = "okay";
+ };
pwm {
pinctrl-0 = <&pwm12_pins_a>;
pinctrl-1 = <&pwm12_sleep_pins_a>;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
` (4 preceding siblings ...)
2024-12-16 15:39 ` [PATCH 5/5] ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards Fabrice Gasnier
@ 2024-12-19 8:53 ` Alexandre TORGUE
5 siblings, 0 replies; 7+ messages in thread
From: Alexandre TORGUE @ 2024-12-19 8:53 UTC (permalink / raw)
To: Fabrice Gasnier
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
linux-arm-kernel, linux-kernel, linux-stm32, olivier.moysan
Hi Fabrice
On 12/16/24 16:39, Fabrice Gasnier wrote:
> Counter driver originally had support limited to quadrature interface
> and simple counter. It has been improved[1], so populate and enable
> stm32 timer counter nodes on stm32mp13 and stm32mp15.
>
> [1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/
>
> Fabrice Gasnier (5):
> ARM: dts: stm32: populate all timer counter nodes on stm32mp13
> ARM: dts: stm32: populate all timer counter nodes on stm32mp15
> ARM: dts: stm32: add counter subnodes on stm32mp135f-dk
> ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1
> ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards
>
> arch/arm/boot/dts/st/stm32mp131.dtsi | 40 ++++++++++++++++++++++
> arch/arm/boot/dts/st/stm32mp135f-dk.dts | 12 +++++++
> arch/arm/boot/dts/st/stm32mp151.dtsi | 41 +++++++++++++++++++++++
> arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 9 +++++
> arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 18 ++++++++++
> 5 files changed, 120 insertions(+)
>
Series applied on stm32-next.
Thanks!
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-19 8:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 15:39 [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 1/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp13 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 2/5] ARM: dts: stm32: populate all timer counter nodes on stm32mp15 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 3/5] ARM: dts: stm32: add counter subnodes on stm32mp135f-dk Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 4/5] ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1 Fabrice Gasnier
2024-12-16 15:39 ` [PATCH 5/5] ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards Fabrice Gasnier
2024-12-19 8:53 ` [PATCH 0/5] ARM: dts: stm32: add counter nodes on stm32mp13 and stm32mp15 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).