Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / hdmi-backlight-hwhack-gpio-overlay.dts
1 /*
2  * Devicetree overlay for GPIO based backlight on/off capability.
3  *
4  * Use this if you have one of those HDMI displays whose backlight cannot be
5  * controlled via DPMS over HDMI and plan to do a little soldering to use an
6  * RPi gpio pin for on/off switching.
7  *
8  * See: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(C)#Backlight_Control
9  *
10  */
11 /dts-v1/;
12 /plugin/;
13
14 / {
15         compatible = "brcm,bcm2835";
16
17         fragment@1 {
18                 target = <&gpio>;
19                 __overlay__ {
20                         hdmi_backlight_hwhack_gpio_pins: hdmi_backlight_hwhack_gpio_pins {
21                                 brcm,pins = <17>;
22                                 brcm,function = <1>; /* out */
23                         };
24                 };
25         };
26
27         fragment@2 {
28                 target-path = "/";
29                 __overlay__ {
30                         hdmi_backlight_hwhack_gpio: hdmi_backlight_hwhack_gpio {
31                                 compatible = "gpio-backlight";
32
33                                 pinctrl-names = "default";
34                                 pinctrl-0 = <&hdmi_backlight_hwhack_gpio_pins>;
35
36                                 gpios = <&gpio 17 0>;
37                                 default-on;
38                         };
39                 };
40         };
41
42         __overrides__ {
43                 gpio_pin   = <&hdmi_backlight_hwhack_gpio>,"gpios:4",
44                              <&hdmi_backlight_hwhack_gpio_pins>,"brcm,pins:0";
45                 active_low = <&hdmi_backlight_hwhack_gpio>,"gpios:8";
46         };
47 };