Message ID | 20240318094925.374959-2-bhargav.r@ltts.com |
---|---|
State | Superseded |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | Add support for TI TPS65224 PMIC | expand |
On 3/18/24 18:49, Bhargav Raviprakash wrote: > Re-use the TPS65941 PMIC driver for TPS65224 PMIC. > Add additional macros of TPS65224 to aid in the driver > re-use. > > Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com> > Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > --- > include/power/tps65941.h | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/include/power/tps65941.h b/include/power/tps65941.h > index a2bc6814ba..cec85333f0 100644 > --- a/include/power/tps65941.h > +++ b/include/power/tps65941.h > @@ -3,11 +3,14 @@ > #define TPS659413 0x2 > #define TPS659414 0x3 > #define LP876441 0x4 > +#define TPS65224 0x5 > > /* I2C device address for pmic tps65941 */ > #define TPS65941_I2C_ADDR (0x12 >> 1) > #define TPS65941_LDO_NUM 4 > #define TPS65941_BUCK_NUM 5 > +#define TPS65224_LDO_NUM 3 > +#define TPS65224_BUCK_NUM 4 > > /* Drivers name */ > #define TPS65941_LDO_DRIVER "tps65941_ldo" > @@ -25,3 +28,30 @@ > #define TPS65941_LDO_MODE_MASK 0x1 > #define TPS65941_LDO_BYPASS_EN 0x80 > #define TP65941_BUCK_CONF_SLEW_MASK 0x7 > + > +#define TPS65224_BUCK_VOLT_MAX 3300000 > +#define TPS65224_BUCK1_VOLT_MAX_HEX 0xFD > +#define TPS65224_BUCK234_VOLT_MAX_HEX 0x45 > + > +#define TPS65224_BUCK_CONF_SLEW_MASK 0x3 > +#define TPS65224_LDO_VOLT_MASK (0x3F << 1) > + > +#define TPS65224_LDO1_VOLT_MIN_HEX 0x0C > +#define TPS65224_LDO23_VOLT_MIN_HEX 0x00 > +#define TPS65224_LDO1_VOLT_MAX_HEX 0x36 > +#define TPS65224_LDO23_VOLT_MAX_HEX 0x38 > + > +#define TPS65224_LDO1_VOLT_MAX 3300000 > +#define TPS65224_LDO23_VOLT_MAX 3400000 > +#define TPS65224_LDO1_VOLT_MIN 1200000 > +#define TPS65224_LDO23_VOLT_MIN 600000 > + > +#define TPS65224_LDO_STEP 50000 > + > +#define TPS65224_LDO_BYP_CONFIG 7 > + > +#define TPS65224_LDO1_VOLT_BYP_MIN 2200000 > +#define TPS65224_LDO1_VOLT_BYP_MAX 3600000 > + > +#define TPS65224_LDO23_VOLT_BYP_MIN 1500000 > +#define TPS65224_LDO23_VOLT_BYP_MAX 5500000
diff --git a/include/power/tps65941.h b/include/power/tps65941.h index a2bc6814ba..cec85333f0 100644 --- a/include/power/tps65941.h +++ b/include/power/tps65941.h @@ -3,11 +3,14 @@ #define TPS659413 0x2 #define TPS659414 0x3 #define LP876441 0x4 +#define TPS65224 0x5 /* I2C device address for pmic tps65941 */ #define TPS65941_I2C_ADDR (0x12 >> 1) #define TPS65941_LDO_NUM 4 #define TPS65941_BUCK_NUM 5 +#define TPS65224_LDO_NUM 3 +#define TPS65224_BUCK_NUM 4 /* Drivers name */ #define TPS65941_LDO_DRIVER "tps65941_ldo" @@ -25,3 +28,30 @@ #define TPS65941_LDO_MODE_MASK 0x1 #define TPS65941_LDO_BYPASS_EN 0x80 #define TP65941_BUCK_CONF_SLEW_MASK 0x7 + +#define TPS65224_BUCK_VOLT_MAX 3300000 +#define TPS65224_BUCK1_VOLT_MAX_HEX 0xFD +#define TPS65224_BUCK234_VOLT_MAX_HEX 0x45 + +#define TPS65224_BUCK_CONF_SLEW_MASK 0x3 +#define TPS65224_LDO_VOLT_MASK (0x3F << 1) + +#define TPS65224_LDO1_VOLT_MIN_HEX 0x0C +#define TPS65224_LDO23_VOLT_MIN_HEX 0x00 +#define TPS65224_LDO1_VOLT_MAX_HEX 0x36 +#define TPS65224_LDO23_VOLT_MAX_HEX 0x38 + +#define TPS65224_LDO1_VOLT_MAX 3300000 +#define TPS65224_LDO23_VOLT_MAX 3400000 +#define TPS65224_LDO1_VOLT_MIN 1200000 +#define TPS65224_LDO23_VOLT_MIN 600000 + +#define TPS65224_LDO_STEP 50000 + +#define TPS65224_LDO_BYP_CONFIG 7 + +#define TPS65224_LDO1_VOLT_BYP_MIN 2200000 +#define TPS65224_LDO1_VOLT_BYP_MAX 3600000 + +#define TPS65224_LDO23_VOLT_BYP_MIN 1500000 +#define TPS65224_LDO23_VOLT_BYP_MAX 5500000