From 32ae16ba4f9dd364382c0ef8372c33281f3b4a5b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 19 Jul 2010 16:25:01 +0200 Subject: [PATCH 3/5] omap3beagle: Instantiate VDD1 and VDD2 regulators 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 69b154c..4c9a7c3 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -303,6 +304,38 @@ static struct regulator_init_data beagle_vpll2 = { .consumer_supplies = &beagle_vdvi_supply, }; +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, }; @@ -328,6 +361,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_boardinfo[] = { -- 1.7.0.4