summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRobin Gong <B38343@freescale.com>2011-12-21 19:13:59 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:12:15 +0800
commitfec9bbd2197a79c29c118e94d443bf07d8966016 (patch)
tree5ef9cee8013eb8ebaccd3416a44dde32350e7e6e /drivers/regulator
parentfad8121594fdac7783ecf4dc03a6acb927bc31bb (diff)
ENGR00170788 MX6Q PFUZE100:configure VDDARM and VDDSOC voltage in standby
Configure register 33&40&47 to set standby voltage of SW1A/1B/1C Signed-off-by: Robin Gong <B38343@freescale.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pfuze100-regulator.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index afa24ab454f6..2cd755aab111 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -168,7 +168,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops;
#define PFUZE100_SW1AVOL_VSEL_M (0x3f<<0)
#define PFUZE100_SW1ASTANDBY 33
-#define PFUZE100_SW1ASTANDBY_STBY_VAL (0x0)
+#define PFUZE100_SW1ASTANDBY_STBY_VAL (0x14)
#define PFUZE100_SW1ASTANDBY_STBY_M (0x3f<<0)
#define PFUZE100_SW1AOFF 34
@@ -197,7 +197,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops;
#define PFUZE100_SW1BVOL_VSEL_M (0x3f<<0)
#define PFUZE100_SW1BSTANDBY 40
-#define PFUZE100_SW1BSTANDBY_STBY_VAL 0x0
+#define PFUZE100_SW1BSTANDBY_STBY_VAL (0x14)
#define PFUZE100_SW1BSTANDBY_STBY_M (0x3f<<0)
#define PFUZE100_SW1BOFF 41
@@ -226,7 +226,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops;
#define PFUZE100_SW1CVOL_VSEL_M (0x3f<<0)
#define PFUZE100_SW1CSTANDBY 47
-#define PFUZE100_SW1CSTANDBY_STBY_VAL 0x0
+#define PFUZE100_SW1CSTANDBY_STBY_VAL (0x14)
#define PFUZE100_SW1CSTANDBY_STBY_M (0x3f<<0)
#define PFUZE100_SW1COFF 48
@@ -634,7 +634,7 @@ static int __devinit pfuze100_regulator_probe(struct platform_device *pdev)
dev_get_platdata(&pdev->dev);
struct pfuze_regulator_init_data *init_data;
int i, ret;
- struct regulator *test_regulator;
+ struct regulator *enabled_regulator;
priv = kzalloc(sizeof(*priv) +
pdata->num_regulators * sizeof(priv->regulators[0]),
@@ -649,6 +649,21 @@ static int __devinit pfuze100_regulator_probe(struct platform_device *pdev)
PFUZE100_SWBSTCON1_SWBSTMOD_VAL);
if (ret)
goto err_free;
+ ret = pfuze_reg_rmw(pfuze100, PFUZE100_SW1ASTANDBY,
+ PFUZE100_SW1ASTANDBY_STBY_M,
+ PFUZE100_SW1ASTANDBY_STBY_VAL);
+ if (ret)
+ goto err_free;
+ ret = pfuze_reg_rmw(pfuze100, PFUZE100_SW1BSTANDBY,
+ PFUZE100_SW1BSTANDBY_STBY_M,
+ PFUZE100_SW1BSTANDBY_STBY_VAL);
+ if (ret)
+ goto err_free;
+ ret = pfuze_reg_rmw(pfuze100, PFUZE100_SW1CSTANDBY,
+ PFUZE100_SW1CSTANDBY_STBY_M,
+ PFUZE100_SW1CSTANDBY_STBY_VAL);
+ if (ret)
+ goto err_free;
pfuze_unlock(pfuze100);
for (i = 0; i < pdata->num_regulators; i++) {
init_data = &pdata->regulators[i];
@@ -662,13 +677,14 @@ static int __devinit pfuze100_regulator_probe(struct platform_device *pdev)
goto err;
}
}
+
+ enabled_regulator = regulator_get(&pdev->dev, "P1V325_VDDARM_SW1AB");
+ if (enabled_regulator)
+ regulator_set_voltage(enabled_regulator, 1325000, 1325000);
+ enabled_regulator = regulator_get(&pdev->dev, "P1V325_VDDSOC_SW1C");
+ if (enabled_regulator)
+ regulator_set_voltage(enabled_regulator, 1325000, 1325000);
#if 0
- test_regulator = regulator_get(&pdev->dev, "P1V325_VDDARM_SW1AB");
- if (test_regulator)
- regulator_set_voltage(test_regulator, 1325000, 1325000);
- test_regulator = regulator_get(&pdev->dev, "P1V325_VDDSOC_SW1C");
- if (test_regulator)
- regulator_set_voltage(test_regulator, 1325000, 1325000);
test_regulator = regulator_get(&pdev->dev, "P3V0_VDDHIGH_SW2");
if (test_regulator)
regulator_set_voltage(test_regulator, 3000000, 3000000);