arm64: dts: salvator-x: Add panel backlight support
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 27 Apr 2017 14:37:41 +0000 (16:37 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 22 May 2017 12:54:49 +0000 (14:54 +0200)
The panel backlight is controlled through a GPIO and a PWM channel.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[simon: apply to salvator-x.dtsi instead of r8a7795-salvator-x.dts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm64/boot/dts/renesas/salvator-x.dtsi

index d5eb022d247cad6eaecbdd6bd4f544624857763d..7240bcd759183d4e5fd251cc9dca464dc64660fa 100644 (file)
                clock-frequency = <11289600>;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 50000>;
+
+               brightness-levels = <256 128 64 16 8 4 0>;
+               default-brightness-level = <6>;
+
+               enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+       };
+
        reg_1p8v: regulator0 {
                compatible = "regulator-fixed";
                regulator-name = "fixed-1.8V";
                function = "i2c2";
        };
 
+       pwm1_pins: pwm {
+               groups = "pwm1_a";
+               function = "pwm1";
+       };
+
        scif1_pins: scif1 {
                groups = "scif1_data_a", "scif1_ctrl";
                function = "scif1";
        };
 };
 
+&pwm1 {
+       pinctrl-0 = <&pwm1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &rcar_sound {
        pinctrl-0 = <&sound_pins &sound_clk_pins>;
        pinctrl-names = "default";