From bf3f5a015946ae6257be7fac5a9b2fc00a6156b5 Mon Sep 17 00:00:00 2001 From: Cedric Encarnacion Date: Fri, 24 Jan 2025 23:23:05 +0800 Subject: [PATCH 1/2] dt-bindings: hwmon: ltc2978: add support for ltm4673 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add LTM4673 to supported devices of LTC2978. Unlike other LTM46xx devices, LTM4673 is a μModule regulator that outputs four channels. Signed-off-by: Cedric Encarnacion Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250124-ltm4673-v1-1-a2c6aa37c903@analog.com Signed-off-by: Guenter Roeck --- Documentation/devicetree/bindings/hwmon/ltc2978.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt index 53cce8489d9e4..504ff6d98fe7d 100644 --- a/Documentation/devicetree/bindings/hwmon/ltc2978.txt +++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt @@ -22,6 +22,7 @@ Required properties: * "lltc,ltc7880" * "lltc,ltm2987" * "lltc,ltm4664" + * "lltc,ltm4673" * "lltc,ltm4675" * "lltc,ltm4676" * "lltc,ltm4677" @@ -48,6 +49,7 @@ Valid names of regulators depend on number of supplies supported per device: * ltc3883 : vout0 * ltc7841 : vout0 * ltm4664 : vout0 - vout1 + * ltm4673 : vout0 - vout3 * ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1 * ltm4680, ltm4686 : vout0 - vout1 * ltm4700 : vout0 - vout1 From f1bd26a28ff34c38a8cc6ff30f711a12688f0c40 Mon Sep 17 00:00:00 2001 From: Cedric Encarnacion Date: Sat, 30 Nov 2024 02:18:28 +0800 Subject: [PATCH 2/2] hwmon: (pmbus/ltc2978) add support for ltm4673 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for LTM4673. The LTM4673 is a quad output, dual 12A and dual 5A, switching mode DC/DC step-down μModule regulator integrated with 4-channel power system manager. This adds only the chip id, the checks for the manufacturer special id, and the relevant attributes for the device's pmbus_driver_info. The device does not support clear peaks. Signed-off-by: Cedric Encarnacion Link: https://lore.kernel.org/r/20250124-ltm4673-v1-2-a2c6aa37c903@analog.com Signed-off-by: Guenter Roeck --- Documentation/hwmon/ltc2978.rst | 9 +++++++++ drivers/hwmon/pmbus/Kconfig | 4 ++-- drivers/hwmon/pmbus/ltc2978.c | 25 +++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Documentation/hwmon/ltc2978.rst b/Documentation/hwmon/ltc2978.rst index 18d0b568a02a8..747e47f28121c 100644 --- a/Documentation/hwmon/ltc2978.rst +++ b/Documentation/hwmon/ltc2978.rst @@ -167,6 +167,14 @@ Supported chips: Datasheet: https://www.analog.com/en/products/ltm4644 + * Linear Technology LTM4673 + + Prefix: 'ltm4673' + + Addresses scanned: - + + Datasheet: https://www.analog.com/en/products/ltm4673 + * Linear Technology LTM4675 Prefix: 'ltm4675' @@ -245,6 +253,7 @@ Description - LTM2987 is a 16-channel Power System Manager with two LTC2977 plus - additional components on a single die. The chip is instantiated and reported - as two separate chips on two different I2C bus addresses. +- LTM4673 is a dual 12A and dual 5A μModule regulator. - LTM4675 is a dual 9A or single 18A μModule regulator - LTM4676 is a dual 13A or single 26A uModule regulator. - LTM4686 is a dual 10A or single 20A uModule regulator. diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 56bdb00fd5b9f..805e46ccc69d7 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -225,8 +225,8 @@ config SENSORS_LTC2978_REGULATOR help If you say yes here you get regulator support for Linear Technology LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889, - LTC7841, LTC7880, LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680, - LTM4686, and LTM4700. + 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 9ef75f96f5f32..86a482579a5d8 100644 --- a/drivers/hwmon/pmbus/ltc2978.c +++ b/drivers/hwmon/pmbus/ltc2978.c @@ -26,8 +26,8 @@ enum chips { lt7170, lt7171, ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132, ltc7841, ltc7880, /* Modules */ - ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686, - ltm4700, + ltm2987, ltm4664, ltm4673, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, + ltm4686, ltm4700, }; /* Common for all chips */ @@ -87,6 +87,8 @@ enum chips { #define LTM2987_ID_A 0x8010 /* A/B for two die IDs */ #define LTM2987_ID_B 0x8020 #define LTM4664_ID 0x4120 +#define LTM4673_ID_REV1 0x0230 +#define LTM4673_ID 0x4480 #define LTM4675_ID 0x47a0 #define LTM4676_ID_REV1 0x4400 #define LTM4676_ID_REV2 0x4480 @@ -557,6 +559,7 @@ static const struct i2c_device_id ltc2978_id[] = { {"ltc7880", ltc7880}, {"ltm2987", ltm2987}, {"ltm4664", ltm4664}, + {"ltm4673", ltm4673}, {"ltm4675", ltm4675}, {"ltm4676", ltm4676}, {"ltm4677", ltm4677}, @@ -687,6 +690,8 @@ static int ltc2978_get_id(struct i2c_client *client) return ltm2987; else if (chip_id == LTM4664_ID) return ltm4664; + else if (chip_id == LTM4673_ID || chip_id == LTM4673_ID_REV1) + return ltm4673; else if (chip_id == LTM4675_ID) return ltm4675; else if (chip_id == LTM4676_ID_REV1 || chip_id == LTM4676_ID_REV2 || @@ -905,6 +910,21 @@ static int ltc2978_probe(struct i2c_client *client) | PMBUS_HAVE_IOUT | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; break; + case ltm4673: + data->features |= FEAT_NEEDS_POLLING; + info->read_word_data = ltc2975_read_word_data; + info->pages = LTC2974_NUM_PAGES; + info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT + | PMBUS_HAVE_TEMP2; + for (i = 0; i < info->pages; i++) { + info->func[i] |= PMBUS_HAVE_IIN + | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT + | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT + | PMBUS_HAVE_PIN + | PMBUS_HAVE_POUT + | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; + } + break; default: return -ENODEV; } @@ -964,6 +984,7 @@ static const struct of_device_id ltc2978_of_match[] = { { .compatible = "lltc,ltc7880" }, { .compatible = "lltc,ltm2987" }, { .compatible = "lltc,ltm4664" }, + { .compatible = "lltc,ltm4673" }, { .compatible = "lltc,ltm4675" }, { .compatible = "lltc,ltm4676" }, { .compatible = "lltc,ltm4677" },