Commit 437afd2ad6ba252fdbad9a1ad2610992fea55bd6

Authored by Marcus Folkesson
Committed by Liam Girdwood
1 parent 1c3ede05d1

regulator: tps65023: Added support for the similiar TPS65020 chip

Defines a new voltage-table and allows registering of the tps65020 device.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

Showing 1 changed file with 53 additions and 0 deletions Side-by-side Diff

drivers/regulator/tps65023-regulator.c
... ... @@ -110,7 +110,16 @@
110 110 1500, 1525, 1550, 1600,
111 111 };
112 112  
  113 +/* Supported voltage values for LDO regulators for tps65020 */
  114 +static const u16 TPS65020_LDO1_VSEL_table[] = {
  115 + 1000, 1050, 1100, 1300,
  116 + 1800, 2500, 3000, 3300,
  117 +};
113 118  
  119 +static const u16 TPS65020_LDO2_VSEL_table[] = {
  120 + 1000, 1050, 1100, 1300,
  121 + 1800, 2500, 3000, 3300,
  122 +};
114 123  
115 124 /* Supported voltage values for LDO regulators
116 125 * for tps65021 and tps65023 */
... ... @@ -548,6 +557,43 @@
548 557 return 0;
549 558 }
550 559  
  560 +static const struct tps_info tps65020_regs[] = {
  561 + {
  562 + .name = "VDCDC1",
  563 + .min_uV = 3300000,
  564 + .max_uV = 3300000,
  565 + .fixed = 1,
  566 + },
  567 + {
  568 + .name = "VDCDC2",
  569 + .min_uV = 1800000,
  570 + .max_uV = 1800000,
  571 + .fixed = 1,
  572 + },
  573 + {
  574 + .name = "VDCDC3",
  575 + .min_uV = 800000,
  576 + .max_uV = 1600000,
  577 + .table_len = ARRAY_SIZE(VCORE_VSEL_table),
  578 + .table = VCORE_VSEL_table,
  579 + },
  580 +
  581 + {
  582 + .name = "LDO1",
  583 + .min_uV = 1000000,
  584 + .max_uV = 3150000,
  585 + .table_len = ARRAY_SIZE(TPS65020_LDO1_VSEL_table),
  586 + .table = TPS65020_LDO1_VSEL_table,
  587 + },
  588 + {
  589 + .name = "LDO2",
  590 + .min_uV = 1050000,
  591 + .max_uV = 3300000,
  592 + .table_len = ARRAY_SIZE(TPS65020_LDO2_VSEL_table),
  593 + .table = TPS65020_LDO2_VSEL_table,
  594 + },
  595 +};
  596 +
551 597 static const struct tps_info tps65021_regs[] = {
552 598 {
553 599 .name = "VDCDC1",
... ... @@ -620,6 +666,11 @@
620 666 },
621 667 };
622 668  
  669 +static struct tps_driver_data tps65020_drv_data = {
  670 + .info = tps65020_regs,
  671 + .core_regulator = TPS65023_DCDC_3,
  672 +};
  673 +
623 674 static struct tps_driver_data tps65021_drv_data = {
624 675 .info = tps65021_regs,
625 676 .core_regulator = TPS65023_DCDC_3,
... ... @@ -635,6 +686,8 @@
635 686 .driver_data = (unsigned long) &tps65023_drv_data},
636 687 {.name = "tps65021",
637 688 .driver_data = (unsigned long) &tps65021_drv_data,},
  689 + {.name = "tps65020",
  690 + .driver_data = (unsigned long) &tps65020_drv_data},
638 691 { },
639 692 };
640 693