ARM: dts: imx6sl-tolino-shine2hd: Add backlight
authorAndreas Kemnade <andreas@kemnade.info>
Wed, 19 Oct 2022 06:51:58 +0000 (08:51 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 29 Oct 2022 04:07:24 +0000 (12:07 +0800)
Add backlight for Tolino Shine2 HD. It uses the PWM
of the embedded controller.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts

index 663ee9d..ea0ce59 100644 (file)
        model = "Tolino Shine 2 HD";
        compatible = "kobo,tolino-shine2hd", "fsl,imx6sl";
 
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&ec 0 50000>;
+               power-supply = <&backlight_regulator>;
+       };
+
+       backlight_regulator: regulator-backlight {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight_power>;
+               regulator-name = "backlight";
+               gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        chosen {
                stdout-path = &uart1;
        };
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog>;
 
+       pinctrl_backlight_power: backlight-powergrp {
+               fsl,pins = <
+                       MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10 0x10059
+               >;
+       };
+
        pinctrl_gpio_keys: gpio-keysgrp {
                fsl,pins = <
                        MX6SL_PAD_SD1_DAT1__GPIO5_IO08  0x17059