diff options
author | Keerthy | 2016-09-30 09:20:43 +0530 |
---|---|---|
committer | Simon Glass | 2016-10-11 10:17:05 -0600 |
commit | 33621d247e771168ebaab2218d02e625371d144a (patch) | |
tree | d2c775025a378d649ccdf5977d4b2c24f4f23d32 /include/power | |
parent | 34514b8b9ce287e2b8e90c77974889d8c53656fe (diff) |
power: pmic: Palmas: Add the base pmic support
Add support to bind the regulators/child nodes with the pmic.
Also adds the pmic i2c based read/write funtions to access pmic
registers.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/power')
-rw-r--r-- | include/power/palmas.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/power/palmas.h b/include/power/palmas.h new file mode 100644 index 00000000000..bad5a354d31 --- /dev/null +++ b/include/power/palmas.h @@ -0,0 +1,25 @@ +#define PALMAS 0x0 +#define TPS659038 0x1 +#define TPS65917 0x2 + +/* I2C device address for pmic palmas */ +#define PALMAS_I2C_ADDR (0x12 >> 1) +#define PALMAS_LDO_NUM 11 +#define PALMAS_SMPS_NUM 8 + +/* Drivers name */ +#define PALMAS_LDO_DRIVER "palmas_ldo" +#define PALMAS_SMPS_DRIVER "palmas_smps" + +#define PALMAS_SMPS_VOLT_MASK 0x7F +#define PALMAS_SMPS_RANGE_MASK 0x80 +#define PALMAS_SMPS_VOLT_MAX_HEX 0x7F +#define PALMAS_SMPS_VOLT_MAX 3300000 +#define PALMAS_SMPS_MODE_MASK 0x3 +#define PALMAS_SMPS_STATUS_MASK 0x30 + +#define PALMAS_LDO_VOLT_MASK 0x3F +#define PALMAS_LDO_VOLT_MAX_HEX 0x3F +#define PALMAS_LDO_VOLT_MAX 3300000 +#define PALMAS_LDO_MODE_MASK 0x1 +#define PALMAS_LDO_STATUS_MASK 0x10 |