6.3.2.2.2.2.1. pwm-backlight
panel_rgb {
...
backlight = <&backlight>;
}
backlight: backlight {
compatible = "pwm-backlight";
/* pwm node name; pwm device No.; period_ns; pwm_polarity */
pwms = <&pwm 2 1000000 0>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <8>;
status = "okay";
};
&pwm {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm2_pins_b>;
/* mode: up-count, down-count, up-down-count
action: none, low, high, inverse */
pwm2 {
aic,mode = "up-count";
aic,tb-clk-rate = <24000000>;
/* CBD, CBU, CAD, CAU, PRD, ZRO */
aic,action0 = "none", "none", "none", "high", "low", "none";
aic,action1 = "none", "none", "none", "low", "high", "none";
aic,default-level = <0>;
aic,rise-edge-delay = <10>;
aic,fall-edge-delay = <10>;
status = "okay";
};
};
背光控制依赖 PWM 模块,详细配置可参考 PWM 使用指南。