e10dc1f68c7d944853bbb326ad4a62c19661968e
[openwrt/staging/neocturne.git] /
1 From 97a59d460244efdb87b464b9f07c1e90e7e7129a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 7 Jan 2022 11:12:08 +0000
4 Subject: [PATCH] dtoverlays: Add backlight-gpio parameter to
5 vc4-kms-dpi-generic
6
7 To allow for the cases where a simple panel does have a GPIO
8 controlled backlight. Defaults to having no backlight defined.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 arch/arm/boot/dts/overlays/README | 2 ++
13 .../overlays/vc4-kms-dpi-generic-overlay.dts | 19 +++++++++++++++++++
14 2 files changed, 21 insertions(+)
15
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -3638,6 +3638,8 @@ Params: clock-frequency Display
19 rgb888 Change to RGB888 output on GPIOs 0-27
20 bus-format Override the bus format for a MEDIA_BUS_FMT_*
21 value. NB also overridden by rgbXXX overrides.
22 + backlight-gpio Defines a GPIO to be used for backlight control
23 + (default of none).
24
25
26 Name: vc4-kms-dsi-7inch
27 --- a/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts
28 +++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts
29 @@ -63,6 +63,23 @@
30 };
31 };
32
33 + fragment@2 {
34 + target = <&panel>;
35 + __dormant__ {
36 + backlight = <&backlight>;
37 + };
38 + };
39 +
40 + fragment@3 {
41 + target-path = "/";
42 + __dormant__ {
43 + backlight: backlight {
44 + compatible = "gpio-backlight";
45 + gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
46 + };
47 + };
48 + };
49 +
50 __overrides__ {
51 clock-frequency = <&timing>, "clock-frequency:0";
52 hactive = <&timing>, "hactive:0";
53 @@ -88,5 +105,7 @@
54 rgb888 = <&panel>, "bus-format:0=0x100a",
55 <&dpi_node>, "pinctrl-0:0=",<&dpi_gpio0>;
56 bus-format = <&panel>, "bus-format:0";
57 + backlight-gpio = <0>, "+2+3",
58 + <&backlight>, "gpios:4";
59 };
60 };