From patchwork Fri Jul 8 15:56:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 956852 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p68FvFWD017332 for ; Fri, 8 Jul 2011 15:57:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941Ab1GHP5L (ORCPT ); Fri, 8 Jul 2011 11:57:11 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:37430 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416Ab1GHP5K convert rfc822-to-8bit (ORCPT ); Fri, 8 Jul 2011 11:57:10 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p68Fv5tn006459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jul 2011 10:57:05 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p68Fv5tl029247; Fri, 8 Jul 2011 10:57:05 -0500 (CDT) Received: from dnce72.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p68Fv4Wh014669; Fri, 8 Jul 2011 10:57:04 -0500 (CDT) thread-index: Acw9h65JJJrmRciRR7uC/xZDtM4Tvg== Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4657 Received: from localhost.localdomain (172.24.88.7) by dnce72.ent.ti.com (137.167.131.87) with Microsoft SMTP Server (TLS) id 8.3.106.1; Fri, 8 Jul 2011 17:57:03 +0200 From: Tero Kristo To: CC: , , Thomas Petazzoni , Thomas Petazzoni Subject: [RFC 2/4] omap3beagle: Instantiate VDD1 and VDD2 regulators Date: Fri, 8 Jul 2011 18:56:26 +0300 Message-ID: <1310140588-26078-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1310140588-26078-1-git-send-email-t-kristo@ti.com> References: <1310140588-26078-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 15:57:15 +0000 (UTC) From: Thomas Petazzoni Instantiate the VDD1 and VDD2 regulators and connect them to their respective consumers: mpu.0 for VDD1 and l3_main.0 for VDD2. TODO: * As these instantiations will be identical for all OMAP3 boards, find a way of sharing them throughout the different OMAP3 boards. Signed-off-by: Thomas Petazzoni --- arch/arm/mach-omap2/board-omap3beagle.c | 35 +++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 78cf5f2..6d3a266 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -400,6 +401,38 @@ static struct regulator_init_data beagle_vpll2 = { .consumer_supplies = beagle_vdvi_supplies, }; +static struct regulator_consumer_supply beagle_vdd1_supply = + REGULATOR_SUPPLY("vcc", "mpu.0"); + +static struct regulator_consumer_supply beagle_vdd2_supply = + REGULATOR_SUPPLY("vcc", "l3_main.0"); + +static struct regulator_init_data beagle_vdd1 = { + .constraints = { + .name = "VDD1", + .min_uV = 600000, + .max_uV = 1450000, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &beagle_vdd1_supply, +}; + +static struct regulator_init_data beagle_vdd2 = { + .constraints = { + .name = "VDD2", + .min_uV = 600000, + .max_uV = 1450000, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &beagle_vdd2_supply, +}; + static struct twl4030_usb_data beagle_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; @@ -423,6 +456,8 @@ static struct twl4030_platform_data beagle_twldata = { .vsim = &beagle_vsim, .vdac = &beagle_vdac, .vpll2 = &beagle_vpll2, + .vdd1 = &beagle_vdd1, + .vdd2 = &beagle_vdd2, }; static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {