From 7c68dd96d5a5eefe3ff6d9b94fc98fd9378aff1f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 3 Aug 2011 14:00:57 +0300 Subject: OMAP: DSS2: Change DSI device naming Currently, there are 2 differently named platform devices generated for the 2 DSS DSI modules. In order to use the same driver, the dsi devices should be 2 instances of the same platform device. Change the platform device names from "omapdss_dsi1" and "omapdss_dsi2" to omapdss_dsi", and set the device indices to 0 and 1. Signed-off-by: Archit Taneja Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/display.c | 6 +++--- arch/arm/mach-omap2/twl-common.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index b6002ec31c6a..d3941e6a40a2 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -267,7 +267,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = { static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), - REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 080d7bd6795e..3f100011adfa 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -335,7 +335,7 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = { static struct regulator_consumer_supply pandora_vdds_supplies[] = { REGULATOR_SUPPLY("vdds_sdi", "omapdss"), REGULATOR_SUPPLY("vdds_dsi", "omapdss"), - REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index a5b7a236aa5b..c42df111c9d2 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -61,7 +61,7 @@ static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = { { "dss_dispc", "omapdss_dispc", -1 }, { "dss_rfbi", "omapdss_rfbi", -1 }, { "dss_venc", "omapdss_venc", -1 }, - { "dss_dsi1", "omapdss_dsi1", -1 }, + { "dss_dsi1", "omapdss_dsi", 0 }, }; static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { @@ -69,8 +69,8 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { { "dss_dispc", "omapdss_dispc", -1 }, { "dss_rfbi", "omapdss_rfbi", -1 }, { "dss_venc", "omapdss_venc", -1 }, - { "dss_dsi1", "omapdss_dsi1", -1 }, - { "dss_dsi2", "omapdss_dsi2", -1 }, + { "dss_dsi1", "omapdss_dsi", 0 }, + { "dss_dsi2", "omapdss_dsi", 1 }, { "dss_hdmi", "omapdss_hdmi", -1 }, }; diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index daa056ed8738..4f6d2164e8cf 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c @@ -99,7 +99,7 @@ static struct regulator_init_data omap3_vdac_idata = { static struct regulator_consumer_supply omap3_vpll2_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), - REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; static struct regulator_init_data omap3_vpll2_idata = { -- cgit v1.2.1 From 4e6a0ab0f9d4c8062bd84f3fc95b175001d46ebf Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 3 Aug 2011 14:13:52 +0300 Subject: OMAP4: TWL: Add common omapdss supplies OMAP DSS normally gets power from VCXIO on OMAP4. Add configuration for this into twl-common.c Mark VCXIO as always_on, as VCXIO is used by multiple components, including the MPU, and turning it off when DSS doesn't need it would lead the device to halt. Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/twl-common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 4f6d2164e8cf..522435772168 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c @@ -235,6 +235,12 @@ static struct regulator_init_data omap4_vana_idata = { }, }; +static struct regulator_consumer_supply omap4_vcxio_supply[] = { + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.1"), +}; + static struct regulator_init_data omap4_vcxio_idata = { .constraints = { .min_uV = 1800000, @@ -243,7 +249,10 @@ static struct regulator_init_data omap4_vcxio_idata = { | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, + .always_on = true, }, + .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply), + .consumer_supplies = omap4_vcxio_supply, }; static struct regulator_init_data omap4_vusb_idata = { -- cgit v1.2.1 From 5bc416cba15f43c799fc02727c6d6887f3e35a4e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 15 Jun 2011 15:21:12 +0300 Subject: OMAP: DSS2: DSI: Improve dsi_mux_pads parameters dsi_mux_pads() needs to know about the DSI HW module and the DSI lanes used. Split the function into two, enable and disable, which take necessary arguments, and add empty implementations for both. Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/display.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index c42df111c9d2..7c6011df80a8 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -74,6 +74,15 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { { "dss_hdmi", "omapdss_hdmi", -1 }, }; +static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) +{ + return 0; +} + +static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) +{ +} + int __init omap_display_init(struct omap_dss_board_info *board_data) { int r = 0; @@ -96,6 +105,11 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); } + if (board_data->dsi_enable_pads == NULL) + board_data->dsi_enable_pads = omap_dsi_enable_pads; + if (board_data->dsi_disable_pads == NULL) + board_data->dsi_disable_pads = omap_dsi_disable_pads; + pdata.board_data = board_data; pdata.board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count; -- cgit v1.2.1 From dc35835c6f4bf3f15b68c723c9b7540cf11b9ad6 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 15 Jun 2011 15:22:47 +0300 Subject: OMAP: DSS2: Implement dsi_mux_pads for OMAP4 Implement dsi_mux_pads for OMAP4. On enable the function enables the DSI pins and disables pull down. On disable the function disables the pins and enables pull down. It is unclear from the TRM whether the pull down is active if the pins are disabled, so this implementation may leave the pins floating when the DSI device is disabled. Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/display.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 7c6011df80a8..62510ec863c6 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -27,6 +27,8 @@ #include #include +#include "control.h" + static struct platform_device omap_display_device = { .name = "omapdss", .id = -1, @@ -74,13 +76,51 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { { "dss_hdmi", "omapdss_hdmi", -1 }, }; +static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) +{ + u32 enable_mask, enable_shift; + u32 pipd_mask, pipd_shift; + u32 reg; + + if (dsi_id == 0) { + enable_mask = OMAP4_DSI1_LANEENABLE_MASK; + enable_shift = OMAP4_DSI1_LANEENABLE_SHIFT; + pipd_mask = OMAP4_DSI1_PIPD_MASK; + pipd_shift = OMAP4_DSI1_PIPD_SHIFT; + } else if (dsi_id == 1) { + enable_mask = OMAP4_DSI2_LANEENABLE_MASK; + enable_shift = OMAP4_DSI2_LANEENABLE_SHIFT; + pipd_mask = OMAP4_DSI2_PIPD_MASK; + pipd_shift = OMAP4_DSI2_PIPD_SHIFT; + } else { + return -ENODEV; + } + + reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); + + reg &= ~enable_mask; + reg &= ~pipd_mask; + + reg |= (lanes << enable_shift) & enable_mask; + reg |= (lanes << pipd_shift) & pipd_mask; + + omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); + + return 0; +} + static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) { + if (cpu_is_omap44xx()) + return omap4_dsi_mux_pads(dsi_id, lane_mask); + return 0; } static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) { + if (cpu_is_omap44xx()) + omap4_dsi_mux_pads(dsi_id, 0); } int __init omap_display_init(struct omap_dss_board_info *board_data) -- cgit v1.2.1 From cc11aaf867e777dfa0f14d9bedead895f5e541b7 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Thu, 1 Sep 2011 15:05:08 +0200 Subject: OMAP: Devkit8000: Change lcd driver to AT070TN83 Change lcd driver from generic to AT070TN83. Signed-off-by: Thomas Weber Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/board-devkit8000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index d3941e6a40a2..da5057ee80ce 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -139,7 +139,7 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = { }; static struct panel_generic_dpi_data lcd_panel = { - .name = "generic", + .name = "innolux_at070tn83", .platform_enable = devkit8000_panel_enable_lcd, .platform_disable = devkit8000_panel_disable_lcd, }; -- cgit v1.2.1 From 8d88767a4377171752c22ac39bcb2b505eb751da Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 22 Aug 2011 13:02:52 +0300 Subject: OMAP: DSS2: HDMI: use default dividers Use default regn and regm2 dividers in the hdmi driver if the board file does not define them. Cc: Mythri P K Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/board-4430sdp.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index c7cef44c75d4..79c28273cf08 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -652,15 +652,6 @@ static struct omap_dss_device sdp4430_hdmi_device = { .name = "hdmi", .driver_name = "hdmi_panel", .type = OMAP_DISPLAY_TYPE_HDMI, - .clocks = { - .dispc = { - .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, - }, - .hdmi = { - .regn = 15, - .regm2 = 1, - }, - }, .platform_enable = sdp4430_panel_enable_hdmi, .platform_disable = sdp4430_panel_disable_hdmi, .channel = OMAP_DSS_CHANNEL_DIGIT, -- cgit v1.2.1 From 1d7a8654e88885137ade1769c574467775fde27b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 1 Sep 2011 10:13:04 +0300 Subject: OMAP: use dvi panel driver instead of generic-dpi Multiple OMAP3/4 boards have a DVI framer output. This patch makes the boards use the new panel-dvi driver, instead of the panel-generic-dpi driver. Separate drivers for fixed size panels and DVI framer gives us cleaner driver code. Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen --- arch/arm/mach-omap2/board-3430sdp.c | 7 +++---- arch/arm/mach-omap2/board-am3517evm.c | 6 +++--- arch/arm/mach-omap2/board-cm-t35.c | 6 +++--- arch/arm/mach-omap2/board-devkit8000.c | 6 +++--- arch/arm/mach-omap2/board-igep0020.c | 7 +++---- arch/arm/mach-omap2/board-omap3beagle.c | 7 +++---- arch/arm/mach-omap2/board-omap3evm.c | 7 +++---- arch/arm/mach-omap2/board-omap3stalker.c | 6 +++--- arch/arm/mach-omap2/board-omap4panda.c | 7 +++---- arch/arm/mach-omap2/board-overo.c | 6 +++--- 10 files changed, 30 insertions(+), 35 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index bd600cfb7f80..18c4d19a439f 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -37,7 +37,7 @@ #include #include #include