[PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree

Guodong Xu posted 4 patches 2 weeks, 2 days ago
There is a newer version of this series
.../devicetree/bindings/mfd/spacemit,p1.yaml       | 58 +++++++++++++++++++++-
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    | 12 ++++-
drivers/regulator/spacemit-p1.c                    | 25 ++++++----
3 files changed, 80 insertions(+), 15 deletions(-)
[PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Guodong Xu 2 weeks, 2 days ago
This series fixes hardware voltage constraints and enables flexible power
tree configurations for the SpacemiT P1 PMIC.

Patch 1, n_voltages is corrected to match hardware register widths, as the
previous values prevented regulators from reaching higher operational
voltages (e.g., 3.3V on LDOs).

Patch 2-4, hardcoded supply assumptions are replaced with explicit
devicetree properties. PMIC supply connections are board-design decisions.
Moving this to DT allows supporting varied topologies without driver
modifications.

Note: Patch 3 introduces a bisect breakage by transitioning to
pin-specific supply names. Probe failures will occur on existing board
(K1 Bananapi F3) until Patch 4 updates the corresponding DTS file.

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
Guodong Xu (4):
      regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
      dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
      regulator: spacemit-p1: Update supply names
      riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties

 .../devicetree/bindings/mfd/spacemit,p1.yaml       | 58 +++++++++++++++++++++-
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    | 12 ++++-
 drivers/regulator/spacemit-p1.c                    | 25 ++++++----
 3 files changed, 80 insertions(+), 15 deletions(-)
---
base-commit: c8a4a774a9b0d2c86593492625874e27e9cbc9a9
change-id: 20260122-spacemit-p1-ae596efe885f

Best regards,
-- 
Guodong Xu <guodong@riscstar.com>
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Yixun Lan 2 weeks, 2 days ago
Hi Guodong,

On 17:43 Thu 22 Jan     , Guodong Xu wrote:
> This series fixes hardware voltage constraints and enables flexible power
> tree configurations for the SpacemiT P1 PMIC.
> 
> Patch 1, n_voltages is corrected to match hardware register widths, as the
> previous values prevented regulators from reaching higher operational
> voltages (e.g., 3.3V on LDOs).
> 
> Patch 2-4, hardcoded supply assumptions are replaced with explicit
> devicetree properties. PMIC supply connections are board-design decisions.
> Moving this to DT allows supporting varied topologies without driver
> modifications.
> 
> Note: Patch 3 introduces a bisect breakage by transitioning to
> pin-specific supply names. Probe failures will occur on existing board
> (K1 Bananapi F3) until Patch 4 updates the corresponding DTS file.
This patch bring system-wide change that not only affect Bananapi F3..

Please also provide fix for other boards, I think you may not be able
to test all boards, but make sure the patches are available, so people
who interested can test, P.S I can help on milkv jupiter board

> 
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> Guodong Xu (4):
>       regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
>       dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
>       regulator: spacemit-p1: Update supply names
>       riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties
> 
>  .../devicetree/bindings/mfd/spacemit,p1.yaml       | 58 +++++++++++++++++++++-
>  arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    | 12 ++++-
>  drivers/regulator/spacemit-p1.c                    | 25 ++++++----
>  3 files changed, 80 insertions(+), 15 deletions(-)
> ---
> base-commit: c8a4a774a9b0d2c86593492625874e27e9cbc9a9
> change-id: 20260122-spacemit-p1-ae596efe885f
> 
> Best regards,
> -- 
> Guodong Xu <guodong@riscstar.com>
> 

-- 
Yixun Lan (dlan)
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Javier Martinez Canillas 2 weeks, 1 day ago
Yixun Lan <dlan@gentoo.org> writes:

Hello Yixun and Guodong,

> Hi Guodong,
>
> On 17:43 Thu 22 Jan     , Guodong Xu wrote:
>> This series fixes hardware voltage constraints and enables flexible power
>> tree configurations for the SpacemiT P1 PMIC.
>> 
>> Patch 1, n_voltages is corrected to match hardware register widths, as the
>> previous values prevented regulators from reaching higher operational
>> voltages (e.g., 3.3V on LDOs).
>> 
>> Patch 2-4, hardcoded supply assumptions are replaced with explicit
>> devicetree properties. PMIC supply connections are board-design decisions.
>> Moving this to DT allows supporting varied topologies without driver
>> modifications.
>> 
>> Note: Patch 3 introduces a bisect breakage by transitioning to
>> pin-specific supply names. Probe failures will occur on existing board
>> (K1 Bananapi F3) until Patch 4 updates the corresponding DTS file.
> This patch bring system-wide change that not only affect Bananapi F3..
>
> Please also provide fix for other boards, I think you may not be able
> to test all boards, but make sure the patches are available, so people
> who interested can test, P.S I can help on milkv jupiter board
>

I can also help testing on the milkv jupiter board.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Mark Brown 2 weeks, 2 days ago
On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> On 17:43 Thu 22 Jan     , Guodong Xu wrote:

> > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > previous values prevented regulators from reaching higher operational
> > voltages (e.g., 3.3V on LDOs).

> This patch bring system-wide change that not only affect Bananapi F3..

> Please also provide fix for other boards, I think you may not be able
> to test all boards, but make sure the patches are available, so people
> who interested can test, P.S I can help on milkv jupiter board

Patch 1 looks like it should be OK as is?
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Yixun Lan 2 weeks, 2 days ago
Hi Mark,

On 11:27 Thu 22 Jan     , Mark Brown wrote:
> On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > On 17:43 Thu 22 Jan     , Guodong Xu wrote:
> 
> > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > previous values prevented regulators from reaching higher operational
> > > voltages (e.g., 3.3V on LDOs).
> 
> > This patch bring system-wide change that not only affect Bananapi F3..
> 
> > Please also provide fix for other boards, I think you may not be able
> > to test all boards, but make sure the patches are available, so people
> > who interested can test, P.S I can help on milkv jupiter board
> 
> Patch 1 looks like it should be OK as is?
then with patch 3, and for other boards (milkv jupiter), should have similar
DT fix as patch 4..

-- 
Yixun Lan (dlan)
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Guodong Xu 2 weeks, 2 days ago
On Thu, Jan 22, 2026 at 8:12 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> Hi Mark,
>
> On 11:27 Thu 22 Jan     , Mark Brown wrote:
> > On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > > On 17:43 Thu 22 Jan     , Guodong Xu wrote:
> >
> > > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > > previous values prevented regulators from reaching higher operational
> > > > voltages (e.g., 3.3V on LDOs).
> >
> > > This patch bring system-wide change that not only affect Bananapi F3..
> >
> > > Please also provide fix for other boards, I think you may not be able
> > > to test all boards, but make sure the patches are available, so people
> > > who interested can test, P.S I can help on milkv jupiter board
> >
> > Patch 1 looks like it should be OK as is?
> then with patch 3, and for other boards (milkv jupiter), should have similar
> DT fix as patch 4..

There is no "spacemit,p1" node in other k1 boards (milkv jupiter).

Best regards,
Guodong Xu

>
> --
> Yixun Lan (dlan)
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Yixun Lan 2 weeks, 2 days ago
Hi Guodong,

On 22:55 Thu 22 Jan     , Guodong Xu wrote:
> On Thu, Jan 22, 2026 at 8:12 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > Hi Mark,
> >
> > On 11:27 Thu 22 Jan     , Mark Brown wrote:
> > > On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > > > On 17:43 Thu 22 Jan     , Guodong Xu wrote:
> > >
> > > > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > > > previous values prevented regulators from reaching higher operational
> > > > > voltages (e.g., 3.3V on LDOs).
> > >
> > > > This patch bring system-wide change that not only affect Bananapi F3..
> > >
> > > > Please also provide fix for other boards, I think you may not be able
> > > > to test all boards, but make sure the patches are available, so people
> > > > who interested can test, P.S I can help on milkv jupiter board
> > >
> > > Patch 1 looks like it should be OK as is?
> > then with patch 3, and for other boards (milkv jupiter), should have similar
> > DT fix as patch 4..
> 
> There is no "spacemit,p1" node in other k1 boards (milkv jupiter).
> 
yes, there is one which accepted during this merge window, and will show up
in v6.20, please check spacemit tree [1] or [2]

Link: https://github.com/spacemit-com/linux/tree/k1/dt-for-next [1]
Link: https://lore.kernel.org/r/176618016976.76638.11221127377007758575.b4-ty@gentoo.org [2]

-- 
Yixun Lan (dlan)
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Mark Brown 2 weeks, 2 days ago
On Thu, Jan 22, 2026 at 08:12:23PM +0800, Yixun Lan wrote:
> On 11:27 Thu 22 Jan     , Mark Brown wrote:

> > Patch 1 looks like it should be OK as is?

> then with patch 3, and for other boards (milkv jupiter), should have similar
> DT fix as patch 4..

Yes, changing the supply names would at a minimum need all the boards
updating (it's an ABI change so shouldn't really happen, but perhaps
there are few enough users for everyone to coordinate and it's what you
all prefer).  Patch 1 shouldn't have any effect unless a board already
specifies a wider range than the driver currently supports.
Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Yixun Lan 2 weeks, 2 days ago
Hi Mark,

On 13:28 Thu 22 Jan     , Mark Brown wrote:
> On Thu, Jan 22, 2026 at 08:12:23PM +0800, Yixun Lan wrote:
> > On 11:27 Thu 22 Jan     , Mark Brown wrote:
> 
> > > Patch 1 looks like it should be OK as is?
> 
> > then with patch 3, and for other boards (milkv jupiter), should have similar
> > DT fix as patch 4..
> 
> Yes, changing the supply names would at a minimum need all the boards
> updating (it's an ABI change so shouldn't really happen, but perhaps
> there are few enough users for everyone to coordinate and it's what you
yes, that's what I care..

> all prefer).  Patch 1 shouldn't have any effect unless a board already
> specifies a wider range than the driver currently supports.
I realized you were talking about patch 1 only, and plan to take it?
then yes, please feel free to do it..

-- 
Yixun Lan (dlan)
Re: (subset) [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
Posted by Mark Brown 1 week, 5 days ago
On Thu, 22 Jan 2026 17:43:41 +0800, Guodong Xu wrote:
> This series fixes hardware voltage constraints and enables flexible power
> tree configurations for the SpacemiT P1 PMIC.
> 
> Patch 1, n_voltages is corrected to match hardware register widths, as the
> previous values prevented regulators from reaching higher operational
> voltages (e.g., 3.3V on LDOs).
> 
> [...]

Applied to

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

Thanks!

[1/4] regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
      commit: 41399c5d476156635c9a58de870d39318e22fa09

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