Hello
I have a devicetree overlay containing this to configure pwm-backlight:It seems to initialize properly. I get a node `/sys/class/backlight/rpi_backlight`. But the output of GPIO12 keeps low. Also checking the pwm debug shows a duty cycle of 0ns. Any idea what could cause this?
I have oriented myself on this overlay on how to use pwm-backlight:
https://github.com/raspberrypi/linux/bl ... verlay.dts
I have a devicetree overlay containing this to configure pwm-backlight:
Code:
+ fragment@1 {+ target = <&gpio>;+ __overlay__ {+ pwm_pins: pwm_pins {+ brcm,pins = <12>;+ brcm,function = <4>; // ALT0+ };+ };+ };++ fragment@2 {+ target = <&pwm>;+ frag1: __overlay__ {+ pinctrl-names = "default";+ pinctrl-0 = <&pwm_pins>;+ assigned-clock-rates = <1000000>;+ status = "okay";+ };+ };++ fragment@3 {+ target-path = "/";+ __overlay__ {+ rpi_backlight: rpi_backlight {+ compatible = "pwm-backlight";+ brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;+ default-brightness-level = <6>;+ pwms = <&pwm 0 200000 0>;+ power-supply = <&vdd_3v3_reg>;+ status = "okay";+ };+ };+ };
Code:
root@CM4:/sys/class/backlight/rpi_backlight# echo 6 > /sys/class/backlight/rpi_backlight/brightness root@CM4:/sys/class/backlight/rpi_backlight# cat /sys/class/backlight/rpi_backlight/actual_brightness 6root@CM4:/sys/class/backlight/rpi_backlight# cat /sys/kernel/debug/pwmplatform/fe20c000.pwm, 2 PWM devices pwm-0 (rpi_backlight ): requested period: 200000 ns duty: 0 ns polarity: normal pwm-1 ((null) ): period: 0 ns duty: 0 ns polarity: normal
https://github.com/raspberrypi/linux/bl ... verlay.dts
Statistics: Posted by batwing — Tue Dec 03, 2024 10:37 am