diff options
Diffstat (limited to 'include/power')
-rw-r--r-- | include/power/lp873x.h | 19 | ||||
-rw-r--r-- | include/power/palmas.h | 25 | ||||
-rw-r--r-- | include/power/regulator.h | 5 |
3 files changed, 49 insertions, 0 deletions
diff --git a/include/power/lp873x.h b/include/power/lp873x.h new file mode 100644 index 0000000..e0c0711 --- /dev/null +++ b/include/power/lp873x.h @@ -0,0 +1,19 @@ +#define LP8732 0x0 +#define LP8733 0x1 + +#define LP873X_LDO_NUM 2 +#define LP873X_BUCK_NUM 2 + +/* Drivers name */ +#define LP873X_LDO_DRIVER "lp873x_ldo" +#define LP873X_BUCK_DRIVER "lp873x_buck" + +#define LP873X_BUCK_VOLT_MASK 0xFF +#define LP873X_BUCK_VOLT_MAX_HEX 0xFF +#define LP873X_BUCK_VOLT_MAX 3360000 +#define LP873X_BUCK_MODE_MASK 0x1 + +#define LP873X_LDO_VOLT_MASK 0x1F +#define LP873X_LDO_VOLT_MAX_HEX 0x19 +#define LP873X_LDO_VOLT_MAX 3300000 +#define LP873X_LDO_MODE_MASK 0x1 diff --git a/include/power/palmas.h b/include/power/palmas.h new file mode 100644 index 0000000..bad5a35 --- /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 diff --git a/include/power/regulator.h b/include/power/regulator.h index 9bcd728..f47ab67 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -108,6 +108,7 @@ enum regulator_type { REGULATOR_TYPE_BUCK, REGULATOR_TYPE_DVS, REGULATOR_TYPE_FIXED, + REGULATOR_TYPE_GPIO, REGULATOR_TYPE_OTHER, }; @@ -152,6 +153,8 @@ enum regulator_flag { * TODO(sjg@chromium.org): Consider putting the above two into @flags * @flags: - flags value (see REGULATOR_FLAG_...) * @name** - fdt regulator name - should be taken from the device tree + * ctrl_reg: - Control register offset used to enable/disable regulator + * volt_reg: - register offset for writing voltage vsel values * * Note: * * - set automatically on device probe by the uclass's '.pre_probe' method. @@ -171,6 +174,8 @@ struct dm_regulator_uclass_platdata { bool boot_on; const char *name; int flags; + u8 ctrl_reg; + u8 volt_reg; }; /* Regulator device operations */ |