Skip to content

Commit 684d5ce

Browse files
Zhenhua HUANGbroonie
authored andcommitted
regulator: ab8500: Introduce aux5, aux6 regulators for AB8540
Introduce aux5, aux6 into ab8540 regulator framework. Signed-off-by: Zhenhua HUANG <zhenhua.huang@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com> Reviewed-by: David PARIS <david.paris@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 33aeb49 commit 684d5ce

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

‎drivers/regulator/ab8500.c‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,21 @@ static const unsigned int ldo_vaux3_ab8540_voltages[] = {
149149
3050000,
150150
};
151151

152+
static const unsigned int ldo_vaux56_ab8540_voltages[] = {
153+
750000, 760000, 770000, 780000, 790000, 800000,
154+
810000, 820000, 830000, 840000, 850000, 860000,
155+
870000, 880000, 890000, 900000, 910000, 920000,
156+
930000, 940000, 950000, 960000, 970000, 980000,
157+
990000, 1000000, 1010000, 1020000, 1030000,
158+
1040000, 1050000, 1060000, 1070000, 1080000,
159+
1090000, 1100000, 1110000, 1120000, 1130000,
160+
1140000, 1150000, 1160000, 1170000, 1180000,
161+
1190000, 1200000, 1210000, 1220000, 1230000,
162+
1240000, 1250000, 1260000, 1270000, 1280000,
163+
1290000, 1300000, 1310000, 1320000, 1330000,
164+
1340000, 1350000, 1360000, 1800000, 2790000,
165+
};
166+
152167
static const unsigned int ldo_vintcore_voltages[] = {
153168
1200000,
154169
1225000,
@@ -1569,6 +1584,54 @@ static struct ab8500_regulator_info
15691584
.voltage_reg = 0x2f,
15701585
.voltage_mask = 0x0f,
15711586
},
1587+
[AB8540_LDO_AUX5] = {
1588+
.desc = {
1589+
.name = "LDO-AUX5",
1590+
.ops = &ab8500_regulator_volt_mode_ops,
1591+
.type = REGULATOR_VOLTAGE,
1592+
.id = AB8540_LDO_AUX5,
1593+
.owner = THIS_MODULE,
1594+
.n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1595+
},
1596+
.load_lp_uA = 20000,
1597+
/* values for Vaux5Regu register */
1598+
.update_bank = 0x04,
1599+
.update_reg = 0x32,
1600+
.update_mask = 0x03,
1601+
.update_val = 0x01,
1602+
.update_val_idle = 0x03,
1603+
.update_val_normal = 0x01,
1604+
/* values for Vaux5SEL register */
1605+
.voltage_bank = 0x04,
1606+
.voltage_reg = 0x33,
1607+
.voltage_mask = 0x3f,
1608+
.voltages = ldo_vaux56_ab8540_voltages,
1609+
.voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1610+
},
1611+
[AB8540_LDO_AUX6] = {
1612+
.desc = {
1613+
.name = "LDO-AUX6",
1614+
.ops = &ab8500_regulator_volt_mode_ops,
1615+
.type = REGULATOR_VOLTAGE,
1616+
.id = AB8540_LDO_AUX6,
1617+
.owner = THIS_MODULE,
1618+
.n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1619+
},
1620+
.load_lp_uA = 20000,
1621+
/* values for Vaux6Regu register */
1622+
.update_bank = 0x04,
1623+
.update_reg = 0x35,
1624+
.update_mask = 0x03,
1625+
.update_val = 0x01,
1626+
.update_val_idle = 0x03,
1627+
.update_val_normal = 0x01,
1628+
/* values for Vaux6SEL register */
1629+
.voltage_bank = 0x04,
1630+
.voltage_reg = 0x36,
1631+
.voltage_mask = 0x3f,
1632+
.voltages = ldo_vaux56_ab8540_voltages,
1633+
.voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1634+
},
15721635
[AB8540_LDO_INTCORE] = {
15731636
.desc = {
15741637
.name = "LDO-INTCORE",
@@ -2979,6 +3042,8 @@ static struct of_regulator_match ab8540_regulator_match[] = {
29793042
{ .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8540_LDO_AUX2, },
29803043
{ .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8540_LDO_AUX3, },
29813044
{ .name = "ab8500_ldo_aux4", .driver_data = (void *) AB8540_LDO_AUX4, },
3045+
{ .name = "ab8500_ldo_aux5", .driver_data = (void *) AB8540_LDO_AUX5, },
3046+
{ .name = "ab8500_ldo_aux6", .driver_data = (void *) AB8540_LDO_AUX6, },
29823047
{ .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8540_LDO_INTCORE, },
29833048
{ .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8540_LDO_TVOUT, },
29843049
{ .name = "ab8500_ldo_audio", .driver_data = (void *) AB8540_LDO_AUDIO, },

‎include/linux/regulator/ab8500.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ enum ab8540_regulator_id {
7474
AB8540_LDO_AUX2,
7575
AB8540_LDO_AUX3,
7676
AB8540_LDO_AUX4,
77+
AB8540_LDO_AUX5,
78+
AB8540_LDO_AUX6,
7779
AB8540_LDO_INTCORE,
7880
AB8540_LDO_TVOUT,
7981
AB8540_LDO_AUDIO,

0 commit comments

Comments
 (0)