Question
How to add pwm-backlight to timer block?
Similar question was asked here:
https://community.st.com/s/question/0D50X0000AvgWuG/how-to-use-timers2-as-pwmbacklight
But this does not work on v5.4 kernel anymore. So a working example would be nice as pwm-backlight device tree handling is not documented in the wiki. SoC is STM32MP157. Current code is:
panel_backlight: panel-backlight {
compatible = "pwm-backlight";
pwms = <&pwm12_pins_a 0 5000000>;
pwm-names = "backlight";
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
status = "okay";
};
&timers12 {
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
pwm12: pwm {
pinctrl-0 = <&pwm12_pins_a>;
pinctrl-1 = <&pwm12_sleep_pins_a>;
pinctrl-names = "default", "sleep";
#pwm-cells = <2>;
status = "okay";
};
timer@11 {
status = "okay";
};
};Which leads to these errors:
[ 0.303501] pwm-backlight panel-backlight: panel-backlight supply power not found, using dummy regulator
[ 0.303628] OF: /panel-backlight: could not get #pwm-cells for /soc/pin-controller@50002000/pwm12-0
[ 0.303640] of_pwm_get(): can't parse "pwms" property
[ 0.303655] pwm-backlight panel-backlight: unable to request PWM
[ 0.303781] pwm-backlight: probe of panel-backlight failed with error -22