ARM: dts: stm32: Add TIMERS inverted PWM channel 3 on STM32MP135F-DK
authorCheick Traore <cheick.traore@foss.st.com>
Tue, 11 Mar 2025 14:30:37 +0000 (15:30 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 12 Mar 2025 15:40:02 +0000 (16:40 +0100)
The pwm source TIM1_CH3N channel (on PE12) in inverted polarity mode
will be used to manage the brightness of the panel backlight on
STM32MP135F-DK.

Signed-off-by: Cheick Traore <cheick.traore@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/dts/stm32mp13-pinctrl.dtsi
arch/arm/dts/stm32mp135f-dk.dts

index c01d39f..52c2a9f 100644 (file)
                };
        };
 
+       pwm1_ch3n_pins_a: pwm1-ch3n-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('E', 12, AF1)>; /* TIM1_CH3N */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm1_ch3n_sleep_pins_a: pwm1-ch3n-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('E', 12, ANALOG)>; /* TIM1_CH3N */
+               };
+       };
+
        pwm3_pins_a: pwm3-0 {
                pins {
                        pinmux = <STM32_PINMUX('B', 1, AF2)>; /* TIM3_CH4 */
index eea740d..275823d 100644 (file)
@@ -9,6 +9,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pwm/pwm.h>
 #include <dt-bindings/regulator/st,stm32mp13-regulator.h>
 #include "stm32mp135.dtsi"
 #include "stm32mp13xf.dtsi"
        status = "disabled";
 };
 
+&timers1 {
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "okay";
+       pwm1: pwm {
+               pinctrl-0 = <&pwm1_ch3n_pins_a>;
+               pinctrl-1 = <&pwm1_ch3n_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+};
+
 &timers3 {
        /delete-property/dmas;
        /delete-property/dma-names;