From patchwork Wed Mar 11 18:58:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brownell X-Patchwork-Id: 11185 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 n2BIwbZF018505 for ; Wed, 11 Mar 2009 18:58:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbZCKS6e (ORCPT ); Wed, 11 Mar 2009 14:58:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752619AbZCKS6e (ORCPT ); Wed, 11 Mar 2009 14:58:34 -0400 Received: from n15b.bullet.mail.mud.yahoo.com ([68.142.207.236]:38108 "HELO n15b.bullet.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752574AbZCKS6e (ORCPT ); Wed, 11 Mar 2009 14:58:34 -0400 Received: from [209.191.108.97] by n15.bullet.mail.mud.yahoo.com with NNFMP; 11 Mar 2009 18:58:31 -0000 Received: from [68.142.201.66] by t4.bullet.mud.yahoo.com with NNFMP; 11 Mar 2009 18:58:31 -0000 Received: from [127.0.0.1] by omp418.mail.mud.yahoo.com with NNFMP; 11 Mar 2009 18:58:31 -0000 X-Yahoo-Newman-Id: 956416.85555.bm@omp418.mail.mud.yahoo.com Received: (qmail 34690 invoked from network); 11 Mar 2009 18:58:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=HuWwp7DfHGFgJM32Y7e3+we4Q7crDPjWsQJMP8ox4qEs3C1iih2rr3ZWL2ysQySnVIaOMeoUGdsSJqnc9ZMl/SIpkUn2eL/wrVxDInZ2nWSU4+A/RGCjseLMTe9SZ0zWWPQhiFomrkx3LZZ/FGa0MymCxjgqQfFY0CTYQ+q8c8U= ; Received: from unknown (HELO pogo) (david-b@69.226.224.20 with plain) by smtp107.sbc.mail.sp1.yahoo.com with SMTP; 11 Mar 2009 18:58:31 -0000 X-YMail-OSG: ZKbRz0sVM1mPlA2rulbkyyA7JP83TmSZTV6iOcuUD.s3GI2HrV.S6TaxdGEAHEjx1StI.u.aZhZINEem98QRY3HC74RGcvgCX2rNxlFbUrr9Pn5UxdtwgA7OFr28qcSV9I2GT6pwnbKzzEXtt9aNIS0iwZPz392Esi5yoOVFfQfMSh94cyyxLYKSkFj2FpvuEg-- X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: OMAP Subject: [patch 2.6.29-rc7-omap-git] Overo: MMC regulator configuration Date: Wed, 11 Mar 2009 10:58:29 -0800 User-Agent: KMail/1.9.10 Cc: Steve Sakoman MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200903111158.29860.david-b@pacbell.net> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: David Brownell This patch hooks up the twl4030 MMC1 regulator on Overo, as well as the MMC1 card detect signal. The WLAN chip connected to MMC2 on some board versions has a dedicated regulator. Signed-off-by: David Brownell Acked-by: Felipe Balbi --- Patches still needed for LDP/Zoom and Pandora... arch/arm/mach-omap2/board-overo.c | 55 ++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 18 deletions(-) -- 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 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -267,10 +267,45 @@ static struct omap_uart_config overo_uar .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; +static struct twl4030_hsmmc_info mmc[] = { + { + .mmc = 1, + .wires = 4, + .gpio_cd = -EINVAL, + .gpio_wp = -EINVAL, + }, + { + .mmc = 2, + .wires = 4, + .gpio_cd = -EINVAL, + .gpio_wp = -EINVAL, + .transceiver = true, + .ocr_mask = 0x00100000, /* 3.3V */ + }, + {} /* Terminator */ +}; + +static struct regulator_consumer_supply overo_vmmc1_supply = { + .supply = "vmmc", +}; + +static int overo_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) +{ + /* gpio + 0 is "mmc0_cd" (input/IRQ) */ + mmc[0].gpio_cd = gpio + 0; + twl4030_mmc_init(mmc); + + overo_vmmc1_supply.dev = mmc[0].dev; + + return 0; +} + static struct twl4030_gpio_platform_data overo_gpio_data = { .gpio_base = OMAP_MAX_GPIO_LINES, .irq_base = TWL4030_GPIO_IRQ_BASE, .irq_end = TWL4030_GPIO_IRQ_END, + .setup = overo_twl_gpio_setup, }; static struct twl4030_usb_data overo_usb_data = { @@ -287,6 +322,8 @@ static struct regulator_init_data overo_ | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = 1, + .consumer_supplies = &overo_vmmc1_supply, }; /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ @@ -343,23 +380,6 @@ static struct platform_device *overo_dev &overo_lcd_device, }; -static struct twl4030_hsmmc_info mmc[] __initdata = { - { - .mmc = 1, - .wires = 4, - .gpio_cd = -EINVAL, - .gpio_wp = -EINVAL, - }, - { - .mmc = 2, - .wires = 4, - .gpio_cd = -EINVAL, - .gpio_wp = -EINVAL, - .transceiver = true, - }, - {} /* Terminator */ -}; - static void __init overo_init(void) { overo_i2c_init(); @@ -367,7 +387,6 @@ static void __init overo_init(void) omap_board_config = overo_config; omap_board_config_size = ARRAY_SIZE(overo_config); omap_serial_init(); - twl4030_mmc_init(mmc); usb_musb_init(); usb_ehci_init(); overo_flash_init();