All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/2] ARM: tegra: paz00: Add host1x support
@ 2012-11-16 23:20 Marc Dietrich
       [not found] ` <138e6f406aef20f6257a8f90af45865bd9c88092.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Dietrich @ 2012-11-16 23:20 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA; +Cc: Stephen Warren

This adds host1x support which includes LVDS support. HDMI is disabled
for now as the tegra drm cannot handle two different display timings
at the same time.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
V4: rebase against for-3.8/DT
V3: move host1x up, revert hdmi ddc clock change

 arch/arm/boot/dts/tegra20-paz00.dts |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 6a93d14..8a14e1d 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -10,6 +10,15 @@
 		reg = <0x00000000 0x20000000>;
 	};
 
+	host1x {
+		dc@54200000 {
+			rgb {
+				status = "okay";
+				nvidia,ddc-i2c-bus = <&lvds_ddc>;
+			};
+		};
+	};
+
 	pinmux {
 		pinctrl-names = "default";
 		pinctrl-0 = <&state_default>;
@@ -240,7 +249,7 @@
 		clock-frequency = <216000000>;
 	};
 
-	i2c@7000c000 {
+	lvds_ddc: i2c@7000c000 {
 		status = "okay";
 		clock-frequency = <400000>;
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v4 2/2] ARM: tegra: paz00: enable backlight
       [not found] ` <138e6f406aef20f6257a8f90af45865bd9c88092.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
@ 2012-11-16 23:20   ` Marc Dietrich
       [not found]     ` <4de446eaf895ffa01d397cf70cec02620e16f690.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Dietrich @ 2012-11-16 23:20 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA; +Cc: Stephen Warren

This enables backlight using power sequences.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/boot/dts/tegra20-paz00.dts |   72 +++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 8a14e1d..7349aa3 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -15,6 +15,10 @@
 			rgb {
 				status = "okay";
 				nvidia,ddc-i2c-bus = <&lvds_ddc>;
+
+				display {
+					nvidia,backlight = <&backlight>;
+				};
 			};
 		};
 	};
@@ -461,6 +465,74 @@
 		};
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255>;
+		default-brightness-level = <12>;
+
+		/* resources used by the power sequences */
+		pwms = <&pwm 0 5000000>;
+		pwm-names = "backlight";
+
+		power-sequences {
+			power-on {
+				step0 {
+					type = "pwm";
+					id = "backlight";
+					enable;
+				};
+				step1 {
+					type = "gpio";
+					gpio = <&gpio 4 0>;   /* gpio PA4, en_vdd_pnl  */
+					value = <1>;
+				};
+				step2 {
+					type = "gpio";
+					gpio = <&gpio 176 0>; /* gpio PW0, bl_vdd */
+					value = <1>;
+				};
+				step3 {
+					type = "gpio";
+					gpio = <&gpio 102 0>; /* gpio PM6, lvds_shdn */
+					value = <1>;
+				};
+				step4 {
+					type = "gpio";
+					gpio = <&gpio 164 0>; /* gpio PU4, bl_enb */
+					value = <1>;
+				};
+			};
+
+			power-off {
+				step4 {
+					type = "gpio";
+					gpio = <&gpio 164 0>; /* gpio PU4, bl_enb */
+					value = <0>;
+				};
+				step0 {
+					type = "gpio";
+					gpio = <&gpio 102 0>; /* gpio PM6, lvds_shdn */
+					value = <0>;
+				};
+				step1 {
+					type = "gpio";
+					gpio = <&gpio 176 0>; /* gpio PW0, bl_vdd */
+					value = <0>;
+				};
+				step2 {
+					type = "gpio";
+					gpio = <&gpio 4 0>;   /* gpio PA4, en_vdd_pnl  */
+					value = <0>;
+				};
+				step3 {
+					type = "pwm";
+					id = "backlight";
+					disable;
+				};
+			};
+		};
+	};
+
 	regulators {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 2/2] ARM: tegra: paz00: enable backlight
       [not found]     ` <4de446eaf895ffa01d397cf70cec02620e16f690.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
@ 2012-11-17  7:35       ` Thierry Reding
       [not found]         ` <20121117073534.GD26391-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
  2012-11-17 15:04       ` Marc Dietrich
  1 sibling, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2012-11-17  7:35 UTC (permalink / raw)
  To: Marc Dietrich; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

On Sat, Nov 17, 2012 at 12:20:32AM +0100, Marc Dietrich wrote:
[...]
> +				step1 {
> +					type = "gpio";
> +					gpio = <&gpio 4 0>;   /* gpio PA4, en_vdd_pnl  */
> +					value = <1>;
> +				};
> +				step2 {
> +					type = "gpio";
> +					gpio = <&gpio 176 0>; /* gpio PW0, bl_vdd */
> +					value = <1>;
> +				};

These look like regulators, so maybe they should be abstracted as such?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 2/2] ARM: tegra: paz00: enable backlight
       [not found]         ` <20121117073534.GD26391-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2012-11-17 14:23           ` Marc Dietrich
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Dietrich @ 2012-11-17 14:23 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

On Saturday 17 November 2012 08:35:34 Thierry Reding wrote:
> On Sat, Nov 17, 2012 at 12:20:32AM +0100, Marc Dietrich wrote:
> [...]
> 
> > +				step1 {
> > +					type = "gpio";
> > +					gpio = <&gpio 4 0>;   /* gpio PA4, en_vdd_pnl  */
> > +					value = <1>;
> > +				};
> > +				step2 {
> > +					type = "gpio";
> > +					gpio = <&gpio 176 0>; /* gpio PW0, bl_vdd */
> > +					value = <1>;
> > +				};
> 
> These look like regulators, so maybe they should be abstracted as such?

Honstly, I never understood why we need to redefine a gpio as a regulator. 
IMHO, gpios don't regulate, they switch 0/1. But yes, these gpios just go to 
some FET which switches on some supply voltage.

Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 2/2] ARM: tegra: paz00: enable backlight
       [not found]     ` <4de446eaf895ffa01d397cf70cec02620e16f690.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
  2012-11-17  7:35       ` Thierry Reding
@ 2012-11-17 15:04       ` Marc Dietrich
  1 sibling, 0 replies; 5+ messages in thread
From: Marc Dietrich @ 2012-11-17 15:04 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA; +Cc: Stephen Warren

Hi,

since backlight will only come in 3.9, I can add some remarks myself, so I 
don't forget them next time.

On Saturday 17 November 2012 00:20:32 Marc Dietrich wrote:
> This enables backlight using power sequences.
> 
> Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
> ---
>  arch/arm/boot/dts/tegra20-paz00.dts |   72
> +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/tegra20-paz00.dts
> b/arch/arm/boot/dts/tegra20-paz00.dts index 8a14e1d..7349aa3 100644
> --- a/arch/arm/boot/dts/tegra20-paz00.dts
> +++ b/arch/arm/boot/dts/tegra20-paz00.dts
> @@ -15,6 +15,10 @@
>  			rgb {
>  				status = "okay";
>  				nvidia,ddc-i2c-bus = <&lvds_ddc>;
> +
> +				display {
> +					nvidia,backlight = <&backlight>;
> +				};
>  			};
>  		};
>  	};
> @@ -461,6 +465,74 @@
>  		};
>  	};
> 
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208 
224
> 240 255>; +		default-brightness-level = <12>;
> +
> +		/* resources used by the power sequences */
> +		pwms = <&pwm 0 5000000>;
> +		pwm-names = "backlight";
> +
> +		power-sequences {
> +			power-on {
> +				step0 {
> +					type = "pwm";
> +					id = "backlight";
> +					enable;
> +				};
> +				step1 {
> +					type = "gpio";
> +					gpio = <&gpio 4 0>;   /* gpio PA4, en_vdd_pnl  */
> +					value = <1>;
> +				};
> +				step2 {
> +					type = "gpio";
> +					gpio = <&gpio 176 0>; /* gpio PW0, bl_vdd */

this one needs to be removed as it is not used. There is bl_pwm (gpio U3) 
however which I cannot sort in here.

> +					value = <1>;
> +				};
> +				step3 {
> +					type = "gpio";
> +					gpio = <&gpio 102 0>; /* gpio PM6, lvds_shdn */
> +					value = <1>;
> +				};
> +				step4 {
> +					type = "gpio";
> +					gpio = <&gpio 164 0>; /* gpio PU4, bl_enb */
> +					value = <1>;
> +				};
> +			};
> +
> +			power-off {
> +				step4 {
> +					type = "gpio";
> +					gpio = <&gpio 164 0>; /* gpio PU4, bl_enb */
> +					value = <0>;

and this is totally bogus.

/me notes: better do not send patches after midnight!

Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-17 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 23:20 [PATCH v4 1/2] ARM: tegra: paz00: Add host1x support Marc Dietrich
     [not found] ` <138e6f406aef20f6257a8f90af45865bd9c88092.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-11-16 23:20   ` [PATCH v4 2/2] ARM: tegra: paz00: enable backlight Marc Dietrich
     [not found]     ` <4de446eaf895ffa01d397cf70cec02620e16f690.1353107865.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-11-17  7:35       ` Thierry Reding
     [not found]         ` <20121117073534.GD26391-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-11-17 14:23           ` Marc Dietrich
2012-11-17 15:04       ` Marc Dietrich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.