Commit 00f6ebbd authored by Robert Marko's avatar Robert Marko Committed by Mark Brown

regulator: qcom_spmi: add support for HT_P150

HT_P150 is a LDO PMOS regulator based on LV P150 using HFS430 layout
found in PMP8074 and PMS405 PMIC-s.

Both PMP8074 and PMS405 define the programmable range as 1.616V to 3.304V
but the actual MAX output voltage depends on the exact LDO in each of
the PMIC-s.

It has a max current of 150mA, voltage step of 8mV.
Signed-off-by: default avatarRobert Marko <robimarko@gmail.com>
Link: https://lore.kernel.org/r/20220704212402.1715182-4-robimarko@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3fec9004
...@@ -164,6 +164,7 @@ enum spmi_regulator_subtype { ...@@ -164,6 +164,7 @@ enum spmi_regulator_subtype {
SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL3 = 0x0f, SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL3 = 0x0f,
SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL4 = 0x10, SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL4 = 0x10,
SPMI_REGULATOR_SUBTYPE_HFS430 = 0x0a, SPMI_REGULATOR_SUBTYPE_HFS430 = 0x0a,
SPMI_REGULATOR_SUBTYPE_HT_P150 = 0x35,
}; };
enum spmi_common_regulator_registers { enum spmi_common_regulator_registers {
...@@ -544,6 +545,10 @@ static struct spmi_voltage_range hfs430_ranges[] = { ...@@ -544,6 +545,10 @@ static struct spmi_voltage_range hfs430_ranges[] = {
SPMI_VOLTAGE_RANGE(0, 320000, 320000, 2040000, 2040000, 8000), SPMI_VOLTAGE_RANGE(0, 320000, 320000, 2040000, 2040000, 8000),
}; };
static struct spmi_voltage_range ht_p150_ranges[] = {
SPMI_VOLTAGE_RANGE(0, 1616000, 1616000, 3304000, 3304000, 8000),
};
static DEFINE_SPMI_SET_POINTS(pldo); static DEFINE_SPMI_SET_POINTS(pldo);
static DEFINE_SPMI_SET_POINTS(nldo1); static DEFINE_SPMI_SET_POINTS(nldo1);
static DEFINE_SPMI_SET_POINTS(nldo2); static DEFINE_SPMI_SET_POINTS(nldo2);
...@@ -564,6 +569,7 @@ static DEFINE_SPMI_SET_POINTS(nldo660); ...@@ -564,6 +569,7 @@ static DEFINE_SPMI_SET_POINTS(nldo660);
static DEFINE_SPMI_SET_POINTS(ht_lvpldo); static DEFINE_SPMI_SET_POINTS(ht_lvpldo);
static DEFINE_SPMI_SET_POINTS(ht_nldo); static DEFINE_SPMI_SET_POINTS(ht_nldo);
static DEFINE_SPMI_SET_POINTS(hfs430); static DEFINE_SPMI_SET_POINTS(hfs430);
static DEFINE_SPMI_SET_POINTS(ht_p150);
static inline int spmi_vreg_read(struct spmi_regulator *vreg, u16 addr, u8 *buf, static inline int spmi_vreg_read(struct spmi_regulator *vreg, u16 addr, u8 *buf,
int len) int len)
...@@ -1458,6 +1464,7 @@ static const struct regulator_ops spmi_hfs430_ops = { ...@@ -1458,6 +1464,7 @@ static const struct regulator_ops spmi_hfs430_ops = {
static const struct spmi_regulator_mapping supported_regulators[] = { static const struct spmi_regulator_mapping supported_regulators[] = {
/* type subtype dig_min dig_max ltype ops setpoints hpm_min */ /* type subtype dig_min dig_max ltype ops setpoints hpm_min */
SPMI_VREG(LDO, HT_P150, 0, INF, HFS430, hfs430, ht_p150, 10000),
SPMI_VREG(BUCK, GP_CTL, 0, INF, SMPS, smps, smps, 100000), SPMI_VREG(BUCK, GP_CTL, 0, INF, SMPS, smps, smps, 100000),
SPMI_VREG(BUCK, HFS430, 0, INF, HFS430, hfs430, hfs430, 10000), SPMI_VREG(BUCK, HFS430, 0, INF, HFS430, hfs430, hfs430, 10000),
SPMI_VREG(LDO, N300, 0, INF, LDO, ldo, nldo1, 10000), SPMI_VREG(LDO, N300, 0, INF, LDO, ldo, nldo1, 10000),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment