Devicetree
 help / color / mirror / Atom feed
From: Tapio Reijonen <tapio.reijonen@vaisala.com>
To: Saravanan Sekar <sravanhome@gmail.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	 Tapio Reijonen <tapio.reijonen@vaisala.com>
Subject: [PATCH 1/2] regulator: dt-bindings: Add MPS MPQ4210
Date: Thu, 10 Sep 2026 08:51:41 +0000	[thread overview]
Message-ID: <20260910-mpq4210-regulator-v1-1-d37e208dfc8d@vaisala.com> (raw)
In-Reply-To: <20260910-mpq4210-regulator-v1-0-d37e208dfc8d@vaisala.com>

The MPQ4210 is a 40V synchronous four-switch buck-boost controller with
an I2C interface. Its output voltage is programmed through an 11-bit
feedback reference DAC covering 0 to 2.047V in 1mV steps, and is then
scaled by an external feedback resistor divider, so the divider ratio
has to be described in the device tree for the driver to translate
reference voltages into output voltages.

The divider is given in ohms rather than the kilo ohms used by
mps,mp886x.yaml because the bottom resistor is not necessarily a whole
number of kilo ohms.

The same divider scales the reference ramp rate, so unlike the other
bindings that scale by a feedback divider there is no portable value a
board can copy into regulator-ramp-delay. Describe how the selectable
rates are derived from the four reference slew rates, and show the
calculation in the example.

Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
---
 .../devicetree/bindings/regulator/mps,mpq4210.yaml | 69 ++++++++++++++++++++++
 MAINTAINERS                                        |  5 ++
 2 files changed, 74 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq4210.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq4210.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..e9e7a87e7533d0948927a459e9af711d1e07e572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mps,mpq4210.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mps,mpq4210.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Monolithic Power Systems MPQ4210 buck-boost regulator
+
+maintainers:
+  - Tapio Reijonen <tapio.reijonen@vaisala.com>
+
+description:
+  The MPQ4210 is a synchronous four-switch buck-boost controller with an I2C
+  interface. The output voltage is programmed through an 11-bit feedback
+  reference DAC and scaled by an external feedback resistor divider.
+
+  The controller ramps the feedback reference at 38, 50, 75 or 150 mV/ms.
+  The divider scales the ramp rate along with the voltage, so the output
+  ramp rates that regulator-ramp-delay can select are those values
+  multiplied by (R1 + R2) / R2.
+
+allOf:
+  - $ref: regulator.yaml#
+
+properties:
+  compatible:
+    const: mps,mpq4210
+
+  reg:
+    maxItems: 1
+
+  enable-gpios:
+    description: GPIO connected to the EN pin. If absent, EN is assumed to
+      be permanently asserted.
+    maxItems: 1
+
+  mps,fb-voltage-divider:
+    description: An array of two integers containing the resistor values R1
+      and R2 of the output feedback voltage divider in ohms.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    maxItems: 2
+
+required:
+  - compatible
+  - reg
+  - mps,fb-voltage-divider
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        regulator@64 {
+            compatible = "mps,mpq4210";
+            reg = <0x64>;
+            regulator-name = "vout";
+            regulator-min-microvolt = <4000000>;
+            regulator-max-microvolt = <20000000>;
+            enable-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+            /* R1 = 82 kOhm, R2 = 9.1 kOhm */
+            mps,fb-voltage-divider = <82000 9100>;
+            /* 50 mV/ms reference ramp x (82000 + 9100) / 9100 */
+            regulator-ramp-delay = <500>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 3a19da74d00c9dfb48e900df71a86d4686d3ec2c..eb552bff791bed27b86d5e2a398d0d96253efc6f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18372,6 +18372,11 @@ F:	scripts/module*
 F:	tools/testing/selftests/kmod/
 F:	tools/testing/selftests/module/
 
+MONOLITHIC POWER SYSTEM MPQ4210 REGULATOR DRIVER
+M:	Tapio Reijonen <tapio.reijonen@vaisala.com>
+S:	Maintained
+F:	Documentation/devicetree/bindings/regulator/mps,mpq4210.yaml
+
 MONOLITHIC POWER SYSTEM PMIC DRIVER
 M:	Saravanan Sekar <sravanhome@gmail.com>
 S:	Maintained

-- 
2.47.3


  reply	other threads:[~2026-09-10  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  8:51 [PATCH 0/2] regulator: Add MPS MPQ4210 buck-boost regulator support Tapio Reijonen
2026-09-10  8:51 ` Tapio Reijonen [this message]
2026-09-10  9:01   ` [PATCH 1/2] regulator: dt-bindings: Add MPS MPQ4210 sashiko-bot
2026-09-11  8:45   ` Krzysztof Kozlowski
2026-09-10  8:51 ` [PATCH 2/2] regulator: Add MPS MPQ4210 buck-boost regulator driver Tapio Reijonen
2026-09-11 18:48   ` Uwe Kleine-König
2026-09-10 15:58 ` [PATCH 0/2] regulator: Add MPS MPQ4210 buck-boost regulator support Mark Brown
2026-09-10 15:58 ` Mark Brown

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=20260910-mpq4210-regulator-v1-1-d37e208dfc8d@vaisala.com \
    --to=tapio.reijonen@vaisala.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sravanhome@gmail.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