diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-08-17 10:21:43 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-08-17 19:36:00 -0400 |
commit | 228b687d9e20f367e4d5ea8723e3abbf0892db61 (patch) | |
tree | 60b86be18f02776b10abb1cb71db3414aa25bbfa | |
parent | 52aae6af71e0e78e25c64e13266917bb323984d5 (diff) |
hwmon: (ltc2978) Add support for LTC3886
LTC3886 is a is a dual PolyPhase DC/DC synchronous step-down switching
regulator controller. It is mostly command compatible to LTC3883,
but supports two phases instead of one.
Suggested-by: Michael Jones <mike@proclivis.com>
Tested-by: Michael Jones <mike@proclivis.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | Documentation/devicetree/bindings/hwmon/ltc2978.txt | 3 | ||||
-rw-r--r-- | Documentation/hwmon/ltc2978 | 23 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/ltc2978.c | 24 |
4 files changed, 39 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt index 5dc2691ccf08..a7afbf60bb9c 100644 --- a/Documentation/devicetree/bindings/hwmon/ltc2978.txt +++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | * "lltc,ltc3880" | 10 | * "lltc,ltc3880" |
11 | * "lltc,ltc3882" | 11 | * "lltc,ltc3882" |
12 | * "lltc,ltc3883" | 12 | * "lltc,ltc3883" |
13 | * "lltc,ltc3886" | ||
13 | * "lltc,ltc3887" | 14 | * "lltc,ltc3887" |
14 | * "lltc,ltm2987" | 15 | * "lltc,ltm2987" |
15 | * "lltc,ltm4676" | 16 | * "lltc,ltm4676" |
@@ -25,7 +26,7 @@ Valid names of regulators depend on number of supplies supported per device: | |||
25 | * ltc2974, ltc2975 : vout0 - vout3 | 26 | * ltc2974, ltc2975 : vout0 - vout3 |
26 | * ltc2977, ltc2980, ltm2987 : vout0 - vout7 | 27 | * ltc2977, ltc2980, ltm2987 : vout0 - vout7 |
27 | * ltc2978 : vout0 - vout7 | 28 | * ltc2978 : vout0 - vout7 |
28 | * ltc3880, ltc3882 : vout0 - vout1 | 29 | * ltc3880, ltc3882, ltc3886 : vout0 - vout1 |
29 | * ltc3883 : vout0 | 30 | * ltc3883 : vout0 |
30 | * ltm4676 : vout0 - vout1 | 31 | * ltm4676 : vout0 - vout1 |
31 | 32 | ||
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978 index 158355398798..f997aa53eb95 100644 --- a/Documentation/hwmon/ltc2978 +++ b/Documentation/hwmon/ltc2978 | |||
@@ -35,6 +35,10 @@ Supported chips: | |||
35 | Prefix: 'ltc3883' | 35 | Prefix: 'ltc3883' |
36 | Addresses scanned: - | 36 | Addresses scanned: - |
37 | Datasheet: http://www.linear.com/product/ltc3883 | 37 | Datasheet: http://www.linear.com/product/ltc3883 |
38 | * Linear Technology LTC3886 | ||
39 | Prefix: 'ltc3886' | ||
40 | Addresses scanned: - | ||
41 | Datasheet: http://www.linear.com/product/ltc3886 | ||
38 | * Linear Technology LTC3887 | 42 | * Linear Technology LTC3887 |
39 | Prefix: 'ltc3887' | 43 | Prefix: 'ltc3887' |
40 | Addresses scanned: - | 44 | Addresses scanned: - |
@@ -60,8 +64,8 @@ LTC2977 is a pin compatible replacement for LTC2978. | |||
60 | LTC2980 is a 16-channel Power System Manager, consisting of two LTC2977 | 64 | LTC2980 is a 16-channel Power System Manager, consisting of two LTC2977 |
61 | in a single die. The chip is instantiated and reported as two separate chips | 65 | in a single die. The chip is instantiated and reported as two separate chips |
62 | on two different I2C bus addresses. | 66 | on two different I2C bus addresses. |
63 | LTC3880, LTC3882, and LTC3887 are dual output poly-phase step-down DC/DC | 67 | LTC3880, LTC3882, LTC3886, and LTC3887 are dual output poly-phase step-down |
64 | controllers. | 68 | DC/DC controllers. |
65 | LTC3883 is a single phase step-down DC/DC controller. | 69 | LTC3883 is a single phase step-down DC/DC controller. |
66 | LTM2987 is a 16-channel Power System Manager with two LTC2977 plus | 70 | LTM2987 is a 16-channel Power System Manager with two LTC2977 plus |
67 | additional components on a single die. The chip is instantiated and reported | 71 | additional components on a single die. The chip is instantiated and reported |
@@ -113,7 +117,7 @@ in[N]_label "vout[1-8]". | |||
113 | LTC2974, LTC2975: N=2-5 | 117 | LTC2974, LTC2975: N=2-5 |
114 | LTC2977, LTC2980, LTM2987: N=2-9 | 118 | LTC2977, LTC2980, LTM2987: N=2-9 |
115 | LTC2978: N=2-9 | 119 | LTC2978: N=2-9 |
116 | LTC3880, LTC3882, LTC3887, LTM4676: N=2-3 | 120 | LTC3880, LTC3882, LTC23886 LTC3887, LTM4676: N=2-3 |
117 | LTC3883: N=2 | 121 | LTC3883: N=2 |
118 | in[N]_input Measured output voltage. | 122 | in[N]_input Measured output voltage. |
119 | in[N]_min Minimum output voltage. | 123 | in[N]_min Minimum output voltage. |
@@ -161,29 +165,30 @@ temp[N]_highest Highest measured temperature. Not supported for chip | |||
161 | temp[N]_reset_history Reset temperature history. Not supported for chip | 165 | temp[N]_reset_history Reset temperature history. Not supported for chip |
162 | temperature sensor on LTC2974 and LTC2975. | 166 | temperature sensor on LTC2974 and LTC2975. |
163 | 167 | ||
164 | power1_label "pin". LTC3883 only. | 168 | power1_label "pin". LTC3883 and LTC3886 only. |
165 | power1_input Measured input power. | 169 | power1_input Measured input power. |
166 | 170 | ||
167 | power[N]_label "pout[1-4]". | 171 | power[N]_label "pout[1-4]". |
168 | LTC2974, LTC2975: N=1-4 | 172 | LTC2974, LTC2975: N=1-4 |
169 | LTC2977, LTC2980, LTM2987: Not supported | 173 | LTC2977, LTC2980, LTM2987: Not supported |
170 | LTC2978: Not supported | 174 | LTC2978: Not supported |
171 | LTC3880, LTC3882, LTC3887, LTM4676: N=1-2 | 175 | LTC3880, LTC3882, LTC3886, LTC3887, LTM4676: N=1-2 |
172 | LTC3883: N=2 | 176 | LTC3883: N=2 |
173 | power[N]_input Measured output power. | 177 | power[N]_input Measured output power. |
174 | 178 | ||
175 | curr1_label "iin". LTC3880, LTC3883, LTC3887, and LTM4676 only. | 179 | curr1_label "iin". LTC3880, LTC3883, LTC3886, LTC3887, and LTM4676 |
180 | only. | ||
176 | curr1_input Measured input current. | 181 | curr1_input Measured input current. |
177 | curr1_max Maximum input current. | 182 | curr1_max Maximum input current. |
178 | curr1_max_alarm Input current high alarm. | 183 | curr1_max_alarm Input current high alarm. |
179 | curr1_highest Highest input current. LTC3883 only. | 184 | curr1_highest Highest input current. LTC3883 and LTC3886 only. |
180 | curr1_reset_history Reset input current history. LTC3883 only. | 185 | curr1_reset_history Reset input current history. LTC3883 and LTC3886 only. |
181 | 186 | ||
182 | curr[N]_label "iout[1-4]". | 187 | curr[N]_label "iout[1-4]". |
183 | LTC2974, LTC2975: N=1-4 | 188 | LTC2974, LTC2975: N=1-4 |
184 | LTC2977, LTC2980, LTM2987: not supported | 189 | LTC2977, LTC2980, LTM2987: not supported |
185 | LTC2978: not supported | 190 | LTC2978: not supported |
186 | LTC3880, LTC3882, LTC3887, LTM4676: N=2-3 | 191 | LTC3880, LTC3882, LTC3886, LTC3887, LTM4676: N=2-3 |
187 | LTC3883: N=2 | 192 | LTC3883: N=2 |
188 | curr[N]_input Measured output current. | 193 | curr[N]_input Measured output current. |
189 | curr[N]_max Maximum output current. | 194 | curr[N]_max Maximum output current. |
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index af778aed4033..5ebc36255c88 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig | |||
@@ -53,7 +53,7 @@ config SENSORS_LTC2978 | |||
53 | help | 53 | help |
54 | If you say yes here you get hardware monitoring support for Linear | 54 | If you say yes here you get hardware monitoring support for Linear |
55 | Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC2980, LTC3880, | 55 | Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC2980, LTC3880, |
56 | LTC3883, LTC3887, LTCM2987, and LTM4676. | 56 | LTC3883, LTC3886, LTC3887, LTCM2987, and LTM4676. |
57 | 57 | ||
58 | This driver can also be built as a module. If so, the module will | 58 | This driver can also be built as a module. If so, the module will |
59 | be called ltc2978. | 59 | be called ltc2978. |
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c index 48dcde0bc740..60fe8f9839d3 100644 --- a/drivers/hwmon/pmbus/ltc2978.c +++ b/drivers/hwmon/pmbus/ltc2978.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "pmbus.h" | 25 | #include "pmbus.h" |
26 | 26 | ||
27 | enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | 27 | enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, |
28 | ltc3883, ltc3887, ltm2987, ltm4676 }; | 28 | ltc3883, ltc3886, ltc3887, ltm2987, ltm4676 }; |
29 | 29 | ||
30 | /* Common for all chips */ | 30 | /* Common for all chips */ |
31 | #define LTC2978_MFR_VOUT_PEAK 0xdd | 31 | #define LTC2978_MFR_VOUT_PEAK 0xdd |
@@ -47,7 +47,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | |||
47 | #define LTC3880_MFR_CLEAR_PEAKS 0xe3 | 47 | #define LTC3880_MFR_CLEAR_PEAKS 0xe3 |
48 | #define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 | 48 | #define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 |
49 | 49 | ||
50 | /* LTC3883 only */ | 50 | /* LTC3883 and LTC3886 only */ |
51 | #define LTC3883_MFR_IIN_PEAK 0xe1 | 51 | #define LTC3883_MFR_IIN_PEAK 0xe1 |
52 | 52 | ||
53 | /* LTC2975 only */ | 53 | /* LTC2975 only */ |
@@ -69,6 +69,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | |||
69 | #define LTC3882_ID 0x4200 | 69 | #define LTC3882_ID 0x4200 |
70 | #define LTC3882_ID_D1 0x4240 /* Dash 1 */ | 70 | #define LTC3882_ID_D1 0x4240 /* Dash 1 */ |
71 | #define LTC3883_ID 0x4300 | 71 | #define LTC3883_ID 0x4300 |
72 | #define LTC3886_ID 0x4600 | ||
72 | #define LTC3887_ID 0x4700 | 73 | #define LTC3887_ID 0x4700 |
73 | #define LTM2987_ID_A 0x8010 /* A/B for two die IDs */ | 74 | #define LTM2987_ID_A 0x8010 /* A/B for two die IDs */ |
74 | #define LTM2987_ID_B 0x8020 | 75 | #define LTM2987_ID_B 0x8020 |
@@ -417,6 +418,7 @@ static const struct i2c_device_id ltc2978_id[] = { | |||
417 | {"ltc3880", ltc3880}, | 418 | {"ltc3880", ltc3880}, |
418 | {"ltc3882", ltc3882}, | 419 | {"ltc3882", ltc3882}, |
419 | {"ltc3883", ltc3883}, | 420 | {"ltc3883", ltc3883}, |
421 | {"ltc3886", ltc3886}, | ||
420 | {"ltc3887", ltc3887}, | 422 | {"ltc3887", ltc3887}, |
421 | {"ltm2987", ltm2987}, | 423 | {"ltm2987", ltm2987}, |
422 | {"ltm4676", ltm4676}, | 424 | {"ltm4676", ltm4676}, |
@@ -485,6 +487,8 @@ static int ltc2978_get_id(struct i2c_client *client) | |||
485 | return ltc3882; | 487 | return ltc3882; |
486 | else if (chip_id == LTC3883_ID) | 488 | else if (chip_id == LTC3883_ID) |
487 | return ltc3883; | 489 | return ltc3883; |
490 | else if (chip_id == LTC3886_ID) | ||
491 | return ltc3886; | ||
488 | else if (chip_id == LTC3887_ID) | 492 | else if (chip_id == LTC3887_ID) |
489 | return ltc3887; | 493 | return ltc3887; |
490 | else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B) | 494 | else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B) |
@@ -624,6 +628,21 @@ static int ltc2978_probe(struct i2c_client *client, | |||
624 | | PMBUS_HAVE_PIN | PMBUS_HAVE_POUT | PMBUS_HAVE_TEMP | 628 | | PMBUS_HAVE_PIN | PMBUS_HAVE_POUT | PMBUS_HAVE_TEMP |
625 | | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_STATUS_TEMP; | 629 | | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_STATUS_TEMP; |
626 | break; | 630 | break; |
631 | case ltc3886: | ||
632 | data->features |= FEAT_CLEAR_PEAKS; | ||
633 | info->read_word_data = ltc3883_read_word_data; | ||
634 | info->pages = LTC3880_NUM_PAGES; | ||
635 | info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | ||
636 | | PMBUS_HAVE_STATUS_INPUT | ||
637 | | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | ||
638 | | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | ||
639 | | PMBUS_HAVE_PIN | PMBUS_HAVE_POUT | PMBUS_HAVE_TEMP | ||
640 | | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_STATUS_TEMP; | ||
641 | info->func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | ||
642 | | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | ||
643 | | PMBUS_HAVE_POUT | ||
644 | | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; | ||
645 | break; | ||
627 | default: | 646 | default: |
628 | return -ENODEV; | 647 | return -ENODEV; |
629 | } | 648 | } |
@@ -650,6 +669,7 @@ static const struct of_device_id ltc2978_of_match[] = { | |||
650 | { .compatible = "lltc,ltc3880" }, | 669 | { .compatible = "lltc,ltc3880" }, |
651 | { .compatible = "lltc,ltc3882" }, | 670 | { .compatible = "lltc,ltc3882" }, |
652 | { .compatible = "lltc,ltc3883" }, | 671 | { .compatible = "lltc,ltc3883" }, |
672 | { .compatible = "lltc,ltc3886" }, | ||
653 | { .compatible = "lltc,ltc3887" }, | 673 | { .compatible = "lltc,ltc3887" }, |
654 | { .compatible = "lltc,ltm2987" }, | 674 | { .compatible = "lltc,ltm2987" }, |
655 | { .compatible = "lltc,ltm4676" }, | 675 | { .compatible = "lltc,ltm4676" }, |