dtoverlays: Add backlight-gpio parameter to vc4-kms-dpi-generic
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 7 Jan 2022 11:12:08 +0000 (11:12 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 7 Jan 2022 11:45:14 +0000 (11:45 +0000)
To allow for the cases where a simple panel does have a GPIO
controlled backlight. Defaults to having no backlight defined.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts

index 6b9a5ef7400a224b21b3c3de55e1955fd1aaaf97..4d3448f047bf97dcede2f3be5bc0b7d3c3cf97c9 100644 (file)
@@ -3625,6 +3625,8 @@ Params: clock-frequency         Display clock frequency (Hz)
         rgb888                  Change to RGB888 output on GPIOs 0-27
         bus-format              Override the bus format for a MEDIA_BUS_FMT_*
                                 value. NB also overridden by rgbXXX overrides.
+        backlight-gpio          Defines a GPIO to be used for backlight control
+                                (default of none).
 
 
 Name:   vc4-kms-dsi-7inch
index def175746f666de768d561f708a202f91fb0f5f8..7846d56c1d1a5c465b3d05388559f0d9383e01b1 100644 (file)
                };
        };
 
+       fragment@2 {
+               target = <&panel>;
+               __dormant__  {
+                       backlight = <&backlight>;
+               };
+       };
+
+       fragment@3 {
+               target-path = "/";
+               __dormant__  {
+                       backlight: backlight {
+                               compatible = "gpio-backlight";
+                               gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
+                       };
+               };
+       };
+
        __overrides__ {
                clock-frequency = <&timing>, "clock-frequency:0";
                hactive = <&timing>, "hactive:0";
                rgb888 = <&panel>, "bus-format:0=0x100a",
                        <&dpi_node>, "pinctrl-0:0=",<&dpi_gpio0>;
                bus-format = <&panel>, "bus-format:0";
+               backlight-gpio = <0>, "+2+3",
+                       <&backlight>, "gpios:4";
        };
 };