* [PATCH 1/3] hwmon: (pmbus/ltc7841) add support for LT717x - docs
2025-03-17 5:02 [PATCH 0/3] Add support for LT7170 and LT7171 Regulator Kim Seer Paller
@ 2025-03-17 5:02 ` Kim Seer Paller
2025-03-17 15:03 ` Guenter Roeck
2025-03-17 5:02 ` [PATCH 2/3] dt-bindings: hwmon: ltc2978: add support for LT717x Kim Seer Paller
2025-03-17 5:02 ` [PATCH 3/3] hwmon: (pmbus/ltc2978) add support for lt717x Kim Seer Paller
2 siblings, 1 reply; 8+ messages in thread
From: Kim Seer Paller @ 2025-03-17 5:02 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Delphine CC Chiu
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, linux-i2c,
Kim Seer Paller, Cherrence Sarip
Add LT7170 and LT7171 to compatible devices of LTC2978.
Co-developed-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
---
Documentation/hwmon/ltc2978.rst | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/Documentation/hwmon/ltc2978.rst b/Documentation/hwmon/ltc2978.rst
index feae53eb9fbf5cff8f7a484c163acad011315d8d..0b72d566cac709aeafe53d08680ad65221bfa33f 100644
--- a/Documentation/hwmon/ltc2978.rst
+++ b/Documentation/hwmon/ltc2978.rst
@@ -5,6 +5,22 @@ Kernel driver ltc2978
Supported chips:
+ * Analog Devices LT7170
+
+ Prefix: 'lt7170'
+
+ Addresses scanned: -
+
+ Datasheet: https://www.analog.com/en/products/lt7170.html
+
+ * Analog Devices LT7171
+
+ Prefix: 'lt7171'
+
+ Addresses scanned: -
+
+ Datasheet: https://www.analog.com/en/products/lt7171.html
+
* Linear Technology LTC2972
Prefix: 'ltc2972'
@@ -223,6 +239,8 @@ Author: Guenter Roeck <linux@roeck-us.net>
Description
-----------
+- LT7170 and LT7171 are 20 A, 16 V, single- or dual-phase Silent Switcher
+- step-down regulators with Digital Power System Management.
- LTC2974 and LTC2975 are quad digital power supply managers.
- LTC2978 is an octal power supply monitor.
- LTC2977 is a pin compatible replacement for LTC2978.
@@ -300,6 +318,7 @@ in1_reset_history Reset input voltage history.
in[N]_label "vout[1-8]".
+ - LT7170, LT7171: N=2
- LTC2972: N=2-3
- LTC2974, LTC2975: N=2-5
- LTC2977, LTC2979, LTC2980, LTM2987: N=2-9
@@ -338,6 +357,8 @@ in[N]_reset_history Reset output voltage history.
temp[N]_input Measured temperature.
+ - On LT7170 and LT7171, temp1 reports the chip
+ temperature.
- On LTC2972, temp[1-2] report external temperatures,
and temp 3 reports the chip temperature.
- On LTC2974 and LTC2975, temp[1-4] report external
@@ -411,9 +432,9 @@ power[N]_input Measured output power.
curr1_label "iin".
- LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889,
- LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
- and LTM4700 only.
+ LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886,
+ LTC3887, LTC3889, LTM4644, LTM4675, LTM4676, LTM4677,
+ LTM4678, LTM4680, and LTM4700 only.
curr1_input Measured input current.
@@ -431,6 +452,7 @@ curr1_reset_history Reset input current history.
curr[N]_label "iout[1-4]".
+ - LT7170, LT7171: N=1
- LTC2972: N-1-2
- LTC2974, LTC2975: N=1-4
- LTC2977, LTC2979, LTC2980, LTM2987: not supported
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 2/3] dt-bindings: hwmon: ltc2978: add support for LT717x
2025-03-17 5:02 [PATCH 0/3] Add support for LT7170 and LT7171 Regulator Kim Seer Paller
2025-03-17 5:02 ` [PATCH 1/3] hwmon: (pmbus/ltc7841) add support for LT717x - docs Kim Seer Paller
@ 2025-03-17 5:02 ` Kim Seer Paller
2025-03-17 11:34 ` Krzysztof Kozlowski
2025-03-17 15:04 ` Guenter Roeck
2025-03-17 5:02 ` [PATCH 3/3] hwmon: (pmbus/ltc2978) add support for lt717x Kim Seer Paller
2 siblings, 2 replies; 8+ messages in thread
From: Kim Seer Paller @ 2025-03-17 5:02 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Delphine CC Chiu
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, linux-i2c,
Kim Seer Paller, Cherrence Sarip
Add LTC7170 and LT7171 to supported devices of LTC2978. It has similar
set of registers to LTC3887, differing only in number of channels and
some PMBUS status and functionalities.
Co-developed-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
---
Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml b/Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml
index eeb6a4fe80b265ee364188f7b507425cbf34a48e..aa801ef1640b177ee55181c724b024b4857e0252 100644
--- a/Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml
+++ b/Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml
@@ -12,6 +12,8 @@ maintainers:
properties:
compatible:
enum:
+ - lltc,lt7170
+ - lltc,lt7171
- lltc,ltc2972
- lltc,ltc2974
- lltc,ltc2975
@@ -47,6 +49,7 @@ properties:
description: |
list of regulators provided by this controller.
Valid names of regulators depend on number of supplies supported per device:
+ * lt7170, lt7171 : vout0
* ltc2972 vout0 - vout1
* ltc2974, ltc2975 : vout0 - vout3
* ltc2977, ltc2979, ltc2980, ltm2987 : vout0 - vout7
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 3/3] hwmon: (pmbus/ltc2978) add support for lt717x
2025-03-17 5:02 [PATCH 0/3] Add support for LT7170 and LT7171 Regulator Kim Seer Paller
2025-03-17 5:02 ` [PATCH 1/3] hwmon: (pmbus/ltc7841) add support for LT717x - docs Kim Seer Paller
2025-03-17 5:02 ` [PATCH 2/3] dt-bindings: hwmon: ltc2978: add support for LT717x Kim Seer Paller
@ 2025-03-17 5:02 ` Kim Seer Paller
2025-03-17 15:05 ` Guenter Roeck
2 siblings, 1 reply; 8+ messages in thread
From: Kim Seer Paller @ 2025-03-17 5:02 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Delphine CC Chiu
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, linux-i2c,
Kim Seer Paller, Cherrence Sarip
Add support for LT7170 and LT7171. The LT7170 and LT7171 are 20 A, 16 V,
Single- or Dual-Phase, Silent Switcher Step-Down Regulators with Digital
Power System Management.
The relevant registers in the LT7170 and LT7171 are similar to those in
the LTC3887, but with fewer channels. This adds the chip ID and
identification of ASCII to differentiate between the LT7170 and LT7171.
These devices support polling for status updates and clearing peak
values. The data format for voltage, current, and temperature is set to
IEEE754 for precision and compatibility.
Co-developed-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
---
drivers/hwmon/pmbus/Kconfig | 6 +++---
drivers/hwmon/pmbus/ltc2978.c | 44 ++++++++++++++++++++++++++++++++++++++++---
2 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index 675b0d4703d87c9d5654489d0d770661ff0dba11..6ce68dd333690c407311e256db3f3284bbb48861 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -233,9 +233,9 @@ config SENSORS_LTC2978_REGULATOR
depends on SENSORS_LTC2978 && REGULATOR
help
If you say yes here you get regulator support for Linear Technology
- LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889, LTC7841,
- LTC7880, LTM4644, LTM4673, LTM4675, LTM4676, LTM4677, LTM4678,
- LTM4680, LTM4686, and LTM4700.
+ LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889,
+ LTC7841, LTC7880, LTM4644, LTM4673, LTM4675, LTM4676, LTM4677,
+ LTM4678, LTM4680, LTM4686, and LTM4700.
config SENSORS_LTC3815
tristate "Linear Technologies LTC3815"
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index 658cb1173291006d83033a6363ac52d24635abaf..8f5be520a15db3d61dcd6df38ece6c74b232f85b 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -23,8 +23,8 @@ enum chips {
/* Managers */
ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
/* Controllers */
- ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132,
- ltc7841, ltc7880,
+ lt7170, lt7171, ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887,
+ ltc3889, ltc7132, ltc7841, ltc7880,
/* Modules */
ltm2987, ltm4664, ltm4673, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680,
ltm4686, ltm4700,
@@ -62,6 +62,7 @@ enum chips {
#define LTC2978_ID_MASK 0xfff0
+#define LT7170_ID 0x1C10
#define LTC2972_ID 0x0310
#define LTC2974_ID 0x0210
#define LTC2975_ID 0x0220
@@ -537,6 +538,8 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
}
static const struct i2c_device_id ltc2978_id[] = {
+ {"lt7170", lt7170},
+ {"lt7171", lt7171},
{"ltc2972", ltc2972},
{"ltc2974", ltc2974},
{"ltc2975", ltc2975},
@@ -615,7 +618,7 @@ static int ltc2978_get_id(struct i2c_client *client)
ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf);
if (ret < 0)
return ret;
- if (ret < 3 || strncmp(buf, "LTC", 3))
+ if (ret < 3 || (strncmp(buf, "LTC", 3) && strncmp(buf, "ADI", 3)))
return -ENODEV;
ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf);
@@ -630,6 +633,25 @@ static int ltc2978_get_id(struct i2c_client *client)
chip_id &= LTC2978_ID_MASK;
+ if (chip_id == LT7170_ID) {
+ u8 buf[I2C_SMBUS_BLOCK_MAX];
+ int ret;
+
+ ret = i2c_smbus_read_i2c_block_data(client, PMBUS_IC_DEVICE_ID,
+ sizeof(buf), buf);
+ if (ret < 0)
+ return ret;
+
+ if (!strncmp(buf + 1, "LT7170", 6) ||
+ !strncmp(buf + 1, "LT7170-1", 8))
+ return lt7170;
+ if (!strncmp(buf + 1, "LT7171", 6) ||
+ !strncmp(buf + 1, "LT7171-1", 8))
+ return lt7171;
+
+ return -ENODEV;
+ }
+
if (chip_id == LTC2972_ID)
return ltc2972;
else if (chip_id == LTC2974_ID)
@@ -741,6 +763,20 @@ static int ltc2978_probe(struct i2c_client *client)
data->temp2_max = 0x7c00;
switch (data->id) {
+ case lt7170:
+ case lt7171:
+ data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
+ info->read_word_data = ltc3883_read_word_data;
+ info->pages = LTC3883_NUM_PAGES;
+ info->format[PSC_VOLTAGE_IN] = ieee754;
+ info->format[PSC_VOLTAGE_OUT] = ieee754;
+ info->format[PSC_CURRENT_OUT] = ieee754;
+ info->format[PSC_TEMPERATURE] = ieee754;
+ info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT
+ | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
+ | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
+ | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
+ break;
case ltc2972:
info->read_word_data = ltc2975_read_word_data;
info->pages = LTC2972_NUM_PAGES;
@@ -927,6 +963,8 @@ static int ltc2978_probe(struct i2c_client *client)
#ifdef CONFIG_OF
static const struct of_device_id ltc2978_of_match[] = {
+ { .compatible = "lltc,lt7170" },
+ { .compatible = "lltc,lt7171" },
{ .compatible = "lltc,ltc2972" },
{ .compatible = "lltc,ltc2974" },
{ .compatible = "lltc,ltc2975" },
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread