From patchwork Tue Mar 31 08:53:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Kooi X-Patchwork-Id: 15340 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2V8orad007438 for ; Tue, 31 Mar 2009 08:50:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbZCaIuw (ORCPT ); Tue, 31 Mar 2009 04:50:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753344AbZCaIuw (ORCPT ); Tue, 31 Mar 2009 04:50:52 -0400 Received: from [80.81.242.146] ([80.81.242.146]:35243 "EHLO amethyst.openembedded.net" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752162AbZCaIuv (ORCPT ); Tue, 31 Mar 2009 04:50:51 -0400 Received: by amethyst.openembedded.net (Postfix, from userid 1002) id 04C6C189347; Tue, 31 Mar 2009 10:53:10 +0200 (CEST) From: Koen Kooi To: linux-omap@vger.kernel.org Cc: Koen Kooi Subject: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again Date: Tue, 31 Mar 2009 10:53:09 +0200 Message-Id: <1238489589-12216-1-git-send-email-koen@beagleboard.org> X-Mailer: git-send-email 1.6.2 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The ldp board was left behind when other boards got updated. The ldp info was copied from the beagleboard board file and s/beagle/ldp/g Changes since v2: * fixed email address Changes since v1: * dropped vsim portion since only 4 pins are hooked up Signed-off-by: Koen Kooi --- arch/arm/mach-omap2/board-ldp.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 30926b0..19a5c15 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = { &wrst_script, }; +static const struct twl4030_resconfig ldp_resconfig[] = { + /* disable regulators that u-boot left enabled; the + * devices' drivers should be managing these. + */ + { .resource = RES_VMMC1, }, + { 0, }, +}; + static struct twl4030_power_data sdp3430_t2scripts_data __initdata = { + .resource_config = ldp_resconfig, .scripts = twl4030_scripts, .size = ARRAY_SIZE(twl4030_scripts), }; @@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = { .irq_line = 1, }; +static struct regulator_consumer_supply ldp_vmmc1_supply = { + .supply = "vmmc", +}; + +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ +static struct regulator_init_data ldp_vmmc1 = { + .constraints = { + .min_uV = 1850000, + .max_uV = 3150000, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE + | REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &ldp_vmmc1_supply, +}; + static struct twl4030_platform_data ldp_twldata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, @@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = { .madc = &ldp_madc_data, .usb = &ldp_usb_data, .power = &sdp3430_t2scripts_data, + .vmmc1 = &ldp_vmmc1, .gpio = &ldp_gpio_data, .keypad = &ldp_kp_twl4030_data, }; @@ -530,6 +560,8 @@ static void __init omap_ldp_init(void) omap_serial_init(); usb_musb_init(); twl4030_mmc_init(mmc); + /* link regulators to MMC adapters */ + ldp_vmmc1_supply.dev = mmc[0].dev; } static void __init omap_ldp_map_io(void)