From patchwork Tue Mar 2 10:29:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aggarwal, Anuj" X-Patchwork-Id: 83166 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o22ATq5X021130 for ; Tue, 2 Mar 2010 10:29:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753Ab0CBK3w (ORCPT ); Tue, 2 Mar 2010 05:29:52 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:55200 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546Ab0CBK3v (ORCPT ); Tue, 2 Mar 2010 05:29:51 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o22AThrB008875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 04:29:46 -0600 Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o22AThRs028572; Tue, 2 Mar 2010 15:59:43 +0530 (IST) Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by psplinux050.india.ti.com (8.13.1/8.13.1) with ESMTP id o22AThMv003163; Tue, 2 Mar 2010 15:59:43 +0530 Received: (from a0393534@localhost) by psplinux050.india.ti.com (8.13.1/8.13.1/Submit) id o22ATgSM003160; Tue, 2 Mar 2010 15:59:43 +0530 From: Anuj Aggarwal To: tony@atomide.com Cc: linux-omap@vger.kernel.org, broonie@opensource.wolfsonmicro.com, lrg@slimlogic.co.uk, Anuj Aggarwal Subject: [PATCHv3 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data Date: Tue, 2 Mar 2010 15:59:42 +0530 Message-Id: <1267525782-3131-1-git-send-email-anuj.aggarwal@ti.com> X-Mailer: git-send-email 1.6.2.4 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.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Mar 2010 10:29:53 +0000 (UTC) diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c new file mode 100644 index 0000000..0c0a860 --- /dev/null +++ b/arch/arm/mach-omap2/twl4030-pmic.c @@ -0,0 +1,175 @@ +/* + * twl4030-pmic.c + * + * Common regulator supplies and init data structs for TWL4030/TPS65950 + * PMIC for OMAP3 based EVMs. They can be used in various board-evm + * files for OMAP3 based platforms using TWL4030. + * + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind, + * whether express or implied; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#include + +/* VDAC */ +struct regulator_consumer_supply twl4030_vdac_supply = { + .supply = "vdac", +}; + +/* VMMC1 */ +struct regulator_consumer_supply twl4030_vmmc1_supply = { + .supply = "vmmc", +}; + +/* VMMC2 */ +struct regulator_consumer_supply twl4030_vmmc2_supply = { + .supply = "vmmc", +}; + +/* VSIM */ +struct regulator_consumer_supply twl4030_vsim_supply = { + .supply = "vmmc_aux", +}; + +/* VPLL2 for digital video outputs */ +struct regulator_consumer_supply twl4030_vpll2_supply = { + .supply = "vdvi", +}; + +/* Regulator initialization data */ +/* VAUX1 */ +struct regulator_init_data twl4030_vaux1_data = { + .constraints = { + .min_uV = 2800000, + .max_uV = 2800000, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX2 */ +struct regulator_init_data twl4030_vaux2_data = { + .constraints = { + .min_uV = 2800000, + .max_uV = 2800000, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX3 */ +struct regulator_init_data twl4030_vaux3_data = { + .constraints = { + .min_uV = 2800000, + .max_uV = 2800000, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX4 */ +struct regulator_init_data twl4030_vaux4_data = { + .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, + }, +}; + +/* VMMC1 */ +struct regulator_init_data twl4030_vmmc1_data = { + .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 = &twl4030_vmmc1_supply, +}; + +/* VMMC2 */ +struct regulator_init_data twl4030_vmmc2_data = { + .constraints = { + .min_uV = 1850000, + .max_uV = 1850000, + .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 = &twl4030_vmmc2_supply, +}; + +/* VSIM */ +struct regulator_init_data twl4030_vsim_data = { + .constraints = { + .min_uV = 1800000, + .max_uV = 3000000, + .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 = &twl4030_vsim_supply, +}; + +/* VDAC */ +struct regulator_init_data twl4030_vdac_data = { + .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 = &twl4030_vdac_supply, +}; + +/* VPLL2 */ +struct regulator_init_data twl4030_vpll2_data = { + .constraints = { + .name = "VDVI", + .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 = &twl4030_vpll2_supply, +}; + diff --git a/arch/arm/mach-omap2/twl4030-pmic.h b/arch/arm/mach-omap2/twl4030-pmic.h new file mode 100644 index 0000000..7a863d6 --- /dev/null +++ b/arch/arm/mach-omap2/twl4030-pmic.h @@ -0,0 +1,34 @@ +/* + * twl4030-pmic.h + * + * Header for common regulator supplies and init data structs for + * TWL4030/TPS65950 PMIC for OMAP3 based EVMs. + * + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind, + * whether express or implied; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +extern struct regulator_consumer_supply twl4030_vdac_supply; +extern struct regulator_consumer_supply twl4030_vmmc1_supply; +extern struct regulator_consumer_supply twl4030_vmmc2_supply; +extern struct regulator_consumer_supply twl4030_vsim_supply; +extern struct regulator_consumer_supply twl4030_vpll2_supply; + +extern struct regulator_init_data twl4030_vaux1_data; +extern struct regulator_init_data twl4030_vaux2_data; +extern struct regulator_init_data twl4030_vaux3_data; +extern struct regulator_init_data twl4030_vaux4_data; +extern struct regulator_init_data twl4030_vmmc1_data; +extern struct regulator_init_data twl4030_vmmc2_data; +extern struct regulator_init_data twl4030_vsim_data; +extern struct regulator_init_data twl4030_vdac_data; +extern struct regulator_init_data twl4030_vpll2_data; +