MLK-14238-05 ARM: dts: imx: Add PWM backlight support on i.mx7ulp evk
authorBai Ping <ping.bai@nxp.com>
Tue, 21 Mar 2017 04:08:27 +0000 (12:08 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:49 +0000 (15:21 -0500)
Add PWM backlight support on i.MX7ULP EVK board.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
[Octavian: fix checkpatch warnings]
Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
arch/arm/boot/dts/imx7ulp-evk.dts

index 7700b92..8f2b81e 100644 (file)
        };
 
        backlight {
-               compatible = "gpio-backlight";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_backlight>;
-               gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
-               default-on;
+               compatible = "pwm-backlight";
+               pwms = <&pwm0 1 5000000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
                status = "okay";
        };
 
                        >;
                };
 
-               pinctrl_backlight: backlight_grp {
+               pinctrl_pwm0: pwm0_grp {
                        fsl,pins = <
-                               ULP1_PAD_PTF2__PTF2             0x20100
+                               ULP1_PAD_PTF2__TPM4_CH1         0x403
                        >;
                };
 
        status = "disabled";
 };
 
+&pwm0 {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&pinctrl_pwm0>;
+       pinctrl-1 = <&pinctrl_pwm0>;
+       status = "okay";
+};
+
 &rpmsg{
        /*
         * 64K for one rpmsg instance, default using 2 rpmsg instances: