aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/regulator/twl-regulator.txt26
-rw-r--r--Documentation/devicetree/bindings/usb/twlxxxx-usb.txt2
-rw-r--r--drivers/mfd/twl-core.c46
-rw-r--r--drivers/regulator/twl-regulator.c76
-rw-r--r--drivers/usb/phy/phy-twl6030-usb.c2
-rw-r--r--include/linux/i2c/twl.h30
6 files changed, 91 insertions, 91 deletions
diff --git a/Documentation/devicetree/bindings/regulator/twl-regulator.txt b/Documentation/devicetree/bindings/regulator/twl-regulator.txt
index 658749b90b97..75b0c1669504 100644
--- a/Documentation/devicetree/bindings/regulator/twl-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/twl-regulator.txt
@@ -18,20 +18,20 @@ For twl6030 regulators/LDOs
18 - "ti,twl6030-vdd1" for VDD1 SMPS 18 - "ti,twl6030-vdd1" for VDD1 SMPS
19 - "ti,twl6030-vdd2" for VDD2 SMPS 19 - "ti,twl6030-vdd2" for VDD2 SMPS
20 - "ti,twl6030-vdd3" for VDD3 SMPS 20 - "ti,twl6030-vdd3" for VDD3 SMPS
21For twl6025 regulators/LDOs 21For twl6032 regulators/LDOs
22- compatible: 22- compatible:
23 - "ti,twl6025-ldo1" for LDO1 LDO 23 - "ti,twl6032-ldo1" for LDO1 LDO
24 - "ti,twl6025-ldo2" for LDO2 LDO 24 - "ti,twl6032-ldo2" for LDO2 LDO
25 - "ti,twl6025-ldo3" for LDO3 LDO 25 - "ti,twl6032-ldo3" for LDO3 LDO
26 - "ti,twl6025-ldo4" for LDO4 LDO 26 - "ti,twl6032-ldo4" for LDO4 LDO
27 - "ti,twl6025-ldo5" for LDO5 LDO 27 - "ti,twl6032-ldo5" for LDO5 LDO
28 - "ti,twl6025-ldo6" for LDO6 LDO 28 - "ti,twl6032-ldo6" for LDO6 LDO
29 - "ti,twl6025-ldo7" for LDO7 LDO 29 - "ti,twl6032-ldo7" for LDO7 LDO
30 - "ti,twl6025-ldoln" for LDOLN LDO 30 - "ti,twl6032-ldoln" for LDOLN LDO
31 - "ti,twl6025-ldousb" for LDOUSB LDO 31 - "ti,twl6032-ldousb" for LDOUSB LDO
32 - "ti,twl6025-smps3" for SMPS3 SMPS 32 - "ti,twl6032-smps3" for SMPS3 SMPS
33 - "ti,twl6025-smps4" for SMPS4 SMPS 33 - "ti,twl6032-smps4" for SMPS4 SMPS
34 - "ti,twl6025-vio" for VIO SMPS 34 - "ti,twl6032-vio" for VIO SMPS
35For twl4030 regulators/LDOs 35For twl4030 regulators/LDOs
36- compatible: 36- compatible:
37 - "ti,twl4030-vaux1" for VAUX1 LDO 37 - "ti,twl4030-vaux1" for VAUX1 LDO
diff --git a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
index 36b9aede3f40..0aee0ad3f035 100644
--- a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
@@ -8,7 +8,7 @@ TWL6030 USB COMPARATOR
8 usb interrupt number that raises VBUS interrupts when the controller has to 8 usb interrupt number that raises VBUS interrupts when the controller has to
9 act as device 9 act as device
10 - usb-supply : phandle to the regulator device tree node. It should be vusb 10 - usb-supply : phandle to the regulator device tree node. It should be vusb
11 if it is twl6030 or ldousb if it is twl6025 subclass. 11 if it is twl6030 or ldousb if it is twl6032 subclass.
12 12
13twl6030-usb { 13twl6030-usb {
14 compatible = "ti,twl6030-usb"; 14 compatible = "ti,twl6030-usb";
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index dbd52b373b27..7f150d94d295 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -118,7 +118,7 @@
118#define TWL6030_BASEADD_GASGAUGE 0x00C0 118#define TWL6030_BASEADD_GASGAUGE 0x00C0
119#define TWL6030_BASEADD_PIH 0x00D0 119#define TWL6030_BASEADD_PIH 0x00D0
120#define TWL6030_BASEADD_CHARGER 0x00E0 120#define TWL6030_BASEADD_CHARGER 0x00E0
121#define TWL6025_BASEADD_CHARGER 0x00DA 121#define TWL6032_BASEADD_CHARGER 0x00DA
122#define TWL6030_BASEADD_LED 0x00F4 122#define TWL6030_BASEADD_LED 0x00F4
123 123
124/* subchip/slave 2 0x4A - DFT */ 124/* subchip/slave 2 0x4A - DFT */
@@ -718,9 +718,9 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
718 | REGULATOR_CHANGE_STATUS, 718 | REGULATOR_CHANGE_STATUS,
719 }; 719 };
720 720
721 if (features & TWL6025_SUBCLASS) { 721 if (features & TWL6032_SUBCLASS) {
722 usb3v3.supply = "ldousb"; 722 usb3v3.supply = "ldousb";
723 regulator = TWL6025_REG_LDOUSB; 723 regulator = TWL6032_REG_LDOUSB;
724 } else { 724 } else {
725 usb3v3.supply = "vusb"; 725 usb3v3.supply = "vusb";
726 regulator = TWL6030_REG_VUSB; 726 regulator = TWL6030_REG_VUSB;
@@ -747,8 +747,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
747 usb3v3.dev_name = dev_name(child); 747 usb3v3.dev_name = dev_name(child);
748 } else if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && 748 } else if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) &&
749 twl_class_is_6030()) { 749 twl_class_is_6030()) {
750 if (features & TWL6025_SUBCLASS) 750 if (features & TWL6032_SUBCLASS)
751 child = add_regulator(TWL6025_REG_LDOUSB, 751 child = add_regulator(TWL6032_REG_LDOUSB,
752 pdata->ldousb, features); 752 pdata->ldousb, features);
753 else 753 else
754 child = add_regulator(TWL6030_REG_VUSB, 754 child = add_regulator(TWL6030_REG_VUSB,
@@ -872,7 +872,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
872 872
873 /* twl6030 regulators */ 873 /* twl6030 regulators */
874 if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() && 874 if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
875 !(features & TWL6025_SUBCLASS)) { 875 !(features & TWL6032_SUBCLASS)) {
876 child = add_regulator(TWL6030_REG_VDD1, pdata->vdd1, 876 child = add_regulator(TWL6030_REG_VDD1, pdata->vdd1,
877 features); 877 features);
878 if (IS_ERR(child)) 878 if (IS_ERR(child))
@@ -952,60 +952,60 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
952 return PTR_ERR(child); 952 return PTR_ERR(child);
953 } 953 }
954 954
955 /* twl6025 regulators */ 955 /* twl6032 regulators */
956 if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() && 956 if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
957 (features & TWL6025_SUBCLASS)) { 957 (features & TWL6032_SUBCLASS)) {
958 child = add_regulator(TWL6025_REG_LDO5, pdata->ldo5, 958 child = add_regulator(TWL6032_REG_LDO5, pdata->ldo5,
959 features); 959 features);
960 if (IS_ERR(child)) 960 if (IS_ERR(child))
961 return PTR_ERR(child); 961 return PTR_ERR(child);
962 962
963 child = add_regulator(TWL6025_REG_LDO1, pdata->ldo1, 963 child = add_regulator(TWL6032_REG_LDO1, pdata->ldo1,
964 features); 964 features);
965 if (IS_ERR(child)) 965 if (IS_ERR(child))
966 return PTR_ERR(child); 966 return PTR_ERR(child);
967 967
968 child = add_regulator(TWL6025_REG_LDO7, pdata->ldo7, 968 child = add_regulator(TWL6032_REG_LDO7, pdata->ldo7,
969 features); 969 features);
970 if (IS_ERR(child)) 970 if (IS_ERR(child))
971 return PTR_ERR(child); 971 return PTR_ERR(child);
972 972
973 child = add_regulator(TWL6025_REG_LDO6, pdata->ldo6, 973 child = add_regulator(TWL6032_REG_LDO6, pdata->ldo6,
974 features); 974 features);
975 if (IS_ERR(child)) 975 if (IS_ERR(child))
976 return PTR_ERR(child); 976 return PTR_ERR(child);
977 977
978 child = add_regulator(TWL6025_REG_LDOLN, pdata->ldoln, 978 child = add_regulator(TWL6032_REG_LDOLN, pdata->ldoln,
979 features); 979 features);
980 if (IS_ERR(child)) 980 if (IS_ERR(child))
981 return PTR_ERR(child); 981 return PTR_ERR(child);
982 982
983 child = add_regulator(TWL6025_REG_LDO2, pdata->ldo2, 983 child = add_regulator(TWL6032_REG_LDO2, pdata->ldo2,
984 features); 984 features);
985 if (IS_ERR(child)) 985 if (IS_ERR(child))
986 return PTR_ERR(child); 986 return PTR_ERR(child);
987 987
988 child = add_regulator(TWL6025_REG_LDO4, pdata->ldo4, 988 child = add_regulator(TWL6032_REG_LDO4, pdata->ldo4,
989 features); 989 features);
990 if (IS_ERR(child)) 990 if (IS_ERR(child))
991 return PTR_ERR(child); 991 return PTR_ERR(child);
992 992
993 child = add_regulator(TWL6025_REG_LDO3, pdata->ldo3, 993 child = add_regulator(TWL6032_REG_LDO3, pdata->ldo3,
994 features); 994 features);
995 if (IS_ERR(child)) 995 if (IS_ERR(child))
996 return PTR_ERR(child); 996 return PTR_ERR(child);
997 997
998 child = add_regulator(TWL6025_REG_SMPS3, pdata->smps3, 998 child = add_regulator(TWL6032_REG_SMPS3, pdata->smps3,
999 features); 999 features);
1000 if (IS_ERR(child)) 1000 if (IS_ERR(child))
1001 return PTR_ERR(child); 1001 return PTR_ERR(child);
1002 1002
1003 child = add_regulator(TWL6025_REG_SMPS4, pdata->smps4, 1003 child = add_regulator(TWL6032_REG_SMPS4, pdata->smps4,
1004 features); 1004 features);
1005 if (IS_ERR(child)) 1005 if (IS_ERR(child))
1006 return PTR_ERR(child); 1006 return PTR_ERR(child);
1007 1007
1008 child = add_regulator(TWL6025_REG_VIO, pdata->vio6025, 1008 child = add_regulator(TWL6032_REG_VIO, pdata->vio6025,
1009 features); 1009 features);
1010 if (IS_ERR(child)) 1010 if (IS_ERR(child))
1011 return PTR_ERR(child); 1011 return PTR_ERR(child);
@@ -1184,10 +1184,10 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
1184 if ((id->driver_data) & TWL6030_CLASS) { 1184 if ((id->driver_data) & TWL6030_CLASS) {
1185 twl_priv->twl_id = TWL6030_CLASS_ID; 1185 twl_priv->twl_id = TWL6030_CLASS_ID;
1186 twl_priv->twl_map = &twl6030_map[0]; 1186 twl_priv->twl_map = &twl6030_map[0];
1187 /* The charger base address is different in twl6025 */ 1187 /* The charger base address is different in twl6032 */
1188 if ((id->driver_data) & TWL6025_SUBCLASS) 1188 if ((id->driver_data) & TWL6032_SUBCLASS)
1189 twl_priv->twl_map[TWL_MODULE_MAIN_CHARGE].base = 1189 twl_priv->twl_map[TWL_MODULE_MAIN_CHARGE].base =
1190 TWL6025_BASEADD_CHARGER; 1190 TWL6032_BASEADD_CHARGER;
1191 twl_regmap_config = twl6030_regmap_config; 1191 twl_regmap_config = twl6030_regmap_config;
1192 } else { 1192 } else {
1193 twl_priv->twl_id = TWL4030_CLASS_ID; 1193 twl_priv->twl_id = TWL4030_CLASS_ID;
@@ -1296,7 +1296,7 @@ static const struct i2c_device_id twl_ids[] = {
1296 { "tps65921", TPS_SUBSET }, /* fewer LDOs; no codec, no LED 1296 { "tps65921", TPS_SUBSET }, /* fewer LDOs; no codec, no LED
1297 and vibrator. Charger in USB module*/ 1297 and vibrator. Charger in USB module*/
1298 { "twl6030", TWL6030_CLASS }, /* "Phoenix power chip" */ 1298 { "twl6030", TWL6030_CLASS }, /* "Phoenix power chip" */
1299 { "twl6025", TWL6030_CLASS | TWL6025_SUBCLASS }, /* "Phoenix lite" */ 1299 { "twl6032", TWL6030_CLASS | TWL6032_SUBCLASS }, /* "Phoenix lite" */
1300 { /* end of list */ }, 1300 { /* end of list */ },
1301}; 1301};
1302MODULE_DEVICE_TABLE(i2c, twl_ids); 1302MODULE_DEVICE_TABLE(i2c, twl_ids);
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index fb6e67d74ffb..93bc4f456da4 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -109,7 +109,7 @@ struct twlreg_info {
109#define SMPS_OFFSET_EN BIT(0) 109#define SMPS_OFFSET_EN BIT(0)
110#define SMPS_EXTENDED_EN BIT(1) 110#define SMPS_EXTENDED_EN BIT(1)
111 111
112/* twl6025 SMPS EPROM values */ 112/* twl6032 SMPS EPROM values */
113#define TWL6030_SMPS_OFFSET 0xB0 113#define TWL6030_SMPS_OFFSET 0xB0
114#define TWL6030_SMPS_MULT 0xB3 114#define TWL6030_SMPS_MULT 0xB3
115#define SMPS_MULTOFFSET_SMPS4 BIT(0) 115#define SMPS_MULTOFFSET_SMPS4 BIT(0)
@@ -173,7 +173,7 @@ static int twl6030reg_is_enabled(struct regulator_dev *rdev)
173 struct twlreg_info *info = rdev_get_drvdata(rdev); 173 struct twlreg_info *info = rdev_get_drvdata(rdev);
174 int grp = 0, val; 174 int grp = 0, val;
175 175
176 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) { 176 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) {
177 grp = twlreg_grp(rdev); 177 grp = twlreg_grp(rdev);
178 if (grp < 0) 178 if (grp < 0)
179 return grp; 179 return grp;
@@ -211,7 +211,7 @@ static int twl6030reg_enable(struct regulator_dev *rdev)
211 int grp = 0; 211 int grp = 0;
212 int ret; 212 int ret;
213 213
214 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 214 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
215 grp = twlreg_grp(rdev); 215 grp = twlreg_grp(rdev);
216 if (grp < 0) 216 if (grp < 0)
217 return grp; 217 return grp;
@@ -245,7 +245,7 @@ static int twl6030reg_disable(struct regulator_dev *rdev)
245 int grp = 0; 245 int grp = 0;
246 int ret; 246 int ret;
247 247
248 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 248 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
249 grp = P1_GRP_6030 | P2_GRP_6030 | P3_GRP_6030; 249 grp = P1_GRP_6030 | P2_GRP_6030 | P3_GRP_6030;
250 250
251 /* For 6030, set the off state for all grps enabled */ 251 /* For 6030, set the off state for all grps enabled */
@@ -339,7 +339,7 @@ static int twl6030reg_set_mode(struct regulator_dev *rdev, unsigned mode)
339 int grp = 0; 339 int grp = 0;
340 int val; 340 int val;
341 341
342 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 342 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
343 grp = twlreg_grp(rdev); 343 grp = twlreg_grp(rdev);
344 344
345 if (grp < 0) 345 if (grp < 0)
@@ -899,14 +899,14 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
899 }, \ 899 }, \
900 } 900 }
901 901
902#define TWL6025_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \ 902#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
903static const struct twlreg_info TWL6025_INFO_##label = { \ 903static const struct twlreg_info TWL6032_INFO_##label = { \
904 .base = offset, \ 904 .base = offset, \
905 .min_mV = min_mVolts, \ 905 .min_mV = min_mVolts, \
906 .max_mV = max_mVolts, \ 906 .max_mV = max_mVolts, \
907 .desc = { \ 907 .desc = { \
908 .name = #label, \ 908 .name = #label, \
909 .id = TWL6025_REG_##label, \ 909 .id = TWL6032_REG_##label, \
910 .n_voltages = 32, \ 910 .n_voltages = 32, \
911 .ops = &twl6030ldo_ops, \ 911 .ops = &twl6030ldo_ops, \
912 .type = REGULATOR_VOLTAGE, \ 912 .type = REGULATOR_VOLTAGE, \
@@ -933,14 +933,14 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
933 }, \ 933 }, \
934 } 934 }
935 935
936#define TWL6025_ADJUSTABLE_SMPS(label, offset) \ 936#define TWL6032_ADJUSTABLE_SMPS(label, offset) \
937static const struct twlreg_info TWLSMPS_INFO_##label = { \ 937static const struct twlreg_info TWLSMPS_INFO_##label = { \
938 .base = offset, \ 938 .base = offset, \
939 .min_mV = 600, \ 939 .min_mV = 600, \
940 .max_mV = 2100, \ 940 .max_mV = 2100, \
941 .desc = { \ 941 .desc = { \
942 .name = #label, \ 942 .name = #label, \
943 .id = TWL6025_REG_##label, \ 943 .id = TWL6032_REG_##label, \
944 .n_voltages = 63, \ 944 .n_voltages = 63, \
945 .ops = &twlsmps_ops, \ 945 .ops = &twlsmps_ops, \
946 .type = REGULATOR_VOLTAGE, \ 946 .type = REGULATOR_VOLTAGE, \
@@ -981,15 +981,15 @@ TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000, 3300);
981TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300); 981TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300);
982TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300); 982TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300);
983/* 6025 are renamed compared to 6030 versions */ 983/* 6025 are renamed compared to 6030 versions */
984TWL6025_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300); 984TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300);
985TWL6025_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300); 985TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300);
986TWL6025_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300); 986TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300);
987TWL6025_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300); 987TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300);
988TWL6025_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300); 988TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300);
989TWL6025_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300); 989TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300);
990TWL6025_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300); 990TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300);
991TWL6025_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300); 991TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300);
992TWL6025_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300); 992TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300);
993TWL4030_FIXED_LDO(VINTANA1, 0x3f, 1500, 11, 100, 0x08); 993TWL4030_FIXED_LDO(VINTANA1, 0x3f, 1500, 11, 100, 0x08);
994TWL4030_FIXED_LDO(VINTDIG, 0x47, 1500, 13, 100, 0x08); 994TWL4030_FIXED_LDO(VINTDIG, 0x47, 1500, 13, 100, 0x08);
995TWL4030_FIXED_LDO(VUSB1V5, 0x71, 1500, 17, 100, 0x08); 995TWL4030_FIXED_LDO(VUSB1V5, 0x71, 1500, 17, 100, 0x08);
@@ -1001,9 +1001,9 @@ TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);
1001TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0); 1001TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0);
1002TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0); 1002TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0);
1003TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0); 1003TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0);
1004TWL6025_ADJUSTABLE_SMPS(SMPS3, 0x34); 1004TWL6032_ADJUSTABLE_SMPS(SMPS3, 0x34);
1005TWL6025_ADJUSTABLE_SMPS(SMPS4, 0x10); 1005TWL6032_ADJUSTABLE_SMPS(SMPS4, 0x10);
1006TWL6025_ADJUSTABLE_SMPS(VIO, 0x16); 1006TWL6032_ADJUSTABLE_SMPS(VIO, 0x16);
1007 1007
1008static u8 twl_get_smps_offset(void) 1008static u8 twl_get_smps_offset(void)
1009{ 1009{
@@ -1031,7 +1031,7 @@ static u8 twl_get_smps_mult(void)
1031 1031
1032#define TWL4030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL4030, label) 1032#define TWL4030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL4030, label)
1033#define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label) 1033#define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label)
1034#define TWL6025_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6025, label) 1034#define TWL6032_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6032, label)
1035#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) 1035#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label)
1036#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) 1036#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label)
1037 1037
@@ -1060,15 +1060,15 @@ static const struct of_device_id twl_of_match[] = {
1060 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC), 1060 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC),
1061 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP), 1061 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP),
1062 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM), 1062 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM),
1063 TWL6025_OF_MATCH("ti,twl6025-ldo2", LDO2), 1063 TWL6032_OF_MATCH("ti,twl6032-ldo2", LDO2),
1064 TWL6025_OF_MATCH("ti,twl6025-ldo4", LDO4), 1064 TWL6032_OF_MATCH("ti,twl6032-ldo4", LDO4),
1065 TWL6025_OF_MATCH("ti,twl6025-ldo3", LDO3), 1065 TWL6032_OF_MATCH("ti,twl6032-ldo3", LDO3),
1066 TWL6025_OF_MATCH("ti,twl6025-ldo5", LDO5), 1066 TWL6032_OF_MATCH("ti,twl6032-ldo5", LDO5),
1067 TWL6025_OF_MATCH("ti,twl6025-ldo1", LDO1), 1067 TWL6032_OF_MATCH("ti,twl6032-ldo1", LDO1),
1068 TWL6025_OF_MATCH("ti,twl6025-ldo7", LDO7), 1068 TWL6032_OF_MATCH("ti,twl6032-ldo7", LDO7),
1069 TWL6025_OF_MATCH("ti,twl6025-ldo6", LDO6), 1069 TWL6032_OF_MATCH("ti,twl6032-ldo6", LDO6),
1070 TWL6025_OF_MATCH("ti,twl6025-ldoln", LDOLN), 1070 TWL6032_OF_MATCH("ti,twl6032-ldoln", LDOLN),
1071 TWL6025_OF_MATCH("ti,twl6025-ldousb", LDOUSB), 1071 TWL6032_OF_MATCH("ti,twl6032-ldousb", LDOUSB),
1072 TWLFIXED_OF_MATCH("ti,twl4030-vintana1", VINTANA1), 1072 TWLFIXED_OF_MATCH("ti,twl4030-vintana1", VINTANA1),
1073 TWLFIXED_OF_MATCH("ti,twl4030-vintdig", VINTDIG), 1073 TWLFIXED_OF_MATCH("ti,twl4030-vintdig", VINTDIG),
1074 TWLFIXED_OF_MATCH("ti,twl4030-vusb1v5", VUSB1V5), 1074 TWLFIXED_OF_MATCH("ti,twl4030-vusb1v5", VUSB1V5),
@@ -1080,9 +1080,9 @@ static const struct of_device_id twl_of_match[] = {
1080 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB), 1080 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB),
1081 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8), 1081 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8),
1082 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1), 1082 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1),
1083 TWLSMPS_OF_MATCH("ti,twl6025-smps3", SMPS3), 1083 TWLSMPS_OF_MATCH("ti,twl6032-smps3", SMPS3),
1084 TWLSMPS_OF_MATCH("ti,twl6025-smps4", SMPS4), 1084 TWLSMPS_OF_MATCH("ti,twl6032-smps4", SMPS4),
1085 TWLSMPS_OF_MATCH("ti,twl6025-vio", VIO), 1085 TWLSMPS_OF_MATCH("ti,twl6032-vio", VIO),
1086 {}, 1086 {},
1087}; 1087};
1088MODULE_DEVICE_TABLE(of, twl_of_match); 1088MODULE_DEVICE_TABLE(of, twl_of_match);
@@ -1163,19 +1163,19 @@ static int twlreg_probe(struct platform_device *pdev)
1163 } 1163 }
1164 1164
1165 switch (id) { 1165 switch (id) {
1166 case TWL6025_REG_SMPS3: 1166 case TWL6032_REG_SMPS3:
1167 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS3) 1167 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS3)
1168 info->flags |= SMPS_EXTENDED_EN; 1168 info->flags |= SMPS_EXTENDED_EN;
1169 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS3) 1169 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS3)
1170 info->flags |= SMPS_OFFSET_EN; 1170 info->flags |= SMPS_OFFSET_EN;
1171 break; 1171 break;
1172 case TWL6025_REG_SMPS4: 1172 case TWL6032_REG_SMPS4:
1173 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS4) 1173 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS4)
1174 info->flags |= SMPS_EXTENDED_EN; 1174 info->flags |= SMPS_EXTENDED_EN;
1175 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS4) 1175 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS4)
1176 info->flags |= SMPS_OFFSET_EN; 1176 info->flags |= SMPS_OFFSET_EN;
1177 break; 1177 break;
1178 case TWL6025_REG_VIO: 1178 case TWL6032_REG_VIO:
1179 if (twl_get_smps_mult() & SMPS_MULTOFFSET_VIO) 1179 if (twl_get_smps_mult() & SMPS_MULTOFFSET_VIO)
1180 info->flags |= SMPS_EXTENDED_EN; 1180 info->flags |= SMPS_EXTENDED_EN;
1181 if (twl_get_smps_offset() & SMPS_MULTOFFSET_VIO) 1181 if (twl_get_smps_offset() & SMPS_MULTOFFSET_VIO)
diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c
index 9de7ada90a8b..1753bd367e0a 100644
--- a/drivers/usb/phy/phy-twl6030-usb.c
+++ b/drivers/usb/phy/phy-twl6030-usb.c
@@ -347,7 +347,7 @@ static int twl6030_usb_probe(struct platform_device *pdev)
347 if (np) { 347 if (np) {
348 twl->regulator = "usb"; 348 twl->regulator = "usb";
349 } else if (pdata) { 349 } else if (pdata) {
350 if (pdata->features & TWL6025_SUBCLASS) 350 if (pdata->features & TWL6032_SUBCLASS)
351 twl->regulator = "ldousb"; 351 twl->regulator = "ldousb";
352 else 352 else
353 twl->regulator = "vusb"; 353 twl->regulator = "vusb";
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 2167c0d00abf..81cbbdb96aae 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -725,7 +725,7 @@ struct twl4030_platform_data {
725 struct regulator_init_data *clk32kg; 725 struct regulator_init_data *clk32kg;
726 struct regulator_init_data *v1v8; 726 struct regulator_init_data *v1v8;
727 struct regulator_init_data *v2v1; 727 struct regulator_init_data *v2v1;
728 /* TWL6025 LDO regulators */ 728 /* TWL6032 LDO regulators */
729 struct regulator_init_data *ldo1; 729 struct regulator_init_data *ldo1;
730 struct regulator_init_data *ldo2; 730 struct regulator_init_data *ldo2;
731 struct regulator_init_data *ldo3; 731 struct regulator_init_data *ldo3;
@@ -735,7 +735,7 @@ struct twl4030_platform_data {
735 struct regulator_init_data *ldo7; 735 struct regulator_init_data *ldo7;
736 struct regulator_init_data *ldoln; 736 struct regulator_init_data *ldoln;
737 struct regulator_init_data *ldousb; 737 struct regulator_init_data *ldousb;
738 /* TWL6025 DCDC regulators */ 738 /* TWL6032 DCDC regulators */
739 struct regulator_init_data *smps3; 739 struct regulator_init_data *smps3;
740 struct regulator_init_data *smps4; 740 struct regulator_init_data *smps4;
741 struct regulator_init_data *vio6025; 741 struct regulator_init_data *vio6025;
@@ -752,7 +752,7 @@ struct twl_regulator_driver_data {
752#define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ 752#define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */
753#define TWL5031 BIT(2) /* twl5031 has different registers */ 753#define TWL5031 BIT(2) /* twl5031 has different registers */
754#define TWL6030_CLASS BIT(3) /* TWL6030 class */ 754#define TWL6030_CLASS BIT(3) /* TWL6030 class */
755#define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ 755#define TWL6032_SUBCLASS BIT(4) /* TWL6032 has changed registers */
756#define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible 756#define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible
757 * but not officially supported. 757 * but not officially supported.
758 * This flag is necessary to 758 * This flag is necessary to
@@ -839,20 +839,20 @@ static inline int twl4030charger_usb_en(int enable) { return 0; }
839#define TWL6030_REG_CLK32KG 48 839#define TWL6030_REG_CLK32KG 48
840 840
841/* LDOs on 6025 have different names */ 841/* LDOs on 6025 have different names */
842#define TWL6025_REG_LDO2 49 842#define TWL6032_REG_LDO2 49
843#define TWL6025_REG_LDO4 50 843#define TWL6032_REG_LDO4 50
844#define TWL6025_REG_LDO3 51 844#define TWL6032_REG_LDO3 51
845#define TWL6025_REG_LDO5 52 845#define TWL6032_REG_LDO5 52
846#define TWL6025_REG_LDO1 53 846#define TWL6032_REG_LDO1 53
847#define TWL6025_REG_LDO7 54 847#define TWL6032_REG_LDO7 54
848#define TWL6025_REG_LDO6 55 848#define TWL6032_REG_LDO6 55
849#define TWL6025_REG_LDOLN 56 849#define TWL6032_REG_LDOLN 56
850#define TWL6025_REG_LDOUSB 57 850#define TWL6032_REG_LDOUSB 57
851 851
852/* 6025 DCDC supplies */ 852/* 6025 DCDC supplies */
853#define TWL6025_REG_SMPS3 58 853#define TWL6032_REG_SMPS3 58
854#define TWL6025_REG_SMPS4 59 854#define TWL6032_REG_SMPS4 59
855#define TWL6025_REG_VIO 60 855#define TWL6032_REG_VIO 60
856 856
857 857
858#endif /* End of __TWL4030_H */ 858#endif /* End of __TWL4030_H */