diff mbox

[v2,6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support

Message ID 1493303863-23719-7-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Ulrich Hecht April 27, 2017, 2:37 p.m. UTC
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The panel backlight is controlled through a GPIO and a PWM channel.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Laurent Pinchart April 27, 2017, 2:42 p.m. UTC | #1
Hi Ulrich,

Thank you for the patch.

On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> The panel backlight is controlled through a GPIO and a PWM channel.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 +++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index bf4674e..8558b27
> 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> @@ -280,6 +280,16 @@
>  			};
>  		};
>  	};
> +
> +	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>;
> +	};
>  };
> 
>  &du {
> @@ -366,6 +376,11 @@
>  		function = "du";
>  	};
> 
> +	pwm1_pins: pwm {
> +		groups = "pwm1_a";
> +		function = "pwm1";
> +	};
> +
>  	sdhi0_pins: sd0 {
>  		groups = "sdhi0_data4", "sdhi0_ctrl";
>  		function = "sdhi0";
> @@ -441,6 +456,13 @@
>  	};
>  };
> 
> +&pwm1 {
> +	pinctrl-0 = <&pwm1_pins>;
> +	pinctrl-names = "default";
> +
> +	status = "okay";
> +};
> +
>  &scif1 {
>  	pinctrl-0 = <&scif1_pins>;
>  	pinctrl-names = "default";
Laurent Pinchart April 27, 2017, 2:43 p.m. UTC | #2
On Thursday 27 Apr 2017 17:42:53 Laurent Pinchart wrote:
> On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > 
> > The panel backlight is controlled through a GPIO and a PWM channel.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Please ignore this, I meant to reply to the M3-W patch.

> 
> > ---
> > 
> >  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 +++++++++++++++++
> >  1 file changed, 22 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index
> > bf4674e..8558b27
> > 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > @@ -280,6 +280,16 @@
> > 
> >  			};
> >  		
> >  		};
> >  	
> >  	};
> > 
> > +
> > +	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>;
> > +	};
> > 
> >  };
> >  
> >  &du {
> > 
> > @@ -366,6 +376,11 @@
> > 
> >  		function = "du";
> >  	
> >  	};
> > 
> > +	pwm1_pins: pwm {
> > +		groups = "pwm1_a";
> > +		function = "pwm1";
> > +	};
> > +
> > 
> >  	sdhi0_pins: sd0 {
> >  	
> >  		groups = "sdhi0_data4", "sdhi0_ctrl";
> >  		function = "sdhi0";
> > 
> > @@ -441,6 +456,13 @@
> > 
> >  	};
> >  
> >  };
> > 
> > +&pwm1 {
> > +	pinctrl-0 = <&pwm1_pins>;
> > +	pinctrl-names = "default";
> > +
> > +	status = "okay";
> > +};
> > +
> > 
> >  &scif1 {
> >  
> >  	pinctrl-0 = <&scif1_pins>;
> >  	pinctrl-names = "default";
Simon Horman April 28, 2017, 5:23 a.m. UTC | #3
On Thu, Apr 27, 2017 at 05:43:35PM +0300, Laurent Pinchart wrote:
> On Thursday 27 Apr 2017 17:42:53 Laurent Pinchart wrote:
> > On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> > > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > 
> > > The panel backlight is controlled through a GPIO and a PWM channel.
> > > 
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > 
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Please ignore this, I meant to reply to the M3-W patch.

Thanks, noted.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index bf4674e..8558b27 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -280,6 +280,16 @@ 
 			};
 		};
 	};
+
+	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>;
+	};
 };
 
 &du {
@@ -366,6 +376,11 @@ 
 		function = "du";
 	};
 
+	pwm1_pins: pwm {
+		groups = "pwm1_a";
+		function = "pwm1";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -441,6 +456,13 @@ 
 	};
 };
 
+&pwm1 {
+	pinctrl-0 = <&pwm1_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &scif1 {
 	pinctrl-0 = <&scif1_pins>;
 	pinctrl-names = "default";