From patchwork Tue Mar 24 12:17:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13959 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 n2OCGZpA011394 for ; Tue, 24 Mar 2009 12:16:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755413AbZCXMQ1 (ORCPT ); Tue, 24 Mar 2009 08:16:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755037AbZCXMQ1 (ORCPT ); Tue, 24 Mar 2009 08:16:27 -0400 Received: from smtp.nokia.com ([192.100.122.230]:41779 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbZCXMQ0 (ORCPT ); Tue, 24 Mar 2009 08:16:26 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n2OCGAN3025979; Tue, 24 Mar 2009 14:16:18 +0200 Received: from vaepf101.NOE.Nokia.com ([10.160.244.86]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 24 Mar 2009 14:16:18 +0200 Received: from [172.21.41.224] ([172.21.41.224]) by vaepf101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 24 Mar 2009 14:16:18 +0200 Message-ID: <49C8CF41.2040103@nokia.com> Date: Tue, 24 Mar 2009 14:17:05 +0200 From: Adrian Hunter User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Tony Lindgren CC: linux-omap Mailing List , David Brownell Subject: [PATCH] RX51: connect VAUX3 to MMC2 X-OriginalArrivalTime: 24 Mar 2009 12:16:18.0062 (UTC) FILETIME=[55B40AE0:01C9AC7A] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 6d7a4c9322e70e83bdcf66d151c1ce56ba2f949f Mon Sep 17 00:00:00 2001 From: Adrian Hunter Signed-off-by: Adrian Hunter --- arch/arm/mach-omap2/board-rx51-peripherals.c | 29 +++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 6e23587..41bb392 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -30,6 +30,8 @@ #include "mmc-twl4030.h" +#define SYSTEM_REV_B_USES_VAUX3 0x1699 +#define SYSTEM_REV_S_USES_VAUX3 0x8 #define SMC91X_CS 1 #define SMC91X_GPIO_IRQ 54 @@ -306,7 +308,7 @@ static struct regulator_init_data rx51_vaux2 = { }; /* VAUX3 - adds more power to VIO_18 rail */ -static struct regulator_init_data rx51_vaux3 = { +static struct regulator_init_data rx51_vaux3_cam = { .constraints = { .name = "VCAM_DIG_18", .min_uV = 1800000, @@ -319,6 +321,22 @@ static struct regulator_init_data rx51_vaux3 = { }, }; +static struct regulator_init_data rx51_vaux3_mmc = { + .constraints = { + .name = "VMMC2_30", + .min_uV = 2800000, + .max_uV = 3000000, + .apply_uV = true, + .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 = &rx51_vmmc2_supply, +}; + static struct regulator_init_data rx51_vaux4 = { .constraints = { .name = "VCAM_ANA_28", @@ -429,10 +447,8 @@ static struct twl4030_platform_data rx51_twldata = { .vaux1 = &rx51_vaux1, .vaux2 = &rx51_vaux2, - .vaux3 = &rx51_vaux3, .vaux4 = &rx51_vaux4, .vmmc1 = &rx51_vmmc1, - .vmmc2 = &rx51_vmmc2, .vsim = &rx51_vsim, .vdac = &rx51_vdac, }; @@ -448,6 +464,13 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { static int __init rx51_i2c_init(void) { + if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || + system_rev >= SYSTEM_REV_B_USES_VAUX3) + rx51_twldata.vaux3 = &rx51_vaux3_mmc; + else { + rx51_twldata.vaux3 = &rx51_vaux3_cam; + rx51_twldata.vmmc2 = &rx51_vmmc2; + } omap_register_i2c_bus(1, 2600, rx51_peripherals_i2c_board_info_1, ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); omap_register_i2c_bus(2, 100, NULL, 0);