Skip to contentSkip to conversation

hwmon: Add support for Analog Devices MAX20912 and MAX20916

PATCH In review Fred Chen 6 participants 21 messages Jul 7 – Jul 13

Subsystems (3)
lore
Share & tools
lore

Fred Chen

author
#0 lore raw

cover hwmon: Add support for Analog Devices MAX20912 and MAX20916

Add PMBus hardware monitoring support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators.

Both devices expose two independently regulated output voltage rails, Rail A and Rail B, using the VR12 VID interface. Each rail reports input current, output current, temperature, input power, and output power. Input voltage is reported on Rail A only.

Fred Chen (2):
dt-bindings: trivial-devices: Add adi max20912 and max20916
hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

 .../devicetree/bindings/trivial-devices.yaml  |   4 +
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/max20912.rst              | 156 ++++++++++++++++++
 MAINTAINERS                                   |   7 +
 drivers/hwmon/pmbus/Kconfig                   |   9 +
 drivers/hwmon/pmbus/Makefile                  |   1 +
 drivers/hwmon/pmbus/max20912.c                |  70 ++++++++
 7 files changed, 248 insertions(+)
 create mode 100644 Documentation/hwmon/max20912.rst
 create mode 100644 drivers/hwmon/pmbus/max20912.c
Signature · 1 line
2.52.0
author
#1 lore raw

PATCH 1/2 dt-bindings: trivial-devices: Add adi max20912 and max20916

Add device tree bindings for Analog Devices MAX20912 and MAX20916 Dual-Output Voltage Regulator.

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +4 -0
index 435c4baab436..5e7fb4edb82a 100644
@@ -57,6 +57,10 @@ properties:
           - adi,adt7468
             # Analog Devices LT7182S Dual Channel 6A, 20V PolyPhase Step-Down Silent Switcher
           - adi,lt7182s
+            # Analog Devices MAX20912 Dual-Output Voltage Regulator
+          - adi,max20912
+            # Analog Devices MAX20916 Dual-Output Voltage Regulator
+          - adi,max20916
             # AMS iAQ-Core VOC Sensor
           - ams,iaq-core
             # Aosong temperature & humidity sensors with I2C interface
Signature · 1 line
2.52.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: trivial-devices: Add adi max20912 and max20916

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add device tree bindings for Analog Devices MAX20912 and MAX20916 Dual-Output Voltage Regulator.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author
#3 lore raw

PATCH 2/2 hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

---
 Documentation/hwmon/index.rst    |   1 +
 Documentation/hwmon/max20912.rst | 156 +++++++++++++++++++++++++++++++
 MAINTAINERS                      |   7 ++
 drivers/hwmon/pmbus/Kconfig      |   9 ++
 drivers/hwmon/pmbus/Makefile     |   1 +
 drivers/hwmon/pmbus/max20912.c   |  70 ++++++++++++++
 6 files changed, 244 insertions(+)
 create mode 100644 Documentation/hwmon/max20912.rst
 create mode 100644 drivers/hwmon/pmbus/max20912.c
Documentation/hwmon/index.rst +1 -0
index 29130df44d12..4fadb7e961b2 100644
@@ -166,6 +166,7 @@ Hardware Monitoring Kernel Drivers
    max20751
    max20830
    max20860a
+   max20912
    max31722
    max31730
    max31760
Documentation/hwmon/max20912.rst new file +156 -0

156 lines not on this page · raw message

MAINTAINERS +7 -0
index 4a8b0fd665ce..a301af7ff6fd 100644
@@ -15851,6 +15851,13 @@ F:	Documentation/devicetree/bindings/hwmon/pmbus/adi,max20860a.yaml
 F:	Documentation/hwmon/max20860a.rst
 F:	drivers/hwmon/pmbus/max20860a.c
 
+MAX20912 HARDWARE MONITOR DRIVER
+M:	Fred Chen <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/hwmon/max20912.rst
+F:	drivers/hwmon/pmbus/max20912.c
+
 MAX2175 SDR TUNER DRIVER
 M:	Ramesh Shanmugasundaram <[email protected]>
 L:	[email protected]
drivers/hwmon/pmbus/Kconfig +9 -0
index c8cda160b5f8..442c3538bf7c 100644
@@ -421,6 +421,15 @@ config SENSORS_MAX20860A_REGULATOR
 	  This enables the MAX20860A to be used as a regulator device,
 	  providing voltage control through the regulator framework.
 
+config SENSORS_MAX20912
+	tristate "Analog Devices MAX20912 and MAX20916"
+	help
+	  If you say yes here you get hardware monitoring support for Analog
+	  Devices MAX20912 and MAX20916 dual-output voltage regulators.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called max20912.
+
 config SENSORS_MAX31785
 	tristate "Maxim MAX31785 and compatibles"
 	help
drivers/hwmon/pmbus/Makefile +1 -0
index ffc05f493213..2fa74f0caf18 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_SENSORS_MAX20730)	+= max20730.o
 obj-$(CONFIG_SENSORS_MAX20751)	+= max20751.o
 obj-$(CONFIG_SENSORS_MAX20830)	+= max20830.o
 obj-$(CONFIG_SENSORS_MAX20860A)	+= max20860a.o
+obj-$(CONFIG_SENSORS_MAX20912)	+= max20912.o
 obj-$(CONFIG_SENSORS_MAX31785)	+= max31785.o
 obj-$(CONFIG_SENSORS_MAX34440)	+= max34440.o
 obj-$(CONFIG_SENSORS_MAX8688)	+= max8688.o
drivers/hwmon/pmbus/max20912.c new file +70 -0

70 lines not on this page · raw message

Signature · 1 line
2.52.0
#4 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

drivers/hwmon/pmbus/max20912.c line 50

Quoted 11 lines · Fred Chen
drivers/hwmon/pmbus/max20912.c new file +11 -0
+
+static const struct of_device_id max20912_of_match[] = {
+	{ .compatible = "adi,max20912" },
+	{ .compatible = "adi,max20916" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, max20912_of_match);
+
+static const struct i2c_device_id max20912_id[] = {
+	{"max20912"},
+	{"max20916"},

Please use named initializers (see recent code).

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Fred Chen
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
maintainer
#6 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Fred Chen
Quoted 4 lines · Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Thanks,
Guenter

#7 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already done.

- Nuno Sá

Quoted 4 lines

Thanks,
Guenter

#8 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 44 lines · Nuno Sá
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Quoted 3 lines

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already done.

Binding should be in such case posted complete, so probably not a trivial device.

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 45 lines · Krzysztof Kozlowski
Quoted 44 lines · Nuno Sá
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Quoted 6 lines
Quoted 3 lines

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already done.

Binding should be in such case posted complete, so probably not a trivial device.

Yes, in my series bindings are not in trivial as we support the enable gpios.

- Nuno Sá

maintainer
#10 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 50 lines · Nuno Sá
Quoted 49 lines · Krzysztof Kozlowski
Quoted 47 lines · Nuno Sá
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Fred Chen

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already done.

Quoted 6 lines
Quoted 2 lines

Binding should be in such case posted complete, so probably not a trivial device.

Yes, in my series bindings are not in trivial as we support the enable gpios.

Same question I asked before: What is your use case ?

Thanks,
Guenter

#11 lore raw

RE: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 54 lines · Nuno Sá
Quoted 48 lines · Krzysztof Kozlowski
Quoted 47 lines · Nuno Sá
Quoted 46 lines · Guenter Roeck
Quoted 9 lines · Fred Chen
Quoted 4 lines

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support
for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already

done.

Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Binding should be in such case posted complete, so probably not a trivial device.

Yes, in my series bindings are not in trivial as we support the enable gpios.

Same question I asked before: What is your use case ?

Hi Guenter,

Unlike my MAX20830 patches, for some reason these chips (not only Nuno's max20826) hardwired the bit 2 in ON_OFF_CONFIG to '1'. This makes the use of gpio to enable the device a requirement. (as of the latest info given to us)

Regards,
Alexis

author
#12 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Torreno, Alexis Czezar <[email protected]> 於 2026年7月9日週四 上午8:59寫道:

Quoted 65 lines
Quoted 55 lines · Nuno Sá
Quoted 48 lines · Krzysztof Kozlowski
Quoted 47 lines · Nuno Sá
Quoted 46 lines · Guenter Roeck
Quoted 9 lines · Fred Chen
Quoted 4 lines

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support
for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already

done.

Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Binding should be in such case posted complete, so probably not a trivial device.

Yes, in my series bindings are not in trivial as we support the enable gpios.

Same question I asked before: What is your use case ?

Quoted 8 lines

Hi Guenter,

Unlike my MAX20830 patches, for some reason these chips (not only Nuno's max20826) hardwired the bit 2 in ON_OFF_CONFIG to '1'. This makes the use of gpio to enable the device a requirement. (as of the latest info given to us)

Regards,
Alexis

Hi Nuno,

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

As for the testing, I have verified that the telemetry readings for both Rail A and Rail B behave as expected. The driver reports valid data after system power-on, and the readings drop to 0 properly after power-off.

It's possible my specs are outdated or that I'm missing some use cases. If you plan to submit your more complete driver covering the MAX20912/16 soon, I'm more than willing to hold off on sending v2 patch.

Regards,
Fred

#13 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 75 lines · Fred Chen

Torreno, Alexis Czezar <[email protected]> 於 2026年7月9日週四 上午8:59寫道:

Quoted 65 lines
Quoted 55 lines · Nuno Sá
Quoted 48 lines · Krzysztof Kozlowski
Quoted 47 lines · Nuno Sá
Quoted 46 lines · Guenter Roeck
Quoted 9 lines · Fred Chen
Quoted 4 lines

Add support for the Analog Devices MAX20912 and MAX20916 dual-output multiphase voltage regulators with PMBus interfaces.

Please provide evidence that those chips actually exist. Internet search comes up blank. I'll need confirmation from someone at Analog.

Hi Guenter,

Well, in fact I'm in the middle of preparing a series that adds support
for:

"max20826"
"max20855b"
"max20908"
"max20912"
"max20916"

All the above parts have the datasheet under NDA. But before we had a one page "datasheet" in analog.com but I guess that is gone! For context I mainly did the base (core) driver for max20826 and then Alexis added the other ones.

Not sure how to proceed... I can wait and then work on top of what Fred has but this patch is very minimal when compared with what we have. Like:

* No regulator support;
* No direct mode. The chip has two ways to access registers (paging and
* direct mode).
* No way to count how many phases we have or if RAIL_B (func[1]) is being used at all.

Some other things more intriguing is that these chips, as far as I'm aware (at least for max20826), always have bit 2 set in ON_OFF_CONFIG so a gpio vout. Also we needed some special handling to read phase current which I'm not seeing in the driver. So I would like to understand how the chip was tested?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Anyways, if Fred is ok with it I can just finish what I'm doing and send the patches. It would make sense to have something more complete on submission but I don't want to just "steal" the work already

done.

Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Binding should be in such case posted complete, so probably not a trivial device.

Yes, in my series bindings are not in trivial as we support the enable gpios.

Same question I asked before: What is your use case ?

Quoted 8 lines

Hi Guenter,

Unlike my MAX20830 patches, for some reason these chips (not only Nuno's max20826) hardwired the bit 2 in ON_OFF_CONFIG to '1'. This makes the use of gpio to enable the device a requirement. (as of the latest info given to us)

Regards,
Alexis

Quoted 6 lines

Hi Nuno,

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

I see, phases are not supported using standard PMBUS.

Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Quoted 9 lines

As for the testing, I have verified that the telemetry readings for both Rail A and Rail B behave as expected. The driver reports valid data after system power-on, and the readings drop to 0 properly after power-off.

It's possible my specs are outdated or that I'm missing some use cases. If you plan to submit your more complete driver covering the MAX20912/16 soon, I'm more than willing to hold off on sending v2 patch.

Sure, soon enough :)

- Nuno Sá

maintainer
#14 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 8 lines · Nuno Sá
Quoted 5 lines

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

I see, phases are not supported using standard PMBUS.

As mentioned in my other e-mail, it can still be supported by the driver. That is what the chip drivers are for, after all.

Quoted 5 lines
Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

Quoted 7 lines

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Agreed. I don't really like it, but if the chip and some specific hardware mandate it, it should be supported. However, that code also needs to be tested - an untested implementation would be worse than no implementation.

Note to anyone from Analog listening: It is really unfortunate that I, as subsystem maintainer, do not have access to datasheets. That means I have to rely on assumptions and can not really provide actionable feedback other than guesswork based on the PMBus standard. That feedback may and likely will miss essential details.

Thanks,
Guenter

#15 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 25 lines · Guenter Roeck
Quoted 8 lines · Nuno Sá
Quoted 5 lines

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

I see, phases are not supported using standard PMBUS.

As mentioned in my other e-mail, it can still be supported by the driver. That is what the chip drivers are for, after all.

Quoted 5 lines
Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

Quoted 7 lines

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Quoted 3 lines

Agreed. I don't really like it, but if the chip and some specific hardware mandate it, it should be supported. However, that code also needs to be tested - an untested implementation would be worse than no implementation.

That's how I tested it :). So from what I understand the preferred way is to support these pins as optional? If they are not there we just assume the pins are always enabled by some other means? In contrast to what I have today which makes these pins mandatory!

Quoted 6 lines

Note to anyone from Analog listening: It is really unfortunate that I, as subsystem maintainer, do not have access to datasheets. That means I have to rely on assumptions and can not really provide actionable feedback other than guesswork based on the PMBus standard. That feedback may and likely will miss essential details.

I cannot make any promises but can at least raise this internally.

- Nuno Sá

maintainer
#16 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 26 lines · Nuno Sá
Quoted 25 lines · Guenter Roeck
Quoted 8 lines · Nuno Sá
Quoted 5 lines

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

I see, phases are not supported using standard PMBUS.

As mentioned in my other e-mail, it can still be supported by the driver. That is what the chip drivers are for, after all.

Quoted 12 lines
Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Quoted 9 lines
Quoted 3 lines

Agreed. I don't really like it, but if the chip and some specific hardware mandate it, it should be supported. However, that code also needs to be tested - an untested implementation would be worse than no implementation.

That's how I tested it :). So from what I understand the preferred way is to support these pins as optional? If they are not there we just assume the pins are always enabled by some other means? In contrast to what I have today which makes these pins mandatory!

I had to go back a bit in mental history .... actually, the regulator code in the PMBus core doesn't touch the ON_OFF_CONFIG register. It uses the OPERATION command to enable/disable outputs. The reason is that the enable pin and ON_OFF_CONFIG typically affect the entire chip, while the OPERATION command only affects a single channel.

So far PMBus drivers typically don't touch ON_OFF_CONFIG. The ibm-cffps driver supports writing it, but only through a debugfs file. The tda38640 driver supports writing it, but only because it does not (or not correctly) support the OPERATION command. ON_OFF_CONFIG (if it is modified at all) is normally set by the firmware or even in production (if the chip supports non-volatile configuration). It is one of the "hairy" PMBus commands which should be left alone if at all possible.

You can not make the property mandatory since most systems will neither support nor need it since it is handled by hardware/firmware. In many if not almost all cases there won't even _be_ a GPIO pin that can be set by software.

Guenter

#17 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

Quoted 37 lines · Guenter Roeck
Quoted 26 lines · Nuno Sá
Quoted 25 lines · Guenter Roeck
Quoted 8 lines · Nuno Sá
Quoted 5 lines

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

I see, phases are not supported using standard PMBUS.

As mentioned in my other e-mail, it can still be supported by the driver. That is what the chip drivers are for, after all.

Quoted 12 lines
Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Quoted 9 lines
Quoted 3 lines

Agreed. I don't really like it, but if the chip and some specific hardware mandate it, it should be supported. However, that code also needs to be tested - an untested implementation would be worse than no implementation.

That's how I tested it :). So from what I understand the preferred way is to support these pins as optional? If they are not there we just assume the pins are always enabled by some other means? In contrast to what I have today which makes these pins mandatory!

Quoted 6 lines

I had to go back a bit in mental history .... actually, the regulator code in the PMBus core doesn't touch the ON_OFF_CONFIG register. It uses the OPERATION command to enable/disable outputs. The reason is that the enable pin and ON_OFF_CONFIG typically affect the entire chip, while the OPERATION command only affects a single channel.

Yes. The only thing I do is to read the ON_OFF_CONFIG register at probe to check if I need to check the enable bit in OPERATION. So that vout state becomes gpio && OPERATION.

Quoted 8 lines

So far PMBus drivers typically don't touch ON_OFF_CONFIG. The ibm-cffps driver supports writing it, but only through a debugfs file. The tda38640 driver supports writing it, but only because it does not (or not correctly) support the OPERATION command. ON_OFF_CONFIG (if it is modified at all) is normally set by the firmware or even in production (if the chip supports non-volatile configuration). It is one of the "hairy" PMBus commands which should be left alone if at all possible.

Quoted 4 lines

You can not make the property mandatory since most systems will neither support nor need it since it is handled by hardware/firmware. In many if not almost all cases there won't even _be_ a GPIO pin that can be set by software.

Understood.

- Nuno Sá

Quoted 3 lines

Guenter

#18 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Guenter Roeck
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Nuno Sá
Quoted 5 lines

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

Quoted 5 lines
Quoted 2 lines

I see, phases are not supported using standard PMBUS.

As mentioned in my other e-mail, it can still be supported by the driver. That is what the chip drivers are for, after all.

Ah and if it was not clear... The driver I have in hands do support reading phases. In fact we need a patch in the pmbus header to increase the max number of phases as, at least, max20826 supports up to 16 phases just in one rail (or 8 + 8)

- Nuno Sá

Quoted 25 lines
Quoted 6 lines
Quoted 5 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

Quoted 7 lines

But we cannot assume all systems will behave like the above. But now i do wonder about controlling the GPIOs in the driver. In your system you clearly did not need to do it. In mine (testing with a rpi) I had to use a GPIO (well I could have used hogs or pinctrl). But if you control the pin you do gain the ability to turn off the regulator. If you don't it's always on (which might be indeed the bulk of the real usecases for these systems).

Agreed. I don't really like it, but if the chip and some specific hardware mandate it, it should be supported. However, that code also needs to be tested - an untested implementation would be worse than no implementation.

Note to anyone from Analog listening: It is really unfortunate that I, as subsystem maintainer, do not have access to datasheets. That means I have to rely on assumptions and can not really provide actionable feedback other than guesswork based on the PMBus standard. That feedback may and likely will miss essential details.

Thanks,
Guenter

maintainer
#19 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Fred Chen
Quoted 5 lines · Fred Chen

Based on the MAX20912/16 specs on my hand, these chips do not support PMBUS_PHASE (0x04). Furthermore, the spec only indicates support for VID mode and does not provide m/b/r. Therefore, some of the features you mentioned might be specific to the MAX20826 series.

FWIW, phase support can be implemented in the chip driver. Other chips such as MAX16601 don't support the standard phase command either.

Quoted 4 lines

Regarding enabling VOUT via GPIO, our platform handles this via the CPLD as part of the hardware power sequencing. Managing this pin through the driver is not a requirement for our system.

That would normally be the case, but if the chip mandates the use of the EN pin the driver should support (but not mandate) it. I would not expect you to implement it, though, if you can not test it. This functionality is critical enough that it should be implemented and tested by someone with access to hardware using it.

Thanks,
Guenter

maintainer
#20 lore raw

Re: [PATCH 2/2] hwmon: (pmbus) Add driver for Analog Devices MAX20912 and MAX20916

In reply to Torreno, Alexis Czezar
Quoted 5 lines · Alexis Czezar
Quoted 5 lines
Quoted 4 lines

Yes, in my series bindings are not in trivial as we support the enable gpios.

Quoted 9 lines
Quoted 2 lines

Same question I asked before: What is your use case ?

Hi Guenter,

Unlike my MAX20830 patches, for some reason these chips (not only Nuno's max20826) hardwired the bit 2 in ON_OFF_CONFIG to '1'. This makes the use of gpio to enable the device a requirement. (as of the latest info given to us)

Outch, that hurts. Ok. I excpect that to be explained in the driver.

Thanks,
Guenter