From patchwork Wed Jan 13 21:19:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 72710 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0DLJG8p005279 for ; Wed, 13 Jan 2010 21:19:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120Ab0AMVTO (ORCPT ); Wed, 13 Jan 2010 16:19:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932125Ab0AMVTO (ORCPT ); Wed, 13 Jan 2010 16:19:14 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:58412 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932087Ab0AMVTN (ORCPT ); Wed, 13 Jan 2010 16:19:13 -0500 Received: by fxm25 with SMTP id 25so664231fxm.21 for ; Wed, 13 Jan 2010 13:19:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=GSFwMAfg49cNqxxzPgo1adSCY9nMn7YXDu28PbW9bXM=; b=USn9+5WgOFEClu0DWwUTHyNYOBmuREq2TfI78PXSeV+7yVX9Orh3iCyzpGjA5csnay Ze5HdRgvhDAQiGUvRwQWIC+GI+CrH89oFEogLJdwrgMCBPt8pEFk/BBbfW1gFP6Qd0WW 5pD2OyvDGNIXXgKQx8WN8R+gApB9jdvLjk9KA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=WXs9y66LY5mERPnc9l16c821uKwvu/zqkzwEddFNw6CGicsLuhmXzNS3/cjTJqlI4v kU4eWAeC42a+E0UvbrV6F6HxRbNIfzImpiewweRIclP/zjbqqdZGjvJnsKyMxwCKlE3w UyV2TmeDdRbV57Yq1vZLDBBJT3sMb407xmb0g= Received: by 10.223.76.137 with SMTP id c9mr7603476fak.76.1263417551390; Wed, 13 Jan 2010 13:19:11 -0800 (PST) Received: from localhost.localdomain (78-60-202-21.static.zebra.lt [78.60.202.21]) by mx.google.com with ESMTPS id 16sm11050675fxm.12.2010.01.13.13.19.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 13 Jan 2010 13:19:10 -0800 (PST) From: Grazvydas Ignotas To: linux-fbdev@vger.kernel.org Cc: linux-omap@vger.kernel.org, Tomi Valkeinen , Grazvydas Ignotas Subject: [PATCHv2] OMAP: pandora: add DSS2 support and related regulators Date: Wed, 13 Jan 2010 23:19:07 +0200 Message-Id: <1263417547-24575-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index ef17cf1..bd3e577 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "mux.h" #include "sdram-micron-mt46h32m32lf-6.h" @@ -192,6 +193,61 @@ static struct twl4030_keypad_data pandora_kp_data = { .rep = 1, }; +static struct omap_dss_device pandora_lcd_device = { + .name = "lcd", + .driver_name = "tpo_td043mtea1_panel", + .type = OMAP_DISPLAY_TYPE_DPI, + .phy.dpi.data_lines = 24, + .reset_gpio = 157, +}; + +static struct omap_dss_device pandora_tv_device = { + .name = "tv", + .driver_name = "venc", + .type = OMAP_DISPLAY_TYPE_VENC, + .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, +}; + +static struct omap_dss_device *pandora_dss_devices[] = { + &pandora_lcd_device, + &pandora_tv_device, +}; + +static struct omap_dss_board_info pandora_dss_data = { + .num_devices = ARRAY_SIZE(pandora_dss_devices), + .devices = pandora_dss_devices, + .default_device = &pandora_lcd_device, +}; + +static struct platform_device pandora_dss_device = { + .name = "omapdss", + .id = -1, + .dev = { + .platform_data = &pandora_dss_data, + }, +}; + +static struct regulator_consumer_supply pandora_vcc_lcd_supply = { + .supply = "vcc", + .dev = &pandora_lcd_device.dev, +}; + +static struct regulator_consumer_supply pandora_vdda_dac_supply = { + .supply = "vdda_dac", + .dev = &pandora_dss_device.dev, +}; + +static struct regulator_consumer_supply pandora_vdds_supplies[] = { + { + .supply = "vdds_sdi", + .dev = &pandora_dss_device.dev, + }, + { + .supply = "vdds_dsi", + .dev = &pandora_dss_device.dev, + }, +}; + static struct twl4030_hsmmc_info omap3pandora_mmc[] = { { .mmc = 1, @@ -277,6 +333,49 @@ static struct regulator_init_data pandora_vmmc2 = { .consumer_supplies = &pandora_vmmc2_supply, }; +/* VDAC for DSS driving S-Video */ +static struct regulator_init_data pandora_vdac = { + .constraints = { + .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 = 1, + .consumer_supplies = &pandora_vdda_dac_supply, +}; + +/* VPLL2 for digital video outputs */ +static struct regulator_init_data pandora_vpll2 = { + .constraints = { + .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(pandora_vdds_supplies), + .consumer_supplies = pandora_vdds_supplies, +}; + +/* VAUX1 for LCD */ +static struct regulator_init_data pandora_vaux1 = { + .constraints = { + .min_uV = 3000000, + .max_uV = 3000000, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &pandora_vcc_lcd_supply, +}; + static struct twl4030_usb_data omap3pandora_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; @@ -298,6 +397,9 @@ static struct twl4030_platform_data omap3pandora_twldata = { .codec = &omap3pandora_codec_data, .vmmc1 = &pandora_vmmc1, .vmmc2 = &pandora_vmmc2, + .vdac = &pandora_vdac, + .vpll2 = &pandora_vpll2, + .vaux1 = &pandora_vaux1, .keypad = &pandora_kp_data, }; @@ -365,6 +467,12 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { .controller_data = &ads7846_mcspi_config, .irq = OMAP_GPIO_IRQ(OMAP3_PANDORA_TS_GPIO), .platform_data = &ads7846_config, + }, { + .modalias = "tpo_td043mtea1_panel_spi", + .bus_num = 1, + .chip_select = 1, + .max_speed_hz = 375000, + .platform_data = &pandora_lcd_device, } }; @@ -379,6 +487,7 @@ static void __init omap3pandora_init_irq(void) static struct platform_device *omap3pandora_devices[] __initdata = { &pandora_leds_gpio, &pandora_keys_gpio, + &pandora_dss_device, }; static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {