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

From: Nuno Sá

Date: Thu Jul 09 2026 - 05:04:14 EST


On Thu, Jul 09, 2026 at 03:23:55PM +0800, Fred Chen wrote:
> Torreno, Alexis Czezar <AlexisCzezar.Torreno@xxxxxxxxxx> 於 2026年7月9日週四 上午8:59寫道:
> >
> > > On 7/8/26 04:32, Nuno Sá wrote:
> > > > On Wed, Jul 08, 2026 at 12:50:25PM +0200, Krzysztof Kozlowski wrote:
> > > >> On Wed, Jul 08, 2026 at 10:19:56AM +0100, Nuno Sá wrote:
> > > >>> On Tue, Jul 07, 2026 at 06:52:48AM -0700, Guenter Roeck wrote:
> > > >>>> On 7/7/26 05:26, Fred Chen wrote:
> > > >>>>> Add support for the Analog Devices MAX20912 and MAX20916
> > > >>>>> dual-output multiphase voltage regulators with PMBus interfaces.
> > > >>>>>
> > > >>>>> Signed-off-by: Fred Chen <fredchen.openbmc@xxxxxxxxx>
> > > >>>>
> > > >>>> 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.
> > > >>
> > > >> 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
>
> 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.

>
> 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).

>
> 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á