ARM: davinci: dm365-evm: Add Fixed regulators needed for tlv320aic3101

The codec driver needs correct regulators in order to probe.
Both VCC_3V3 and VCC_1V8 is always on fixed regulators on the board.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
Peter Ujfalusi 2019-08-30 13:22:52 +03:00 committed by Sekhar Nori
parent 6b49d4fbcb
commit 9c76e8f65d
1 changed files with 20 additions and 0 deletions

View File

@ -30,6 +30,8 @@
#include <linux/spi/eeprom.h>
#include <linux/v4l2-dv-timings.h>
#include <linux/platform_data/ti-aemif.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@ -245,6 +247,19 @@ static struct davinci_i2c_platform_data i2c_pdata = {
.bus_delay = 0 /* usec */,
};
/* Fixed regulator support */
static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
/* Baseboard 3.3V: 5V -> TPS767D301 -> 3.3V */
REGULATOR_SUPPLY("AVDD", "1-0018"),
REGULATOR_SUPPLY("DRVDD", "1-0018"),
REGULATOR_SUPPLY("IOVDD", "1-0018"),
};
static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
/* Baseboard 1.8V: 5V -> TPS767D301 -> 1.8V */
REGULATOR_SUPPLY("DVDD", "1-0018"),
};
static int dm365evm_keyscan_enable(struct device *dev)
{
return davinci_cfg_reg(DM365_KEYSCAN);
@ -800,6 +815,11 @@ static __init void dm365_evm_init(void)
if (ret)
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v,
ARRAY_SIZE(fixed_supplies_1_8v), 1800000);
regulator_register_always_on(1, "fixed-dummy", fixed_supplies_3_3v,
ARRAY_SIZE(fixed_supplies_3_3v), 3300000);
nvmem_add_cell_table(&davinci_nvmem_cell_table);
nvmem_add_cell_lookups(&davinci_nvmem_cell_lookup, 1);