diff mbox

[2/2] ARM: dts: imx6x-sdb: Add LCD support

Message ID 1409593803-12368-2-git-send-email-fabio.estevam@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Sept. 1, 2014, 5:50 p.m. UTC
Add support for the "MX28LCD Seiko 4.3' WVGA" panel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/boot/dts/imx6sx-sdb.dts | 93 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

Comments

Shawn Guo Sept. 2, 2014, 1:50 p.m. UTC | #1
On Mon, Sep 01, 2014 at 02:50:03PM -0300, Fabio Estevam wrote:
> Add support for the "MX28LCD Seiko 4.3' WVGA" panel.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/boot/dts/imx6sx-sdb.dts | 93 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 93 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
> index a3980d9..e2c244d 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb.dts
> +++ b/arch/arm/boot/dts/imx6sx-sdb.dts
> @@ -24,6 +24,13 @@
>  		reg = <0x80000000 0x40000000>;
>  	};
>  
> +	backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm3 0 5000000>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		default-brightness-level = <6>;
> +	};
> +
>  	gpio-keys {
>  		compatible = "gpio-keys";
>  		pinctrl-names = "default";
> @@ -90,6 +97,14 @@
>  			regulator-min-microvolt = <5000000>;
>  			regulator-max-microvolt = <5000000>;
>  		};
> +
> +		reg_lcd_3v3: regulator@4 {
> +			compatible = "regulator-fixed";
> +			reg = <4>;
> +			regulator-name = "lcd-3v3";
> +			gpio = <&gpio3 27 0>;
> +			enable-active-high;
> +		};
>  	};
>  
>  	sound {
> @@ -251,6 +266,44 @@
>  	};
>  };
>  
> +&lcdif1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_lcd>;
> +	lcd-supply = <&reg_lcd_3v3>;
> +	display = <&display0>;
> +	status = "okay";
> +
> +	display0: display {

Shouldn't the node be named more specific, so that we do not run into
the kernel warning complaining duplicated property name?

Shawn

> +		bits-per-pixel = <16>;
> +		bus-width = <24>;
> +
> +		display-timings {
> +			native-mode = <&timing0>;
> +			timing0: timing0 {
> +				clock-frequency = <33500000>;
> +				hactive = <800>;
> +				vactive = <480>;
> +				hback-porch = <89>;
> +				hfront-porch = <164>;
> +				vback-porch = <23>;
> +				vfront-porch = <10>;
> +				hsync-len = <10>;
> +				vsync-len = <10>;
> +				hsync-active = <0>;
> +				vsync-active = <0>;
> +				de-active = <1>;
> +				pixelclk-active = <0>;
> +			};
> +		};
> +	};
> +};
> +
> +&pwm3 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_pwm3>;
> +	status = "okay";
> +};
> +
>  &ssi2 {
>  	status = "okay";
>  };
> @@ -365,6 +418,46 @@
>  			>;
>  		};
>  
> +		pinctrl_lcd: lcdgrp {
> +			fsl,pins = <
> +				MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA18__LCDIF1_DATA_18 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA19__LCDIF1_DATA_19 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA20__LCDIF1_DATA_20 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA21__LCDIF1_DATA_21 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA22__LCDIF1_DATA_22 0x4001b0b0
> +				MX6SX_PAD_LCD1_DATA23__LCDIF1_DATA_23 0x4001b0b0
> +				MX6SX_PAD_LCD1_CLK__LCDIF1_CLK	0x4001b0b0
> +				MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE 0x4001b0b0
> +				MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC 0x4001b0b0
> +				MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC 0x4001b0b0
> +				MX6SX_PAD_LCD1_RESET__GPIO3_IO_27 0x4001b0b0
> +			>;
> +		};
> +
> +		pinctrl_pwm3: pwm3grp-1 {
> +			fsl,pins = <
> +				MX6SX_PAD_SD1_DATA2__PWM3_OUT 0x110b0
> +			>;
> +		};
> +
>  		pinctrl_vcc_sd3: vccsd3grp {
>  			fsl,pins = <
>  				MX6SX_PAD_KEY_COL1__GPIO2_IO_11		0x17059
> -- 
> 1.9.1
>
Fabio Estevam Sept. 2, 2014, 2:01 p.m. UTC | #2
On Tue, Sep 2, 2014 at 10:50 AM, Shawn Guo <shawn.guo@freescale.com> wrote:

>> +&lcdif1 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&pinctrl_lcd>;
>> +     lcd-supply = <&reg_lcd_3v3>;
>> +     display = <&display0>;
>> +     status = "okay";
>> +
>> +     display0: display {
>
> Shouldn't the node be named more specific, so that we do not run into
> the kernel warning complaining duplicated property name?

I do not see any warning here.

It was on mx28 that I got the warning as it has "display: display".

Last time on mx28 you asked me to look at mx6qdl-sabresd.dtsi for a
reference, but display nodes there are inside the ldb node and do not
have the "display: display", so not sure how to proceed.

What do you suggest here?
Shawn Guo Sept. 2, 2014, 2:11 p.m. UTC | #3
On Tue, Sep 02, 2014 at 11:01:06AM -0300, Fabio Estevam wrote:
> On Tue, Sep 2, 2014 at 10:50 AM, Shawn Guo <shawn.guo@freescale.com> wrote:
> 
> >> +&lcdif1 {
> >> +     pinctrl-names = "default";
> >> +     pinctrl-0 = <&pinctrl_lcd>;
> >> +     lcd-supply = <&reg_lcd_3v3>;
> >> +     display = <&display0>;
> >> +     status = "okay";
> >> +
> >> +     display0: display {
> >
> > Shouldn't the node be named more specific, so that we do not run into
> > the kernel warning complaining duplicated property name?
> 
> I do not see any warning here.

I'm not sure why you do not see it, but I do.

[    0.037835] device-tree: Duplicate name in lcdif@02220000, renamed to "display#1"

> 
> It was on mx28 that I got the warning as it has "display: display".

I do not think the warning comes because of "display: display" but the
fact that lcdif node has a property named "display" and a child node
named "display" at the same time.

Shawn

> 
> Last time on mx28 you asked me to look at mx6qdl-sabresd.dtsi for a
> reference, but display nodes there are inside the ldb node and do not
> have the "display: display", so not sure how to proceed.
> 
> What do you suggest here?
Fabio Estevam Sept. 2, 2014, 6 p.m. UTC | #4
On Tue, Sep 2, 2014 at 11:11 AM, Shawn Guo <shawn.guo@freescale.com> wrote:

> I'm not sure why you do not see it, but I do.
>
> [    0.037835] device-tree: Duplicate name in lcdif@02220000, renamed to "display#1"

I was not grepping correctly, sorry. I can see it now.

> I do not think the warning comes because of "display: display" but the
> fact that lcdif node has a property named "display" and a child node
> named "display" at the same time.

Ok, sent a v2 without the duplicate warning message. Thanks
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
index a3980d9..e2c244d 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb.dts
@@ -24,6 +24,13 @@ 
 		reg = <0x80000000 0x40000000>;
 	};
 
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm3 0 5000000>;
+		brightness-levels = <0 4 8 16 32 64 128 255>;
+		default-brightness-level = <6>;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -90,6 +97,14 @@ 
 			regulator-min-microvolt = <5000000>;
 			regulator-max-microvolt = <5000000>;
 		};
+
+		reg_lcd_3v3: regulator@4 {
+			compatible = "regulator-fixed";
+			reg = <4>;
+			regulator-name = "lcd-3v3";
+			gpio = <&gpio3 27 0>;
+			enable-active-high;
+		};
 	};
 
 	sound {
@@ -251,6 +266,44 @@ 
 	};
 };
 
+&lcdif1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_lcd>;
+	lcd-supply = <&reg_lcd_3v3>;
+	display = <&display0>;
+	status = "okay";
+
+	display0: display {
+		bits-per-pixel = <16>;
+		bus-width = <24>;
+
+		display-timings {
+			native-mode = <&timing0>;
+			timing0: timing0 {
+				clock-frequency = <33500000>;
+				hactive = <800>;
+				vactive = <480>;
+				hback-porch = <89>;
+				hfront-porch = <164>;
+				vback-porch = <23>;
+				vfront-porch = <10>;
+				hsync-len = <10>;
+				vsync-len = <10>;
+				hsync-active = <0>;
+				vsync-active = <0>;
+				de-active = <1>;
+				pixelclk-active = <0>;
+			};
+		};
+	};
+};
+
+&pwm3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pwm3>;
+	status = "okay";
+};
+
 &ssi2 {
 	status = "okay";
 };
@@ -365,6 +418,46 @@ 
 			>;
 		};
 
+		pinctrl_lcd: lcdgrp {
+			fsl,pins = <
+				MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA18__LCDIF1_DATA_18 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA19__LCDIF1_DATA_19 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA20__LCDIF1_DATA_20 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA21__LCDIF1_DATA_21 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA22__LCDIF1_DATA_22 0x4001b0b0
+				MX6SX_PAD_LCD1_DATA23__LCDIF1_DATA_23 0x4001b0b0
+				MX6SX_PAD_LCD1_CLK__LCDIF1_CLK	0x4001b0b0
+				MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE 0x4001b0b0
+				MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC 0x4001b0b0
+				MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC 0x4001b0b0
+				MX6SX_PAD_LCD1_RESET__GPIO3_IO_27 0x4001b0b0
+			>;
+		};
+
+		pinctrl_pwm3: pwm3grp-1 {
+			fsl,pins = <
+				MX6SX_PAD_SD1_DATA2__PWM3_OUT 0x110b0
+			>;
+		};
+
 		pinctrl_vcc_sd3: vccsd3grp {
 			fsl,pins = <
 				MX6SX_PAD_KEY_COL1__GPIO2_IO_11		0x17059