Skip to content

Commit ee50845

Browse files
AngeloGioacchino Del Regnombgg
authored andcommitted
arm64: dts: mediatek: cherry: Add configuration for display backlight
Configure the hardware PWM for the integrated display's backlight: all Cherry devices enable the backlight with GPIO82 and manage the PWM via MediaTek disp-pwm on GPIO97. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20230223145426.193590-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
1 parent b86b946 commit ee50845

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
serial0 = &uart0;
2323
};
2424

25+
backlight_lcd0: backlight-lcd0 {
26+
compatible = "pwm-backlight";
27+
brightness-levels = <0 1023>;
28+
default-brightness-level = <576>;
29+
enable-gpios = <&pio 82 GPIO_ACTIVE_HIGH>;
30+
num-interpolated-steps = <1023>;
31+
pwms = <&disp_pwm0 0 500000>;
32+
power-supply = <&ppvar_sys>;
33+
};
34+
2535
chosen {
2636
stdout-path = "serial0:115200n8";
2737
};
@@ -212,6 +222,13 @@
212222
};
213223
};
214224

225+
&disp_pwm0 {
226+
status = "okay";
227+
228+
pinctrl-names = "default";
229+
pinctrl-0 = <&disp_pwm0_pin_default>;
230+
};
231+
215232
&dp_tx {
216233
status = "okay";
217234

@@ -653,6 +670,13 @@
653670
};
654671
};
655672

673+
disp_pwm0_pin_default: disp-pwm0-default-pins {
674+
pins-disp-pwm {
675+
pinmux = <PINMUX_GPIO82__FUNC_GPIO82>,
676+
<PINMUX_GPIO97__FUNC_DISP_PWM0>;
677+
};
678+
};
679+
656680
dptx_pin: dptx-default-pins {
657681
pins-cmd-dat {
658682
pinmux = <PINMUX_GPIO18__FUNC_DP_TX_HPD>;

0 commit comments

Comments
 (0)