linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] OMAP: DSS2: Add new display panel
@ 2010-10-28 14:43 Enric Balletbo i Serra
  2010-10-28 14:43 ` [PATCH 1/2] OMAP: DSS2: Add Powertip PH480272T " Enric Balletbo i Serra
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-28 14:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Next patches adds support for the two new LCD panel display used
on IGEP boards.

 Powertip PH480272T LCD 4.3inch (480x242) display
 Seiko 70WVW1TZ3 LCD 7.0inch WVGA (800x480) display

Please, consider adding in next merge window.

Cheers,

Enric Balletbo i Serra (2):
  OMAP: DSS2: Add Powertip PH480272T display panel
  OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel

 drivers/video/omap2/displays/Kconfig               |   14 ++
 drivers/video/omap2/displays/Makefile              |    2 +
 .../omap2/displays/panel-powertip-ph480272t.c      |  155 +++++++++++++++++++
 .../video/omap2/displays/panel-seiko-70wvw1tz3.c   |  157 ++++++++++++++++++++
 4 files changed, 328 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-powertip-ph480272t.c
 create mode 100644 drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c

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

* [PATCH 1/2] OMAP: DSS2: Add Powertip PH480272T display panel
  2010-10-28 14:43 [PATCH 0/2] OMAP: DSS2: Add new display panel Enric Balletbo i Serra
@ 2010-10-28 14:43 ` Enric Balletbo i Serra
  2010-10-28 14:43 ` [PATCH 2/2] OMAP: DSS2: Add Seiko 70WVW1TZ3 " Enric Balletbo i Serra
  2010-11-01 14:15 ` [PATCH 0/2] OMAP: DSS2: Add new " Tomi Valkeinen
  2 siblings, 0 replies; 6+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-28 14:43 UTC (permalink / raw)
  To: linux-arm-kernel

From: Enric Balletbo i Serra <eballetbo@iseebcn.com>

Add new Powertip PH480242T panel, a LCD 4.3inch (480x242) display
type with 24-bit RGB interface.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
 drivers/video/omap2/displays/Kconfig               |    7 +
 drivers/video/omap2/displays/Makefile              |    1 +
 .../omap2/displays/panel-powertip-ph480272t.c      |  155 ++++++++++++++++++++
 3 files changed, 163 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-powertip-ph480272t.c

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 12327bb..c3aa478 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -44,4 +44,11 @@ config PANEL_ACX565AKM
 	select BACKLIGHT_CLASS_DEVICE
 	help
 	  This is the LCD panel used on Nokia N900
+
+config PANEL_POWERTIP_PH480272T
+	tristate "Powertip PH480272T LCD Panel"
+	depends on OMAP2_DSS
+	select BACKLIGHT_CLASS_DEVICE
+        help
+          LCD Panel used in IGEP boards.
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index aa38609..3967dbc 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
 obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
 obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
 obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
+obj-$(CONFIG_PANEL_POWERTIP_PH480272T) += panel-powertip-ph480272t.o
diff --git a/drivers/video/omap2/displays/panel-powertip-ph480272t.c b/drivers/video/omap2/displays/panel-powertip-ph480272t.c
new file mode 100644
index 0000000..d303180
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-powertip-ph480272t.c
@@ -0,0 +1,155 @@
+/*
+ * LCD panel driver for Powertip PH480272T
+ *
+ * Copyright (C) 2010, ISEE 2007 SL
+ * Author: Enric Balletbo i Serra <eballetbo@iseebcn.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/err.h>
+
+#include <plat/display.h>
+
+static struct omap_video_timings ph480272t_timings = {
+	.x_res		= 480,
+	.y_res		= 272,
+	.pixel_clock	= 9000,
+	.hsw		= 40,
+	.hfp		= 2,
+	.hbp		= 2,
+	.vsw		= 10,
+	.vfp            = 2,
+	.vbp            = 2,
+};
+
+static int ph480272t_power_on(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	r = omapdss_dpi_display_enable(dssdev);
+	if (r)
+		goto err0;
+
+	/* wait couple of vsyncs until enabling the LCD */
+	msleep(50);
+
+	if (dssdev->platform_enable) {
+		r = dssdev->platform_enable(dssdev);
+		if (r)
+			goto err1;
+	}
+
+	return 0;
+err1:
+	omapdss_dpi_display_disable(dssdev);
+err0:
+	return r;
+}
+
+static void ph480272t_power_off(struct omap_dss_device *dssdev)
+{
+	if (dssdev->platform_disable)
+		dssdev->platform_disable(dssdev);
+
+	/* wait at least 5 vsyncs after disabling the LCD */
+	msleep(100);
+
+	omapdss_dpi_display_disable(dssdev);
+}
+
+static int ph480272t_probe(struct omap_dss_device *dssdev)
+{
+
+	dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+		OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO;
+
+	dssdev->panel.acb = 0x0;
+	dssdev->panel.timings = ph480272t_timings;
+
+	return 0;
+}
+
+static void ph480272t_remove(struct omap_dss_device *dssdev)
+{
+}
+
+static int ph480272t_enable(struct omap_dss_device *dssdev)
+{
+	int r = 0;
+
+	r = ph480272t_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
+}
+
+static void ph480272t_disable(struct omap_dss_device *dssdev)
+{
+	ph480272t_power_off(dssdev);
+
+	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int ph480272t_suspend(struct omap_dss_device *dssdev)
+{
+	ph480272t_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
+	return 0;
+}
+
+static int ph480272t_resume(struct omap_dss_device *dssdev)
+{
+	int r = 0;
+
+	r = ph480272t_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
+}
+
+static struct omap_dss_driver ph480272t_driver = {
+	.probe		= ph480272t_probe,
+	.remove		= ph480272t_remove,
+	.enable		= ph480272t_enable,
+	.disable	= ph480272t_disable,
+	.suspend	= ph480272t_suspend,
+	.resume		= ph480272t_resume,
+	.driver         = {
+		.name   = "ph480272t",
+		.owner  = THIS_MODULE,
+	},
+};
+
+static int __init ph480272t_init(void)
+{
+	return omap_dss_register_driver(&ph480272t_driver);
+}
+
+static void __exit ph480272t_exit(void)
+{
+	omap_dss_unregister_driver(&ph480272t_driver);
+}
+
+module_init(ph480272t_init);
+module_exit(ph480272t_exit);
+MODULE_LICENSE("GPL");
-- 
1.7.0.4

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

* [PATCH 2/2] OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel
  2010-10-28 14:43 [PATCH 0/2] OMAP: DSS2: Add new display panel Enric Balletbo i Serra
  2010-10-28 14:43 ` [PATCH 1/2] OMAP: DSS2: Add Powertip PH480272T " Enric Balletbo i Serra
@ 2010-10-28 14:43 ` Enric Balletbo i Serra
  2010-11-01 14:15 ` [PATCH 0/2] OMAP: DSS2: Add new " Tomi Valkeinen
  2 siblings, 0 replies; 6+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-28 14:43 UTC (permalink / raw)
  To: linux-arm-kernel

From: Enric Balletbo i Serra <eballetbo@iseebcn.com>

Add new Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display
type with 24-bit RGB interface and Touch-Panel

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
 drivers/video/omap2/displays/Kconfig               |    7 +
 drivers/video/omap2/displays/Makefile              |    1 +
 .../video/omap2/displays/panel-seiko-70wvw1tz3.c   |  157 ++++++++++++++++++++
 3 files changed, 165 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index c3aa478..d8e580b 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -51,4 +51,11 @@ config PANEL_POWERTIP_PH480272T
 	select BACKLIGHT_CLASS_DEVICE
         help
           LCD Panel used in IGEP boards.
+
+config PANEL_SEIKO_70WVW1TZ3
+	tristate "Seiko 70WVW1TZ3 LCD Panel"
+	depends on OMAP2_DSS
+	select BACKLIGHT_CLASS_DEVICE
+        help
+          7.0 inch LCD Panel used in IGEP boards.
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index 3967dbc..75e888e 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
 obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
 obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
 obj-$(CONFIG_PANEL_POWERTIP_PH480272T) += panel-powertip-ph480272t.o
+obj-$(CONFIG_PANEL_SEIKO_70WVW1TZ3) += panel-seiko-70wvw1tz3.o
diff --git a/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c b/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c
new file mode 100644
index 0000000..0083d54
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c
@@ -0,0 +1,157 @@
+/*
+ * LCD panel driver for Seiko 70wvw1tz3Z3
+ *
+ * Copyright (C) 2010, ISEE 2007 SL
+ * Author: Enric Balletbo i Serra <eballetbo@iseebcn.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/err.h>
+
+#include <plat/display.h>
+
+static struct omap_video_timings s70wvw1tz3_timings = {
+	.x_res = 800,
+	.y_res = 480,
+	.pixel_clock	= 33000,
+	.hsw		= 128,
+	.hfp		= 10,
+	.hbp		= 10,
+	.vsw		= 2,
+	.vfp		= 4,
+	.vbp		= 11,
+};
+
+static int s70wvw1tz3_panel_power_on(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	r = omapdss_dpi_display_enable(dssdev);
+	if (r)
+		goto err0;
+
+	/* wait couple of vsyncs until enabling the LCD */
+	msleep(50);
+
+	if (dssdev->platform_enable) {
+		r = dssdev->platform_enable(dssdev);
+		if (r)
+			goto err1;
+	}
+
+	return 0;
+err1:
+	omapdss_dpi_display_disable(dssdev);
+err0:
+	return r;
+}
+
+static void s70wvw1tz3_panel_power_off(struct omap_dss_device *dssdev)
+{
+	if (dssdev->platform_disable)
+		dssdev->platform_disable(dssdev);
+
+	/* wait at least 5 vsyncs after disabling the LCD */
+	msleep(100);
+
+	omapdss_dpi_display_disable(dssdev);
+}
+
+static int s70wvw1tz3_panel_probe(struct omap_dss_device *dssdev)
+{
+	dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+		OMAP_DSS_LCD_IHS;
+
+	dssdev->panel.acb = 0x0;
+	dssdev->panel.timings = s70wvw1tz3_timings;
+
+	return 0;
+}
+
+static void s70wvw1tz3_panel_remove(struct omap_dss_device *dssdev)
+{
+}
+
+static int s70wvw1tz3_panel_enable(struct omap_dss_device *dssdev)
+{
+	int r = 0;
+
+	r = s70wvw1tz3_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
+}
+
+static void s70wvw1tz3_panel_disable(struct omap_dss_device *dssdev)
+{
+	s70wvw1tz3_panel_power_off(dssdev);
+
+	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int s70wvw1tz3_panel_suspend(struct omap_dss_device *dssdev)
+{
+	s70wvw1tz3_panel_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
+
+	return 0;
+}
+
+static int s70wvw1tz3_panel_resume(struct omap_dss_device *dssdev)
+{
+	int r = 0;
+
+	r = s70wvw1tz3_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
+}
+
+static struct omap_dss_driver s70wvw1tz3_driver = {
+	.probe		= s70wvw1tz3_panel_probe,
+	.remove		= s70wvw1tz3_panel_remove,
+
+	.enable		= s70wvw1tz3_panel_enable,
+	.disable	= s70wvw1tz3_panel_disable,
+	.suspend	= s70wvw1tz3_panel_suspend,
+	.resume		= s70wvw1tz3_panel_resume,
+
+	.driver         = {
+		.name   = "70wvw1tz3",
+		.owner  = THIS_MODULE,
+	},
+};
+
+static int __init s70wvw1tz3_init(void)
+{
+	return omap_dss_register_driver(&s70wvw1tz3_driver);
+}
+
+static void __exit s70wvw1tz3_exit(void)
+{
+	omap_dss_unregister_driver(&s70wvw1tz3_driver);
+}
+
+module_init(s70wvw1tz3_init);
+module_exit(s70wvw1tz3_exit);
+MODULE_LICENSE("GPL");
-- 
1.7.0.4

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

* [PATCH 0/2] OMAP: DSS2: Add new display panel
  2010-10-28 14:43 [PATCH 0/2] OMAP: DSS2: Add new display panel Enric Balletbo i Serra
  2010-10-28 14:43 ` [PATCH 1/2] OMAP: DSS2: Add Powertip PH480272T " Enric Balletbo i Serra
  2010-10-28 14:43 ` [PATCH 2/2] OMAP: DSS2: Add Seiko 70WVW1TZ3 " Enric Balletbo i Serra
@ 2010-11-01 14:15 ` Tomi Valkeinen
  2010-11-01 16:45   ` Bryan Wu
  2 siblings, 1 reply; 6+ messages in thread
From: Tomi Valkeinen @ 2010-11-01 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, 2010-10-28 at 16:43 +0200, ext Enric Balletbo i Serra wrote:
> Hi,
> 
> Next patches adds support for the two new LCD panel display used
> on IGEP boards.
> 
>  Powertip PH480272T LCD 4.3inch (480x242) display
>  Seiko 70WVW1TZ3 LCD 7.0inch WVGA (800x480) display
> 
> Please, consider adding in next merge window.
> 
> Cheers,
> 
> Enric Balletbo i Serra (2):
>   OMAP: DSS2: Add Powertip PH480272T display panel
>   OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel

These both are "dummy" panels, and the driver is basically a copy of the
existing drivers. I don't think I will merge any more of these, sorry.

What we need is a common driver for all these dummy panels, and the
driver would contain configurations for all the supported panels. The
board file would pass the name of the panel used in that board to the
driver, and the driver would use the configurations for that panel.

This has been discussed a few times in l-o list, but I haven't found
time to implement it and nobody else has done it either.

 Tomi

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

* [PATCH 0/2] OMAP: DSS2: Add new display panel
  2010-11-01 14:15 ` [PATCH 0/2] OMAP: DSS2: Add new " Tomi Valkeinen
@ 2010-11-01 16:45   ` Bryan Wu
  2010-11-02  9:19     ` Tomi Valkeinen
  0 siblings, 1 reply; 6+ messages in thread
From: Bryan Wu @ 2010-11-01 16:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 1, 2010 at 10:15 AM, Tomi Valkeinen
<tomi.valkeinen@nokia.com> wrote:
> Hi,
>
> On Thu, 2010-10-28 at 16:43 +0200, ext Enric Balletbo i Serra wrote:
>> Hi,
>>
>> Next patches adds support for the two new LCD panel display used
>> on IGEP boards.
>>
>> ?Powertip PH480272T LCD 4.3inch (480x242) display
>> ?Seiko 70WVW1TZ3 LCD 7.0inch WVGA (800x480) display
>>
>> Please, consider adding in next merge window.
>>
>> Cheers,
>>
>> Enric Balletbo i Serra (2):
>> ? OMAP: DSS2: Add Powertip PH480272T display panel
>> ? OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel
>
> These both are "dummy" panels, and the driver is basically a copy of the
> existing drivers. I don't think I will merge any more of these, sorry.
>
> What we need is a common driver for all these dummy panels, and the
> driver would contain configurations for all the supported panels. The
> board file would pass the name of the panel used in that board to the
> driver, and the driver would use the configurations for that panel.
>

It looks like that we just need one file name displays.c to do those
generic things and pass the configuration from board files to this
driver, such as timing or other things.

> This has been discussed a few times in l-o list, but I haven't found
> time to implement it and nobody else has done it either.
>

I'm quite happy to do this, thanks,

-- 
Bryan Wu <bryan.wu@canonical.com>
Kernel Developer ? ?+86.138-1617-6545 Mobile
Ubuntu Kernel Team
Canonical Ltd. ? ? ?www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com

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

* [PATCH 0/2] OMAP: DSS2: Add new display panel
  2010-11-01 16:45   ` Bryan Wu
@ 2010-11-02  9:19     ` Tomi Valkeinen
  0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2010-11-02  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2010-11-01 at 17:45 +0100, ext Bryan Wu wrote:
> On Mon, Nov 1, 2010 at 10:15 AM, Tomi Valkeinen
> <tomi.valkeinen@nokia.com> wrote:

> > What we need is a common driver for all these dummy panels, and the
> > driver would contain configurations for all the supported panels. The
> > board file would pass the name of the panel used in that board to the
> > driver, and the driver would use the configurations for that panel.
> >
> 
> It looks like that we just need one file name displays.c to do those
> generic things and pass the configuration from board files to this
> driver, such as timing or other things.

Not quite. If you pass timing information from the board files then
every board file has to define all the timings, even if they are using
the same panel.

That's why the configs should be in the panel driver, and the board file
only has to define which panel is actually connected.

> > This has been discussed a few times in l-o list, but I haven't found
> > time to implement it and nobody else has done it either.
> >
> 
> I'm quite happy to do this, thanks,

Thanks, I appreciate that.

 Tomi

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

end of thread, other threads:[~2010-11-02  9:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 14:43 [PATCH 0/2] OMAP: DSS2: Add new display panel Enric Balletbo i Serra
2010-10-28 14:43 ` [PATCH 1/2] OMAP: DSS2: Add Powertip PH480272T " Enric Balletbo i Serra
2010-10-28 14:43 ` [PATCH 2/2] OMAP: DSS2: Add Seiko 70WVW1TZ3 " Enric Balletbo i Serra
2010-11-01 14:15 ` [PATCH 0/2] OMAP: DSS2: Add new " Tomi Valkeinen
2010-11-01 16:45   ` Bryan Wu
2010-11-02  9:19     ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).