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
7 To allow for the cases where a simple panel does have a GPIO
8 controlled backlight. Defaults to having no backlight defined.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/README | 2 ++
13 .../overlays/vc4-kms-dpi-generic-overlay.dts | 19 +++++++++++++++++++
14 2 files changed, 21 insertions(+)
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
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
36 + backlight = <&backlight>;
43 + backlight: backlight {
44 + compatible = "gpio-backlight";
45 + gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
51 clock-frequency = <&timing>, "clock-frequency:0";
52 hactive = <&timing>, "hactive:0";
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";