diff options
author | Roger Monk <r-monk@ti.com> | 2010-01-11 15:37:28 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-01-11 16:42:55 +0100 |
commit | 8f58eb85cda95f96db4a3e8b2f0ba5830430182f (patch) | |
tree | 9c959cac4f011dc36ddf93274788bdfe5cdd3d46 /recipes/linux/linux-davinci | |
parent | 159a80cbe0b675ea11ab4f46a267aa925414b710 (diff) |
linux-davinci: Add regulator fixes for DA850/OMAPL EVM and OPPs
Diffstat (limited to 'recipes/linux/linux-davinci')
4 files changed, 170 insertions, 0 deletions
diff --git a/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch b/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch new file mode 100644 index 0000000000..656a09e8c4 --- /dev/null +++ b/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch @@ -0,0 +1,93 @@ +From: Anuj Aggarwal <anuj.aggarwal@ti.com> +Date: Fri, 18 Dec 2009 11:18:43 +0000 (+0530) +Subject: Regulator: Check which register needs to be read for DCDC2/3 +X-Git-Url: http://arago-project.org/git/people/?p=sekhar%2Flinux-omapl1.git;a=commitdiff_plain;h=9f8ddc15520a7d5bb27bb660215d3a153ea39c00 + +Regulator: Check which register needs to be read for DCDC2/3 + +In TPS6507x, for DCDC2/3, either DEFDCDC2_LOW or DEFDCDC2_HIGH +can be read depending on the status of DEFDCDC2 pin. Since this +pin cannot be read through register, this information is passed +through board-evm file and the driver appropriately checks it +before reading the LOW / HIGH register. + +Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com> +Signed-off-by: Sekhar Nori <nsekhar@ti.com> +--- + +diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c +index f8a6dfb..602a194 100644 +--- a/drivers/regulator/tps6507x-regulator.c ++++ b/drivers/regulator/tps6507x-regulator.c +@@ -159,13 +159,15 @@ struct tps_info { + unsigned max_uV; + u8 table_len; + const u16 *table; ++ /* HIGH register is used to control the output voltage for DCDC2/3 */ ++ unsigned reg_high:1; + }; + + struct tps_pmic { + struct regulator_desc desc[TPS6507X_NUM_REGULATOR]; + struct i2c_client *client; + struct regulator_dev *rdev[TPS6507X_NUM_REGULATOR]; +- const struct tps_info *info[TPS6507X_NUM_REGULATOR]; ++ struct tps_info *info[TPS6507X_NUM_REGULATOR]; + struct mutex io_lock; + }; + +@@ -352,10 +354,16 @@ static int tps6507x_dcdc_get_voltage(struct regulator_dev *dev) + reg = TPS6507X_REG_DEFDCDC1; + break; + case TPS6507X_DCDC_2: +- reg = TPS6507X_REG_DEFDCDC2_LOW; ++ if (tps->info[dcdc]->reg_high) ++ reg = TPS6507X_REG_DEFDCDC2_HIGH; ++ else ++ reg = TPS6507X_REG_DEFDCDC2_LOW; + break; + case TPS6507X_DCDC_3: +- reg = TPS6507X_REG_DEFDCDC3_LOW; ++ if (tps->info[dcdc]->reg_high) ++ reg = TPS6507X_REG_DEFDCDC3_HIGH; ++ else ++ reg = TPS6507X_REG_DEFDCDC3_LOW; + break; + default: + return -EINVAL; +@@ -381,10 +389,16 @@ static int tps6507x_dcdc_set_voltage(struct regulator_dev *dev, + reg = TPS6507X_REG_DEFDCDC1; + break; + case TPS6507X_DCDC_2: +- reg = TPS6507X_REG_DEFDCDC2_LOW; ++ if (tps->info[dcdc]->reg_high) ++ reg = TPS6507X_REG_DEFDCDC2_HIGH; ++ else ++ reg = TPS6507X_REG_DEFDCDC2_LOW; + break; + case TPS6507X_DCDC_3: +- reg = TPS6507X_REG_DEFDCDC3_LOW; ++ if (tps->info[dcdc]->reg_high) ++ reg = TPS6507X_REG_DEFDCDC3_HIGH; ++ else ++ reg = TPS6507X_REG_DEFDCDC3_LOW; + break; + default: + return -EINVAL; +@@ -542,7 +556,7 @@ static + int tps_6507x_probe(struct i2c_client *client, const struct i2c_device_id *id) + { + static int desc_id; +- const struct tps_info *info = (void *)id->driver_data; ++ struct tps_info *info = (void *)id->driver_data; + struct regulator_init_data *init_data; + struct regulator_dev *rdev; + struct tps_pmic *tps; +@@ -573,6 +587,7 @@ int tps_6507x_probe(struct i2c_client *client, const struct i2c_device_id *id) + for (i = 0; i < TPS6507X_NUM_REGULATOR; i++, info++, init_data++) { + /* Register the regulators */ + tps->info[i] = info; ++ tps->info[i]->reg_high = (unsigned) init_data->driver_data; + tps->desc[i].name = info->name; + tps->desc[i].id = desc_id++; + tps->desc[i].n_voltages = num_voltages[i]; diff --git a/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch b/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch new file mode 100644 index 0000000000..ff60c41fff --- /dev/null +++ b/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch @@ -0,0 +1,40 @@ +From: Sekhar Nori <nsekhar@ti.com> +Date: Mon, 21 Dec 2009 09:13:49 +0000 (+0530) +Subject: davinci: da850/omap-l138 evm: account for defdcdc{2,3} being tied high +X-Git-Url: http://arago-project.org/git/people/?p=sekhar%2Flinux-omapl1.git;a=commitdiff_plain;h=2aa1058a4db0681929ba09f50da89f4fe283e0bd + +davinci: da850/omap-l138 evm: account for defdcdc{2,3} being tied high + +Per the da850/omap-l138 Beta EVM SOM schematic, the defdcdc2 and +defdcdc3 lines are tied high by default. This leads to a 3.3V IO +and 1.2V CVDD voltage. + +For the TPS6507x driver, it means that the DEFDCDC_HIGH registers +need to be read/written instead of DEFDCDC_LOW register. The tps6507x +driver added this functionality recently. This patch passes the right +platform data to the TPS6507x which tells it that the HIGH register +needs to be read instead of the LOW register. + +Signed-off-by: Sekhar Nori <nsekhar@ti.com> +--- + +diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c +index 607dd2d..9ed07d6 100755 +--- a/arch/arm/mach-davinci/board-da850-evm.c ++++ b/arch/arm/mach-davinci/board-da850-evm.c +@@ -599,6 +599,7 @@ struct regulator_init_data tps65070_regulator_data[] = { + }, + .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), + .consumer_supplies = tps65070_dcdc2_consumers, ++ .driver_data = (void *) 1, + }, + + /* dcdc3 */ +@@ -612,6 +613,7 @@ struct regulator_init_data tps65070_regulator_data[] = { + }, + .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), + .consumer_supplies = tps65070_dcdc3_consumers, ++ .driver_data = (void *) 1, + }, + + /* ldo1 */ diff --git a/recipes/linux/linux-davinci/da850_omapl138_opp408mhz.patch b/recipes/linux/linux-davinci/da850_omapl138_opp408mhz.patch new file mode 100644 index 0000000000..2a80f644f5 --- /dev/null +++ b/recipes/linux/linux-davinci/da850_omapl138_opp408mhz.patch @@ -0,0 +1,26 @@ +--- old/arch/arm/mach-davinci/da850.c 2010-01-11 15:02:02.000000000 +0000 ++++ new/arch/arm/mach-davinci/da850.c 2010-01-11 15:00:28.000000000 +0000 +@@ -974,6 +974,15 @@ + .cvdd_max = 1375000, + }; + ++static const struct da850_opp da850_opp_408 = { ++ .freq = 408000, ++ .prediv = 1, ++ .mult = 17, ++ .postdiv = 1, ++ .cvdd_min = 1300000, ++ .cvdd_max = 1325000, ++}; ++ + static const struct da850_opp da850_opp_300 = { + .freq = 300000, + .prediv = 1, +@@ -1009,6 +1018,7 @@ + + static struct cpufreq_frequency_table da850_freq_table[] = { + OPP(456), ++ OPP(408), + OPP(300), + OPP(200), + OPP(96), diff --git a/recipes/linux/linux-davinci/da850_omapl138_opp456mhz_increaseDcDc3.patch b/recipes/linux/linux-davinci/da850_omapl138_opp456mhz_increaseDcDc3.patch new file mode 100644 index 0000000000..113eeb0847 --- /dev/null +++ b/recipes/linux/linux-davinci/da850_omapl138_opp456mhz_increaseDcDc3.patch @@ -0,0 +1,11 @@ +--- old/arch/arm/mach-davinci/board-da850-evm.c 2010-01-11 14:49:21.000000000 +0000 ++++ new/arch/arm/mach-davinci/board-da850-evm.c 2010-01-11 14:47:44.000000000 +0000 +@@ -606,7 +606,7 @@ + { + .constraints = { + .min_uV = 950000, +- .max_uV = 1320000, ++ .max_uV = 1400000, + .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | + REGULATOR_CHANGE_STATUS), + .boot_on = 1, |