aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/board-harmony-power.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c
index 44dcb2e869b5..8fd387bf31f0 100644
--- a/arch/arm/mach-tegra/board-harmony-power.c
+++ b/arch/arm/mach-tegra/board-harmony-power.c
@@ -19,6 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/regulator/machine.h> 21#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h>
22#include <linux/mfd/tps6586x.h> 23#include <linux/mfd/tps6586x.h>
23#include <linux/of.h> 24#include <linux/of.h>
24#include <linux/of_i2c.h> 25#include <linux/of_i2c.h>
@@ -34,7 +35,9 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = {
34}; 35};
35 36
36static struct regulator_init_data ldo0_data = { 37static struct regulator_init_data ldo0_data = {
38 .supply_regulator = "vdd_sm2",
37 .constraints = { 39 .constraints = {
40 .name = "vdd_ldo0",
38 .min_uV = 3300 * 1000, 41 .min_uV = 3300 * 1000,
39 .max_uV = 3300 * 1000, 42 .max_uV = 3300 * 1000,
40 .valid_modes_mask = (REGULATOR_MODE_NORMAL | 43 .valid_modes_mask = (REGULATOR_MODE_NORMAL |
@@ -48,9 +51,11 @@ static struct regulator_init_data ldo0_data = {
48 .consumer_supplies = tps658621_ldo0_supply, 51 .consumer_supplies = tps658621_ldo0_supply,
49}; 52};
50 53
51#define HARMONY_REGULATOR_INIT(_id, _minmv, _maxmv) \ 54#define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv) \
52 static struct regulator_init_data _id##_data = { \ 55 static struct regulator_init_data _id##_data = { \
56 .supply_regulator = _supply, \
53 .constraints = { \ 57 .constraints = { \
58 .name = _name, \
54 .min_uV = (_minmv)*1000, \ 59 .min_uV = (_minmv)*1000, \
55 .max_uV = (_maxmv)*1000, \ 60 .max_uV = (_maxmv)*1000, \
56 .valid_modes_mask = (REGULATOR_MODE_NORMAL | \ 61 .valid_modes_mask = (REGULATOR_MODE_NORMAL | \
@@ -61,18 +66,18 @@ static struct regulator_init_data ldo0_data = {
61 }, \ 66 }, \
62 } 67 }
63 68
64HARMONY_REGULATOR_INIT(sm0, 725, 1500); 69HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500);
65HARMONY_REGULATOR_INIT(sm1, 725, 1500); 70HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500);
66HARMONY_REGULATOR_INIT(sm2, 3000, 4550); 71HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550);
67HARMONY_REGULATOR_INIT(ldo1, 725, 1500); 72HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500);
68HARMONY_REGULATOR_INIT(ldo2, 725, 1500); 73HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500);
69HARMONY_REGULATOR_INIT(ldo3, 1250, 3300); 74HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300);
70HARMONY_REGULATOR_INIT(ldo4, 1700, 2475); 75HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475);
71HARMONY_REGULATOR_INIT(ldo5, 1250, 3300); 76HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300);
72HARMONY_REGULATOR_INIT(ldo6, 1250, 3300); 77HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300);
73HARMONY_REGULATOR_INIT(ldo7, 1250, 3300); 78HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300);
74HARMONY_REGULATOR_INIT(ldo8, 1250, 3300); 79HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300);
75HARMONY_REGULATOR_INIT(ldo9, 1250, 3300); 80HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300);
76 81
77#define TPS_REG(_id, _data) \ 82#define TPS_REG(_id, _data) \
78 { \ 83 { \
@@ -115,6 +120,8 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
115int __init harmony_regulator_init(void) 120int __init harmony_regulator_init(void)
116{ 121{
117 if (machine_is_harmony()) { 122 if (machine_is_harmony()) {
123 regulator_register_always_on(0, "vdd_sys",
124 NULL, 0, 5000000);
118 i2c_register_board_info(3, harmony_regulators, 1); 125 i2c_register_board_info(3, harmony_regulators, 1);
119 } else { /* Harmony, booted using device tree */ 126 } else { /* Harmony, booted using device tree */
120 struct device_node *np; 127 struct device_node *np;