diff options
author | Sekhar Nori <nsekhar@ti.com> | 2009-09-22 11:44:04 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-25 13:21:30 -0500 |
commit | a9eb1f675c3363a174a424f7834e768d17cd20e5 (patch) | |
tree | 9972fa219484f2b12de390141f7f775d5a50be11 /arch/arm/mach-davinci/board-da850-evm.c | |
parent | 09dc2d452103583802e1379164eb7638c7f95f6e (diff) |
davinci: DA850/OMAP-L138 EVM: add support for TPS65070 PMIC
This patch adds support for using the TPS65070 PMIC found
on the DA850/OMAP-L138 EVM.
It defines the power rail consumer mapping and registers the
the I2C based PMIC as a board device.
The power rail constraints are derived from the maxmimum and
minimum recommended operating condition values of the respective
consumers derived from section 5.2 of the OMAP-L138 datasheet.
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-da850-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 16c8cceb36c..a34df64bea2 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/nand.h> | 23 | #include <linux/mtd/nand.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/regulator/machine.h> | ||
26 | 27 | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
@@ -251,6 +252,153 @@ static void __init da850_evm_init_nor(void) | |||
251 | iounmap(aemif_addr); | 252 | iounmap(aemif_addr); |
252 | } | 253 | } |
253 | 254 | ||
255 | /* TPS65070 voltage regulator support */ | ||
256 | |||
257 | /* 3.3V */ | ||
258 | struct regulator_consumer_supply tps65070_dcdc1_consumers[] = { | ||
259 | { | ||
260 | .supply = "usb0_vdda33", | ||
261 | }, | ||
262 | { | ||
263 | .supply = "usb1_vdda33", | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | /* 3.3V or 1.8V */ | ||
268 | struct regulator_consumer_supply tps65070_dcdc2_consumers[] = { | ||
269 | { | ||
270 | .supply = "dvdd3318_a", | ||
271 | }, | ||
272 | { | ||
273 | .supply = "dvdd3318_b", | ||
274 | }, | ||
275 | { | ||
276 | .supply = "dvdd3318_c", | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | /* 1.2V */ | ||
281 | struct regulator_consumer_supply tps65070_dcdc3_consumers[] = { | ||
282 | { | ||
283 | .supply = "cvdd", | ||
284 | }, | ||
285 | }; | ||
286 | |||
287 | /* 1.8V LDO */ | ||
288 | struct regulator_consumer_supply tps65070_ldo1_consumers[] = { | ||
289 | { | ||
290 | .supply = "sata_vddr", | ||
291 | }, | ||
292 | { | ||
293 | .supply = "usb0_vdda18", | ||
294 | }, | ||
295 | { | ||
296 | .supply = "usb1_vdda18", | ||
297 | }, | ||
298 | { | ||
299 | .supply = "ddr_dvdd18", | ||
300 | }, | ||
301 | }; | ||
302 | |||
303 | /* 1.2V LDO */ | ||
304 | struct regulator_consumer_supply tps65070_ldo2_consumers[] = { | ||
305 | { | ||
306 | .supply = "sata_vdd", | ||
307 | }, | ||
308 | { | ||
309 | .supply = "pll0_vdda", | ||
310 | }, | ||
311 | { | ||
312 | .supply = "pll1_vdda", | ||
313 | }, | ||
314 | { | ||
315 | .supply = "usbs_cvdd", | ||
316 | }, | ||
317 | { | ||
318 | .supply = "vddarnwa1", | ||
319 | }, | ||
320 | }; | ||
321 | |||
322 | struct regulator_init_data tps65070_regulator_data[] = { | ||
323 | /* dcdc1 */ | ||
324 | { | ||
325 | .constraints = { | ||
326 | .min_uV = 3150000, | ||
327 | .max_uV = 3450000, | ||
328 | .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | | ||
329 | REGULATOR_CHANGE_STATUS), | ||
330 | .boot_on = 1, | ||
331 | }, | ||
332 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc1_consumers), | ||
333 | .consumer_supplies = tps65070_dcdc1_consumers, | ||
334 | }, | ||
335 | |||
336 | /* dcdc2 */ | ||
337 | { | ||
338 | .constraints = { | ||
339 | .min_uV = 1710000, | ||
340 | .max_uV = 3450000, | ||
341 | .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | | ||
342 | REGULATOR_CHANGE_STATUS), | ||
343 | .boot_on = 1, | ||
344 | }, | ||
345 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), | ||
346 | .consumer_supplies = tps65070_dcdc2_consumers, | ||
347 | }, | ||
348 | |||
349 | /* dcdc3 */ | ||
350 | { | ||
351 | .constraints = { | ||
352 | .min_uV = 950000, | ||
353 | .max_uV = 1320000, | ||
354 | .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | | ||
355 | REGULATOR_CHANGE_STATUS), | ||
356 | .boot_on = 1, | ||
357 | }, | ||
358 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), | ||
359 | .consumer_supplies = tps65070_dcdc3_consumers, | ||
360 | }, | ||
361 | |||
362 | /* ldo1 */ | ||
363 | { | ||
364 | .constraints = { | ||
365 | .min_uV = 1710000, | ||
366 | .max_uV = 1890000, | ||
367 | .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | | ||
368 | REGULATOR_CHANGE_STATUS), | ||
369 | .boot_on = 1, | ||
370 | }, | ||
371 | .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo1_consumers), | ||
372 | .consumer_supplies = tps65070_ldo1_consumers, | ||
373 | }, | ||
374 | |||
375 | /* ldo2 */ | ||
376 | { | ||
377 | .constraints = { | ||
378 | .min_uV = 1140000, | ||
379 | .max_uV = 1320000, | ||
380 | .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | | ||
381 | REGULATOR_CHANGE_STATUS), | ||
382 | .boot_on = 1, | ||
383 | }, | ||
384 | .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo2_consumers), | ||
385 | .consumer_supplies = tps65070_ldo2_consumers, | ||
386 | }, | ||
387 | }; | ||
388 | |||
389 | static struct i2c_board_info __initdata da850evm_tps65070_info[] = { | ||
390 | { | ||
391 | I2C_BOARD_INFO("tps6507x", 0x48), | ||
392 | .platform_data = &tps65070_regulator_data[0], | ||
393 | }, | ||
394 | }; | ||
395 | |||
396 | static int __init pmic_tps65070_init(void) | ||
397 | { | ||
398 | return i2c_register_board_info(1, da850evm_tps65070_info, | ||
399 | ARRAY_SIZE(da850evm_tps65070_info)); | ||
400 | } | ||
401 | |||
254 | #if defined(CONFIG_MTD_PHYSMAP) || \ | 402 | #if defined(CONFIG_MTD_PHYSMAP) || \ |
255 | defined(CONFIG_MTD_PHYSMAP_MODULE) | 403 | defined(CONFIG_MTD_PHYSMAP_MODULE) |
256 | #define HAS_NOR 1 | 404 | #define HAS_NOR 1 |
@@ -275,6 +423,11 @@ static __init void da850_evm_init(void) | |||
275 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 423 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
276 | int ret; | 424 | int ret; |
277 | 425 | ||
426 | ret = pmic_tps65070_init(); | ||
427 | if (ret) | ||
428 | pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n", | ||
429 | ret); | ||
430 | |||
278 | ret = da8xx_pinmux_setup(da850_nand_pins); | 431 | ret = da8xx_pinmux_setup(da850_nand_pins); |
279 | if (ret) | 432 | if (ret) |
280 | pr_warning("da850_evm_init: nand mux setup failed: %d\n", | 433 | pr_warning("da850_evm_init: nand mux setup failed: %d\n", |