Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5114

Advanced users • Re: Can't get PWM backlight to work on P4

$
0
0
I was able to get something working by utilizing the pwm-leds driver instead:

Code:

/dts-v1/;/plugin/;/ {        compatible = "brcm,bcm2835";        fragment@0 {                target = <&gpio>;                __overlay__ {                        pwm_pins: pwm_pins {                                brcm,pins = <18 19>;                                brcm,function = <2>;                                brcm,pull = <0>;                        };                };        };        fragment@1 {                target = <&pwm>;                __overlay__ {                        pinctrl-names = "default";                        pinctrl-0 = <&pwm_pins>;                        status = "okay";                };        };        fragment@2 {                target-path = "/";                __overlay__  {                        backlight: backlight {                                compatible = "pwm-leds";                                status = "okay";                                backlight_led: backlight_led {                                        label = "backlight";                                        pwms = <&pwm 0 5000000>;                                        linux,default-trigger = "default-on";                                        brightness = <255>;                                };                        };                };        };};
Then I can control it via the /sys/class/leds/backlight interface. It doesn't integrate with DPMS, but at least I can control the brightness.

Statistics: Posted by JinShil — Thu Jan 18, 2024 3:04 am



Viewing all articles
Browse latest Browse all 5114

Trending Articles