Question
PWM backlight not working.
Can you please check my device tree configuration?
Backlight as a GPIO is working correctly, but when i try to use it as pwm, the pin line is always fixed to low.
Inside my .dts:
This is my panel definition:
panel {
compatible = "newkoro,display","simple-panel";
//enable-gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
//reset-gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>;
backlight = <&backlight>;
power-supply = <&vdd>;
status = "okay";
port@0{
//reg = <0>;
panel_in: endpoint {
remote-endpoint = <<dc_ep0_out>;
};
};
};
This is backlight as simple gpio (working)
//backlight: panel-backlight {
// compatible = "gpio-backlight";
// gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
//default-off;
//};
This is backlight as pwm (not working)
backlight: panel-backlight {
compatible = "pwm-backlight";
pwms = <&backlight_pwm 0 100000 0>;
brightness-levels = <0 31 63 95 127 159 191 223 255>;
default-brightness-level = <8>;
status = "okay";
//power-supply = <®_5v2>; /* 3V3_BACKLIGHT */
};
and this is timer defs:
&timers15 {
status = "okay";
backlight_pwm: pwm {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pwm15_pins_a>;
pinctrl-1 = <&pwm15_sleep_pins_a>;
status = "okay";
//#pwm-cells = <2>;
};
};
inside pinctrl i have:
pwm15_pins_a: pwm15-0 {
pins {
pinmux = <STM32_PINMUX('E', 4, AF4)>; /* TIM15_CH1N */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
};
pwm15_sleep_pins_a: pwm15-sleep-0 {
pins {
pinmux = <STM32_PINMUX('E', 4, ANALOG)>; /* TIM15_CH1N */
};
};thank you
