All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part)
@ 2011-09-12 11:20 Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 1/6] OMAP: RX51: Remove unused old omapfb stuff Tomi Valkeinen
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen

This patch set ports all the OMAP2/3 boards, except N8x0, that use the old
omapfb to use the newer DSS2 driver. Only board files are changed, the panel
driver additions are done in separate patch set. Applying this set without the
driver changes will obviously disable the displays of the affected boards until
the drivers are also merged.

Some board files contained old omapfb code, but there wasn't a matching LCD
driver. That board file code is also removed.

Porting N800 driver is more complicated, as the blizzard chip driver is quite
big and includes features that cannot be supported in DSS2 currently. I will
post patches for that later.

I don't have any of the boards touched by these patches, so testing is
appreciated.

 Tomi

Tomi Valkeinen (6):
  OMAP: RX51: Remove unused old omapfb stuff
  OMAP: omap3touchbook: Remove unused lcd stuff
  OMAP: 2420SDP: Port the display driver to new DSS2
  OMAP: LDP: Port the display driver to new DSS2
  OMAP: H4: Port the display driver to new DSS2
  OMAP: Apollon: Port the display driver to new DSS2

 arch/arm/mach-omap2/board-2430sdp.c        |   78 ++++++++++++++---
 arch/arm/mach-omap2/board-apollon.c        |   35 +++++---
 arch/arm/mach-omap2/board-h4.c             |   42 ++++++----
 arch/arm/mach-omap2/board-ldp.c            |  123 +++++++++++++++++++++++++---
 arch/arm/mach-omap2/board-omap3touchbook.c |   18 ----
 arch/arm/mach-omap2/board-rx51.c           |   25 ------
 6 files changed, 225 insertions(+), 96 deletions(-)

-- 
1.7.4.1


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

* [PATCHv2 1/6] OMAP: RX51: Remove unused old omapfb stuff
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 2/6] OMAP: omap3touchbook: Remove unused lcd stuff Tomi Valkeinen
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen

RX51 uses the new DSS2 display driver, but the board file still
contained some code for the old omapfb driver. The old code can be
removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-rx51.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 5ea142f..9e7dde6 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -79,29 +79,6 @@ static struct cpuidle_params rx51_cpuidle_params[] = {
 	{7505 + 15274, 484329, 1},
 };
 
-static struct omap_lcd_config rx51_lcd_config = {
-	.ctrl_name	= "internal",
-};
-
-static struct omap_fbmem_config rx51_fbmem0_config = {
-	.size = 752 * 1024,
-};
-
-static struct omap_fbmem_config rx51_fbmem1_config = {
-	.size = 752 * 1024,
-};
-
-static struct omap_fbmem_config rx51_fbmem2_config = {
-	.size = 752 * 1024,
-};
-
-static struct omap_board_config_kernel rx51_config[] = {
-	{ OMAP_TAG_FBMEM,	&rx51_fbmem0_config },
-	{ OMAP_TAG_FBMEM,	&rx51_fbmem1_config },
-	{ OMAP_TAG_FBMEM,	&rx51_fbmem2_config },
-	{ OMAP_TAG_LCD,		&rx51_lcd_config },
-};
-
 static void __init rx51_init_early(void)
 {
 	struct omap_sdrc_params *sdrc_params;
@@ -128,8 +105,6 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init rx51_init(void)
 {
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-	omap_board_config = rx51_config;
-	omap_board_config_size = ARRAY_SIZE(rx51_config);
 	omap3_pm_init_cpuidle(rx51_cpuidle_params);
 	omap_serial_init();
 	usb_musb_init(&musb_board_data);
-- 
1.7.4.1


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

* [PATCHv2 2/6] OMAP: omap3touchbook: Remove unused lcd stuff
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 1/6] OMAP: RX51: Remove unused old omapfb stuff Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 3/6] OMAP: 2420SDP: Port the display driver to new DSS2 Tomi Valkeinen
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen, Gregoire Gentil

board-omap3touchbook.c adds an LCD device, but the kernel doesn't
contain a driver for the device. So let's remove the unneeded LCD
device.

Cc: Gregoire Gentil <gregoire@gentil.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-omap3touchbook.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 852ea04..80e8276 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -104,15 +104,6 @@ static struct omap2_hsmmc_info mmc[] = {
 	{}	/* Terminator */
 };
 
-static struct platform_device omap3_touchbook_lcd_device = {
-	.name		= "omap3touchbook_lcd",
-	.id		= -1,
-};
-
-static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
-	.ctrl_name	= "internal",
-};
-
 static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
 	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
@@ -165,14 +156,12 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
 static struct regulator_consumer_supply touchbook_vdac_supply[] = {
 {
 	.supply		= "vdac",
-	.dev		= &omap3_touchbook_lcd_device.dev,
 },
 };
 
 static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
 {
 	.supply		= "vdvi",
-	.dev		= &omap3_touchbook_lcd_device.dev,
 },
 };
 
@@ -316,10 +305,6 @@ static struct platform_device keys_gpio = {
 	},
 };
 
-static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
-	{ OMAP_TAG_LCD,		&omap3_touchbook_lcd_config },
-};
-
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
@@ -339,7 +324,6 @@ static void __init omap3_touchbook_init_irq(void)
 }
 
 static struct platform_device *omap3_touchbook_devices[] __initdata = {
-	&omap3_touchbook_lcd_device,
 	&leds_gpio,
 	&keys_gpio,
 };
@@ -376,8 +360,6 @@ early_param("tbr", early_touchbook_revision);
 static void __init omap3_touchbook_init(void)
 {
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-	omap_board_config = omap3_touchbook_config;
-	omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
 
 	pm_power_off = omap3_touchbook_poweroff;
 
-- 
1.7.4.1


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

* [PATCHv2 3/6] OMAP: 2420SDP: Port the display driver to new DSS2
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 1/6] OMAP: RX51: Remove unused old omapfb stuff Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 2/6] OMAP: omap3touchbook: Remove unused lcd stuff Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 4/6] OMAP: LDP: " Tomi Valkeinen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen, Hunyue Yau

Port the old omapfb panel driver to DSS2. This patch changes the board
file only, the driver is ported in separate patch.

Cc: Hunyue Yau <hyau@mvista.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-2430sdp.c |   78 ++++++++++++++++++++++++++++------
 1 files changed, 64 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 2028464..6742eef 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -39,6 +39,9 @@
 #include <plat/usb.h>
 #include <plat/gpmc-smc91x.h>
 
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+
 #include "mux.h"
 #include "hsmmc.h"
 #include "common-board-devices.h"
@@ -99,20 +102,72 @@ static struct platform_device sdp2430_flash_device = {
 	.resource	= &sdp2430_flash_resource,
 };
 
-static struct platform_device sdp2430_lcd_device = {
-	.name		= "sdp2430_lcd",
-	.id		= -1,
-};
-
 static struct platform_device *sdp2430_devices[] __initdata = {
 	&sdp2430_flash_device,
+};
+
+/* LCD */
+#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO	91
+#define SDP2430_LCD_PANEL_ENABLE_GPIO		154
+
+static int sdp2430_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 1);
+	gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 1);
+
+	return 0;
+}
+
+static void sdp2430_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 0);
+	gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 0);
+}
+
+static struct panel_generic_dpi_data sdp2430_panel_data = {
+	.name			= "2430sdp",
+	.platform_enable	= sdp2430_panel_enable_lcd,
+	.platform_disable	= sdp2430_panel_disable_lcd,
+};
+
+static struct omap_dss_device sdp2430_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.phy.dpi.data_lines	= 16,
+	.data			= &sdp2430_panel_data,
+};
+
+static struct omap_dss_device *sdp2430_dss_devices[] = {
 	&sdp2430_lcd_device,
 };
 
-static struct omap_lcd_config sdp2430_lcd_config __initdata = {
-	.ctrl_name	= "internal",
+static struct omap_dss_board_info sdp2430_dss_data = {
+	.num_devices	= ARRAY_SIZE(sdp2430_dss_devices),
+	.devices	= sdp2430_dss_devices,
+	.default_device	= &sdp2430_lcd_device,
 };
 
+static void __init sdp2430_display_init(void)
+{
+	int r;
+
+	static struct gpio gpios[] __initdata = {
+		{ SDP2430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
+			"LCD reset" },
+		{ SDP2430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW,
+			"LCD Backlight" },
+	};
+
+	r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+	if (r) {
+		pr_err("Cannot request LCD GPIOs, error %d\n", r);
+		return;
+	}
+
+	omap_display_init(&sdp2430_dss_data);
+}
+
 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
 
 static struct omap_smc91x_platform_data board_smc91x_data = {
@@ -137,10 +192,6 @@ static inline void board_smc91x_init(void)
 
 #endif
 
-static struct omap_board_config_kernel sdp2430_config[] __initdata = {
-	{OMAP_TAG_LCD, &sdp2430_lcd_config},
-};
-
 static void __init omap_2430sdp_init_early(void)
 {
 	omap2_init_common_infrastructure();
@@ -228,9 +279,6 @@ static void __init omap_2430sdp_init(void)
 {
 	omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
 
-	omap_board_config = sdp2430_config;
-	omap_board_config_size = ARRAY_SIZE(sdp2430_config);
-
 	omap2430_i2c_init();
 
 	platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
@@ -246,6 +294,8 @@ static void __init omap_2430sdp_init(void)
 	/* Turn off secondary LCD backlight */
 	gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW,
 			 "Secondary LCD backlight");
+
+	sdp2430_display_init();
 }
 
 static void __init omap_2430sdp_map_io(void)
-- 
1.7.4.1


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

* [PATCHv2 4/6] OMAP: LDP: Port the display driver to new DSS2
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
                   ` (2 preceding siblings ...)
  2011-09-12 11:20 ` [PATCHv2 3/6] OMAP: 2420SDP: Port the display driver to new DSS2 Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 5/6] OMAP: H4: " Tomi Valkeinen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen, Igor Grinberg

Port the old omapfb panel driver to DSS2. This patch changes the board
file only, the driver is ported in separate patch.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-ldp.c |  123 +++++++++++++++++++++++++++++++++++----
 1 files changed, 112 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 218764c..76f02a9 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -27,6 +27,7 @@
 #include <linux/io.h>
 #include <linux/smsc911x.h>
 #include <linux/mmc/host.h>
+#include <linux/gpio.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -34,7 +35,6 @@
 #include <asm/mach/map.h>
 
 #include <plat/mcspi.h>
-#include <mach/gpio.h>
 #include <plat/board.h>
 #include <plat/common.h>
 #include <plat/gpmc.h>
@@ -44,6 +44,9 @@
 #include <plat/usb.h>
 #include <plat/gpmc-smsc911x.h>
 
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+
 #include "board-flash.h"
 #include "mux.h"
 #include "hsmmc.h"
@@ -180,29 +183,108 @@ static inline void __init ldp_init_smsc911x(void)
 	gpmc_smsc911x_init(&smsc911x_cfg);
 }
 
-static struct platform_device ldp_lcd_device = {
-	.name		= "ldp_lcd",
-	.id		= -1,
+/* LCD */
+
+static int ldp_backlight_gpio;
+static int ldp_lcd_enable_gpio;
+
+#define LCD_PANEL_RESET_GPIO		55
+#define LCD_PANEL_QVGA_GPIO		56
+
+static int ldp_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	if (gpio_is_valid(ldp_lcd_enable_gpio))
+		gpio_direction_output(ldp_lcd_enable_gpio, 1);
+	if (gpio_is_valid(ldp_backlight_gpio))
+		gpio_direction_output(ldp_backlight_gpio, 1);
+
+	return 0;
+}
+
+static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	if (gpio_is_valid(ldp_lcd_enable_gpio))
+		gpio_direction_output(ldp_lcd_enable_gpio, 0);
+	if (gpio_is_valid(ldp_backlight_gpio))
+		gpio_direction_output(ldp_backlight_gpio, 0);
+}
+
+static struct panel_generic_dpi_data ldp_panel_data = {
+	.name			= "2430sdp",
+	.platform_enable	= ldp_panel_enable_lcd,
+	.platform_disable	= ldp_panel_disable_lcd,
 };
 
-static struct omap_lcd_config ldp_lcd_config __initdata = {
-	.ctrl_name	= "internal",
+static struct omap_dss_device ldp_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.phy.dpi.data_lines	= 18,
+	.data			= &ldp_panel_data,
+};
+
+static struct omap_dss_device *ldp_dss_devices[] = {
+	&ldp_lcd_device,
 };
 
-static struct omap_board_config_kernel ldp_config[] __initdata = {
-	{ OMAP_TAG_LCD,		&ldp_lcd_config },
+static struct omap_dss_board_info ldp_dss_data = {
+	.num_devices	= ARRAY_SIZE(ldp_dss_devices),
+	.devices	= ldp_dss_devices,
+	.default_device	= &ldp_lcd_device,
 };
 
+static void __init ldp_display_init(void)
+{
+	int r;
+
+	static struct gpio gpios[] __initdata = {
+		{LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
+		{LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
+	};
+
+	r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+	if (r) {
+		pr_err("Cannot request LCD GPIOs, error %d\n", r);
+		return;
+	}
+
+	omap_display_init(&ldp_dss_data);
+}
+
 static void __init omap_ldp_init_early(void)
 {
 	omap2_init_common_infrastructure();
 	omap2_init_common_devices(NULL, NULL);
 }
 
+static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
+{
+	int r;
+
+	struct gpio gpios[] = {
+		{gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"},
+		{gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"},
+	};
+
+	r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+	if (r) {
+		pr_err("Cannot request LCD GPIOs, error %d\n", r);
+		ldp_backlight_gpio = -EINVAL;
+		ldp_lcd_enable_gpio = -EINVAL;
+		return r;
+	}
+
+	ldp_backlight_gpio = gpio + 15;
+	ldp_lcd_enable_gpio = gpio + 7;
+
+	return 0;
+}
+
 static struct twl4030_gpio_platform_data ldp_gpio_data = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
+	.setup		= ldp_twl_gpio_setup,
 };
 
 static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
@@ -244,10 +326,31 @@ static struct regulator_init_data ldp_vaux1 = {
 	.consumer_supplies		= ldp_vaux1_supplies,
 };
 
+static struct regulator_consumer_supply ldp_vpll2_supplies[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
+};
+
+static struct regulator_init_data ldp_vpll2 = {
+	.constraints = {
+		.name			= "VDVI",
+		.min_uV			= 1800000,
+		.max_uV			= 1800000,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(ldp_vpll2_supplies),
+	.consumer_supplies	= ldp_vpll2_supplies,
+};
+
 static struct twl4030_platform_data ldp_twldata = {
 	/* platform_data for children goes here */
 	.vmmc1		= &ldp_vmmc1,
 	.vaux1		= &ldp_vaux1,
+	.vpll2		= &ldp_vpll2,
 	.gpio		= &ldp_gpio_data,
 	.keypad		= &ldp_kp_twl4030_data,
 };
@@ -273,7 +376,6 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
 };
 
 static struct platform_device *ldp_devices[] __initdata = {
-	&ldp_lcd_device,
 	&ldp_gpio_keys_device,
 };
 
@@ -318,8 +420,6 @@ static struct mtd_partition ldp_nand_partitions[] = {
 static void __init omap_ldp_init(void)
 {
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-	omap_board_config = ldp_config;
-	omap_board_config_size = ARRAY_SIZE(ldp_config);
 	ldp_init_smsc911x();
 	omap_i2c_init();
 	platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
@@ -330,6 +430,7 @@ static void __init omap_ldp_init(void)
 		ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
 
 	omap2_hsmmc_init(mmc);
+	ldp_display_init();
 }
 
 MACHINE_START(OMAP_LDP, "OMAP LDP board")
-- 
1.7.4.1


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

* [PATCHv2 5/6] OMAP: H4: Port the display driver to new DSS2
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
                   ` (3 preceding siblings ...)
  2011-09-12 11:20 ` [PATCHv2 4/6] OMAP: LDP: " Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-12 11:20 ` [PATCHv2 6/6] OMAP: Apollon: " Tomi Valkeinen
  2011-09-19  7:38 ` [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen

Port the old omapfb panel driver to DSS2. This patch changes the board
file only, the driver is ported in separate patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-h4.c |   42 ++++++++++++++++++++++++---------------
 1 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 45de2b3..f7c09de 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -40,6 +40,9 @@
 #include <plat/dma.h>
 #include <plat/gpmc.h>
 
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+
 #include "mux.h"
 #include "control.h"
 
@@ -157,17 +160,33 @@ static struct platform_device h4_kp_device = {
 	},
 };
 
-static struct platform_device h4_lcd_device = {
-	.name		= "lcd_h4",
-	.id		= -1,
-};
-
 static struct platform_device *h4_devices[] __initdata = {
 	&h4_flash_device,
 	&h4_kp_device,
+};
+
+static struct panel_generic_dpi_data h4_panel_data = {
+	.name			= "h4",
+};
+
+static struct omap_dss_device h4_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.phy.dpi.data_lines	= 16,
+	.data			= &h4_panel_data,
+};
+
+static struct omap_dss_device *h4_dss_devices[] = {
 	&h4_lcd_device,
 };
 
+static struct omap_dss_board_info h4_dss_data = {
+	.num_devices	= ARRAY_SIZE(h4_dss_devices),
+	.devices	= h4_dss_devices,
+	.default_device	= &h4_lcd_device,
+};
+
 /* 2420 Sysboot setup (2430 is different) */
 static u32 get_sysboot_value(void)
 {
@@ -271,10 +290,6 @@ static void __init h4_init_flash(void)
 	h4_flash_resource.end	= base + SZ_64M - 1;
 }
 
-static struct omap_lcd_config h4_lcd_config __initdata = {
-	.ctrl_name	= "internal",
-};
-
 static struct omap_usb_config h4_usb_config __initdata = {
 	/* S1.10 OFF -- usb "download port"
 	 * usb0 switched to Mini-B port and isp1105 transceiver;
@@ -286,10 +301,6 @@ static struct omap_usb_config h4_usb_config __initdata = {
 	.hmc_mode	= 0x00,		/* 0:dev|otg 1:disable 2:disable */
 };
 
-static struct omap_board_config_kernel h4_config[] __initdata = {
-	{ OMAP_TAG_LCD,		&h4_lcd_config },
-};
-
 static void __init omap_h4_init_early(void)
 {
 	omap2_init_common_infrastructure();
@@ -331,9 +342,6 @@ static void __init omap_h4_init(void)
 {
 	omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
 
-	omap_board_config = h4_config;
-	omap_board_config_size = ARRAY_SIZE(h4_config);
-
 	/*
 	 * Make sure the serial ports are muxed on at this point.
 	 * You have to mux them off in device drivers later on
@@ -372,6 +380,8 @@ static void __init omap_h4_init(void)
 	omap2_usbfs_init(&h4_usb_config);
 	omap_serial_init();
 	h4_init_flash();
+
+	omap_display_init(&h4_dss_data);
 }
 
 static void __init omap_h4_map_io(void)
-- 
1.7.4.1


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

* [PATCHv2 6/6] OMAP: Apollon: Port the display driver to new DSS2
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
                   ` (4 preceding siblings ...)
  2011-09-12 11:20 ` [PATCHv2 5/6] OMAP: H4: " Tomi Valkeinen
@ 2011-09-12 11:20 ` Tomi Valkeinen
  2011-09-19  7:38 ` [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
  6 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-12 11:20 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: archit, Tomi Valkeinen, Kyungmin Park

Port the old omapfb panel driver to DSS2. This patch changes the board
file only, the driver is ported in separate patch.

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-apollon.c |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 7021170..d8eb81e 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -40,6 +40,9 @@
 #include <plat/common.h>
 #include <plat/gpmc.h>
 
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+
 #include "mux.h"
 #include "control.h"
 
@@ -149,11 +152,6 @@ static struct platform_device apollon_smc91x_device = {
 	.resource	= apollon_smc91x_resources,
 };
 
-static struct platform_device apollon_lcd_device = {
-	.name		= "apollon_lcd",
-	.id		= -1,
-};
-
 static struct omap_led_config apollon_led_config[] = {
 	{
 		.cdev	= {
@@ -191,7 +189,6 @@ static struct platform_device apollon_led_device = {
 static struct platform_device *apollon_devices[] __initdata = {
 	&apollon_onenand_device,
 	&apollon_smc91x_device,
-	&apollon_lcd_device,
 	&apollon_led_device,
 };
 
@@ -265,12 +262,26 @@ static struct omap_usb_config apollon_usb_config __initdata = {
 	.pins[0]	= 6,
 };
 
-static struct omap_lcd_config apollon_lcd_config __initdata = {
-	.ctrl_name	= "internal",
+static struct panel_generic_dpi_data apollon_panel_data = {
+	.name			= "apollon",
 };
 
-static struct omap_board_config_kernel apollon_config[] __initdata = {
-	{ OMAP_TAG_LCD,		&apollon_lcd_config },
+static struct omap_dss_device apollon_lcd_device = {
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.phy.dpi.data_lines	= 18,
+	.data			= &apollon_panel_data,
+};
+
+static struct omap_dss_device *apollon_dss_devices[] = {
+	&apollon_lcd_device,
+};
+
+static struct omap_dss_board_info apollon_dss_data = {
+	.num_devices	= ARRAY_SIZE(apollon_dss_devices),
+	.devices	= apollon_dss_devices,
+	.default_device	= &apollon_lcd_device,
 };
 
 static void __init omap_apollon_init_early(void)
@@ -314,8 +325,6 @@ static void __init omap_apollon_init(void)
 	u32 v;
 
 	omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
-	omap_board_config = apollon_config;
-	omap_board_config_size = ARRAY_SIZE(apollon_config);
 
 	apollon_init_smc91x();
 	apollon_led_init();
@@ -340,6 +349,8 @@ static void __init omap_apollon_init(void)
 	 */
 	platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
 	omap_serial_init();
+
+	omap_display_init(&apollon_dss_data);
 }
 
 static void __init omap_apollon_map_io(void)
-- 
1.7.4.1


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

* Re: [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part)
  2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
                   ` (5 preceding siblings ...)
  2011-09-12 11:20 ` [PATCHv2 6/6] OMAP: Apollon: " Tomi Valkeinen
@ 2011-09-19  7:38 ` Tomi Valkeinen
  2011-09-19 21:08   ` Tony Lindgren
  6 siblings, 1 reply; 9+ messages in thread
From: Tomi Valkeinen @ 2011-09-19  7:38 UTC (permalink / raw)
  To: tony; +Cc: archit, linux-omap mailing list

Hi Tony, 

On Mon, 2011-09-12 at 14:20 +0300, Tomi Valkeinen wrote:
> This patch set ports all the OMAP2/3 boards, except N8x0, that use the old
> omapfb to use the newer DSS2 driver. Only board files are changed, the panel
> driver additions are done in separate patch set. Applying this set without the
> driver changes will obviously disable the displays of the affected boards until
> the drivers are also merged.
> 
> Some board files contained old omapfb code, but there wasn't a matching LCD
> driver. That board file code is also removed.

Any chances to get these in for the next merge window? These will remove
most of the OMAP2/3 users of the old omapfb, and when the old omapfb is
used only by OMAP1, we can remove quite a bit of code there.

 Tomi



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

* Re: [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part)
  2011-09-19  7:38 ` [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
@ 2011-09-19 21:08   ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2011-09-19 21:08 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: archit, linux-omap mailing list

* Tomi Valkeinen <tomi.valkeinen@ti.com> [110919 00:05]:
> Hi Tony, 
> 
> On Mon, 2011-09-12 at 14:20 +0300, Tomi Valkeinen wrote:
> > This patch set ports all the OMAP2/3 boards, except N8x0, that use the old
> > omapfb to use the newer DSS2 driver. Only board files are changed, the panel
> > driver additions are done in separate patch set. Applying this set without the
> > driver changes will obviously disable the displays of the affected boards until
> > the drivers are also merged.
> > 
> > Some board files contained old omapfb code, but there wasn't a matching LCD
> > driver. That board file code is also removed.
> 
> Any chances to get these in for the next merge window? These will remove
> most of the OMAP2/3 users of the old omapfb, and when the old omapfb is
> used only by OMAP1, we can remove quite a bit of code there.

OK thanks for cleaning this up. Will apply these to board branch.

Tony

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

end of thread, other threads:[~2011-09-19 21:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 11:20 [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 1/6] OMAP: RX51: Remove unused old omapfb stuff Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 2/6] OMAP: omap3touchbook: Remove unused lcd stuff Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 3/6] OMAP: 2420SDP: Port the display driver to new DSS2 Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 4/6] OMAP: LDP: " Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 5/6] OMAP: H4: " Tomi Valkeinen
2011-09-12 11:20 ` [PATCHv2 6/6] OMAP: Apollon: " Tomi Valkeinen
2011-09-19  7:38 ` [PATCHv2 0/6] OMAP: DSS: porting old drivers to DSS2 (board files part) Tomi Valkeinen
2011-09-19 21:08   ` Tony Lindgren

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.