|
30 | 30 | #include <linux/spi/eeprom.h>
|
31 | 31 | #include <linux/v4l2-dv-timings.h>
|
32 | 32 | #include <linux/platform_data/ti-aemif.h>
|
| 33 | +#include <linux/regulator/fixed.h> |
| 34 | +#include <linux/regulator/machine.h> |
33 | 35 |
|
34 | 36 | #include <asm/mach-types.h>
|
35 | 37 | #include <asm/mach/arch.h>
|
@@ -245,6 +247,19 @@ static struct davinci_i2c_platform_data i2c_pdata = {
|
245 | 247 | .bus_delay = 0 /* usec */,
|
246 | 248 | };
|
247 | 249 |
|
| 250 | +/* Fixed regulator support */ |
| 251 | +static struct regulator_consumer_supply fixed_supplies_3_3v[] = { |
| 252 | + /* Baseboard 3.3V: 5V -> TPS767D301 -> 3.3V */ |
| 253 | + REGULATOR_SUPPLY("AVDD", "1-0018"), |
| 254 | + REGULATOR_SUPPLY("DRVDD", "1-0018"), |
| 255 | + REGULATOR_SUPPLY("IOVDD", "1-0018"), |
| 256 | +}; |
| 257 | + |
| 258 | +static struct regulator_consumer_supply fixed_supplies_1_8v[] = { |
| 259 | + /* Baseboard 1.8V: 5V -> TPS767D301 -> 1.8V */ |
| 260 | + REGULATOR_SUPPLY("DVDD", "1-0018"), |
| 261 | +}; |
| 262 | + |
248 | 263 | static int dm365evm_keyscan_enable(struct device *dev)
|
249 | 264 | {
|
250 | 265 | return davinci_cfg_reg(DM365_KEYSCAN);
|
@@ -800,6 +815,11 @@ static __init void dm365_evm_init(void)
|
800 | 815 | if (ret)
|
801 | 816 | pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
802 | 817 |
|
| 818 | + regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v, |
| 819 | + ARRAY_SIZE(fixed_supplies_1_8v), 1800000); |
| 820 | + regulator_register_always_on(1, "fixed-dummy", fixed_supplies_3_3v, |
| 821 | + ARRAY_SIZE(fixed_supplies_3_3v), 3300000); |
| 822 | + |
803 | 823 | nvmem_add_cell_table(&davinci_nvmem_cell_table);
|
804 | 824 | nvmem_add_cell_lookups(&davinci_nvmem_cell_lookup, 1);
|
805 | 825 |
|
|
0 commit comments