mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] regulator: mp886x: add MP8864 support
@ 2026-09-01  4:31 Jisheng Zhang
  2026-09-01  4:31 ` [PATCH 1/3] regulator: mp886x: fix vsel_mask Jisheng Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jisheng Zhang @ 2026-09-01  4:31 UTC (permalink / raw)
  To: Saravanan Sekar, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, devicetree

The MP8864 is a 4 A, 21 V synchronous step-down converter.  Its
register layout and voltage transition handling are compatible with the
MP8867, but its selectable switching frequencies are 600 kHz, 850 kHz,
1.1 MHz and 1.6 MHz.

Add the compatible and chip-specific switching-frequency table. 

patch1 fixes the vsel_mask
patch2 document the mp8864 dt-binding
patch3 add the mp8864 support to the driver

Jisheng Zhang (3):
  regulator: mp886x: fix vsel_mask
  regulator: dt-bindings: mp886x: support mp8864
  regulator: mp886x: add MP8864 support

 .../bindings/regulator/mps,mp886x.yaml        | 16 +++++++++++--
 drivers/regulator/Kconfig                     |  2 +-
 drivers/regulator/mp886x.c                    | 23 +++++++++++++++++--
 3 files changed, 36 insertions(+), 5 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] regulator: mp886x: fix vsel_mask
  2026-09-01  4:31 [PATCH 0/3] regulator: mp886x: add MP8864 support Jisheng Zhang
@ 2026-09-01  4:31 ` Jisheng Zhang
  2026-09-01  4:31 ` [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864 Jisheng Zhang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jisheng Zhang @ 2026-09-01  4:31 UTC (permalink / raw)
  To: Saravanan Sekar, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, devicetree

The MP886X vsel is 7bits, fix the vsel_mask.

Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/regulator/mp886x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index e0b62bc02a1e..a10f3a20d413 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -267,7 +267,7 @@ static int mp886x_regulator_register(struct mp886x_device_info *di,
 	rdesc->min_uV = 600000;
 	rdesc->uV_step = 10000;
 	rdesc->vsel_reg = MP886X_VSEL;
-	rdesc->vsel_mask = 0x3f;
+	rdesc->vsel_mask = 0x7f;
 	rdesc->ramp_reg = MP886X_SYSCNTLREG1;
 	rdesc->ramp_mask = MP886X_SLEW_MASK;
 	rdesc->ramp_delay_table = di->ci->slew_rates;
-- 
2.51.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864
  2026-09-01  4:31 [PATCH 0/3] regulator: mp886x: add MP8864 support Jisheng Zhang
  2026-09-01  4:31 ` [PATCH 1/3] regulator: mp886x: fix vsel_mask Jisheng Zhang
@ 2026-09-01  4:31 ` Jisheng Zhang
  2026-09-01 17:42   ` Conor Dooley
  2026-09-01  4:31 ` [PATCH 3/3] regulator: mp886x: add MP8864 support Jisheng Zhang
  2026-09-04 18:13 ` [PATCH 0/3] " Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: Jisheng Zhang @ 2026-09-01  4:31 UTC (permalink / raw)
  To: Saravanan Sekar, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, devicetree

The MP8864 is a 4 A, 21 V synchronous step-down converter.  Its
register layout and voltage transition handling are compatible with the
MP8867, but its selectable switching frequencies are 600 kHz, 850 kHz,
1.1 MHz and 1.6 MHz.

Add the compatible and chip-specific switching-frequency table.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Assisted-by: Codex:gpt-5
---
 .../bindings/regulator/mps,mp886x.yaml           | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
index 374a4f6b1e23..6cf7c1c3c0c3 100644
--- a/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
+++ b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
@@ -4,17 +4,30 @@
 $id: http://devicetree.org/schemas/regulator/mps,mp886x.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Monolithic Power Systems MP8867/MP8869 voltage regulator
+title: Monolithic Power Systems MP8864/MP8867/MP8869 voltage regulator
 
 maintainers:
   - Jisheng Zhang <jszhang@kernel.org>
 
 allOf:
   - $ref: regulator.yaml#
+  - if:
+      properties:
+        compatible:
+          const: mps,mp8864
+    then:
+      properties:
+        mps,switch-frequency-hz:
+          enum: [600000, 850000, 1100000, 1600000]
+    else:
+      properties:
+        mps,switch-frequency-hz:
+          enum: [500000, 750000, 1000000, 1250000, 1500000]
 
 properties:
   compatible:
     enum:
+      - mps,mp8864
       - mps,mp8867
       - mps,mp8869
 
@@ -33,7 +46,6 @@ properties:
 
   mps,switch-frequency-hz:
     description: The valid switch frequency in Hertz.
-    enum: [500000, 750000, 1000000, 1250000, 1500000]
 
 required:
   - compatible
-- 
2.51.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] regulator: mp886x: add MP8864 support
  2026-09-01  4:31 [PATCH 0/3] regulator: mp886x: add MP8864 support Jisheng Zhang
  2026-09-01  4:31 ` [PATCH 1/3] regulator: mp886x: fix vsel_mask Jisheng Zhang
  2026-09-01  4:31 ` [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864 Jisheng Zhang
@ 2026-09-01  4:31 ` Jisheng Zhang
  2026-09-04 18:13 ` [PATCH 0/3] " Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Jisheng Zhang @ 2026-09-01  4:31 UTC (permalink / raw)
  To: Saravanan Sekar, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, devicetree

The MP8864 is a 4 A, 21 V synchronous step-down converter.  Its
register layout and voltage transition handling are compatible with the
MP8867, but its selectable switching frequencies are 600 kHz, 850 kHz,
1.1 MHz and 1.6 MHz.

Add the compatible and chip-specific switching-frequency table.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Assisted-by: Codex:gpt-5
---
 drivers/regulator/Kconfig  |  2 +-
 drivers/regulator/mp886x.c | 21 ++++++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 89789ac7a786..c8940e2c7e04 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -864,7 +864,7 @@ config REGULATOR_MP8859
 	  module. The module will be named "mp8859".
 
 config REGULATOR_MP886X
-	tristate "MPS MP8869 regulator driver"
+	tristate "MPS MP8864/MP8867/MP8869 regulator driver"
 	depends on I2C && OF
 	select REGMAP_I2C
 	help
diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index a10f3a20d413..14f60cdcbbd6 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 //
-// MP8867/MP8869 regulator driver
+// MP8864/MP8867/MP8869 regulator driver
 //
 // Copyright (C) 2020 Synaptics Incorporated
 //
@@ -229,6 +229,23 @@ static const struct regulator_ops mp8867_regulator_ops = {
 	.set_ramp_delay = regulator_set_ramp_delay_regmap,
 };
 
+static const struct mp886x_cfg_info mp8864_ci = {
+	.rops = &mp8867_regulator_ops,
+	.slew_rates = {
+		64000,
+		32000,
+		16000,
+		8000,
+		4000,
+		2000,
+		1000,
+		500,
+	},
+	.switch_freq = { 600000, 850000, 1100000, 1600000 },
+	.fs_reg = MP886X_SYSCNTLREG1,
+	.fs_shift = 1,
+};
+
 static const struct mp886x_cfg_info mp8867_ci = {
 	.rops = &mp8867_regulator_ops,
 	.slew_rates = {
@@ -341,6 +358,7 @@ static int mp886x_i2c_probe(struct i2c_client *client)
 }
 
 static const struct of_device_id mp886x_dt_ids[] = {
+	{ .compatible = "mps,mp8864", .data = &mp8864_ci },
 	{ .compatible = "mps,mp8867", .data = &mp8867_ci },
 	{ .compatible = "mps,mp8869", .data = &mp8869_ci },
 	{ }
@@ -348,6 +366,7 @@ static const struct of_device_id mp886x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mp886x_dt_ids);
 
 static const struct i2c_device_id mp886x_id[] = {
+	{ .name = "mp8864", .driver_data = (kernel_ulong_t)&mp8864_ci },
 	{ .name = "mp8867", .driver_data = (kernel_ulong_t)&mp8867_ci },
 	{ .name = "mp8869", .driver_data = (kernel_ulong_t)&mp8869_ci },
 	{ }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864
  2026-09-01  4:31 ` [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864 Jisheng Zhang
@ 2026-09-01 17:42   ` Conor Dooley
  0 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2026-09-01 17:42 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Saravanan Sekar, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] regulator: mp886x: add MP8864 support
  2026-09-01  4:31 [PATCH 0/3] regulator: mp886x: add MP8864 support Jisheng Zhang
                   ` (2 preceding siblings ...)
  2026-09-01  4:31 ` [PATCH 3/3] regulator: mp886x: add MP8864 support Jisheng Zhang
@ 2026-09-04 18:13 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-09-04 18:13 UTC (permalink / raw)
  To: Saravanan Sekar, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jisheng Zhang
  Cc: linux-kernel, devicetree

On Tue, 01 Sep 2026 12:31:20 +0800, Jisheng Zhang wrote:
> regulator: mp886x: add MP8864 support
> 
> The MP8864 is a 4 A, 21 V synchronous step-down converter.  Its
> register layout and voltage transition handling are compatible with the
> MP8867, but its selectable switching frequencies are 600 kHz, 850 kHz,
> 1.1 MHz and 1.6 MHz.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.4

Thanks!

[1/3] regulator: mp886x: fix vsel_mask
      https://git.kernel.org/broonie/regulator/c/24fa0eadc2e3
[2/3] regulator: dt-bindings: mp886x: support mp8864
      https://git.kernel.org/broonie/regulator/c/c75d4f104f81
[3/3] regulator: mp886x: add MP8864 support
      https://git.kernel.org/broonie/regulator/c/6c45fd3e1854

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-04 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01  4:31 [PATCH 0/3] regulator: mp886x: add MP8864 support Jisheng Zhang
2026-09-01  4:31 ` [PATCH 1/3] regulator: mp886x: fix vsel_mask Jisheng Zhang
2026-09-01  4:31 ` [PATCH 2/3] regulator: dt-bindings: mp886x: support mp8864 Jisheng Zhang
2026-09-01 17:42   ` Conor Dooley
2026-09-01  4:31 ` [PATCH 3/3] regulator: mp886x: add MP8864 support Jisheng Zhang
2026-09-04 18:13 ` [PATCH 0/3] " Mark Brown

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®