Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-28 Thread Tomi Valkeinen
On 28/05/14 00:14, Tony Lindgren wrote:

 FYI, I'm getting this with current linux next:
 
 omapfb omapfb: failed to allocate framebuffer
 omapfb omapfb: failed to allocate fbmem
 omapfb omapfb: failed to setup omapfb
 omapfb: probe of omapfb failed with error -12

You need the attached patch to fix linux-next's dma alloc.

 Tomi

From 88275fcdf6e7545e66fe35b822a41c9c017656f2 Mon Sep 17 00:00:00 2001
From: Vlastimil Babka vba...@suse.cz
Date: Fri, 23 May 2014 10:18:56 +0200
Subject: [PATCH] 
 mm-compaction-properly-signal-and-act-upon-lock-and-need_sched-contention-fix2

Step 1: Change function name and comment between v1 and v2 so that the return
value signals the opposite thing.
Step 2: Change the call sites to reflect the opposite return value.
Step 3: ???
Step 4: Make a complete fool of yourself.

Signed-off-by: Vlastimil Babka vba...@suse.cz
---
 mm/compaction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index a525cd47a9d5..51750197db11 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -237,13 +237,13 @@ static inline bool compact_should_abort(struct compact_control *cc)
 	if (need_resched()) {
 		if (cc-mode == MIGRATE_ASYNC) {
 			cc-contended = true;
-			return false;
+			return true;
 		}
 
 		cond_resched();
 	}
 
-	return true;
+	return false;
 }
 
 /* Returns true if the page is within a block suitable for migration to */
-- 
1.9.1



signature.asc
Description: OpenPGP digital signature


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-28 Thread Tomi Valkeinen
On 27/05/14 23:59, Tony Lindgren wrote:

 In case you did not yet do it, here's this patch updated for you. I'm
 assuming you'll apply this to your panel dts branch. Let me know when the
 dependencies are in linux next and I'll test it one more time. The omap
 changes finally hit linux next as of today, so I'm only doing fixes
 and minimal changes for now.

I haven't pushed the dts changes to linux-next as the base branch was
missing. Now that it's there, I have pushed the DSS dts changes also.

You can do a manual merge if you want to try before linux-next is updated:

git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git for-next

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-27 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [140521 07:51]:
 * Tomi Valkeinen tomi.valkei...@ti.com [140521 05:45]:
  On 14/05/14 00:32, Tony Lindgren wrote:
  
   +dss {
   + status = ok;
   + vdds_dsi-supply = vpll2;
   + port {
   + dpi_out: endpoint {
   + remote-endpoint = lcd_in;
   + data-lines = 18;
   + };
   + };
   +};
  
  I just noticed the vdds_dsi-supply there. While the driver currently
  uses that if available, I think it should be removed, and done the same
  way Florian did with his overo patches:
  
  /* Needed to power the DPI pins */
  vpll2 {
  regulator-always-on;
  };
  
  That supply is not DSS's supply, but it's used to power up the pins. If
  the pins were used as GPIOs, that power should be enabled.
 
 OK thanks for catching it.

In case you did not yet do it, here's this patch updated for you. I'm
assuming you'll apply this to your panel dts branch. Let me know when the
dependencies are in linux next and I'll test it one more time. The omap
changes finally hit linux next as of today, so I'm only doing fixes
and minimal changes for now.

Regards,

Tony

8 --
From: Tony Lindgren t...@atomide.com
Date: Tue, 27 May 2014 11:31:02 -0700
Subject: [PATCH] ARM: dts: Add LCD panel sharp ls037v7dw01 support for 
omap3-evm and ldp

Looks like quite a few omap3 boards have sharp ls037v7dw01 that's
configured as various panel dpi entries for whatever legacy reasons.
For device tree based support, let's just configure these properly for
panel ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com

--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+   OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_vsync.dss_vsync */
+   OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+
+   OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data6.dss_data6 */
+   OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data7.dss_data7 */
+   OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data8.dss_data8 */
+   OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data9.dss_data9 */
+   OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data10.dss_data10 */
+   OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data11.dss_data11 */
+   OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data12.dss_data12 */
+   OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data13.dss_data13 */
+   OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data14.dss_data14 */
+   OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data15.dss_data15 */
+   OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data16.dss_data16 */
+   OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data17.dss_data17 */
+
+   OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data18.dss_data0 */
+   OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data19.dss_data1 */
+   OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data20.dss_data2 */
+   OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data21.dss_data3 */
+   OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data22.dss_data4 */
+   OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data23.dss_data5 */
+   ;
+   };
+
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = 
0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* 
sdmmc1_clk.sdmmc1_clk */
@@ 

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-27 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [140527 14:00]:
 * Tony Lindgren t...@atomide.com [140521 07:51]:
  * Tomi Valkeinen tomi.valkei...@ti.com [140521 05:45]:
   On 14/05/14 00:32, Tony Lindgren wrote:
   
+dss {
+   status = ok;
+   vdds_dsi-supply = vpll2;
+   port {
+   dpi_out: endpoint {
+   remote-endpoint = lcd_in;
+   data-lines = 18;
+   };
+   };
+};
   
   I just noticed the vdds_dsi-supply there. While the driver currently
   uses that if available, I think it should be removed, and done the same
   way Florian did with his overo patches:
   
   /* Needed to power the DPI pins */
   vpll2 {
 regulator-always-on;
   };
   
   That supply is not DSS's supply, but it's used to power up the pins. If
   the pins were used as GPIOs, that power should be enabled.
  
  OK thanks for catching it.
 
 In case you did not yet do it, here's this patch updated for you. I'm
 assuming you'll apply this to your panel dts branch. Let me know when the
 dependencies are in linux next and I'll test it one more time. The omap
 changes finally hit linux next as of today, so I'm only doing fixes
 and minimal changes for now.

Sorry here's the patch one more time with the regulator-always-on added.

FYI, I'm getting this with current linux next:

omapfb omapfb: failed to allocate framebuffer
omapfb omapfb: failed to allocate fbmem
omapfb omapfb: failed to setup omapfb
omapfb: probe of omapfb failed with error -12

Regards,

Tony

8 -
From: Tony Lindgren t...@atomide.com
Date: Tue, 27 May 2014 11:31:02 -0700
Subject: [PATCH] ARM: dts: Add LCD panel sharp ls037v7dw01 support for 
omap3-evm and ldp

Looks like quite a few omap3 boards have sharp ls037v7dw01 that's
configured as various panel dpi entries for whatever legacy reasons.
For device tree based support, let's just configure these properly for
panel ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com

--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+   OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_vsync.dss_vsync */
+   OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+
+   OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data6.dss_data6 */
+   OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data7.dss_data7 */
+   OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data8.dss_data8 */
+   OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data9.dss_data9 */
+   OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data10.dss_data10 */
+   OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data11.dss_data11 */
+   OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data12.dss_data12 */
+   OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data13.dss_data13 */
+   OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data14.dss_data14 */
+   OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data15.dss_data15 */
+   OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data16.dss_data16 */
+   OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data17.dss_data17 */
+
+   OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data18.dss_data0 */
+   OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data19.dss_data1 */
+   OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data20.dss_data2 */
+   OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3)   /* 

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-21 Thread Tomi Valkeinen
On 14/05/14 00:32, Tony Lindgren wrote:

 +dss {
 + status = ok;
 + vdds_dsi-supply = vpll2;
 + port {
 + dpi_out: endpoint {
 + remote-endpoint = lcd_in;
 + data-lines = 18;
 + };
 + };
 +};

I just noticed the vdds_dsi-supply there. While the driver currently
uses that if available, I think it should be removed, and done the same
way Florian did with his overo patches:

/* Needed to power the DPI pins */
vpll2 {
regulator-always-on;
};

That supply is not DSS's supply, but it's used to power up the pins. If
the pins were used as GPIOs, that power should be enabled.

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-21 Thread Tony Lindgren
* Tomi Valkeinen tomi.valkei...@ti.com [140521 05:45]:
 On 14/05/14 00:32, Tony Lindgren wrote:
 
  +dss {
  +   status = ok;
  +   vdds_dsi-supply = vpll2;
  +   port {
  +   dpi_out: endpoint {
  +   remote-endpoint = lcd_in;
  +   data-lines = 18;
  +   };
  +   };
  +};
 
 I just noticed the vdds_dsi-supply there. While the driver currently
 uses that if available, I think it should be removed, and done the same
 way Florian did with his overo patches:
 
 /* Needed to power the DPI pins */
 vpll2 {
   regulator-always-on;
 };
 
 That supply is not DSS's supply, but it's used to power up the pins. If
 the pins were used as GPIOs, that power should be enabled.

OK thanks for catching it.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-16 Thread Tomi Valkeinen
From: Tony Lindgren t...@atomide.com

Looks like quite a few omap3 boards have sharp ls037v7dw01 that's
configured as various panel dpi entries for whatever legacy reasons.
For device tree based support, let's just configure these properly for
panel ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/boot/dts/omap3-evm-37xx.dts   | 50 
 arch/arm/boot/dts/omap3-evm-common.dtsi| 26 +
 arch/arm/boot/dts/omap3-ldp.dts| 29 --
 .../boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi| 67 ++
 4 files changed, 167 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi

diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts 
b/arch/arm/boot/dts/omap3-evm-37xx.dts
index 4df68ad3736a..a181e30daaef 100644
--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+   OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_vsync.dss_vsync */
+   OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+
+   OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data6.dss_data6 */
+   OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data7.dss_data7 */
+   OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data8.dss_data8 */
+   OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data9.dss_data9 */
+   OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data10.dss_data10 */
+   OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data11.dss_data11 */
+   OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data12.dss_data12 */
+   OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data13.dss_data13 */
+   OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data14.dss_data14 */
+   OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data15.dss_data15 */
+   OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data16.dss_data16 */
+   OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data17.dss_data17 */
+
+   OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data18.dss_data0 */
+   OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data19.dss_data1 */
+   OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data20.dss_data2 */
+   OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data21.dss_data3 */
+   OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data22.dss_data4 */
+   OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data23.dss_data5 */
+   ;
+   };
+
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = 
0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* 
sdmmc1_clk.sdmmc1_clk */
@@ -75,6 +112,19 @@
};
 };
 
+omap3_pmx_wkup {
+   dss_dpi_pins2: pinmux_dss_dpi_pins1 {
+   pinctrl-single,pins = 
+   0x0a (PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 
*/
+   0x0c (PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 
*/
+   0x10 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 
*/
+   0x12 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 
*/
+   0x14 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 
*/
+   0x16 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 
*/
+   ;
+   };
+};
+
 mmc1 {
pinctrl-names = default;
pinctrl-0 = mmc1_pins;
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi 

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-15 Thread Tomi Valkeinen
On 14/05/14 00:32, Tony Lindgren wrote:

 +lcd0 {
 + enable-gpios = gpio5 24 GPIO_ACTIVE_HIGH;/* gpio152, lcd INI */
 + reset-gpios = gpio5 27 GPIO_ACTIVE_HIGH; /* gpio155, lcd RESB */
 + /*
 +  * The LCD is sideways, so we want the VGA mode instead of
 +  * QVGA mode. Probably also want to have omapfb.rotate=3
 +  * in the kernel cmdline until there's a binding for that.
 +  */
 + mode-gpios = gpio5 26 GPIO_ACTIVE_LOW /* gpio154, lcd MO */
 +   gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */
 +   gpio1 3 GPIO_ACTIVE_HIGH;   /* gpio3, lcd UD */

I don't think that is correct. The panel bindings should define what the
first mode-gpio means. Looking at the panel spec, I think the definition
should be enable QVGA mode. And in the board's dts above, the
GPIO_ACTIVE_x should tell which is one is correct polarity for QVGA
mode. Which is GPIO_ACTIVE_HIGH here.

If we want to tell the panel driver to use QVGA mode, we should do that
explicitly with a flag, not by hacking the GPIO polarities. It's the
panel driver's job to set the GPIO.

So in the previous mail I suggested the 'vga-mode' flag, but I think we
need actually two flags for each GPIO: one that's used to tell the
driver which mode we want, which is used if the panel driver has control
for the GPIO, and the other that tells which is the hardwired setting.

Then again, the two cases are exclusive, so maybe a single flag per mode
pin is ok. So, for the MO pin, we could have 'qvga-mode' flag in the
.dts, which means:

If there is MO gpio, set MO high. If there's no MO gpio, presume MO pin
is pulled up

Of course, one could argue that, in case MO is controlled with GPIO, the
'qvga-mode' flag is about SW level configuration, not hardware...

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-13 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [140509 08:38]:
 * Tomi Valkeinen tomi.valkei...@ti.com [140509 00:08]:
  On 09/05/14 02:36, Tony Lindgren wrote:
  Why always-on?
 
 Oops, yeah that should not be there. The GPIO is board specific.

Oops, on ldp the regulator is always on tps61130rsa enabled by
twl4030 regen. Here's the updated patch with ldp support fixed
for the GPIOs tested with blank and bl_power.

Regards,

Tony

8 --
From: Tony Lindgren t...@atomide.com
Date: Thu, 8 May 2014 17:55:32 -0700
Subject: [PATCH] ARM: dts: Add LCD panel sharp ls037v7dw01 support for 
omap3-evm and ldp

Looks like quite a few omap3 boards have sharp ls037v7dw01 that's
configured as various panel dpi entries for whatever legacy reasons.
For device tree based support, let's just configure these properly for
panel ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com

--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+   OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_vsync.dss_vsync */
+   OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+
+   OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data6.dss_data6 */
+   OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data7.dss_data7 */
+   OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data8.dss_data8 */
+   OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data9.dss_data9 */
+   OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data10.dss_data10 */
+   OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data11.dss_data11 */
+   OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data12.dss_data12 */
+   OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data13.dss_data13 */
+   OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data14.dss_data14 */
+   OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data15.dss_data15 */
+   OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data16.dss_data16 */
+   OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data17.dss_data17 */
+
+   OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data18.dss_data0 */
+   OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data19.dss_data1 */
+   OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data20.dss_data2 */
+   OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data21.dss_data3 */
+   OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data22.dss_data4 */
+   OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3)   /* 
dss_data23.dss_data5 */
+   ;
+   };
+
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = 
0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* 
sdmmc1_clk.sdmmc1_clk */
@@ -75,6 +112,19 @@
};
 };
 
+omap3_pmx_wkup {
+   dss_dpi_pins2: pinmux_dss_dpi_pins1 {
+   pinctrl-single,pins = 
+   0x0a (PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 
*/
+   0x0c (PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 
*/
+   0x10 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 
*/
+   0x12 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 
*/
+   0x14 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 
*/
+   0x16 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 
*/
+   ;
+   };
+};
+
 mmc1 {
pinctrl-names = default;

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-09 Thread Tomi Valkeinen
On 09/05/14 02:36, Tony Lindgren wrote:

 --- /dev/null
 +++ b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
 @@ -0,0 +1,82 @@
 +/*
 + * Common file for omap dpi panels with QVGA and reset pins
 + *
 + * Note that the board specifc DTS file needs to specify
 + * at minimum the GPIO enable-gpios for display, and
 + * gpios for gpio-backlight.
 + */

This looks very board specific to me... The regulator and the use of
mcspi1 depend on the board, so this file can't be used on just any omap
board with the same panel. And this can (probably) only be used on
boards with a single display. Do those boards have tv-out?

So I have nothing against having common files, but shouldn't this be
named something more specific? If the boards involved are TI's OMAP3
development boards, maybe this should be something like...
omap3-ti-dev-panel-sharp-ls037v7dw01.dtsi. Well, that's a quite long one.

 +/ {
 + aliases {
 + display0 = lcd0;
 + };
 +
 + backlight0: backlight {
 + compatible = gpio-backlight;
 + };
 +
 + /* 3.3V GPIO controlled regulator for LCD_ENVDD */
 + lcd_3v3: regulator-lcd-3v3 {
 + compatible = regulator-fixed;
 + regulator-name = lcd_3v3;
 + regulator-min-microvolt = 330;
 + regulator-max-microvolt = 330;
 + startup-delay-us = 7;
 + regulator-always-on;

Why always-on?

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-09 Thread Tony Lindgren
* Tomi Valkeinen tomi.valkei...@ti.com [140509 00:08]:
 On 09/05/14 02:36, Tony Lindgren wrote:
 
  --- /dev/null
  +++ b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
  @@ -0,0 +1,82 @@
  +/*
  + * Common file for omap dpi panels with QVGA and reset pins
  + *
  + * Note that the board specifc DTS file needs to specify
  + * at minimum the GPIO enable-gpios for display, and
  + * gpios for gpio-backlight.
  + */
 
 This looks very board specific to me... The regulator and the use of
 mcspi1 depend on the board, so this file can't be used on just any omap
 board with the same panel. And this can (probably) only be used on
 boards with a single display. Do those boards have tv-out?

Yes there's also TV out and DVI on omap3-evm, LDP just has DVI.

It seems that all omap3 boards using this are pretty much wired
the same way.
 
 So I have nothing against having common files, but shouldn't this be
 named something more specific? If the boards involved are TI's OMAP3
 development boards, maybe this should be something like...
 omap3-ti-dev-panel-sharp-ls037v7dw01.dtsi. Well, that's a quite long one.

Yeah let's use omap3-panel-sharp-ls037v7dw01.dtsi. Looking at the
legacy board files that should cover quite a few of them.

I guess it might also work on 2430sdp, but let's assume omap3
for now.
 
  +/ {
  +   aliases {
  +   display0 = lcd0;
  +   };
  +
  +   backlight0: backlight {
  +   compatible = gpio-backlight;
  +   };
  +
  +   /* 3.3V GPIO controlled regulator for LCD_ENVDD */
  +   lcd_3v3: regulator-lcd-3v3 {
  +   compatible = regulator-fixed;
  +   regulator-name = lcd_3v3;
  +   regulator-min-microvolt = 330;
  +   regulator-max-microvolt = 330;
  +   startup-delay-us = 7;
  +   regulator-always-on;
 
 Why always-on?

Oops, yeah that should not be there. The GPIO is board specific.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-08 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [140505 11:40]:
 * Tony Lindgren t...@atomide.com [140430 10:48]:
  * Joachim Eastwood manab...@gmail.com [140429 18:08]:
   On 30 April 2014 01:52, Tony Lindgren t...@atomide.com wrote:
+   reset-gpios = gpio2 23 GPIO_ACTIVE_HIGH; /* gpio55, lcd 
RESB */
+   gpios = gpio2 24 GPIO_ACTIVE_LOW  /* gpio56, lcd MO */
   
   enable-gpios ?
  
  Oops yes, changed from gpios to enable-gpios while reading the panel
  binding doc, probably forgot to commit the change, will update.
 
 Here's an updated version of this one.

One more update for the use of enable-gpios, reset-gpios and
mode-gpios to follow the binding described in simple-panel.txt.

Tomi feel free to pick this one up too, I'd assume you prefer
to do an immutable branch for the .dts changes that we both
can merge in as needed.

Regards,

Tony

8---
From: Tony Lindgren t...@atomide.com
Date: Mon, 28 Apr 2014 20:22:21 -0700
Subject: [PATCH] ARM: dts: Add LCD panel sharp ls037v7dw01 support for 
omap3-evm and ldp

Looks like quite a few omaps have sharp ls037v7dw01 that's configured
as various panel dpi entries for whatever legacy reasons. For device
tree based support, let's just configure these properly for panel
ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com

--- /dev/null
+++ b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
@@ -0,0 +1,82 @@
+/*
+ * Common file for omap dpi panels with QVGA and reset pins
+ *
+ * Note that the board specifc DTS file needs to specify
+ * at minimum the GPIO enable-gpios for display, and
+ * gpios for gpio-backlight.
+ */
+
+/ {
+   aliases {
+   display0 = lcd0;
+   };
+
+   backlight0: backlight {
+   compatible = gpio-backlight;
+   };
+
+   /* 3.3V GPIO controlled regulator for LCD_ENVDD */
+   lcd_3v3: regulator-lcd-3v3 {
+   compatible = regulator-fixed;
+   regulator-name = lcd_3v3;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   startup-delay-us = 7;
+   regulator-always-on;
+   };
+
+   lcd0: display {
+   compatible = sharp,ls037v7dw01;
+   label = lcd;
+   power-supply = lcd_3v3;
+   panel-timing {
+   clock-frequency = 540;
+   hback-porch = 39;
+   hactive = 240;
+   hfront-porch = 3;
+   hsync-len = 3;
+   vback-porch = 7;
+   vactive = 320;
+   vfront-porch = 2;
+   vsync-len = 1;
+   hsync-active = 0;
+   vsync-active = 0;
+   de-active = 1;
+   pixelclk-active = 1;
+   };
+
+   port {
+   lcd_in: endpoint {
+   remote-endpoint = dpi_out;
+   };
+   };
+   };
+};
+
+dss {
+   status = ok;
+   vdds_dsi-supply = vpll2;
+   port {
+   dpi_out: endpoint {
+   remote-endpoint = lcd_in;
+   data-lines = 18;
+   };
+   };
+};
+
+mcspi1 {
+   tsc2046@0 {
+   reg = 0;  /* CS0 */
+   compatible = ti,tsc2046;
+   spi-max-frequency = 100;
+   vcc-supply = lcd_3v3;
+   ti,x-min = /bits/ 16 0;
+   ti,x-max = /bits/ 16 8000;
+   ti,y-min = /bits/ 16 0;
+   ti,y-max = /bits/ 16 4800;
+   ti,x-plate-ohms = /bits/ 16 40;
+   ti,pressure-max = /bits/ 16 255;
+   ti,swap-xy;
+   linux,wakeup;
+   };
+};
--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+  

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-05-05 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [140430 10:48]:
 * Joachim Eastwood manab...@gmail.com [140429 18:08]:
  On 30 April 2014 01:52, Tony Lindgren t...@atomide.com wrote:
   Looks like quite a few omaps have sharp ls037v7dw01 that's configured
   as various panel dpi entries for whatever legacy reasons. For device
   tree based support, let's just configure these properly for panel
   ls037v7dw01 instead of panel dpi.
  
   This patch creates a common file for panel ls037v7dw01, and makes
   boards ldp and omap3-evm to use it. The panel for ldp is configured
   in the qvga mode and omap3-evm panel in vga mode.
  
   The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
   controller for the omaps, so let's add a basic configuration for
   the touchscreen also using the default values.
  
   Note that we can now remove the regulator-name = vdds_dsi
   entry for ldp, that's no longer needed as we have the entry
   for vdds_dsi-supply = vpll2.
  
   Signed-off-by: Tony Lindgren t...@atomide.com
   ---
.../arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi | 82 
   ++
arch/arm/boot/dts/omap3-evm-37xx.dts   | 50 +
arch/arm/boot/dts/omap3-evm-common.dtsi| 47 +
arch/arm/boot/dts/omap3-ldp.dts| 31 ++--
4 files changed, 205 insertions(+), 5 deletions(-)
create mode 100644 arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
  
   diff --git a/arch/arm/boot/dts/omap3-ldp.dts 
   b/arch/arm/boot/dts/omap3-ldp.dts
   index 0abe986..50fdac9 100644
   --- a/arch/arm/boot/dts/omap3-ldp.dts
   +++ b/arch/arm/boot/dts/omap3-ldp.dts
   @@ -164,6 +164,7 @@
  
#include twl4030.dtsi
#include twl4030_omap3.dtsi
   +#include omap-panel-sharp-ls037v7dw01.dtsi
  
i2c2 {
   clock-frequency = 40;
   @@ -173,6 +174,31 @@
   clock-frequency = 40;
};
  
   +lcd_3v3 {
   +   gpio = twl_gpio 7 GPIO_ACTIVE_HIGH;
   +   enable-active-high;
   +};
   +
   +lcd0 {
   +   reset-gpios = gpio2 23 GPIO_ACTIVE_HIGH; /* gpio55, lcd 
   RESB */
   +   gpios = gpio2 24 GPIO_ACTIVE_LOW  /* gpio56, lcd MO */
  
  enable-gpios ?
 
 Oops yes, changed from gpios to enable-gpios while reading the panel
 binding doc, probably forgot to commit the change, will update.

Here's an updated version of this one.

Tony


From: Tony Lindgren t...@atomide.com
Date: Mon, 28 Apr 2014 20:22:21 -0700
Subject: [PATCH] ARM: dts: Add LCD panel sharp ls037v7dw01 support for 
omap3-evm and ldp

Looks like quite a few omaps have sharp ls037v7dw01 that's configured
as various panel dpi entries for whatever legacy reasons. For device
tree based support, let's just configure these properly for panel
ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com

diff --git a/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi 
b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
new file mode 100644
index 000..f5252da
--- /dev/null
+++ b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
@@ -0,0 +1,82 @@
+/*
+ * Common file for omap dpi panels with QVGA and reset pins
+ *
+ * Note that the board specifc DTS file needs to specify
+ * at minimum the GPIO enable-gpios for display, and
+ * gpios for gpio-backlight.
+ */
+
+/ {
+   aliases {
+   display0 = lcd0;
+   };
+
+   backlight0: backlight {
+   compatible = gpio-backlight;
+   };
+
+   /* 3.3V GPIO controlled regulator for LCD_ENVDD */
+   lcd_3v3: regulator-lcd-3v3 {
+   compatible = regulator-fixed;
+   regulator-name = lcd_3v3;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   startup-delay-us = 7;
+   regulator-always-on;
+   };
+
+   lcd0: display {
+   compatible = sharp,ls037v7dw01;
+   label = lcd;
+   power-supply = lcd_3v3;
+   panel-timing {
+   clock-frequency = 540;
+   hback-porch = 39;
+   hactive = 240;
+   hfront-porch = 3;
+   hsync-len = 3;
+   vback-porch = 7;
+   vactive = 320;
+   vfront-porch = 2;
+   vsync-len = 1;
+   hsync-active = 0;
+   vsync-active = 0;
+

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-04-30 Thread Tony Lindgren
* Joachim Eastwood manab...@gmail.com [140429 18:08]:
 On 30 April 2014 01:52, Tony Lindgren t...@atomide.com wrote:
  Looks like quite a few omaps have sharp ls037v7dw01 that's configured
  as various panel dpi entries for whatever legacy reasons. For device
  tree based support, let's just configure these properly for panel
  ls037v7dw01 instead of panel dpi.
 
  This patch creates a common file for panel ls037v7dw01, and makes
  boards ldp and omap3-evm to use it. The panel for ldp is configured
  in the qvga mode and omap3-evm panel in vga mode.
 
  The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
  controller for the omaps, so let's add a basic configuration for
  the touchscreen also using the default values.
 
  Note that we can now remove the regulator-name = vdds_dsi
  entry for ldp, that's no longer needed as we have the entry
  for vdds_dsi-supply = vpll2.
 
  Signed-off-by: Tony Lindgren t...@atomide.com
  ---
   .../arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi | 82 
  ++
   arch/arm/boot/dts/omap3-evm-37xx.dts   | 50 +
   arch/arm/boot/dts/omap3-evm-common.dtsi| 47 +
   arch/arm/boot/dts/omap3-ldp.dts| 31 ++--
   4 files changed, 205 insertions(+), 5 deletions(-)
   create mode 100644 arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
 
  diff --git a/arch/arm/boot/dts/omap3-ldp.dts 
  b/arch/arm/boot/dts/omap3-ldp.dts
  index 0abe986..50fdac9 100644
  --- a/arch/arm/boot/dts/omap3-ldp.dts
  +++ b/arch/arm/boot/dts/omap3-ldp.dts
  @@ -164,6 +164,7 @@
 
   #include twl4030.dtsi
   #include twl4030_omap3.dtsi
  +#include omap-panel-sharp-ls037v7dw01.dtsi
 
   i2c2 {
  clock-frequency = 40;
  @@ -173,6 +174,31 @@
  clock-frequency = 40;
   };
 
  +lcd_3v3 {
  +   gpio = twl_gpio 7 GPIO_ACTIVE_HIGH;
  +   enable-active-high;
  +};
  +
  +lcd0 {
  +   reset-gpios = gpio2 23 GPIO_ACTIVE_HIGH; /* gpio55, lcd RESB 
  */
  +   gpios = gpio2 24 GPIO_ACTIVE_LOW  /* gpio56, lcd MO */
 
 enable-gpios ?

Oops yes, changed from gpios to enable-gpios while reading the panel
binding doc, probably forgot to commit the change, will update.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-04-29 Thread Tony Lindgren
Looks like quite a few omaps have sharp ls037v7dw01 that's configured
as various panel dpi entries for whatever legacy reasons. For device
tree based support, let's just configure these properly for panel
ls037v7dw01 instead of panel dpi.

This patch creates a common file for panel ls037v7dw01, and makes
boards ldp and omap3-evm to use it. The panel for ldp is configured
in the qvga mode and omap3-evm panel in vga mode.

The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
controller for the omaps, so let's add a basic configuration for
the touchscreen also using the default values.

Note that we can now remove the regulator-name = vdds_dsi
entry for ldp, that's no longer needed as we have the entry
for vdds_dsi-supply = vpll2.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 .../arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi | 82 ++
 arch/arm/boot/dts/omap3-evm-37xx.dts   | 50 +
 arch/arm/boot/dts/omap3-evm-common.dtsi| 47 +
 arch/arm/boot/dts/omap3-ldp.dts| 31 ++--
 4 files changed, 205 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi

diff --git a/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi 
b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
new file mode 100644
index 000..f5252da
--- /dev/null
+++ b/arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi
@@ -0,0 +1,82 @@
+/*
+ * Common file for omap dpi panels with QVGA and reset pins
+ *
+ * Note that the board specifc DTS file needs to specify
+ * at minimum the GPIO enable-gpios for display, and
+ * gpios for gpio-backlight.
+ */
+
+/ {
+   aliases {
+   display0 = lcd0;
+   };
+
+   backlight0: backlight {
+   compatible = gpio-backlight;
+   };
+
+   /* 3.3V GPIO controlled regulator for LCD_ENVDD */
+   lcd_3v3: regulator-lcd-3v3 {
+   compatible = regulator-fixed;
+   regulator-name = lcd_3v3;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   startup-delay-us = 7;
+   regulator-always-on;
+   };
+
+   lcd0: display {
+   compatible = sharp,ls037v7dw01;
+   label = lcd;
+   power-supply = lcd_3v3;
+   panel-timing {
+   clock-frequency = 540;
+   hback-porch = 39;
+   hactive = 240;
+   hfront-porch = 3;
+   hsync-len = 3;
+   vback-porch = 7;
+   vactive = 320;
+   vfront-porch = 2;
+   vsync-len = 1;
+   hsync-active = 0;
+   vsync-active = 0;
+   de-active = 1;
+   pixelclk-active = 1;
+   };
+
+   port {
+   lcd_in: endpoint {
+   remote-endpoint = dpi_out;
+   };
+   };
+   };
+};
+
+dss {
+   status = ok;
+   vdds_dsi-supply = vpll2;
+   port {
+   dpi_out: endpoint {
+   remote-endpoint = lcd_in;
+   data-lines = 18;
+   };
+   };
+};
+
+mcspi1 {
+   tsc2046@0 {
+   reg = 0;  /* CS0 */
+   compatible = ti,tsc2046;
+   spi-max-frequency = 100;
+   vcc-supply = lcd_3v3;
+   ti,x-min = /bits/ 16 0;
+   ti,x-max = /bits/ 16 8000;
+   ti,y-min = /bits/ 16 0;
+   ti,y-max = /bits/ 16 4800;
+   ti,x-plate-ohms = /bits/ 16 40;
+   ti,pressure-max = /bits/ 16 255;
+   ti,swap-xy;
+   linux,wakeup;
+   };
+};
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts 
b/arch/arm/boot/dts/omap3-evm-37xx.dts
index 4df68ad..a181e30 100644
--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -26,7 +26,44 @@
};
 };
 
+dss {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   dss_dpi_pins1
+   dss_dpi_pins2
+   ;
+};
+
 omap3_pmx_core {
+   dss_dpi_pins1: pinmux_dss_dpi_pins2 {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* 
dss_pclk.dss_pclk */
+   OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* 
dss_hsync.dss_hsync */
+   OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_vsync.dss_vsync */
+   OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+
+   OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* 
dss_data6.dss_data6 */
+   OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | 

Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp

2014-04-29 Thread Joachim Eastwood
On 30 April 2014 01:52, Tony Lindgren t...@atomide.com wrote:
 Looks like quite a few omaps have sharp ls037v7dw01 that's configured
 as various panel dpi entries for whatever legacy reasons. For device
 tree based support, let's just configure these properly for panel
 ls037v7dw01 instead of panel dpi.

 This patch creates a common file for panel ls037v7dw01, and makes
 boards ldp and omap3-evm to use it. The panel for ldp is configured
 in the qvga mode and omap3-evm panel in vga mode.

 The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen
 controller for the omaps, so let's add a basic configuration for
 the touchscreen also using the default values.

 Note that we can now remove the regulator-name = vdds_dsi
 entry for ldp, that's no longer needed as we have the entry
 for vdds_dsi-supply = vpll2.

 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  .../arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi | 82 
 ++
  arch/arm/boot/dts/omap3-evm-37xx.dts   | 50 +
  arch/arm/boot/dts/omap3-evm-common.dtsi| 47 +
  arch/arm/boot/dts/omap3-ldp.dts| 31 ++--
  4 files changed, 205 insertions(+), 5 deletions(-)
  create mode 100644 arch/arm/boot/dts/omap-panel-sharp-ls037v7dw01.dtsi

 diff --git a/arch/arm/boot/dts/omap3-ldp.dts b/arch/arm/boot/dts/omap3-ldp.dts
 index 0abe986..50fdac9 100644
 --- a/arch/arm/boot/dts/omap3-ldp.dts
 +++ b/arch/arm/boot/dts/omap3-ldp.dts
 @@ -164,6 +164,7 @@

  #include twl4030.dtsi
  #include twl4030_omap3.dtsi
 +#include omap-panel-sharp-ls037v7dw01.dtsi

  i2c2 {
 clock-frequency = 40;
 @@ -173,6 +174,31 @@
 clock-frequency = 40;
  };

 +lcd_3v3 {
 +   gpio = twl_gpio 7 GPIO_ACTIVE_HIGH;
 +   enable-active-high;
 +};
 +
 +lcd0 {
 +   reset-gpios = gpio2 23 GPIO_ACTIVE_HIGH; /* gpio55, lcd RESB */
 +   gpios = gpio2 24 GPIO_ACTIVE_LOW  /* gpio56, lcd MO */

enable-gpios ?

 +0  /* lcd LR */
 +0  /* lcd UD */
 +0;/* lcd INI */
 +};

regards
Joachim Eastwood
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html