aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-03-07 05:48:15 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-28 02:54:23 -0400
commitfe67dfc874da094bbbfbb73e74924d414b96105b (patch)
treea1375a23a31abf50388471e02814b3bbe9842aa4 /arch/arm/mach-ux500
parentdfa3a824de631e6833ffa9a7befc08186b027799 (diff)
mach-ux500: configure board for the TPS61052 regulator v2
This registers the TPS61052 regulator to the ux500 MOP/HREF boards. Cc: Samuel Ortiz <samuel.ortiz@intel.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Ola Lilja <ola.o.lilja@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/Kconfig1
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c24
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c23
4 files changed, 48 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 203b986280f5..58626013aa32 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -23,6 +23,7 @@ menu "Ux500 target platform"
23config MACH_U8500 23config MACH_U8500
24 bool "U8500 Development platform" 24 bool "U8500 Development platform"
25 depends on UX500_SOC_DB8500 25 depends on UX500_SOC_DB8500
26 select TPS6105X
26 help 27 help
27 Include support for the mop500 development platform. 28 Include support for the mop500 development platform.
28 29
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index d4f33ebaf637..9ed0f90cfe23 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -13,6 +13,30 @@
13#include <linux/regulator/ab8500.h> 13#include <linux/regulator/ab8500.h>
14#include "board-mop500-regulators.h" 14#include "board-mop500-regulators.h"
15 15
16/*
17 * TPS61052 regulator
18 */
19static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
20 /*
21 * Boost converter supply to raise voltage on audio speaker, this
22 * is actually connected to three pins, VInVhfL (left amplifier)
23 * VInVhfR (right amplifier) and VIntDClassInt - all three must
24 * be connected to the same voltage.
25 */
26 REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"),
27};
28
29struct regulator_init_data tps61052_regulator = {
30 .constraints = {
31 .name = "vaudio-hf",
32 .min_uV = 4500000,
33 .max_uV = 4500000,
34 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
35 },
36 .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers),
37 .consumer_supplies = tps61052_vaudio_consumers,
38};
39
16static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { 40static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
17 /* External displays, connector on board 2v5 power supply */ 41 /* External displays, connector on board 2v5 power supply */
18 REGULATOR_SUPPLY("vaux12v5", "mcde.0"), 42 REGULATOR_SUPPLY("vaux12v5", "mcde.0"),
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index f979b892e4fa..94992158d962 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -17,5 +17,6 @@
17extern struct ab8500_regulator_reg_init 17extern struct ab8500_regulator_reg_init
18ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS]; 18ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
19extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; 19extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
20extern struct regulator_init_data tps61052_regulator;
20 21
21#endif 22#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a10abc7d8eee..dc8746d7826e 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -22,6 +22,7 @@
22#include <linux/mfd/ab8500.h> 22#include <linux/mfd/ab8500.h>
23#include <linux/regulator/ab8500.h> 23#include <linux/regulator/ab8500.h>
24#include <linux/mfd/tc3589x.h> 24#include <linux/mfd/tc3589x.h>
25#include <linux/mfd/tps6105x.h>
25#include <linux/mfd/ab8500/gpio.h> 26#include <linux/mfd/ab8500/gpio.h>
26#include <linux/leds-lp5521.h> 27#include <linux/leds-lp5521.h>
27#include <linux/input.h> 28#include <linux/input.h>
@@ -93,6 +94,15 @@ struct platform_device ab8500_device = {
93}; 94};
94 95
95/* 96/*
97 * TPS61052
98 */
99
100static struct tps6105x_platform_data mop500_tps61052_data = {
101 .mode = TPS6105X_MODE_VOLTAGE,
102 .regulator_data = &tps61052_regulator,
103};
104
105/*
96 * TC35892 106 * TC35892
97 */ 107 */
98 108
@@ -162,7 +172,7 @@ static struct lp5521_platform_data __initdata lp5521_sec_data = {
162 .clock_mode = LP5521_CLOCK_EXT, 172 .clock_mode = LP5521_CLOCK_EXT,
163}; 173};
164 174
165static struct i2c_board_info mop500_i2c0_devices[] = { 175static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
166 { 176 {
167 I2C_BOARD_INFO("tc3589x", 0x42), 177 I2C_BOARD_INFO("tc3589x", 0x42),
168 .irq = NOMADIK_GPIO_TO_IRQ(217), 178 .irq = NOMADIK_GPIO_TO_IRQ(217),
@@ -170,6 +180,14 @@ static struct i2c_board_info mop500_i2c0_devices[] = {
170 }, 180 },
171}; 181};
172 182
183/* I2C0 devices only available prior to HREFv60 */
184static struct i2c_board_info __initdata mop500_i2c0_old_devices[] = {
185 {
186 I2C_BOARD_INFO("tps61052", 0x33),
187 .platform_data = &mop500_tps61052_data,
188 },
189};
190
173static struct i2c_board_info __initdata mop500_i2c2_devices[] = { 191static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
174 { 192 {
175 /* lp5521 LED driver, 1st device */ 193 /* lp5521 LED driver, 1st device */
@@ -432,6 +450,9 @@ static void __init mop500_init_machine(void)
432 450
433 i2c_register_board_info(0, mop500_i2c0_devices, 451 i2c_register_board_info(0, mop500_i2c0_devices,
434 ARRAY_SIZE(mop500_i2c0_devices)); 452 ARRAY_SIZE(mop500_i2c0_devices));
453 if (!machine_is_hrefv60())
454 i2c_register_board_info(0, mop500_i2c0_old_devices,
455 ARRAY_SIZE(mop500_i2c0_old_devices));
435 i2c_register_board_info(2, mop500_i2c2_devices, 456 i2c_register_board_info(2, mop500_i2c2_devices,
436 ARRAY_SIZE(mop500_i2c2_devices)); 457 ARRAY_SIZE(mop500_i2c2_devices));
437} 458}