summaryrefslogtreecommitdiff
path: root/drivers/regulator/Kconfig
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-10 16:53:12 +0100
committerMark Brown <broonie@kernel.org>2026-09-10 16:53:12 +0100
commit6f69bafa8781aa533cfaed5c1eb7f3d38156bbb3 (patch)
treece15d0ad240b756e7548bff4ce8be1ab46fff441 /drivers/regulator/Kconfig
parent9442b4078ae0737152d5fd980d9108515b27c182 (diff)
parent61879d561e91c71502fef9f28f26b31e9a5b9fa2 (diff)
regulator: Add MPS MPQ4210 buck-boost regulator support
Tapio Reijonen <tapio.reijonen@vaisala.com> says: This series adds support for the Monolithic Power Systems MPQ4210, a 40V synchronous four-switch buck-boost controller with an I2C interface. The output voltage is programmed through an 11-bit feedback reference DAC with a 1mV step and is then scaled by an external feedback resistor divider, so the divider ratio has to be described in the device tree. The same ratio applies to the reference slew rate, so the four rates that the Control 1 SR field selects are scaled into a per-device ramp_delay_table and the field is exposed through regulator_set_ramp_delay_regmap(). The current limit, switching frequency, dither and interrupt registers are left at their reset values. Only 0.3V to 2.047V of the DAC range is specified, so linear_min_sel holds the driver to that and the lower selectors are not offered. On a board with a gain of 14 that is the difference between a floor of 4.2V and one of 0V, and the lower part of that range does not regulate. Scaling the ramp table is a deliberate difference from ltc3589 and mp886x, which read an equivalent feedback-divider property but keep their ramp values unscaled. Every other constraint in the device tree is expressed at the regulator output, so the selectable rates have to be as well, or regulator-ramp-delay would select the wrong SR encoding. It does mean the reachable rates are board specific and no value can be copied between boards, so the binding documents how they are derived and shows the calculation in its example. Two details are worth a reviewer's attention. Enable follows the start-up sequence the datasheet spells out: commit the reference with the GO bit, wait 200ms, then set ENPWR. That is why .enable is open coded rather than using regulator_enable_regmap. Control 1 bit 2 is documented only as "Reserved", but the datasheet notes that it must be set to one before the IC starts up. Its reset value is zero, so probe sets it. One consequence of the hardware worth spelling out: the MPQ4210 does not respond on the I2C bus while EN is deasserted. The enable GPIO is therefore claimed and asserted before the first register access and held for the lifetime of the device, rather than being handed to the core as regulator_config::ena_gpiod, which would drop the bus along with the output. Tested on an i.MX6SX board, regulator behind an I2C mux, feedback divider 100k/7.685k giving a gain of 14.0124, a 14012uV step and a 4.204V floor: - A 16 point staircase from 4.204V to 25.2V: the commanded voltage, the value read back and the selector decoded from the two reference registers agree exactly at every point, and a meter on the rail follows. - With the rail up and no regulator-ramp-delay in the device tree, Control 1 reads 0x45: SR at its reset value, bit 2 set, GO self-cleared and ENPWR set. Interrupt status reads clear. - regulator-ramp-delay picks the SR encoding as intended. 1050, an exact entry of this board's scaled table, gives 0x85. 3000, above every entry, warns "Can't set ramp-delay 3000, setting 2101" and gives 0xC5. - Sampling Control 1 across a disable and re-enable shows 0x45, 0x44, 0x45, so ENPWR is cleared and restored as expected. - Enable takes 230ms, against roughly 16ms for a plain register write on this bus. Link: https://patch.msgid.link/20260910-mpq4210-regulator-v1-0-d37e208dfc8d@vaisala.com
Diffstat (limited to 'drivers/regulator/Kconfig')
-rw-r--r--drivers/regulator/Kconfig11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index c8940e2c7e04..4431c48dbfc2 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -870,6 +870,17 @@ config REGULATOR_MP886X
help
This driver supports the MP8869 voltage regulator.
+config REGULATOR_MPQ4210
+ tristate "MPS MPQ4210 regulator driver"
+ depends on I2C && OF
+ select REGMAP_I2C
+ help
+ This driver supports the MPQ4210 synchronous buck-boost controller.
+ It supports get/set voltage, enable/disable and ramp rate selection
+ through the regulator interface.
+ Say M here if you want to include support for the regulator as a
+ module. The module will be named "mpq4210".
+
config REGULATOR_MPQ7920
tristate "Monolithic MPQ7920 PMIC"
depends on I2C && OF