All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-03-23  9:56 ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

These patches get the N900 LCD panel working.
Apply's cleanly on 2.6.34-rc2

Pre-requisites:
https://patchwork.kernel.org/patch/86318/
https://patchwork.kernel.org/patch/86319/
https://patchwork.kernel.org/patch/86320/

---
Roger Quadros (5):
  OMAP: RX51: Add LCD Panel support
  OMAP: RX51: Add "vdds_sdi" supply voltage for SDI
  OMAP: RX51: Add Touch Controller in SPI board info
  OMAP: DSS2: Add ACX565AKM Panel Driver
  OMAP: RX51: Add LCD Panel and framebuffer console to defconfig

 arch/arm/configs/rx51_defconfig                |   37 ++-
 arch/arm/mach-omap2/Makefile                   |    1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c   |   43 ++
 arch/arm/mach-omap2/board-rx51-video.c         |   95 ++++
 drivers/video/omap2/displays/Kconfig           |    5 +
 drivers/video/omap2/displays/Makefile          |    1 +
 drivers/video/omap2/displays/panel-acx565akm.c |  551 ++++++++++++++++++++++++
 7 files changed, 732 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
 create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c


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

* [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-03-23  9:56 ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

These patches get the N900 LCD panel working.
Apply's cleanly on 2.6.34-rc2

Pre-requisites:
https://patchwork.kernel.org/patch/86318/
https://patchwork.kernel.org/patch/86319/
https://patchwork.kernel.org/patch/86320/

---
Roger Quadros (5):
  OMAP: RX51: Add LCD Panel support
  OMAP: RX51: Add "vdds_sdi" supply voltage for SDI
  OMAP: RX51: Add Touch Controller in SPI board info
  OMAP: DSS2: Add ACX565AKM Panel Driver
  OMAP: RX51: Add LCD Panel and framebuffer console to defconfig

 arch/arm/configs/rx51_defconfig                |   37 ++-
 arch/arm/mach-omap2/Makefile                   |    1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c   |   43 ++
 arch/arm/mach-omap2/board-rx51-video.c         |   95 ++++
 drivers/video/omap2/displays/Kconfig           |    5 +
 drivers/video/omap2/displays/Makefile          |    1 +
 drivers/video/omap2/displays/panel-acx565akm.c |  551 ++++++++++++++++++++++++
 7 files changed, 732 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
 create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c


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

* [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23  9:56 ` Roger Quadros
@ 2010-03-23  9:56   ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

Adds basic support for LCD Panel on Nokia N900

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/Makefile                 |    1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
 arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-rx51-video.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4b9fc57..b03cbb4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		+= board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
 					   board-rx51-sdram.o \
 					   board-rx51-peripherals.o \
+					   board-rx51-video.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
 					   board-zoom-peripherals.o \
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 4377a4c..f404537 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -45,6 +45,7 @@
 /* list all spi devices here */
 enum {
 	RX51_SPI_WL1251,
+	RX51_SPI_MIPID,		/* LCD panel */
 };
 
 static struct wl12xx_platform_data wl1251_pdata;
@@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
 	.single_channel	= 1,
 };
 
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,
+};
+
 static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 	[RX51_SPI_WL1251] = {
 		.modalias		= "wl1251",
@@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 		.controller_data	= &wl1251_mcspi_config,
 		.platform_data		= &wl1251_pdata,
 	},
+	[RX51_SPI_MIPID] = {
+		.modalias		= "acx565akm",
+		.bus_num		= 1,
+		.chip_select		= 2,
+		.max_speed_hz		= 6000000,
+		.controller_data	= &mipid_mcspi_config,
+	},
 };
 
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
new file mode 100644
index 0000000..e3e22a8
--- /dev/null
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -0,0 +1,95 @@
+/*
+ * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
+ *
+ * Copyright (C) 2010 Nokia
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/spi/spi.h>
+
+#include <asm/mach-types.h>
+#include <plat/mux.h>
+#include <plat/display.h>
+#include <plat/mcspi.h>
+
+#include "mux.h"
+
+#define RX51_LCD_RESET_GPIO	90
+
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+
+static int rx51_lcd_enable(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(dssdev->reset_gpio, 1);
+	return 0;
+}
+
+static void rx51_lcd_disable(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(dssdev->reset_gpio, 0);
+}
+
+static struct omap_dss_device rx51_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "panel-acx565akm",
+	.type			= OMAP_DISPLAY_TYPE_SDI,
+	.phy.sdi.datapairs	= 2,
+	.reset_gpio		= RX51_LCD_RESET_GPIO,
+	.platform_enable	= rx51_lcd_enable,
+	.platform_disable	= rx51_lcd_disable,
+};
+
+static struct omap_dss_device *rx51_dss_devices[] = {
+	&rx51_lcd_device,
+};
+
+static struct omap_dss_board_info rx51_dss_board_info = {
+	.num_devices	= ARRAY_SIZE(rx51_dss_devices),
+	.devices	= rx51_dss_devices,
+	.default_device	= &rx51_lcd_device,
+};
+
+struct platform_device rx51_display_device = {
+	.name	= "omapdss",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &rx51_dss_board_info,
+	},
+};
+
+static struct platform_device *rx51_video_devices[] __initdata = {
+	&rx51_display_device,
+};
+
+static int __init rx51_video_init(void)
+{
+	if (!machine_is_nokia_rx51())
+		return 0;
+
+	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
+		pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
+		return 0;
+	}
+
+	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
+		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
+		return 0;
+	}
+
+	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
+
+	platform_add_devices(rx51_video_devices,
+				ARRAY_SIZE(rx51_video_devices));
+	return 0;
+}
+
+subsys_initcall(rx51_video_init);
+
+#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
-- 
1.6.0.4


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

* [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23  9:56   ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

Adds basic support for LCD Panel on Nokia N900

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/Makefile                 |    1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
 arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-rx51-video.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4b9fc57..b03cbb4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		+= board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
 					   board-rx51-sdram.o \
 					   board-rx51-peripherals.o \
+					   board-rx51-video.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
 					   board-zoom-peripherals.o \
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 4377a4c..f404537 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -45,6 +45,7 @@
 /* list all spi devices here */
 enum {
 	RX51_SPI_WL1251,
+	RX51_SPI_MIPID,		/* LCD panel */
 };
 
 static struct wl12xx_platform_data wl1251_pdata;
@@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
 	.single_channel	= 1,
 };
 
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,
+};
+
 static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 	[RX51_SPI_WL1251] = {
 		.modalias		= "wl1251",
@@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 		.controller_data	= &wl1251_mcspi_config,
 		.platform_data		= &wl1251_pdata,
 	},
+	[RX51_SPI_MIPID] = {
+		.modalias		= "acx565akm",
+		.bus_num		= 1,
+		.chip_select		= 2,
+		.max_speed_hz		= 6000000,
+		.controller_data	= &mipid_mcspi_config,
+	},
 };
 
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
new file mode 100644
index 0000000..e3e22a8
--- /dev/null
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -0,0 +1,95 @@
+/*
+ * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
+ *
+ * Copyright (C) 2010 Nokia
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/spi/spi.h>
+
+#include <asm/mach-types.h>
+#include <plat/mux.h>
+#include <plat/display.h>
+#include <plat/mcspi.h>
+
+#include "mux.h"
+
+#define RX51_LCD_RESET_GPIO	90
+
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+
+static int rx51_lcd_enable(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(dssdev->reset_gpio, 1);
+	return 0;
+}
+
+static void rx51_lcd_disable(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(dssdev->reset_gpio, 0);
+}
+
+static struct omap_dss_device rx51_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "panel-acx565akm",
+	.type			= OMAP_DISPLAY_TYPE_SDI,
+	.phy.sdi.datapairs	= 2,
+	.reset_gpio		= RX51_LCD_RESET_GPIO,
+	.platform_enable	= rx51_lcd_enable,
+	.platform_disable	= rx51_lcd_disable,
+};
+
+static struct omap_dss_device *rx51_dss_devices[] = {
+	&rx51_lcd_device,
+};
+
+static struct omap_dss_board_info rx51_dss_board_info = {
+	.num_devices	= ARRAY_SIZE(rx51_dss_devices),
+	.devices	= rx51_dss_devices,
+	.default_device	= &rx51_lcd_device,
+};
+
+struct platform_device rx51_display_device = {
+	.name	= "omapdss",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &rx51_dss_board_info,
+	},
+};
+
+static struct platform_device *rx51_video_devices[] __initdata = {
+	&rx51_display_device,
+};
+
+static int __init rx51_video_init(void)
+{
+	if (!machine_is_nokia_rx51())
+		return 0;
+
+	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
+		pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
+		return 0;
+	}
+
+	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
+		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
+		return 0;
+	}
+
+	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
+
+	platform_add_devices(rx51_video_devices,
+				ARRAY_SIZE(rx51_video_devices));
+	return 0;
+}
+
+subsys_initcall(rx51_video_init);
+
+#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
-- 
1.6.0.4


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

* [PATCH 2/5] OMAP: RX51: Add "vdds_sdi" supply voltage for SDI
  2010-03-23  9:56   ` Roger Quadros
@ 2010-03-23  9:56     ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

The SDI Display subsystem needs access to the vdds_sdi supply
regulator. This is TWL4030's VAUX1 supply on RX-51.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index f404537..3ef805e 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -300,6 +300,19 @@ static struct regulator_consumer_supply rx51_vsim_supply = {
 	.dev_name = "mmci-omap-hs.1",
 };
 
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+extern struct platform_device rx51_display_device;
+#endif
+
+static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+	{
+		.supply	= "vdds_sdi",
+		.dev	= &rx51_display_device.dev,
+	},
+#endif
+};
+
 static struct regulator_init_data rx51_vaux1 = {
 	.constraints = {
 		.name			= "V28",
@@ -310,6 +323,8 @@ static struct regulator_init_data rx51_vaux1 = {
 		.valid_ops_mask		= REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= ARRAY_SIZE(rx51_vaux1_consumers),
+	.consumer_supplies	= rx51_vaux1_consumers,
 };
 
 static struct regulator_init_data rx51_vaux2 = {
-- 
1.6.0.4


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

* [PATCH 2/5] OMAP: RX51: Add "vdds_sdi" supply voltage for SDI
@ 2010-03-23  9:56     ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

The SDI Display subsystem needs access to the vdds_sdi supply
regulator. This is TWL4030's VAUX1 supply on RX-51.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index f404537..3ef805e 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -300,6 +300,19 @@ static struct regulator_consumer_supply rx51_vsim_supply = {
 	.dev_name = "mmci-omap-hs.1",
 };
 
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+extern struct platform_device rx51_display_device;
+#endif
+
+static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
+#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
+	{
+		.supply	= "vdds_sdi",
+		.dev	= &rx51_display_device.dev,
+	},
+#endif
+};
+
 static struct regulator_init_data rx51_vaux1 = {
 	.constraints = {
 		.name			= "V28",
@@ -310,6 +323,8 @@ static struct regulator_init_data rx51_vaux1 = {
 		.valid_ops_mask		= REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= ARRAY_SIZE(rx51_vaux1_consumers),
+	.consumer_supplies	= rx51_vaux1_consumers,
 };
 
 static struct regulator_init_data rx51_vaux2 = {
-- 
1.6.0.4


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

* [PATCH 3/5] OMAP: RX51: Add Touch Controller in SPI board info
  2010-03-23  9:56     ` Roger Quadros
@ 2010-03-23  9:56       ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

The Touch controller and LCD Panel share the same SPI bus 1.
So, we need to define the touch controller in the SPI board info
else, the SPI bus will be contended due to invalid state of
Touch controller's Chip Select thus preventing the LCD panel
from working.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 3ef805e..020f354 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -46,6 +46,7 @@
 enum {
 	RX51_SPI_WL1251,
 	RX51_SPI_MIPID,		/* LCD panel */
+	RX51_SPI_TSC2005,	/* Touch Controller */
 };
 
 static struct wl12xx_platform_data wl1251_pdata;
@@ -60,6 +61,11 @@ static struct omap2_mcspi_device_config mipid_mcspi_config = {
 	.single_channel	= 1,
 };
 
+static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,
+};
+
 static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 	[RX51_SPI_WL1251] = {
 		.modalias		= "wl1251",
@@ -77,6 +83,15 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 		.max_speed_hz		= 6000000,
 		.controller_data	= &mipid_mcspi_config,
 	},
+	[RX51_SPI_TSC2005] = {
+		.modalias		= "tsc2005",
+		.bus_num		= 1,
+		.chip_select		= 0,
+		/* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/
+		.max_speed_hz		= 6000000,
+		.controller_data	= &tsc2005_mcspi_config,
+		/* .platform_data = &tsc2005_config,*/
+	},
 };
 
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
-- 
1.6.0.4


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

* [PATCH 3/5] OMAP: RX51: Add Touch Controller in SPI board info
@ 2010-03-23  9:56       ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

The Touch controller and LCD Panel share the same SPI bus 1.
So, we need to define the touch controller in the SPI board info
else, the SPI bus will be contended due to invalid state of
Touch controller's Chip Select thus preventing the LCD panel
from working.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 3ef805e..020f354 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -46,6 +46,7 @@
 enum {
 	RX51_SPI_WL1251,
 	RX51_SPI_MIPID,		/* LCD panel */
+	RX51_SPI_TSC2005,	/* Touch Controller */
 };
 
 static struct wl12xx_platform_data wl1251_pdata;
@@ -60,6 +61,11 @@ static struct omap2_mcspi_device_config mipid_mcspi_config = {
 	.single_channel	= 1,
 };
 
+static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,
+};
+
 static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 	[RX51_SPI_WL1251] = {
 		.modalias		= "wl1251",
@@ -77,6 +83,15 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
 		.max_speed_hz		= 6000000,
 		.controller_data	= &mipid_mcspi_config,
 	},
+	[RX51_SPI_TSC2005] = {
+		.modalias		= "tsc2005",
+		.bus_num		= 1,
+		.chip_select		= 0,
+		/* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/
+		.max_speed_hz		= 6000000,
+		.controller_data	= &tsc2005_mcspi_config,
+		/* .platform_data = &tsc2005_config,*/
+	},
 };
 
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
-- 
1.6.0.4


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

* [PATCH 4/5] OMAP: DSS2: Add ACX565AKM Panel Driver
  2010-03-23  9:56       ` Roger Quadros
@ 2010-03-23  9:56         ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

This is the panel used on Nokia N900

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 drivers/video/omap2/displays/Kconfig           |    5 +
 drivers/video/omap2/displays/Makefile          |    1 +
 drivers/video/omap2/displays/panel-acx565akm.c |  551 ++++++++++++++++++++++++
 3 files changed, 557 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index dfb57ee..c34e1f5 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -37,4 +37,9 @@ config PANEL_TPO_TD043MTEA1
         help
           LCD Panel used in OMAP3 Pandora
 
+config PANEL_ACX565AKM
+	tristate "ACX565AKM Panel"
+	depends on OMAP2_DSS_SDI
+	help
+	  This is the LCD panel used on Nokia N900
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index e2bb321..aa38609 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
 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
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
new file mode 100644
index 0000000..a63447f
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -0,0 +1,551 @@
+/*
+ * Support for ACX565AKM LCD Panel used on Nokia N900
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ * Author: Roger Quadros <roger.quadros@nokia.com>
+ *
+ * Based on panel-generic.c by Tomi Valkeinen <tomi.valkeinen@nokia.com>
+ * Borrowed MIPID SPI code from Imre Deak <imre.deak@nokia.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/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/spi/spi.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/backlight.h>
+
+#include <plat/display.h>
+
+#define MIPID_CMD_READ_DISP_ID		0x04
+#define MIPID_CMD_READ_RED		0x06
+#define MIPID_CMD_READ_GREEN		0x07
+#define MIPID_CMD_READ_BLUE		0x08
+#define MIPID_CMD_READ_DISP_STATUS	0x09
+#define MIPID_CMD_RDDSDR		0x0F
+#define MIPID_CMD_SLEEP_IN		0x10
+#define MIPID_CMD_SLEEP_OUT		0x11
+#define MIPID_CMD_DISP_OFF		0x28
+#define MIPID_CMD_DISP_ON		0x29
+#define MIPID_CMD_WRITE_DISP_BRIGHTNESS	0x51
+#define MIPID_CMD_READ_DISP_BRIGHTNESS	0x52
+#define MIPID_CMD_WRITE_CTRL_DISP	0x53
+
+#define CTRL_DISP_BRIGHTNESS_CTRL_ON	(1 << 5)
+#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON	(1 << 4)
+#define CTRL_DISP_BACKLIGHT_ON		(1 << 2)
+#define CTRL_DISP_AUTO_BRIGHTNESS_ON	(1 << 1)
+
+#define MIPID_CMD_READ_CTRL_DISP	0x54
+#define MIPID_CMD_WRITE_CABC		0x55
+#define MIPID_CMD_READ_CABC		0x56
+
+#define MIPID_VER_LPH8923		3
+#define MIPID_VER_LS041Y3		4
+#define MIPID_VER_L4F00311		8
+#define MIPID_VER_ACX565AKM		9
+
+struct acx565akm_device {
+	char		*name;
+	int		enabled;
+	int		model;
+	int		revision;
+	u8		display_id[3];
+	unsigned	has_bc:1;
+	unsigned	has_cabc:1;
+	unsigned	cabc_mode;
+	unsigned long	hw_guard_end;		/* next value of jiffies
+						   when we can issue the
+						   next sleep in/out command */
+	unsigned long	hw_guard_wait;		/* max guard time in jiffies */
+
+	struct spi_device	*spi;
+	struct mutex		mutex;
+
+	struct omap_dss_device	*dssdev;
+};
+
+static struct acx565akm_device acx_dev;
+
+/*--------------------MIPID interface-----------------------------*/
+
+static void acx565akm_transfer(struct acx565akm_device *md, int cmd,
+			      const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
+{
+	struct spi_message	m;
+	struct spi_transfer	*x, xfer[5];
+	int			r;
+
+	BUG_ON(md->spi = NULL);
+
+	spi_message_init(&m);
+
+	memset(xfer, 0, sizeof(xfer));
+	x = &xfer[0];
+
+	cmd &=  0xff;
+	x->tx_buf = &cmd;
+	x->bits_per_word = 9;
+	x->len = 2;
+
+	if (rlen > 1 && wlen = 0) {
+		/*
+		 * Between the command and the response data there is a
+		 * dummy clock cycle. Add an extra bit after the command
+		 * word to account for this.
+		 */
+		x->bits_per_word = 10;
+		cmd <<= 1;
+	}
+	spi_message_add_tail(x, &m);
+
+	if (wlen) {
+		x++;
+		x->tx_buf = wbuf;
+		x->len = wlen;
+		x->bits_per_word = 9;
+		spi_message_add_tail(x, &m);
+	}
+
+	if (rlen) {
+		x++;
+		x->rx_buf	= rbuf;
+		x->len		= rlen;
+		spi_message_add_tail(x, &m);
+	}
+
+	r = spi_sync(md->spi, &m);
+	if (r < 0)
+		dev_dbg(&md->spi->dev, "spi_sync %d\n", r);
+}
+
+static inline void acx565akm_cmd(struct acx565akm_device *md, int cmd)
+{
+	acx565akm_transfer(md, cmd, NULL, 0, NULL, 0);
+}
+
+static inline void acx565akm_write(struct acx565akm_device *md,
+			       int reg, const u8 *buf, int len)
+{
+	acx565akm_transfer(md, reg, buf, len, NULL, 0);
+}
+
+static inline void acx565akm_read(struct acx565akm_device *md,
+			      int reg, u8 *buf, int len)
+{
+	acx565akm_transfer(md, reg, NULL, 0, buf, len);
+}
+
+static void hw_guard_start(struct acx565akm_device *md, int guard_msec)
+{
+	md->hw_guard_wait = msecs_to_jiffies(guard_msec);
+	md->hw_guard_end = jiffies + md->hw_guard_wait;
+}
+
+static void hw_guard_wait(struct acx565akm_device *md)
+{
+	unsigned long wait = md->hw_guard_end - jiffies;
+
+	if ((long)wait > 0 && wait <= md->hw_guard_wait) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(wait);
+	}
+}
+
+/*----------------------MIPID wrappers----------------------------*/
+
+static void set_sleep_mode(struct acx565akm_device *md, int on)
+{
+	int cmd;
+
+	if (on)
+		cmd = MIPID_CMD_SLEEP_IN;
+	else
+		cmd = MIPID_CMD_SLEEP_OUT;
+	/*
+	 * We have to keep 120msec between sleep in/out commands.
+	 * (8.2.15, 8.2.16).
+	 */
+	hw_guard_wait(md);
+	acx565akm_cmd(md, cmd);
+	hw_guard_start(md, 120);
+}
+
+static void set_display_state(struct acx565akm_device *md, int enabled)
+{
+	int cmd = enabled ? MIPID_CMD_DISP_ON : MIPID_CMD_DISP_OFF;
+
+	acx565akm_cmd(md, cmd);
+}
+
+static int panel_enabled(struct acx565akm_device *md)
+{
+	u32 disp_status;
+	int enabled;
+
+	acx565akm_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4);
+	disp_status = __be32_to_cpu(disp_status);
+	enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
+	dev_dbg(&md->spi->dev,
+		"LCD panel %senabled by bootloader (status 0x%04x)\n",
+		enabled ? "" : "not ", disp_status);
+	return enabled;
+}
+
+static int panel_detect(struct acx565akm_device *md)
+{
+	acx565akm_read(md, MIPID_CMD_READ_DISP_ID, md->display_id, 3);
+	dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n",
+		md->display_id[0], md->display_id[1], md->display_id[2]);
+
+	switch (md->display_id[0]) {
+	case 0x10:
+		md->model = MIPID_VER_ACX565AKM;
+		md->name = "acx565akm";
+		md->has_bc = 1;
+		md->has_cabc = 1;
+		break;
+	case 0x29:
+		md->model = MIPID_VER_L4F00311;
+		md->name = "l4f00311";
+		break;
+	case 0x45:
+		md->model = MIPID_VER_LPH8923;
+		md->name = "lph8923";
+		break;
+	case 0x83:
+		md->model = MIPID_VER_LS041Y3;
+		md->name = "ls041y3";
+		break;
+	default:
+		md->name = "unknown";
+		dev_err(&md->spi->dev, "invalid display ID\n");
+		return -ENODEV;
+	}
+
+	md->revision = md->display_id[1];
+
+	dev_info(&md->spi->dev, "omapfb: %s rev %02x LCD detected\n",
+			md->name, md->revision);
+
+	return 0;
+}
+
+/*---------------------------ACX Panel----------------------------*/
+
+static int acx_get_recommended_bpp(struct omap_dss_device *dssdev)
+{
+	return 16;
+}
+
+static struct omap_video_timings acx_panel_timings = {
+	.x_res		= 800,
+	.y_res		= 480,
+	.pixel_clock	= 24000,
+	.hfp		= 28,
+	.hsw		= 4,
+	.hbp		= 24,
+	.vfp		= 3,
+	.vsw		= 3,
+	.vbp		= 4,
+};
+
+static int acx_panel_probe(struct omap_dss_device *dssdev)
+{
+	int r;
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+					OMAP_DSS_LCD_IHS;
+	/* FIXME AC bias ? */
+	dssdev->panel.timings = acx_panel_timings;
+
+	if (dssdev->platform_enable)
+		dssdev->platform_enable(dssdev);
+	/*
+	 * After reset we have to wait 5 msec before the first
+	 * command can be sent.
+	 */
+	msleep(5);
+
+	md->enabled = panel_enabled(md);
+
+	r = panel_detect(md);
+	if (r) {
+		dev_err(&dssdev->dev, "%s panel detect error\n", __func__);
+		if (!md->enabled && dssdev->platform_disable)
+			dssdev->platform_disable(dssdev);
+		return r;
+	}
+
+	mutex_lock(&acx_dev.mutex);
+	acx_dev.dssdev = dssdev;
+	mutex_unlock(&acx_dev.mutex);
+
+	if (!md->enabled) {
+		if (dssdev->platform_disable)
+			dssdev->platform_disable(dssdev);
+	}
+
+	return 0;
+}
+
+static void acx_panel_remove(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	mutex_lock(&acx_dev.mutex);
+	acx_dev.dssdev = NULL;
+	mutex_unlock(&acx_dev.mutex);
+}
+
+static int acx_panel_power_on(struct omap_dss_device *dssdev)
+{
+	struct acx565akm_device *md = &acx_dev;
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+
+	mutex_lock(&md->mutex);
+
+	r = omapdss_sdi_display_enable(dssdev);
+	if (r) {
+		pr_err("%s sdi enable failed\n", __func__);
+		return r;
+	}
+
+	/*FIXME tweak me */
+	msleep(50);
+
+	if (dssdev->platform_enable) {
+		r = dssdev->platform_enable(dssdev);
+		if (r)
+			goto fail;
+	}
+
+	if (md->enabled) {
+		dev_dbg(&md->spi->dev, "panel already enabled\n");
+		mutex_unlock(&md->mutex);
+		return 0;
+	}
+
+	/*
+	 * We have to meet all the following delay requirements:
+	 * 1. tRW: reset pulse width 10usec (7.12.1)
+	 * 2. tRT: reset cancel time 5msec (7.12.1)
+	 * 3. Providing PCLK,HS,VS signals for 2 frames = ~50msec worst
+	 *    case (7.6.2)
+	 * 4. 120msec before the sleep out command (7.12.1)
+	 */
+	msleep(120);
+
+	set_sleep_mode(md, 0);
+	md->enabled = 1;
+
+	/* 5msec between sleep out and the next command. (8.2.16) */
+	msleep(5);
+	set_display_state(md, 1);
+
+	mutex_unlock(&md->mutex);
+
+	return 0;
+fail:
+	omapdss_sdi_display_disable(dssdev);
+	return r;
+}
+
+static void acx_panel_power_off(struct omap_dss_device *dssdev)
+{
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+
+	mutex_lock(&md->mutex);
+
+	if (!md->enabled) {
+		mutex_unlock(&md->mutex);
+		return;
+	}
+	set_display_state(md, 0);
+	set_sleep_mode(md, 1);
+	md->enabled = 0;
+	/*
+	 * We have to provide PCLK,HS,VS signals for 2 frames (worst case
+	 * ~50msec) after sending the sleep in command and asserting the
+	 * reset signal. We probably could assert the reset w/o the delay
+	 * but we still delay to avoid possible artifacts. (7.6.1)
+	 */
+	msleep(50);
+
+	if (dssdev->platform_disable)
+		dssdev->platform_disable(dssdev);
+
+	/* FIXME need to tweak this delay */
+	msleep(100);
+
+	omapdss_sdi_display_disable(dssdev);
+
+	mutex_unlock(&md->mutex);
+}
+
+static int acx_panel_enable(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	r = acx_panel_power_on(dssdev);
+
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+	return 0;
+}
+
+static void acx_panel_disable(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	acx_panel_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int acx_panel_suspend(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	acx_panel_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
+	return 0;
+}
+
+static int acx_panel_resume(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	r = acx_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+	return 0;
+}
+
+static void acx_panel_set_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	int r;
+
+	if (dssdev->state = OMAP_DSS_DISPLAY_ACTIVE)
+		omapdss_sdi_display_disable(dssdev);
+
+	dssdev->panel.timings = *timings;
+
+	if (dssdev->state = OMAP_DSS_DISPLAY_ACTIVE) {
+		r = omapdss_sdi_display_enable(dssdev);
+		if (r)
+			dev_err(&dssdev->dev, "%s enable failed\n", __func__);
+	}
+}
+
+static void acx_panel_get_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	*timings = dssdev->panel.timings;
+}
+
+static int acx_panel_check_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	return 0;
+}
+
+
+static struct omap_dss_driver acx_panel_driver = {
+	.probe		= acx_panel_probe,
+	.remove		= acx_panel_remove,
+
+	.enable		= acx_panel_enable,
+	.disable	= acx_panel_disable,
+	.suspend	= acx_panel_suspend,
+	.resume		= acx_panel_resume,
+
+	.set_timings	= acx_panel_set_timings,
+	.get_timings	= acx_panel_get_timings,
+	.check_timings	= acx_panel_check_timings,
+
+	.get_recommended_bpp = acx_get_recommended_bpp,
+
+	.driver         = {
+		.name   = "panel-acx565akm",
+		.owner  = THIS_MODULE,
+	},
+};
+
+/*--------------------SPI probe-------------------------*/
+
+static int acx565akm_spi_probe(struct spi_device *spi)
+{
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&spi->dev, "%s\n", __func__);
+
+	spi->mode = SPI_MODE_3;
+	md->spi = spi;
+	mutex_init(&md->mutex);
+	dev_set_drvdata(&spi->dev, md);
+
+	omap_dss_register_driver(&acx_panel_driver);
+
+	return 0;
+}
+
+static int acx565akm_spi_remove(struct spi_device *spi)
+{
+	struct acx565akm_device *md = dev_get_drvdata(&spi->dev);
+
+	dev_dbg(&md->spi->dev, "%s\n", __func__);
+	omap_dss_unregister_driver(&acx_panel_driver);
+
+	return 0;
+}
+
+static struct spi_driver acx565akm_spi_driver = {
+	.driver = {
+		.name	= "acx565akm",
+		.bus	= &spi_bus_type,
+		.owner	= THIS_MODULE,
+	},
+	.probe	= acx565akm_spi_probe,
+	.remove	= __devexit_p(acx565akm_spi_remove),
+};
+
+static int __init acx565akm_init(void)
+{
+	return spi_register_driver(&acx565akm_spi_driver);
+}
+
+static void __exit acx565akm_exit(void)
+{
+	spi_unregister_driver(&acx565akm_spi_driver);
+}
+
+module_init(acx565akm_init);
+module_exit(acx565akm_exit);
+
+MODULE_AUTHOR("Roger Quadros <roger.quadros@nokia.com>");
+MODULE_DESCRIPTION("acx565akm LCD Driver");
+MODULE_LICENSE("GPL");
-- 
1.6.0.4


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

* [PATCH 4/5] OMAP: DSS2: Add ACX565AKM Panel Driver
@ 2010-03-23  9:56         ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

This is the panel used on Nokia N900

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 drivers/video/omap2/displays/Kconfig           |    5 +
 drivers/video/omap2/displays/Makefile          |    1 +
 drivers/video/omap2/displays/panel-acx565akm.c |  551 ++++++++++++++++++++++++
 3 files changed, 557 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index dfb57ee..c34e1f5 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -37,4 +37,9 @@ config PANEL_TPO_TD043MTEA1
         help
           LCD Panel used in OMAP3 Pandora
 
+config PANEL_ACX565AKM
+	tristate "ACX565AKM Panel"
+	depends on OMAP2_DSS_SDI
+	help
+	  This is the LCD panel used on Nokia N900
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index e2bb321..aa38609 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
 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
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
new file mode 100644
index 0000000..a63447f
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -0,0 +1,551 @@
+/*
+ * Support for ACX565AKM LCD Panel used on Nokia N900
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ * Author: Roger Quadros <roger.quadros@nokia.com>
+ *
+ * Based on panel-generic.c by Tomi Valkeinen <tomi.valkeinen@nokia.com>
+ * Borrowed MIPID SPI code from Imre Deak <imre.deak@nokia.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/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/spi/spi.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/backlight.h>
+
+#include <plat/display.h>
+
+#define MIPID_CMD_READ_DISP_ID		0x04
+#define MIPID_CMD_READ_RED		0x06
+#define MIPID_CMD_READ_GREEN		0x07
+#define MIPID_CMD_READ_BLUE		0x08
+#define MIPID_CMD_READ_DISP_STATUS	0x09
+#define MIPID_CMD_RDDSDR		0x0F
+#define MIPID_CMD_SLEEP_IN		0x10
+#define MIPID_CMD_SLEEP_OUT		0x11
+#define MIPID_CMD_DISP_OFF		0x28
+#define MIPID_CMD_DISP_ON		0x29
+#define MIPID_CMD_WRITE_DISP_BRIGHTNESS	0x51
+#define MIPID_CMD_READ_DISP_BRIGHTNESS	0x52
+#define MIPID_CMD_WRITE_CTRL_DISP	0x53
+
+#define CTRL_DISP_BRIGHTNESS_CTRL_ON	(1 << 5)
+#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON	(1 << 4)
+#define CTRL_DISP_BACKLIGHT_ON		(1 << 2)
+#define CTRL_DISP_AUTO_BRIGHTNESS_ON	(1 << 1)
+
+#define MIPID_CMD_READ_CTRL_DISP	0x54
+#define MIPID_CMD_WRITE_CABC		0x55
+#define MIPID_CMD_READ_CABC		0x56
+
+#define MIPID_VER_LPH8923		3
+#define MIPID_VER_LS041Y3		4
+#define MIPID_VER_L4F00311		8
+#define MIPID_VER_ACX565AKM		9
+
+struct acx565akm_device {
+	char		*name;
+	int		enabled;
+	int		model;
+	int		revision;
+	u8		display_id[3];
+	unsigned	has_bc:1;
+	unsigned	has_cabc:1;
+	unsigned	cabc_mode;
+	unsigned long	hw_guard_end;		/* next value of jiffies
+						   when we can issue the
+						   next sleep in/out command */
+	unsigned long	hw_guard_wait;		/* max guard time in jiffies */
+
+	struct spi_device	*spi;
+	struct mutex		mutex;
+
+	struct omap_dss_device	*dssdev;
+};
+
+static struct acx565akm_device acx_dev;
+
+/*--------------------MIPID interface-----------------------------*/
+
+static void acx565akm_transfer(struct acx565akm_device *md, int cmd,
+			      const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
+{
+	struct spi_message	m;
+	struct spi_transfer	*x, xfer[5];
+	int			r;
+
+	BUG_ON(md->spi == NULL);
+
+	spi_message_init(&m);
+
+	memset(xfer, 0, sizeof(xfer));
+	x = &xfer[0];
+
+	cmd &=  0xff;
+	x->tx_buf = &cmd;
+	x->bits_per_word = 9;
+	x->len = 2;
+
+	if (rlen > 1 && wlen == 0) {
+		/*
+		 * Between the command and the response data there is a
+		 * dummy clock cycle. Add an extra bit after the command
+		 * word to account for this.
+		 */
+		x->bits_per_word = 10;
+		cmd <<= 1;
+	}
+	spi_message_add_tail(x, &m);
+
+	if (wlen) {
+		x++;
+		x->tx_buf = wbuf;
+		x->len = wlen;
+		x->bits_per_word = 9;
+		spi_message_add_tail(x, &m);
+	}
+
+	if (rlen) {
+		x++;
+		x->rx_buf	= rbuf;
+		x->len		= rlen;
+		spi_message_add_tail(x, &m);
+	}
+
+	r = spi_sync(md->spi, &m);
+	if (r < 0)
+		dev_dbg(&md->spi->dev, "spi_sync %d\n", r);
+}
+
+static inline void acx565akm_cmd(struct acx565akm_device *md, int cmd)
+{
+	acx565akm_transfer(md, cmd, NULL, 0, NULL, 0);
+}
+
+static inline void acx565akm_write(struct acx565akm_device *md,
+			       int reg, const u8 *buf, int len)
+{
+	acx565akm_transfer(md, reg, buf, len, NULL, 0);
+}
+
+static inline void acx565akm_read(struct acx565akm_device *md,
+			      int reg, u8 *buf, int len)
+{
+	acx565akm_transfer(md, reg, NULL, 0, buf, len);
+}
+
+static void hw_guard_start(struct acx565akm_device *md, int guard_msec)
+{
+	md->hw_guard_wait = msecs_to_jiffies(guard_msec);
+	md->hw_guard_end = jiffies + md->hw_guard_wait;
+}
+
+static void hw_guard_wait(struct acx565akm_device *md)
+{
+	unsigned long wait = md->hw_guard_end - jiffies;
+
+	if ((long)wait > 0 && wait <= md->hw_guard_wait) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(wait);
+	}
+}
+
+/*----------------------MIPID wrappers----------------------------*/
+
+static void set_sleep_mode(struct acx565akm_device *md, int on)
+{
+	int cmd;
+
+	if (on)
+		cmd = MIPID_CMD_SLEEP_IN;
+	else
+		cmd = MIPID_CMD_SLEEP_OUT;
+	/*
+	 * We have to keep 120msec between sleep in/out commands.
+	 * (8.2.15, 8.2.16).
+	 */
+	hw_guard_wait(md);
+	acx565akm_cmd(md, cmd);
+	hw_guard_start(md, 120);
+}
+
+static void set_display_state(struct acx565akm_device *md, int enabled)
+{
+	int cmd = enabled ? MIPID_CMD_DISP_ON : MIPID_CMD_DISP_OFF;
+
+	acx565akm_cmd(md, cmd);
+}
+
+static int panel_enabled(struct acx565akm_device *md)
+{
+	u32 disp_status;
+	int enabled;
+
+	acx565akm_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4);
+	disp_status = __be32_to_cpu(disp_status);
+	enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
+	dev_dbg(&md->spi->dev,
+		"LCD panel %senabled by bootloader (status 0x%04x)\n",
+		enabled ? "" : "not ", disp_status);
+	return enabled;
+}
+
+static int panel_detect(struct acx565akm_device *md)
+{
+	acx565akm_read(md, MIPID_CMD_READ_DISP_ID, md->display_id, 3);
+	dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n",
+		md->display_id[0], md->display_id[1], md->display_id[2]);
+
+	switch (md->display_id[0]) {
+	case 0x10:
+		md->model = MIPID_VER_ACX565AKM;
+		md->name = "acx565akm";
+		md->has_bc = 1;
+		md->has_cabc = 1;
+		break;
+	case 0x29:
+		md->model = MIPID_VER_L4F00311;
+		md->name = "l4f00311";
+		break;
+	case 0x45:
+		md->model = MIPID_VER_LPH8923;
+		md->name = "lph8923";
+		break;
+	case 0x83:
+		md->model = MIPID_VER_LS041Y3;
+		md->name = "ls041y3";
+		break;
+	default:
+		md->name = "unknown";
+		dev_err(&md->spi->dev, "invalid display ID\n");
+		return -ENODEV;
+	}
+
+	md->revision = md->display_id[1];
+
+	dev_info(&md->spi->dev, "omapfb: %s rev %02x LCD detected\n",
+			md->name, md->revision);
+
+	return 0;
+}
+
+/*---------------------------ACX Panel----------------------------*/
+
+static int acx_get_recommended_bpp(struct omap_dss_device *dssdev)
+{
+	return 16;
+}
+
+static struct omap_video_timings acx_panel_timings = {
+	.x_res		= 800,
+	.y_res		= 480,
+	.pixel_clock	= 24000,
+	.hfp		= 28,
+	.hsw		= 4,
+	.hbp		= 24,
+	.vfp		= 3,
+	.vsw		= 3,
+	.vbp		= 4,
+};
+
+static int acx_panel_probe(struct omap_dss_device *dssdev)
+{
+	int r;
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+					OMAP_DSS_LCD_IHS;
+	/* FIXME AC bias ? */
+	dssdev->panel.timings = acx_panel_timings;
+
+	if (dssdev->platform_enable)
+		dssdev->platform_enable(dssdev);
+	/*
+	 * After reset we have to wait 5 msec before the first
+	 * command can be sent.
+	 */
+	msleep(5);
+
+	md->enabled = panel_enabled(md);
+
+	r = panel_detect(md);
+	if (r) {
+		dev_err(&dssdev->dev, "%s panel detect error\n", __func__);
+		if (!md->enabled && dssdev->platform_disable)
+			dssdev->platform_disable(dssdev);
+		return r;
+	}
+
+	mutex_lock(&acx_dev.mutex);
+	acx_dev.dssdev = dssdev;
+	mutex_unlock(&acx_dev.mutex);
+
+	if (!md->enabled) {
+		if (dssdev->platform_disable)
+			dssdev->platform_disable(dssdev);
+	}
+
+	return 0;
+}
+
+static void acx_panel_remove(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	mutex_lock(&acx_dev.mutex);
+	acx_dev.dssdev = NULL;
+	mutex_unlock(&acx_dev.mutex);
+}
+
+static int acx_panel_power_on(struct omap_dss_device *dssdev)
+{
+	struct acx565akm_device *md = &acx_dev;
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+
+	mutex_lock(&md->mutex);
+
+	r = omapdss_sdi_display_enable(dssdev);
+	if (r) {
+		pr_err("%s sdi enable failed\n", __func__);
+		return r;
+	}
+
+	/*FIXME tweak me */
+	msleep(50);
+
+	if (dssdev->platform_enable) {
+		r = dssdev->platform_enable(dssdev);
+		if (r)
+			goto fail;
+	}
+
+	if (md->enabled) {
+		dev_dbg(&md->spi->dev, "panel already enabled\n");
+		mutex_unlock(&md->mutex);
+		return 0;
+	}
+
+	/*
+	 * We have to meet all the following delay requirements:
+	 * 1. tRW: reset pulse width 10usec (7.12.1)
+	 * 2. tRT: reset cancel time 5msec (7.12.1)
+	 * 3. Providing PCLK,HS,VS signals for 2 frames = ~50msec worst
+	 *    case (7.6.2)
+	 * 4. 120msec before the sleep out command (7.12.1)
+	 */
+	msleep(120);
+
+	set_sleep_mode(md, 0);
+	md->enabled = 1;
+
+	/* 5msec between sleep out and the next command. (8.2.16) */
+	msleep(5);
+	set_display_state(md, 1);
+
+	mutex_unlock(&md->mutex);
+
+	return 0;
+fail:
+	omapdss_sdi_display_disable(dssdev);
+	return r;
+}
+
+static void acx_panel_power_off(struct omap_dss_device *dssdev)
+{
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+
+	mutex_lock(&md->mutex);
+
+	if (!md->enabled) {
+		mutex_unlock(&md->mutex);
+		return;
+	}
+	set_display_state(md, 0);
+	set_sleep_mode(md, 1);
+	md->enabled = 0;
+	/*
+	 * We have to provide PCLK,HS,VS signals for 2 frames (worst case
+	 * ~50msec) after sending the sleep in command and asserting the
+	 * reset signal. We probably could assert the reset w/o the delay
+	 * but we still delay to avoid possible artifacts. (7.6.1)
+	 */
+	msleep(50);
+
+	if (dssdev->platform_disable)
+		dssdev->platform_disable(dssdev);
+
+	/* FIXME need to tweak this delay */
+	msleep(100);
+
+	omapdss_sdi_display_disable(dssdev);
+
+	mutex_unlock(&md->mutex);
+}
+
+static int acx_panel_enable(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	r = acx_panel_power_on(dssdev);
+
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+	return 0;
+}
+
+static void acx_panel_disable(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	acx_panel_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int acx_panel_suspend(struct omap_dss_device *dssdev)
+{
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	acx_panel_power_off(dssdev);
+	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
+	return 0;
+}
+
+static int acx_panel_resume(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	dev_dbg(&dssdev->dev, "%s\n", __func__);
+	r = acx_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+	return 0;
+}
+
+static void acx_panel_set_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	int r;
+
+	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
+		omapdss_sdi_display_disable(dssdev);
+
+	dssdev->panel.timings = *timings;
+
+	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
+		r = omapdss_sdi_display_enable(dssdev);
+		if (r)
+			dev_err(&dssdev->dev, "%s enable failed\n", __func__);
+	}
+}
+
+static void acx_panel_get_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	*timings = dssdev->panel.timings;
+}
+
+static int acx_panel_check_timings(struct omap_dss_device *dssdev,
+		struct omap_video_timings *timings)
+{
+	return 0;
+}
+
+
+static struct omap_dss_driver acx_panel_driver = {
+	.probe		= acx_panel_probe,
+	.remove		= acx_panel_remove,
+
+	.enable		= acx_panel_enable,
+	.disable	= acx_panel_disable,
+	.suspend	= acx_panel_suspend,
+	.resume		= acx_panel_resume,
+
+	.set_timings	= acx_panel_set_timings,
+	.get_timings	= acx_panel_get_timings,
+	.check_timings	= acx_panel_check_timings,
+
+	.get_recommended_bpp = acx_get_recommended_bpp,
+
+	.driver         = {
+		.name   = "panel-acx565akm",
+		.owner  = THIS_MODULE,
+	},
+};
+
+/*--------------------SPI probe-------------------------*/
+
+static int acx565akm_spi_probe(struct spi_device *spi)
+{
+	struct acx565akm_device *md = &acx_dev;
+
+	dev_dbg(&spi->dev, "%s\n", __func__);
+
+	spi->mode = SPI_MODE_3;
+	md->spi = spi;
+	mutex_init(&md->mutex);
+	dev_set_drvdata(&spi->dev, md);
+
+	omap_dss_register_driver(&acx_panel_driver);
+
+	return 0;
+}
+
+static int acx565akm_spi_remove(struct spi_device *spi)
+{
+	struct acx565akm_device *md = dev_get_drvdata(&spi->dev);
+
+	dev_dbg(&md->spi->dev, "%s\n", __func__);
+	omap_dss_unregister_driver(&acx_panel_driver);
+
+	return 0;
+}
+
+static struct spi_driver acx565akm_spi_driver = {
+	.driver = {
+		.name	= "acx565akm",
+		.bus	= &spi_bus_type,
+		.owner	= THIS_MODULE,
+	},
+	.probe	= acx565akm_spi_probe,
+	.remove	= __devexit_p(acx565akm_spi_remove),
+};
+
+static int __init acx565akm_init(void)
+{
+	return spi_register_driver(&acx565akm_spi_driver);
+}
+
+static void __exit acx565akm_exit(void)
+{
+	spi_unregister_driver(&acx565akm_spi_driver);
+}
+
+module_init(acx565akm_init);
+module_exit(acx565akm_exit);
+
+MODULE_AUTHOR("Roger Quadros <roger.quadros@nokia.com>");
+MODULE_DESCRIPTION("acx565akm LCD Driver");
+MODULE_LICENSE("GPL");
-- 
1.6.0.4


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

* [PATCH 5/5] OMAP: RX51: Add LCD Panel and framebuffer console to defconfig
  2010-03-23  9:56         ` Roger Quadros
@ 2010-03-23  9:56           ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

Let's see the flashy Tux and console on N900's LCD screen.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/configs/rx51_defconfig |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index 45135ff..d3bac0e 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -1113,7 +1113,40 @@ CONFIG_RADIO_ADAPTERS=y
 #
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+
+# Frame buffer hardware drivers
+#
+CONFIG_OMAP2_VRAM=y
+CONFIG_OMAP2_VRFB=y
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_VRAM_SIZE=2
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
+# CONFIG_OMAP2_DSS_DPI is not set
+# CONFIG_OMAP2_DSS_RFBI is not set
+# CONFIG_OMAP2_DSS_VENC is not set
+CONFIG_OMAP2_DSS_SDI=y
+# CONFIG_OMAP2_DSS_DSI is not set
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+CONFIG_FB_OMAP2_NUM_FBS=3
+
+#
+# OMAP2/3 Display Device Drivers
+#
+# CONFIG_PANEL_GENERIC is not set
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+# CONFIG_PANEL_SHARP_LQ043T1DG01 is not set
+# CONFIG_PANEL_TOPPOLY_TDO35S is not set
+# CONFIG_PANEL_TPO_TD043MTEA1 is not set
+CONFIG_PANEL_ACX565AKM=y
+
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -1130,6 +1163,8 @@ CONFIG_DISPLAY_SUPPORT=y
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_LOGO=y
 CONFIG_SOUND=y
 # CONFIG_SOUND_OSS_CORE is not set
 CONFIG_SND=y
-- 
1.6.0.4


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

* [PATCH 5/5] OMAP: RX51: Add LCD Panel and framebuffer console to defconfig
@ 2010-03-23  9:56           ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23  9:56 UTC (permalink / raw)
  To: tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev

From: Roger Quadros <roger.quadros@nokia.com>

Let's see the flashy Tux and console on N900's LCD screen.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
---
 arch/arm/configs/rx51_defconfig |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index 45135ff..d3bac0e 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -1113,7 +1113,40 @@ CONFIG_RADIO_ADAPTERS=y
 #
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+
+# Frame buffer hardware drivers
+#
+CONFIG_OMAP2_VRAM=y
+CONFIG_OMAP2_VRFB=y
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_VRAM_SIZE=2
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
+# CONFIG_OMAP2_DSS_DPI is not set
+# CONFIG_OMAP2_DSS_RFBI is not set
+# CONFIG_OMAP2_DSS_VENC is not set
+CONFIG_OMAP2_DSS_SDI=y
+# CONFIG_OMAP2_DSS_DSI is not set
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+CONFIG_FB_OMAP2_NUM_FBS=3
+
+#
+# OMAP2/3 Display Device Drivers
+#
+# CONFIG_PANEL_GENERIC is not set
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+# CONFIG_PANEL_SHARP_LQ043T1DG01 is not set
+# CONFIG_PANEL_TOPPOLY_TDO35S is not set
+# CONFIG_PANEL_TPO_TD043MTEA1 is not set
+CONFIG_PANEL_ACX565AKM=y
+
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -1130,6 +1163,8 @@ CONFIG_DISPLAY_SUPPORT=y
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_LOGO=y
 CONFIG_SOUND=y
 # CONFIG_SOUND_OSS_CORE is not set
 CONFIG_SND=y
-- 
1.6.0.4


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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23  9:56   ` Roger Quadros
@ 2010-03-23 10:12     ` pHilipp Zabel
  -1 siblings, 0 replies; 36+ messages in thread
From: pHilipp Zabel @ 2010-03-23 10:12 UTC (permalink / raw)
  To: Roger Quadros; +Cc: tony, Tomi.Valkeinen, linux-omap, linux-fbdev

On Tue, Mar 23, 2010 at 10:56 AM, Roger Quadros <roger.quadros@nokia.com> wrote:
> From: Roger Quadros <roger.quadros@nokia.com>
>
> Adds basic support for LCD Panel on Nokia N900
>
> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
> ---
>  arch/arm/mach-omap2/Makefile                 |    1 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>  arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
>  3 files changed, 109 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4b9fc57..b03cbb4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)               += board-n8x0.o
>  obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51.o \
>                                           board-rx51-sdram.o \
>                                           board-rx51-peripherals.o \
> +                                          board-rx51-video.o \
>                                           hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom2.o \
>                                           board-zoom-peripherals.o \
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index 4377a4c..f404537 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -45,6 +45,7 @@
>  /* list all spi devices here */
>  enum {
>        RX51_SPI_WL1251,
> +       RX51_SPI_MIPID,         /* LCD panel */
>  };
>
>  static struct wl12xx_platform_data wl1251_pdata;
> @@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
>        .single_channel = 1,
>  };
>
> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
> +       .turbo_mode     = 0,
> +       .single_channel = 1,
> +};
> +
>  static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>        [RX51_SPI_WL1251] = {
>                .modalias               = "wl1251",
> @@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>                .controller_data        = &wl1251_mcspi_config,
>                .platform_data          = &wl1251_pdata,
>        },
> +       [RX51_SPI_MIPID] = {
> +               .modalias               = "acx565akm",
> +               .bus_num                = 1,
> +               .chip_select            = 2,
> +               .max_speed_hz           = 6000000,
> +               .controller_data        = &mipid_mcspi_config,
> +       },
>  };
>
>  #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
> diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
> new file mode 100644
> index 0000000..e3e22a8
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-rx51-video.c
> @@ -0,0 +1,95 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c

board-rx51-video.c

> + *
> + * Copyright (C) 2010 Nokia
> + *
> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/spi/spi.h>
> +
> +#include <asm/mach-types.h>
> +#include <plat/mux.h>
> +#include <plat/display.h>
> +#include <plat/mcspi.h>
> +
> +#include "mux.h"
> +
> +#define RX51_LCD_RESET_GPIO    90
> +
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +static int rx51_lcd_enable(struct omap_dss_device *dssdev)
> +{
> +       gpio_set_value(dssdev->reset_gpio, 1);
> +       return 0;
> +}
> +
> +static void rx51_lcd_disable(struct omap_dss_device *dssdev)
> +{
> +       gpio_set_value(dssdev->reset_gpio, 0);
> +}
> +
> +static struct omap_dss_device rx51_lcd_device = {
> +       .name                   = "lcd",
> +       .driver_name            = "panel-acx565akm",
> +       .type                   = OMAP_DISPLAY_TYPE_SDI,
> +       .phy.sdi.datapairs      = 2,
> +       .reset_gpio             = RX51_LCD_RESET_GPIO,
> +       .platform_enable        = rx51_lcd_enable,
> +       .platform_disable       = rx51_lcd_disable,
> +};
> +
> +static struct omap_dss_device *rx51_dss_devices[] = {
> +       &rx51_lcd_device,
> +};
> +
> +static struct omap_dss_board_info rx51_dss_board_info = {
> +       .num_devices    = ARRAY_SIZE(rx51_dss_devices),
> +       .devices        = rx51_dss_devices,
> +       .default_device = &rx51_lcd_device,
> +};
> +
> +struct platform_device rx51_display_device = {
> +       .name   = "omapdss",
> +       .id     = -1,
> +       .dev    = {
> +               .platform_data = &rx51_dss_board_info,
> +       },
> +};
> +
> +static struct platform_device *rx51_video_devices[] __initdata = {
> +       &rx51_display_device,
> +};
> +
> +static int __init rx51_video_init(void)
> +{
> +       if (!machine_is_nokia_rx51())
> +               return 0;
> +
> +       if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
> +               pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
> +               return 0;
> +       }
> +
> +       if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
> +               pr_err("%s failed to get LCD Reset GPIO\n", __func__);
> +               return 0;
> +       }
> +
> +       gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
> +
> +       platform_add_devices(rx51_video_devices,
> +                               ARRAY_SIZE(rx51_video_devices));
> +       return 0;
> +}
> +
> +subsys_initcall(rx51_video_init);
> +
> +#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
> --
> 1.6.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

regards
Philipp

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23 10:12     ` pHilipp Zabel
  0 siblings, 0 replies; 36+ messages in thread
From: pHilipp Zabel @ 2010-03-23 10:12 UTC (permalink / raw)
  To: Roger Quadros; +Cc: tony, Tomi.Valkeinen, linux-omap, linux-fbdev

On Tue, Mar 23, 2010 at 10:56 AM, Roger Quadros <roger.quadros@nokia.com> wrote:
> From: Roger Quadros <roger.quadros@nokia.com>
>
> Adds basic support for LCD Panel on Nokia N900
>
> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
> ---
>  arch/arm/mach-omap2/Makefile                 |    1 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>  arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
>  3 files changed, 109 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4b9fc57..b03cbb4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)               += board-n8x0.o
>  obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51.o \
>                                           board-rx51-sdram.o \
>                                           board-rx51-peripherals.o \
> +                                          board-rx51-video.o \
>                                           hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom2.o \
>                                           board-zoom-peripherals.o \
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index 4377a4c..f404537 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -45,6 +45,7 @@
>  /* list all spi devices here */
>  enum {
>        RX51_SPI_WL1251,
> +       RX51_SPI_MIPID,         /* LCD panel */
>  };
>
>  static struct wl12xx_platform_data wl1251_pdata;
> @@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
>        .single_channel = 1,
>  };
>
> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
> +       .turbo_mode     = 0,
> +       .single_channel = 1,
> +};
> +
>  static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>        [RX51_SPI_WL1251] = {
>                .modalias               = "wl1251",
> @@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>                .controller_data        = &wl1251_mcspi_config,
>                .platform_data          = &wl1251_pdata,
>        },
> +       [RX51_SPI_MIPID] = {
> +               .modalias               = "acx565akm",
> +               .bus_num                = 1,
> +               .chip_select            = 2,
> +               .max_speed_hz           = 6000000,
> +               .controller_data        = &mipid_mcspi_config,
> +       },
>  };
>
>  #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
> diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
> new file mode 100644
> index 0000000..e3e22a8
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-rx51-video.c
> @@ -0,0 +1,95 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c

board-rx51-video.c

> + *
> + * Copyright (C) 2010 Nokia
> + *
> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/spi/spi.h>
> +
> +#include <asm/mach-types.h>
> +#include <plat/mux.h>
> +#include <plat/display.h>
> +#include <plat/mcspi.h>
> +
> +#include "mux.h"
> +
> +#define RX51_LCD_RESET_GPIO    90
> +
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +static int rx51_lcd_enable(struct omap_dss_device *dssdev)
> +{
> +       gpio_set_value(dssdev->reset_gpio, 1);
> +       return 0;
> +}
> +
> +static void rx51_lcd_disable(struct omap_dss_device *dssdev)
> +{
> +       gpio_set_value(dssdev->reset_gpio, 0);
> +}
> +
> +static struct omap_dss_device rx51_lcd_device = {
> +       .name                   = "lcd",
> +       .driver_name            = "panel-acx565akm",
> +       .type                   = OMAP_DISPLAY_TYPE_SDI,
> +       .phy.sdi.datapairs      = 2,
> +       .reset_gpio             = RX51_LCD_RESET_GPIO,
> +       .platform_enable        = rx51_lcd_enable,
> +       .platform_disable       = rx51_lcd_disable,
> +};
> +
> +static struct omap_dss_device *rx51_dss_devices[] = {
> +       &rx51_lcd_device,
> +};
> +
> +static struct omap_dss_board_info rx51_dss_board_info = {
> +       .num_devices    = ARRAY_SIZE(rx51_dss_devices),
> +       .devices        = rx51_dss_devices,
> +       .default_device = &rx51_lcd_device,
> +};
> +
> +struct platform_device rx51_display_device = {
> +       .name   = "omapdss",
> +       .id     = -1,
> +       .dev    = {
> +               .platform_data = &rx51_dss_board_info,
> +       },
> +};
> +
> +static struct platform_device *rx51_video_devices[] __initdata = {
> +       &rx51_display_device,
> +};
> +
> +static int __init rx51_video_init(void)
> +{
> +       if (!machine_is_nokia_rx51())
> +               return 0;
> +
> +       if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
> +               pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
> +               return 0;
> +       }
> +
> +       if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
> +               pr_err("%s failed to get LCD Reset GPIO\n", __func__);
> +               return 0;
> +       }
> +
> +       gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
> +
> +       platform_add_devices(rx51_video_devices,
> +                               ARRAY_SIZE(rx51_video_devices));
> +       return 0;
> +}
> +
> +subsys_initcall(rx51_video_init);
> +
> +#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
> --
> 1.6.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23 10:12     ` pHilipp Zabel
@ 2010-03-23 11:20       ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 11:20 UTC (permalink / raw)
  To: ext pHilipp Zabel
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

ext pHilipp Zabel wrote:
> On Tue, Mar 23, 2010 at 10:56 AM, Roger Quadros <roger.quadros@nokia.com> wrote:
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>> index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)               += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51.o \
>>                                           board-rx51-sdram.o \
>>                                           board-rx51-peripherals.o \
>> +                                          board-rx51-video.o \
>>                                           hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom2.o \
>>                                           board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>        RX51_SPI_WL1251,
>> +       RX51_SPI_MIPID,         /* LCD panel */
>>  };
>>
>>  static struct wl12xx_platform_data wl1251_pdata;
>> @@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
>>        .single_channel = 1,
>>  };
>>
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +       .turbo_mode     = 0,
>> +       .single_channel = 1,
>> +};
>> +
>>  static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>>        [RX51_SPI_WL1251] = {
>>                .modalias               = "wl1251",
>> @@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>>                .controller_data        = &wl1251_mcspi_config,
>>                .platform_data          = &wl1251_pdata,
>>        },
>> +       [RX51_SPI_MIPID] = {
>> +               .modalias               = "acx565akm",
>> +               .bus_num                = 1,
>> +               .chip_select            = 2,
>> +               .max_speed_hz           = 6000000,
>> +               .controller_data        = &mipid_mcspi_config,
>> +       },
>>  };
>>
>>  #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
>> diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
>> new file mode 100644
>> index 0000000..e3e22a8
>> --- /dev/null
>> +++ b/arch/arm/mach-omap2/board-rx51-video.c
>> @@ -0,0 +1,95 @@
>> +/*
>> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
> 
> board-rx51-video.c
> 
yup. thanks :P

-roger

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23 11:20       ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 11:20 UTC (permalink / raw)
  To: ext pHilipp Zabel
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

ext pHilipp Zabel wrote:
> On Tue, Mar 23, 2010 at 10:56 AM, Roger Quadros <roger.quadros@nokia.com> wrote:
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>> index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)               += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51.o \
>>                                           board-rx51-sdram.o \
>>                                           board-rx51-peripherals.o \
>> +                                          board-rx51-video.o \
>>                                           hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom2.o \
>>                                           board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>        RX51_SPI_WL1251,
>> +       RX51_SPI_MIPID,         /* LCD panel */
>>  };
>>
>>  static struct wl12xx_platform_data wl1251_pdata;
>> @@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
>>        .single_channel = 1,
>>  };
>>
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +       .turbo_mode     = 0,
>> +       .single_channel = 1,
>> +};
>> +
>>  static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>>        [RX51_SPI_WL1251] = {
>>                .modalias               = "wl1251",
>> @@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
>>                .controller_data        = &wl1251_mcspi_config,
>>                .platform_data          = &wl1251_pdata,
>>        },
>> +       [RX51_SPI_MIPID] = {
>> +               .modalias               = "acx565akm",
>> +               .bus_num                = 1,
>> +               .chip_select            = 2,
>> +               .max_speed_hz           = 6000000,
>> +               .controller_data        = &mipid_mcspi_config,
>> +       },
>>  };
>>
>>  #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
>> diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
>> new file mode 100644
>> index 0000000..e3e22a8
>> --- /dev/null
>> +++ b/arch/arm/mach-omap2/board-rx51-video.c
>> @@ -0,0 +1,95 @@
>> +/*
>> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
> 
> board-rx51-video.c
> 
yup. thanks :P

-roger

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

* RE: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23  9:56   ` Roger Quadros
@ 2010-03-23 13:48     ` G, Manjunath Kondaiah
  -1 siblings, 0 replies; 36+ messages in thread
From: G, Manjunath Kondaiah @ 2010-03-23 13:48 UTC (permalink / raw)
  To: Roger Quadros, tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev



> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
> Sent: Tuesday, March 23, 2010 3:26 PM
> To: tony@atomide.com
> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
> linux-fbdev@vger.kernel.org
> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
> 
> From: Roger Quadros <roger.quadros@nokia.com>
> 
> Adds basic support for LCD Panel on Nokia N900
> 
> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
> ---
>  arch/arm/mach-omap2/Makefile                 |    1 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
> ++++++++++++++++++++++++++
>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
> 
> diff --git a/arch/arm/mach-omap2/Makefile 
> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
> += board-n8x0.o
>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>  					   board-rx51-sdram.o \
>  					   board-rx51-peripherals.o \
> +					   board-rx51-video.o \
>  					   hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>  					   board-zoom-peripherals.o \
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
> b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index 4377a4c..f404537 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -45,6 +45,7 @@
>  /* list all spi devices here */
>  enum {
>  	RX51_SPI_WL1251,
> +	RX51_SPI_MIPID,		/* LCD panel */
>  };
>  
>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
> +55,11 @@ static struct omap2_mcspi_device_config 
> wl1251_mcspi_config = {
>  	.single_channel	= 1,
>  };
>  
> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
> +	.turbo_mode	= 0,

Any specific reason for not enabling turbo mode? 
It will increase throughput if it is configured in single channel mode.

> +	.single_channel	= 1,
> +};
> +
>  static struct spi_board_info 
> rx51_peripherals_spi_board_info[] __initdata = {
>  	[RX51_SPI_WL1251] = {
>  		.modalias		= "wl1251",
> @@ -64,6 +70,13 @@ static struct spi_board_info 
> rx51_peripherals_spi_board_info[] __initdata = {
>  		.controller_data	= &wl1251_mcspi_config,
>  		.platform_data		= &wl1251_pdata,
>  	},
> +	[RX51_SPI_MIPID] = {
> +		.modalias		= "acx565akm",
> +		.bus_num		= 1,
> +		.chip_select		= 2,
> +		.max_speed_hz		= 6000000,
> +		.controller_data	= &mipid_mcspi_config,
> +	},
>  };
>  
>  #if defined(CONFIG_KEYBOARD_GPIO) || 
> defined(CONFIG_KEYBOARD_GPIO_MODULE)
> diff --git a/arch/arm/mach-omap2/board-rx51-video.c 
> b/arch/arm/mach-omap2/board-rx51-video.c
> new file mode 100644
> index 0000000..e3e22a8
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-rx51-video.c
> @@ -0,0 +1,95 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
> + *
> + * Copyright (C) 2010 Nokia
> + *
> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/spi/spi.h>
> +
> +#include <asm/mach-types.h>
> +#include <plat/mux.h>
> +#include <plat/display.h>
> +#include <plat/mcspi.h>
> +
> +#include "mux.h"
> +
> +#define RX51_LCD_RESET_GPIO	90
> +
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +static int rx51_lcd_enable(struct omap_dss_device *dssdev) {
> +	gpio_set_value(dssdev->reset_gpio, 1);
> +	return 0;
> +}
> +
> +static void rx51_lcd_disable(struct omap_dss_device *dssdev) {
> +	gpio_set_value(dssdev->reset_gpio, 0); }
> +
> +static struct omap_dss_device rx51_lcd_device = {
> +	.name			= "lcd",
> +	.driver_name		= "panel-acx565akm",
> +	.type			= OMAP_DISPLAY_TYPE_SDI,
> +	.phy.sdi.datapairs	= 2,
> +	.reset_gpio		= RX51_LCD_RESET_GPIO,
> +	.platform_enable	= rx51_lcd_enable,
> +	.platform_disable	= rx51_lcd_disable,
> +};
> +
> +static struct omap_dss_device *rx51_dss_devices[] = {
> +	&rx51_lcd_device,
> +};
> +
> +static struct omap_dss_board_info rx51_dss_board_info = {
> +	.num_devices	= ARRAY_SIZE(rx51_dss_devices),
> +	.devices	= rx51_dss_devices,
> +	.default_device	= &rx51_lcd_device,
> +};
> +
> +struct platform_device rx51_display_device = {
> +	.name	= "omapdss",
> +	.id	= -1,
> +	.dev	= {
> +		.platform_data = &rx51_dss_board_info,
> +	},
> +};
> +
> +static struct platform_device *rx51_video_devices[] __initdata = {
> +	&rx51_display_device,
> +};
> +
> +static int __init rx51_video_init(void) {
> +	if (!machine_is_nokia_rx51())
> +		return 0;
> +
> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
> +		pr_err("%s cannot configure MUX for LCD 
> RESET\n", __func__);
> +		return 0;
> +	}
> +
> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
> +		return 0;
> +	}
> +
> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
> +
> +	platform_add_devices(rx51_video_devices,
> +				ARRAY_SIZE(rx51_video_devices));
> +	return 0;
> +}

Since this functional always returns 0, you can make return value of this 
function as void.

-Manjunath

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

* RE: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23 13:48     ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 36+ messages in thread
From: G, Manjunath Kondaiah @ 2010-03-23 13:48 UTC (permalink / raw)
  To: Roger Quadros, tony; +Cc: Tomi.Valkeinen, linux-omap, linux-fbdev



> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
> Sent: Tuesday, March 23, 2010 3:26 PM
> To: tony@atomide.com
> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
> linux-fbdev@vger.kernel.org
> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
> 
> From: Roger Quadros <roger.quadros@nokia.com>
> 
> Adds basic support for LCD Panel on Nokia N900
> 
> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
> ---
>  arch/arm/mach-omap2/Makefile                 |    1 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
> ++++++++++++++++++++++++++
>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
> 
> diff --git a/arch/arm/mach-omap2/Makefile 
> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
> += board-n8x0.o
>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>  					   board-rx51-sdram.o \
>  					   board-rx51-peripherals.o \
> +					   board-rx51-video.o \
>  					   hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>  					   board-zoom-peripherals.o \
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
> b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index 4377a4c..f404537 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -45,6 +45,7 @@
>  /* list all spi devices here */
>  enum {
>  	RX51_SPI_WL1251,
> +	RX51_SPI_MIPID,		/* LCD panel */
>  };
>  
>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
> +55,11 @@ static struct omap2_mcspi_device_config 
> wl1251_mcspi_config = {
>  	.single_channel	= 1,
>  };
>  
> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
> +	.turbo_mode	= 0,

Any specific reason for not enabling turbo mode? 
It will increase throughput if it is configured in single channel mode.

> +	.single_channel	= 1,
> +};
> +
>  static struct spi_board_info 
> rx51_peripherals_spi_board_info[] __initdata = {
>  	[RX51_SPI_WL1251] = {
>  		.modalias		= "wl1251",
> @@ -64,6 +70,13 @@ static struct spi_board_info 
> rx51_peripherals_spi_board_info[] __initdata = {
>  		.controller_data	= &wl1251_mcspi_config,
>  		.platform_data		= &wl1251_pdata,
>  	},
> +	[RX51_SPI_MIPID] = {
> +		.modalias		= "acx565akm",
> +		.bus_num		= 1,
> +		.chip_select		= 2,
> +		.max_speed_hz		= 6000000,
> +		.controller_data	= &mipid_mcspi_config,
> +	},
>  };
>  
>  #if defined(CONFIG_KEYBOARD_GPIO) || 
> defined(CONFIG_KEYBOARD_GPIO_MODULE)
> diff --git a/arch/arm/mach-omap2/board-rx51-video.c 
> b/arch/arm/mach-omap2/board-rx51-video.c
> new file mode 100644
> index 0000000..e3e22a8
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-rx51-video.c
> @@ -0,0 +1,95 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
> + *
> + * Copyright (C) 2010 Nokia
> + *
> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/spi/spi.h>
> +
> +#include <asm/mach-types.h>
> +#include <plat/mux.h>
> +#include <plat/display.h>
> +#include <plat/mcspi.h>
> +
> +#include "mux.h"
> +
> +#define RX51_LCD_RESET_GPIO	90
> +
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +static int rx51_lcd_enable(struct omap_dss_device *dssdev) {
> +	gpio_set_value(dssdev->reset_gpio, 1);
> +	return 0;
> +}
> +
> +static void rx51_lcd_disable(struct omap_dss_device *dssdev) {
> +	gpio_set_value(dssdev->reset_gpio, 0); }
> +
> +static struct omap_dss_device rx51_lcd_device = {
> +	.name			= "lcd",
> +	.driver_name		= "panel-acx565akm",
> +	.type			= OMAP_DISPLAY_TYPE_SDI,
> +	.phy.sdi.datapairs	= 2,
> +	.reset_gpio		= RX51_LCD_RESET_GPIO,
> +	.platform_enable	= rx51_lcd_enable,
> +	.platform_disable	= rx51_lcd_disable,
> +};
> +
> +static struct omap_dss_device *rx51_dss_devices[] = {
> +	&rx51_lcd_device,
> +};
> +
> +static struct omap_dss_board_info rx51_dss_board_info = {
> +	.num_devices	= ARRAY_SIZE(rx51_dss_devices),
> +	.devices	= rx51_dss_devices,
> +	.default_device	= &rx51_lcd_device,
> +};
> +
> +struct platform_device rx51_display_device = {
> +	.name	= "omapdss",
> +	.id	= -1,
> +	.dev	= {
> +		.platform_data = &rx51_dss_board_info,
> +	},
> +};
> +
> +static struct platform_device *rx51_video_devices[] __initdata = {
> +	&rx51_display_device,
> +};
> +
> +static int __init rx51_video_init(void) {
> +	if (!machine_is_nokia_rx51())
> +		return 0;
> +
> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
> +		pr_err("%s cannot configure MUX for LCD 
> RESET\n", __func__);
> +		return 0;
> +	}
> +
> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
> +		return 0;
> +	}
> +
> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
> +
> +	platform_add_devices(rx51_video_devices,
> +				ARRAY_SIZE(rx51_video_devices));
> +	return 0;
> +}

Since this functional always returns 0, you can make return value of this 
function as void.

-Manjunath

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23 13:48     ` G, Manjunath Kondaiah
@ 2010-03-23 13:55       ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 13:55 UTC (permalink / raw)
  To: ext G, Manjunath Kondaiah
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext G, Manjunath Kondaiah wrote:
> 
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org 
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
>> Sent: Tuesday, March 23, 2010 3:26 PM
>> To: tony@atomide.com
>> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
>> linux-fbdev@vger.kernel.org
>> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
>>
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
>> ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
>> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile 
>> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
>> += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>>  					   board-rx51-sdram.o \
>>  					   board-rx51-peripherals.o \
>> +					   board-rx51-video.o \
>>  					   hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>>  					   board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
>> b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>  	RX51_SPI_WL1251,
>> +	RX51_SPI_MIPID,		/* LCD panel */
>>  };
>>  
>>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
>> +55,11 @@ static struct omap2_mcspi_device_config 
>> wl1251_mcspi_config = {
>>  	.single_channel	= 1,
>>  };
>>  
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +	.turbo_mode	= 0,
> 
> Any specific reason for not enabling turbo mode? 
> It will increase throughput if it is configured in single channel mode.
> 
No specific reason. That was the original configuration, in previous versions of 
the code. It shouldn't make much difference as mipid is only used for panel
detection, enable/disable, and backlight control. Need to test if it works with 
turbo mode.

>> +	.single_channel	= 1,
>> +};
>> +
>>  static struct spi_board_info 
>> rx51_peripherals_spi_board_info[] __initdata = {
>>  	[RX51_SPI_WL1251] = {
>>  		.modalias		= "wl1251",

>> +static int __init rx51_video_init(void) {
>> +	if (!machine_is_nokia_rx51())
>> +		return 0;
>> +
>> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
>> +		pr_err("%s cannot configure MUX for LCD 
>> RESET\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
>> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
>> +
>> +	platform_add_devices(rx51_video_devices,
>> +				ARRAY_SIZE(rx51_video_devices));
>> +	return 0;
>> +}
> 
> Since this functional always returns 0, you can make return value of this 
> function as void.
> 

I guess it is better to return non zero on failure paths then.

thanks.
-roger

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23 13:55       ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 13:55 UTC (permalink / raw)
  To: ext G, Manjunath Kondaiah
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext G, Manjunath Kondaiah wrote:
> 
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org 
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
>> Sent: Tuesday, March 23, 2010 3:26 PM
>> To: tony@atomide.com
>> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
>> linux-fbdev@vger.kernel.org
>> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
>>
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
>> ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
>> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile 
>> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
>> += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>>  					   board-rx51-sdram.o \
>>  					   board-rx51-peripherals.o \
>> +					   board-rx51-video.o \
>>  					   hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>>  					   board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
>> b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>  	RX51_SPI_WL1251,
>> +	RX51_SPI_MIPID,		/* LCD panel */
>>  };
>>  
>>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
>> +55,11 @@ static struct omap2_mcspi_device_config 
>> wl1251_mcspi_config = {
>>  	.single_channel	= 1,
>>  };
>>  
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +	.turbo_mode	= 0,
> 
> Any specific reason for not enabling turbo mode? 
> It will increase throughput if it is configured in single channel mode.
> 
No specific reason. That was the original configuration, in previous versions of 
the code. It shouldn't make much difference as mipid is only used for panel
detection, enable/disable, and backlight control. Need to test if it works with 
turbo mode.

>> +	.single_channel	= 1,
>> +};
>> +
>>  static struct spi_board_info 
>> rx51_peripherals_spi_board_info[] __initdata = {
>>  	[RX51_SPI_WL1251] = {
>>  		.modalias		= "wl1251",

>> +static int __init rx51_video_init(void) {
>> +	if (!machine_is_nokia_rx51())
>> +		return 0;
>> +
>> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
>> +		pr_err("%s cannot configure MUX for LCD 
>> RESET\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
>> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
>> +
>> +	platform_add_devices(rx51_video_devices,
>> +				ARRAY_SIZE(rx51_video_devices));
>> +	return 0;
>> +}
> 
> Since this functional always returns 0, you can make return value of this 
> function as void.
> 

I guess it is better to return non zero on failure paths then.

thanks.
-roger

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
  2010-03-23 13:48     ` G, Manjunath Kondaiah
@ 2010-03-23 13:55       ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 13:55 UTC (permalink / raw)
  To: ext G, Manjunath Kondaiah
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext G, Manjunath Kondaiah wrote:
> 
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org 
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
>> Sent: Tuesday, March 23, 2010 3:26 PM
>> To: tony@atomide.com
>> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
>> linux-fbdev@vger.kernel.org
>> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
>>
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
>> ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
>> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile 
>> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
>> += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>>  					   board-rx51-sdram.o \
>>  					   board-rx51-peripherals.o \
>> +					   board-rx51-video.o \
>>  					   hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>>  					   board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
>> b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>  	RX51_SPI_WL1251,
>> +	RX51_SPI_MIPID,		/* LCD panel */
>>  };
>>  
>>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
>> +55,11 @@ static struct omap2_mcspi_device_config 
>> wl1251_mcspi_config = {
>>  	.single_channel	= 1,
>>  };
>>  
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +	.turbo_mode	= 0,
> 
> Any specific reason for not enabling turbo mode? 
> It will increase throughput if it is configured in single channel mode.
> 
No specific reason. That was the original configuration, in previous versions of 
the code. It shouldn't make much difference as mipid is only used for panel
detection, enable/disable, and backlight control. Need to test if it works with 
turbo mode.

>> +	.single_channel	= 1,
>> +};
>> +
>>  static struct spi_board_info 
>> rx51_peripherals_spi_board_info[] __initdata = {
>>  	[RX51_SPI_WL1251] = {
>>  		.modalias		= "wl1251",

>> +static int __init rx51_video_init(void) {
>> +	if (!machine_is_nokia_rx51())
>> +		return 0;
>> +
>> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
>> +		pr_err("%s cannot configure MUX for LCD 
>> RESET\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
>> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
>> +
>> +	platform_add_devices(rx51_video_devices,
>> +				ARRAY_SIZE(rx51_video_devices));
>> +	return 0;
>> +}
> 
> Since this functional always returns 0, you can make return value of this 
> function as void.
> 

I guess it is better to return non zero on failure paths then.

thanks.
-roger

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

* Re: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
@ 2010-03-23 13:55       ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-03-23 13:55 UTC (permalink / raw)
  To: ext G, Manjunath Kondaiah
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext G, Manjunath Kondaiah wrote:
> 
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org 
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Roger Quadros
>> Sent: Tuesday, March 23, 2010 3:26 PM
>> To: tony@atomide.com
>> Cc: Tomi.Valkeinen@nokia.com; linux-omap@vger.kernel.org; 
>> linux-fbdev@vger.kernel.org
>> Subject: [PATCH 1/5] OMAP: RX51: Add LCD Panel support
>>
>> From: Roger Quadros <roger.quadros@nokia.com>
>>
>> Adds basic support for LCD Panel on Nokia N900
>>
>> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
>> ---
>>  arch/arm/mach-omap2/Makefile                 |    1 +
>>  arch/arm/mach-omap2/board-rx51-peripherals.c |   13 ++++
>>  arch/arm/mach-omap2/board-rx51-video.c       |   95 
>> ++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)  create 
>> mode 100644 arch/arm/mach-omap2/board-rx51-video.c
>>
>> diff --git a/arch/arm/mach-omap2/Makefile 
>> b/arch/arm/mach-omap2/Makefile index 4b9fc57..b03cbb4 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0)		
>> += board-n8x0.o
>>  obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
>>  					   board-rx51-sdram.o \
>>  					   board-rx51-peripherals.o \
>> +					   board-rx51-video.o \
>>  					   hsmmc.o
>>  obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
>>  					   board-zoom-peripherals.o \
>> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
>> b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> index 4377a4c..f404537 100644
>> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
>> @@ -45,6 +45,7 @@
>>  /* list all spi devices here */
>>  enum {
>>  	RX51_SPI_WL1251,
>> +	RX51_SPI_MIPID,		/* LCD panel */
>>  };
>>  
>>  static struct wl12xx_platform_data wl1251_pdata; @@ -54,6 
>> +55,11 @@ static struct omap2_mcspi_device_config 
>> wl1251_mcspi_config = {
>>  	.single_channel	= 1,
>>  };
>>  
>> +static struct omap2_mcspi_device_config mipid_mcspi_config = {
>> +	.turbo_mode	= 0,
> 
> Any specific reason for not enabling turbo mode? 
> It will increase throughput if it is configured in single channel mode.
> 
No specific reason. That was the original configuration, in previous versions of 
the code. It shouldn't make much difference as mipid is only used for panel
detection, enable/disable, and backlight control. Need to test if it works with 
turbo mode.

>> +	.single_channel	= 1,
>> +};
>> +
>>  static struct spi_board_info 
>> rx51_peripherals_spi_board_info[] __initdata = {
>>  	[RX51_SPI_WL1251] = {
>>  		.modalias		= "wl1251",

>> +static int __init rx51_video_init(void) {
>> +	if (!machine_is_nokia_rx51())
>> +		return 0;
>> +
>> +	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
>> +		pr_err("%s cannot configure MUX for LCD 
>> RESET\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) {
>> +		pr_err("%s failed to get LCD Reset GPIO\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
>> +
>> +	platform_add_devices(rx51_video_devices,
>> +				ARRAY_SIZE(rx51_video_devices));
>> +	return 0;
>> +}
> 
> Since this functional always returns 0, you can make return value of this 
> function as void.
> 

I guess it is better to return non zero on failure paths then.

thanks.
-roger

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-03-23  9:56 ` Roger Quadros
@ 2010-04-06  8:14   ` Arnaud Ebalard
  -1 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-06  8:14 UTC (permalink / raw)
  To: Roger Quadros; +Cc: tony, Tomi.Valkeinen, linux-omap, linux-fbdev

Hi Roger,

Roger Quadros <roger.quadros@nokia.com> writes:

> These patches get the N900 LCD panel working.
> Apply's cleanly on 2.6.34-rc2
>
> Pre-requisites:
> https://patchwork.kernel.org/patch/86318/
> https://patchwork.kernel.org/patch/86319/
> https://patchwork.kernel.org/patch/86320/

First, thanks for pushing the missing bits for N900 hardware support
upstream! I wanted to give your patches a try and test a l-o kernel on
my N900 (I know I won't have full hardware support ... at the moment).

Using current l-o tree with your 5 panel patches and the 3 you link on
patchwork, I initially ended up with a kernel panic in
omap3_onenand_write_bufferram() (i.e. unrelated to your patches).

With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
unmap correct DMA buffer), I am able to get the official Nokia
/sbin/preinit called: then, getbootstate reports a malfunction but
AFAICT, the panel is working ok.

If there are additional patches I should be aware of regarding N900
support, I am also interested.

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-06  8:14   ` Arnaud Ebalard
  0 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-06  8:14 UTC (permalink / raw)
  To: Roger Quadros; +Cc: tony, Tomi.Valkeinen, linux-omap, linux-fbdev

Hi Roger,

Roger Quadros <roger.quadros@nokia.com> writes:

> These patches get the N900 LCD panel working.
> Apply's cleanly on 2.6.34-rc2
>
> Pre-requisites:
> https://patchwork.kernel.org/patch/86318/
> https://patchwork.kernel.org/patch/86319/
> https://patchwork.kernel.org/patch/86320/

First, thanks for pushing the missing bits for N900 hardware support
upstream! I wanted to give your patches a try and test a l-o kernel on
my N900 (I know I won't have full hardware support ... at the moment).

Using current l-o tree with your 5 panel patches and the 3 you link on
patchwork, I initially ended up with a kernel panic in
omap3_onenand_write_bufferram() (i.e. unrelated to your patches).

With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
unmap correct DMA buffer), I am able to get the official Nokia
/sbin/preinit called: then, getbootstate reports a malfunction but
AFAICT, the panel is working ok.

If there are additional patches I should be aware of regarding N900
support, I am also interested.

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-06  8:14   ` Arnaud Ebalard
@ 2010-04-06  9:50     ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-04-06  9:50 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext Arnaud Ebalard wrote:
> Hi Roger,
> 
> Roger Quadros <roger.quadros@nokia.com> writes:
> 
>> These patches get the N900 LCD panel working.
>> Apply's cleanly on 2.6.34-rc2
>>
>> Pre-requisites:
>> https://patchwork.kernel.org/patch/86318/
>> https://patchwork.kernel.org/patch/86319/
>> https://patchwork.kernel.org/patch/86320/
> 
> First, thanks for pushing the missing bits for N900 hardware support
> upstream! I wanted to give your patches a try and test a l-o kernel on
> my N900 (I know I won't have full hardware support ... at the moment).
> 
> Using current l-o tree with your 5 panel patches and the 3 you link on
> patchwork, I initially ended up with a kernel panic in
> omap3_onenand_write_bufferram() (i.e. unrelated to your patches).
> 
> With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
> unmap correct DMA buffer), I am able to get the official Nokia
> /sbin/preinit called: then, getbootstate reports a malfunction but
> AFAICT, the panel is working ok.
> 
The getbootstate malfunction is expected as there is no support for it yet in 
mainline. But you should get to shell without that.

You could hack the startup script to spawn a getty on ttyS2. This should get you 
to shell.

so in /sbin/preinit, in start_shell()

-/sbin/getty 115200 ttyS0 -n -l /bin/sh
+/sbin/getty 115200 ttyS2 -n -l /bin/sh

cheers,
-roger

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-06  9:50     ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-04-06  9:50 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

ext Arnaud Ebalard wrote:
> Hi Roger,
> 
> Roger Quadros <roger.quadros@nokia.com> writes:
> 
>> These patches get the N900 LCD panel working.
>> Apply's cleanly on 2.6.34-rc2
>>
>> Pre-requisites:
>> https://patchwork.kernel.org/patch/86318/
>> https://patchwork.kernel.org/patch/86319/
>> https://patchwork.kernel.org/patch/86320/
> 
> First, thanks for pushing the missing bits for N900 hardware support
> upstream! I wanted to give your patches a try and test a l-o kernel on
> my N900 (I know I won't have full hardware support ... at the moment).
> 
> Using current l-o tree with your 5 panel patches and the 3 you link on
> patchwork, I initially ended up with a kernel panic in
> omap3_onenand_write_bufferram() (i.e. unrelated to your patches).
> 
> With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
> unmap correct DMA buffer), I am able to get the official Nokia
> /sbin/preinit called: then, getbootstate reports a malfunction but
> AFAICT, the panel is working ok.
> 
The getbootstate malfunction is expected as there is no support for it yet in 
mainline. But you should get to shell without that.

You could hack the startup script to spawn a getty on ttyS2. This should get you 
to shell.

so in /sbin/preinit, in start_shell()

-/sbin/getty 115200 ttyS0 -n -l /bin/sh
+/sbin/getty 115200 ttyS2 -n -l /bin/sh

cheers,
-roger

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-06  9:50     ` Roger Quadros
@ 2010-04-06 20:41       ` Arnaud Ebalard
  -1 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-06 20:41 UTC (permalink / raw)
  To: Roger Quadros
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

>> Roger Quadros <roger.quadros@nokia.com> writes:
>>
>>> These patches get the N900 LCD panel working.
>>> Apply's cleanly on 2.6.34-rc2
>>>
>>> Pre-requisites:
>>> https://patchwork.kernel.org/patch/86318/
>>> https://patchwork.kernel.org/patch/86319/
>>> https://patchwork.kernel.org/patch/86320/
>>
>> First, thanks for pushing the missing bits for N900 hardware support
>> upstream! I wanted to give your patches a try and test a l-o kernel on
>> my N900 (I know I won't have full hardware support ... at the moment).
>>
>> Using current l-o tree with your 5 panel patches and the 3 you link on
>> patchwork, I initially ended up with a kernel panic in
>> omap3_onenand_write_bufferram() (i.e. unrelated to your patches).
>>
>> With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
>> unmap correct DMA buffer), I am able to get the official Nokia
>> /sbin/preinit called: then, getbootstate reports a malfunction but
>> AFAICT, the panel is working ok.
>>
> The getbootstate malfunction is expected as there is no support for it
> yet in mainline. But you should get to shell without that.
>
> You could hack the startup script to spawn a getty on ttyS2. This
> should get you to shell.
>
> so in /sbin/preinit, in start_shell()
>
> -/sbin/getty 115200 ttyS0 -n -l /bin/sh
> +/sbin/getty 115200 ttyS2 -n -l /bin/sh

For the records, just in case someone wants to do the same, I had to
use: 

   /sbin/getty 115200 tty0 -n -l /bin/sh

I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
working. Any reason for that option not be enabled by default in
rx51_defconfig?

Additionally, after something like 25 seconds, the screen goes black and
the device stops. Any clue? Can be panel realted?

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-06 20:41       ` Arnaud Ebalard
  0 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-06 20:41 UTC (permalink / raw)
  To: Roger Quadros
  Cc: tony, Valkeinen Tomi (Nokia-D/Helsinki), linux-omap, linux-fbdev

Hi,

>> Roger Quadros <roger.quadros@nokia.com> writes:
>>
>>> These patches get the N900 LCD panel working.
>>> Apply's cleanly on 2.6.34-rc2
>>>
>>> Pre-requisites:
>>> https://patchwork.kernel.org/patch/86318/
>>> https://patchwork.kernel.org/patch/86319/
>>> https://patchwork.kernel.org/patch/86320/
>>
>> First, thanks for pushing the missing bits for N900 hardware support
>> upstream! I wanted to give your patches a try and test a l-o kernel on
>> my N900 (I know I won't have full hardware support ... at the moment).
>>
>> Using current l-o tree with your 5 panel patches and the 3 you link on
>> patchwork, I initially ended up with a kernel panic in
>> omap3_onenand_write_bufferram() (i.e. unrelated to your patches).
>>
>> With http://patchwork.ozlabs.org/patch/48337/ (mtd: OneNAND: OMAP3:
>> unmap correct DMA buffer), I am able to get the official Nokia
>> /sbin/preinit called: then, getbootstate reports a malfunction but
>> AFAICT, the panel is working ok.
>>
> The getbootstate malfunction is expected as there is no support for it
> yet in mainline. But you should get to shell without that.
>
> You could hack the startup script to spawn a getty on ttyS2. This
> should get you to shell.
>
> so in /sbin/preinit, in start_shell()
>
> -/sbin/getty 115200 ttyS0 -n -l /bin/sh
> +/sbin/getty 115200 ttyS2 -n -l /bin/sh

For the records, just in case someone wants to do the same, I had to
use: 

   /sbin/getty 115200 tty0 -n -l /bin/sh

I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
working. Any reason for that option not be enabled by default in
rx51_defconfig?

Additionally, after something like 25 seconds, the screen goes black and
the device stops. Any clue? Can be panel realted?

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-06 20:41       ` Arnaud Ebalard
@ 2010-04-07  5:38         ` Tomi Valkeinen
  -1 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2010-04-07  5:38 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: Quadros Roger (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:

> 
> For the records, just in case someone wants to do the same, I had to
> use: 
> 
>    /sbin/getty 115200 tty0 -n -l /bin/sh
> 
> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
> working. Any reason for that option not be enabled by default in
> rx51_defconfig?
> 
> Additionally, after something like 25 seconds, the screen goes black and
> the device stops. Any clue? Can be panel realted?

I'm guessing here, but it could be the HW watchdog kicking in if by
"device stops" you mean that serial etc also stops. Although it should
reboot, not stop...

 Tomi



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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-07  5:38         ` Tomi Valkeinen
  0 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2010-04-07  5:38 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: Quadros Roger (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:

> 
> For the records, just in case someone wants to do the same, I had to
> use: 
> 
>    /sbin/getty 115200 tty0 -n -l /bin/sh
> 
> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
> working. Any reason for that option not be enabled by default in
> rx51_defconfig?
> 
> Additionally, after something like 25 seconds, the screen goes black and
> the device stops. Any clue? Can be panel realted?

I'm guessing here, but it could be the HW watchdog kicking in if by
"device stops" you mean that serial etc also stops. Although it should
reboot, not stop...

 Tomi



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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-07  5:38         ` Tomi Valkeinen
@ 2010-04-07  7:35           ` Arnaud Ebalard
  -1 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-07  7:35 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Quadros Roger (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi Tomi,

Tomi Valkeinen <tomi.valkeinen@nokia.com> writes:

> On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:
>
>> 
>> For the records, just in case someone wants to do the same, I had to
>> use: 
>> 
>>    /sbin/getty 115200 tty0 -n -l /bin/sh
>> 
>> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
>> working. Any reason for that option not be enabled by default in
>> rx51_defconfig?
>> 
>> Additionally, after something like 25 seconds, the screen goes black and
>> the device stops. Any clue? Can be panel realted?
>
> I'm guessing here, but it could be the HW watchdog kicking in if by
> "device stops" you mean that serial etc also stops. Although it should
> reboot, not stop...

Well, it's a stock N900, not a development board so I don't have a
serial; only the screen and the led in the left corner below the
screen. By "device stops" I mean that the screen and the led (which was
previously on) get dark and stay as is.

I also suspected a HW watchdog but 25 seconds did not sound like it. I
built a kernel without HW watchdog: same result.

Any idea regarding how I could debug that?

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-07  7:35           ` Arnaud Ebalard
  0 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-07  7:35 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Quadros Roger (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi Tomi,

Tomi Valkeinen <tomi.valkeinen@nokia.com> writes:

> On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:
>
>> 
>> For the records, just in case someone wants to do the same, I had to
>> use: 
>> 
>>    /sbin/getty 115200 tty0 -n -l /bin/sh
>> 
>> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
>> working. Any reason for that option not be enabled by default in
>> rx51_defconfig?
>> 
>> Additionally, after something like 25 seconds, the screen goes black and
>> the device stops. Any clue? Can be panel realted?
>
> I'm guessing here, but it could be the HW watchdog kicking in if by
> "device stops" you mean that serial etc also stops. Although it should
> reboot, not stop...

Well, it's a stock N900, not a development board so I don't have a
serial; only the screen and the led in the left corner below the
screen. By "device stops" I mean that the screen and the led (which was
previously on) get dark and stay as is.

I also suspected a HW watchdog but 25 seconds did not sound like it. I
built a kernel without HW watchdog: same result.

Any idea regarding how I could debug that?

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-07  7:35           ` Arnaud Ebalard
@ 2010-04-07  7:38             ` Roger Quadros
  -1 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-04-07  7:38 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: Valkeinen Tomi (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi,

ext Arnaud Ebalard wrote:
> Hi Tomi,
> 
> Tomi Valkeinen <tomi.valkeinen@nokia.com> writes:
> 
>> On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:
>>
>>> For the records, just in case someone wants to do the same, I had to
>>> use: 
>>>
>>>    /sbin/getty 115200 tty0 -n -l /bin/sh
>>>
>>> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
>>> working. Any reason for that option not be enabled by default in
>>> rx51_defconfig?
>>>
>>> Additionally, after something like 25 seconds, the screen goes black and
>>> the device stops. Any clue? Can be panel realted?
>> I'm guessing here, but it could be the HW watchdog kicking in if by
>> "device stops" you mean that serial etc also stops. Although it should
>> reboot, not stop...
> 
> Well, it's a stock N900, not a development board so I don't have a
> serial; only the screen and the led in the left corner below the
> screen. By "device stops" I mean that the screen and the led (which was
> previously on) get dark and stay as is.
> 
> I also suspected a HW watchdog but 25 seconds did not sound like it. I
> built a kernel without HW watchdog: same result.
> 
> Any idea regarding how I could debug that?
> 
You can try disabling the hw watchdogs via flasher.

sudo flasher --set-rd-flags=no-omap-wd,no-ext-wd,no-lifeguard-reset

This should prevent any watchdog resets.


To restore to factory settings do

sudo flasher --disable-rd-mode


cheers,
-roger

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-07  7:38             ` Roger Quadros
  0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2010-04-07  7:38 UTC (permalink / raw)
  To: ext Arnaud Ebalard
  Cc: Valkeinen Tomi (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi,

ext Arnaud Ebalard wrote:
> Hi Tomi,
> 
> Tomi Valkeinen <tomi.valkeinen@nokia.com> writes:
> 
>> On Tue, 2010-04-06 at 22:41 +0200, ext Arnaud Ebalard wrote:
>>
>>> For the records, just in case someone wants to do the same, I had to
>>> use: 
>>>
>>>    /sbin/getty 115200 tty0 -n -l /bin/sh
>>>
>>> I also had to set CONFIG_KEYBOARD_TWL4030 to get the keyboard
>>> working. Any reason for that option not be enabled by default in
>>> rx51_defconfig?
>>>
>>> Additionally, after something like 25 seconds, the screen goes black and
>>> the device stops. Any clue? Can be panel realted?
>> I'm guessing here, but it could be the HW watchdog kicking in if by
>> "device stops" you mean that serial etc also stops. Although it should
>> reboot, not stop...
> 
> Well, it's a stock N900, not a development board so I don't have a
> serial; only the screen and the led in the left corner below the
> screen. By "device stops" I mean that the screen and the led (which was
> previously on) get dark and stay as is.
> 
> I also suspected a HW watchdog but 25 seconds did not sound like it. I
> built a kernel without HW watchdog: same result.
> 
> Any idea regarding how I could debug that?
> 
You can try disabling the hw watchdogs via flasher.

sudo flasher --set-rd-flags=no-omap-wd,no-ext-wd,no-lifeguard-reset

This should prevent any watchdog resets.


To restore to factory settings do

sudo flasher --disable-rd-mode


cheers,
-roger

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
  2010-04-07  7:38             ` Roger Quadros
@ 2010-04-07  8:45               ` Arnaud Ebalard
  -1 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-07  8:45 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Valkeinen Tomi (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi Roger,

Roger Quadros <roger.quadros@nokia.com> writes:

>> I also suspected a HW watchdog but 25 seconds did not sound like it. I
>> built a kernel without HW watchdog: same result.
>>
>> Any idea regarding how I could debug that?
>>
> You can try disabling the hw watchdogs via flasher.
>
> sudo flasher --set-rd-flags=no-omap-wd,no-ext-wd,no-lifeguard-reset
>
> This should prevent any watchdog resets.

It does the job! Thanks for the tip. Now that I have a working console,
I will try and make some progress.

Cheers,

a+

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

* Re: [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900
@ 2010-04-07  8:45               ` Arnaud Ebalard
  0 siblings, 0 replies; 36+ messages in thread
From: Arnaud Ebalard @ 2010-04-07  8:45 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Valkeinen Tomi (Nokia-D/Helsinki), tony, linux-omap, linux-fbdev

Hi Roger,

Roger Quadros <roger.quadros@nokia.com> writes:

>> I also suspected a HW watchdog but 25 seconds did not sound like it. I
>> built a kernel without HW watchdog: same result.
>>
>> Any idea regarding how I could debug that?
>>
> You can try disabling the hw watchdogs via flasher.
>
> sudo flasher --set-rd-flags=no-omap-wd,no-ext-wd,no-lifeguard-reset
>
> This should prevent any watchdog resets.

It does the job! Thanks for the tip. Now that I have a working console,
I will try and make some progress.

Cheers,

a+

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

end of thread, other threads:[~2010-04-07  8:45 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23  9:56 [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900 Roger Quadros
2010-03-23  9:56 ` Roger Quadros
2010-03-23  9:56 ` [PATCH 1/5] OMAP: RX51: Add LCD Panel support Roger Quadros
2010-03-23  9:56   ` Roger Quadros
2010-03-23  9:56   ` [PATCH 2/5] OMAP: RX51: Add "vdds_sdi" supply voltage for SDI Roger Quadros
2010-03-23  9:56     ` Roger Quadros
2010-03-23  9:56     ` [PATCH 3/5] OMAP: RX51: Add Touch Controller in SPI board info Roger Quadros
2010-03-23  9:56       ` Roger Quadros
2010-03-23  9:56       ` [PATCH 4/5] OMAP: DSS2: Add ACX565AKM Panel Driver Roger Quadros
2010-03-23  9:56         ` Roger Quadros
2010-03-23  9:56         ` [PATCH 5/5] OMAP: RX51: Add LCD Panel and framebuffer console to defconfig Roger Quadros
2010-03-23  9:56           ` Roger Quadros
2010-03-23 10:12   ` [PATCH 1/5] OMAP: RX51: Add LCD Panel support pHilipp Zabel
2010-03-23 10:12     ` pHilipp Zabel
2010-03-23 11:20     ` Roger Quadros
2010-03-23 11:20       ` Roger Quadros
2010-03-23 13:48   ` G, Manjunath Kondaiah
2010-03-23 13:48     ` G, Manjunath Kondaiah
2010-03-23 13:55     ` Roger Quadros
2010-03-23 13:55       ` Roger Quadros
2010-03-23 13:55     ` Roger Quadros
2010-03-23 13:55       ` Roger Quadros
2010-04-06  8:14 ` [PATCH 0/5] OMAP: RX51: Add LCD Panel Support for N900 Arnaud Ebalard
2010-04-06  8:14   ` Arnaud Ebalard
2010-04-06  9:50   ` Roger Quadros
2010-04-06  9:50     ` Roger Quadros
2010-04-06 20:41     ` Arnaud Ebalard
2010-04-06 20:41       ` Arnaud Ebalard
2010-04-07  5:38       ` Tomi Valkeinen
2010-04-07  5:38         ` Tomi Valkeinen
2010-04-07  7:35         ` Arnaud Ebalard
2010-04-07  7:35           ` Arnaud Ebalard
2010-04-07  7:38           ` Roger Quadros
2010-04-07  7:38             ` Roger Quadros
2010-04-07  8:45             ` Arnaud Ebalard
2010-04-07  8:45               ` Arnaud Ebalard

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.