mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: tzuhao.wtmh@gmail.com, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Naresh Solanki <naresh.solanki@9elements.com>,
	Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Michal Simek <michal.simek@amd.com>,
	Henry Wu <Henry_Wu@quantatw.com>,
	Grant Peltier <grantpeltier93@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Cedric Encarnacion <cedricjustine.encarnacion@analog.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Cherrence Sarip <cherrence.sarip@analog.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Leo Yang <leo.yang.sy0@gmail.com>,
	John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com>,
	Kim Seer Paller <kimseer.paller@analog.com>,
	Alex Vdovydchenko <xzeol@yahoo.com>,
	Ninad Palsule <ninad@linux.ibm.com>,
	Mariel Tinaco <Mariel.Tinaco@analog.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org
Cc: peteryin.openbmc@gmail.com
Subject: Re: [PATCH v2 1/2] hwmon: (pmbus) Add support for MPS multi-phase mp2869a/mp29612a controllers
Date: Wed, 16 Jul 2025 13:36:47 -0700	[thread overview]
Message-ID: <ac652108-68aa-49d1-a448-1c0ee6ca157e@roeck-us.net> (raw)
In-Reply-To: <20250630112120.588246-2-Henry_Wu@quantatw.com>

On 6/30/25 04:20, tzuhao.wtmh@gmail.com wrote:
> From: Henry Wu <Henry_Wu@quantatw.com>
> 
> Add support for the mp2869a and mp29612a controllers from Monolithic Power
> Systems, Inc. (MPS). These are dual-loop, digital, multi-phase modulation
> controllers.
> 
> Signed-off-by: Henry Wu <Henry_Wu@quantatw.com>
> ---
>   Documentation/hwmon/index.rst   |   1 +
>   Documentation/hwmon/mp2869a.rst |  86 +++++++++
>   drivers/hwmon/pmbus/Kconfig     |  10 ++
>   drivers/hwmon/pmbus/Makefile    |   1 +
>   drivers/hwmon/pmbus/mp2869a.c   | 299 ++++++++++++++++++++++++++++++++
>   5 files changed, 397 insertions(+)
>   create mode 100644 Documentation/hwmon/mp2869a.rst
>   create mode 100644 drivers/hwmon/pmbus/mp2869a.c
> 
> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
> index b45bfb4ebf30..10bf4bd77f7b 100644
> --- a/Documentation/hwmon/index.rst
> +++ b/Documentation/hwmon/index.rst
> @@ -172,6 +172,7 @@ Hardware Monitoring Kernel Drivers
>      menf21bmc
>      mlxreg-fan
>      mp2856
> +   mp2869a
>      mp2888
>      mp2891
>      mp2975
> diff --git a/Documentation/hwmon/mp2869a.rst b/Documentation/hwmon/mp2869a.rst
> new file mode 100644
> index 000000000000..a98ccb3d630d
> --- /dev/null
> +++ b/Documentation/hwmon/mp2869a.rst
> @@ -0,0 +1,86 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +Kernel driver mp2896a
> +=====================
> +
> +Supported chips:
> +
> +  * MPS MP2896A
> +
> +    Prefix: 'mp2896a'
> +
> +  * MPS MP29612A
> +
> +    Prefix: 'mp29612a'
> +
> +Author:
> +
> +    Henry Wu <Henry_WU@quantatw.com>
> +
> +Description
> +-----------
> +
> +This driver implements support for Monolithic Power Systems, Inc. (MPS)
> +MP2896A, a digital, multi-phase voltage regulator controller with PMBus interface.
> +
> +This device:
> +
> +- Supports up to two power rails.
> +- Supports multiple PMBus pages for telemetry and configuration.
> +- Supports VOUT readout in **VID format only** (no support for direct format).
> +- Supports AMD SVI3 VID protocol with 5-mV/LSB resolution (if applicable).
> +- Uses vendor-specific registers for VOUT scaling and phase configuration.
> +
> +Device supports:
> +
> +- SVID interface.
> +- AVSBus interface.
> +
> +Device compliant with:
> +
> +- PMBus rev 1.3 interface.
> +
> +Sysfs Interface
> +---------------
> +
> +The driver provides the following sysfs attributes:
> +
> +**Current measurements:**
> +
> +- Index 1: "iin"
> +- Indexes 2, 3: "iout"
> +
> +**curr[1-3]_alarm**
> +**curr[1-3]_input**
> +**curr[1-3]_label**
> +
> +**Voltage measurements:**
> +
> +- Index 1: "vin"
> +- Indexes 2, 3: "vout"
> +
> +**in[1-3]_crit**
> +**in[1-3]_crit_alarm**
> +**in[1-3]_input**
> +**in[1-3]_label**
> +**in[1-3]_lcrit**
> +**in[1-3]_lcrit_alarm**
> +
> +**Power measurements:**
> +
> +- Index 1: "pin"
> +- Indexes 2, 3: "pout"
> +
> +**power[1-3]_alarm**
> +**power[1-3]_input**
> +**power[1-3]_label**
> +
> +**Temperature measurements:**
> +
> +**temp[1-2]_crit**
> +**temp[1-2]_crit_alarm**
> +**temp[1-2]_input**
> +**temp[1-2]_max**
> +**temp[1-2]_max_alarm**
> +
> +
> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
> index 441f984a859d..93b558761cc6 100644
> --- a/drivers/hwmon/pmbus/Kconfig
> +++ b/drivers/hwmon/pmbus/Kconfig
> @@ -364,6 +364,16 @@ config SENSORS_MP2856
>   	  This driver can also be built as a module. If so, the module will
>   	  be called mp2856.
>   
> +config SENSORS_MP2869A
> +	tristate "MP2869A PMBus sensor"
> +	depends on I2C && PMBUS
> +	help
> +	  If you say yes here you get support for the MPS MP2869A MP29612A
> +	  voltage regulator via the PMBus interface.
> +
> +	  This driver can also be built as a module. If so, the module
> +	  will be called mp2869a.
> +
>   config SENSORS_MP2888
>   	tristate "MPS MP2888"
>   	help
> diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
> index 29cd8a3317d2..42087d0dedbc 100644
> --- a/drivers/hwmon/pmbus/Makefile
> +++ b/drivers/hwmon/pmbus/Makefile
> @@ -37,6 +37,7 @@ obj-$(CONFIG_SENSORS_MAX31785)	+= max31785.o
>   obj-$(CONFIG_SENSORS_MAX34440)	+= max34440.o
>   obj-$(CONFIG_SENSORS_MAX8688)	+= max8688.o
>   obj-$(CONFIG_SENSORS_MP2856)	+= mp2856.o
> +obj-$(CONFIG_SENSORS_MP2869A)   += mp2869a.o
>   obj-$(CONFIG_SENSORS_MP2888)	+= mp2888.o
>   obj-$(CONFIG_SENSORS_MP2891)	+= mp2891.o
>   obj-$(CONFIG_SENSORS_MP2975)	+= mp2975.o
> diff --git a/drivers/hwmon/pmbus/mp2869a.c b/drivers/hwmon/pmbus/mp2869a.c
> new file mode 100644
> index 000000000000..e61f1380dbc1
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/mp2869a.c
> @@ -0,0 +1,299 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Hardware monitoring driver for MP2856A/MP29612A
> + * Monolithic Power Systems VR Controller
> + *
> + * Copyright (C) 2023 Quanta Computer lnc.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/i2c.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/pmbus.h>
> +#include "pmbus.h"
> +
> +/* Vendor specific registers. */
> +#define MP2869A_VOUT_MODE			 0x20

Standard register.

> +#define MP2869A_VOUT_MODE_MASK		 GENMASK(7, 5)
> +#define MP2869A_VOUT_MODE_VID		 (0 << 5)
> +
> +#define MP2869A_READ_VOUT			 0x8b

Standard register.
> +
> +#define MP2869A_MFR_VOUT_SCALE_LOOP	 0x29

Standard register.

Guenter


  reply	other threads:[~2025-07-16 20:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30 11:20 [PATCH v2 0/2] hwmon: (pmbus) Add support for MPS " tzuhao.wtmh
2025-06-30 11:20 ` [PATCH v2 1/2] hwmon: (pmbus) Add support for MPS multi-phase " tzuhao.wtmh
2025-07-16 20:36   ` Guenter Roeck [this message]
2025-07-16 23:52   ` Guenter Roeck
2025-06-30 11:20 ` [PATCH v2 2/2] dt-bindings: trivial-devices: Add mp2869a/mp29612a device entry tzuhao.wtmh
2025-06-30 11:28   ` Krzysztof Kozlowski
2025-07-01  7:46     ` Henry Wu
2025-06-30 11:29 ` [PATCH v2 0/2] hwmon: (pmbus) Add support for MPS mp2869a/mp29612a controllers Krzysztof Kozlowski
2025-07-01  8:04   ` Henry Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac652108-68aa-49d1-a448-1c0ee6ca157e@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Henry_Wu@quantatw.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Mariel.Tinaco@analog.com \
    --cc=cedricjustine.encarnacion@analog.com \
    --cc=cherrence.sarip@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=grantpeltier93@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=jdelvare@suse.com \
    --cc=johnerasmusmari.geronimo@analog.com \
    --cc=kimseer.paller@analog.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=leo.yang.sy0@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=naresh.solanki@9elements.com \
    --cc=ninad@linux.ibm.com \
    --cc=nuno.sa@analog.com \
    --cc=peteryin.openbmc@gmail.com \
    --cc=robh@kernel.org \
    --cc=rodrigo.gobbi.7@gmail.com \
    --cc=tzuhao.wtmh@gmail.com \
    --cc=xzeol@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®