[PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers

André Draszik posted 20 patches 2 weeks, 1 day ago
.../bindings/firmware/google,gs101-acpm-ipc.yaml   |   54 +-
.../bindings/mfd/samsung,s2mpg10-pmic.yaml         |  120 ++
.../bindings/mfd/samsung,s2mpg11-pmic.yaml         |   88 ++
.../devicetree/bindings/mfd/samsung,s2mps11.yaml   |   29 +-
.../regulator/samsung,s2mpg10-regulator.yaml       |  158 +++
.../regulator/samsung,s2mpg11-regulator.yaml       |  136 +++
MAINTAINERS                                        |    1 +
drivers/mfd/sec-acpm.c                             |  171 ++-
drivers/mfd/sec-common.c                           |   17 +-
drivers/mfd/sec-irq.c                              |   86 +-
drivers/regulator/s2mps11.c                        | 1186 ++++++++++++++++++--
.../regulator/samsung,s2mpg10-regulator.h          |   53 +
include/linux/mfd/samsung/core.h                   |    1 +
include/linux/mfd/samsung/irq.h                    |  105 ++
include/linux/mfd/samsung/s2mpg10.h                |   44 +-
include/linux/mfd/samsung/s2mpg11.h                |  434 +++++++
include/linux/regulator/driver.h                   |    5 +
17 files changed, 2527 insertions(+), 161 deletions(-)
[PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by André Draszik 2 weeks, 1 day ago
This series extends the existing S2MPG10 PMIC driver to add support for
the regulators, and adds new S2MPG11 core and regulator drivers.

--- dependency note ---
This series must be applied in-order, due to the regulator drivers
depending on headers & definitions added by the bindings and core
drivers.

Due to patch context, there are dependencies on previous Samsung MFD
patches, hence this series is against current for-mfd-next.

While these patches compile, regulator probe will only be successful
with my deferrable regulators patches from
https://lore.kernel.org/r/20251227-regulators-defer-v1-0-3104b22d84cb@linaro.org
(already in linux-next).

I think patches up to and including mfd changes could go via the MFD
tree, and regulator patches using an immutable branch via the regulator
tree on top.
--- end ---

The patches are kept together in one series, due to S2MPG11 and its
regulators being very similar to S2MPG10.

The Samsung S2MPG11 PMIC is a Power Management IC for mobile
applications with buck converters, various LDOs, power meters, and
additional GPIO interfaces. It typically complements an S2MPG10 PMIC in
a main/sub configuration as the sub-PMIC and both are used on the
Google Pixel 6 and 6 Pro (oriole / raven).

A DT update for Oriole / Raven to enable these is required which I will
send out separately.

Cheers,
Andre'

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v7:
- rebase against for-mfd-next
- add 'domain_suffix' to s2mpg11_irq_chip_pmic (patch 9)
- Link to v6: https://lore.kernel.org/r/20260105-s2mpg1x-regulators-v6-0-80f4b6d1bf9d@linaro.org

Changes in v6:
- merge patch 21 into 15 (Bartosz)
- merge 'con-id' handling into patch 15
- collect tags
- Link to v5: https://lore.kernel.org/r/20251227-s2mpg1x-regulators-v5-0-0c04b360b4c9@linaro.org

Changes in v5:
- rebase against mfd/sec alarm IRQ rework
  https://lore.kernel.org/all/20251217-s5m-alarm-v2-0-b7bff003e94c@linaro.org/
- switch to async probe for mfd
- Mark: one MFD cell per PMIC, not per PMIC rail - drop or update
        related patches
  - making the series runtime depend on
    https://lore.kernel.org/r/20251227-regulators-defer-v1-0-3104b22d84cb@linaro.org
- new patch:
  - mfd: sec: s2mpg10: reorder regulators for better probe performance
- collect tags
- Link to v4: https://lore.kernel.org/r/20251110-s2mpg1x-regulators-v4-0-94c9e726d4ba@linaro.org

Changes in v4:
- Krzysztof:
  - s2mpg10-regulator.yaml: move additionalProperties to after allOf
  - s2mpg10-regulator.yaml: use $defs, not definitions
  - split samsung,s2mpg10-pmic.yaml and samsung,s2mpg11-pmic.yaml
  - add full example for samsung,s2mpg10-pmic.yaml and 11
  - acpm binding: commit message update
  - acpm binding: pmic -> pmic-1, pmic2 -> pmic-2
- ensure binding file names match bindings
- fix typos in s2mpg11-regulator.yaml description text
- collect tags
- Link to v3: https://lore.kernel.org/r/20251103-s2mpg1x-regulators-v3-0-b8b96b79e058@linaro.org

Changes in v3:
- Krzysztof:
  - split s2mpg10 core binding into separate file
  - drop PCTRLSEL values that can be described using standard
    properties, and update remaining macro names (self)
  - drop maxItems:1 where not needed (Krzysztof)
  - samsung,ext-control-gpios -> enable-gpios
- fix LDO20M_EN pin name -> VLDO20M_EN
- move all binding patternProperties to top-level
- one (driver) instance per actual rail, not per rail type (LDO or
  buck)
- new macro REGULATOR_LINEAR_VRANGE() (patch 10)
- address some (pre-existing) checkpatch warnings
- various updates to regulator driver (patch 16 & 19).See footer there
- more descriptive commit messages
- Link to v2: https://lore.kernel.org/r/20250606-s2mpg1x-regulators-v2-0-b03feffd2621@linaro.org

Changes in v2:
- s2mpg11 also exposes additional GPIOs, update all relevant commit
  messages (nevertheless, GPIOs are out of scope in this series)
- fix some commit message typos: s2mp1 -> s2mpg1
- patch2: drop | (literal style mark) from samsung,ext-control-gpios
- patch5: add | to vinb*-supply description for better formatting
- patch13: update ::of_parse_cb assignment
- patch15: drop duplicated ::of_parse_cb assignment
- Link to v1: https://lore.kernel.org/r/20250604-s2mpg1x-regulators-v1-0-6038740f49ae@linaro.org

---
André Draszik (20):
      dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase
      regulator: dt-bindings: add s2mpg10-pmic regulators
      regulator: dt-bindings: add s2mpg11-pmic regulators
      dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
      dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
      dt-bindings: mfd: Add samsung,s2mpg11-pmic
      dt-bindings: firmware: google,gs101-acpm-ipc: add S2MPG11 secondary PMIC
      mfd: sec: s2mpg10: reorder regulators for better probe performance
      mfd: sec: Add support for S2MPG11 PMIC via ACPM
      regulator: add REGULATOR_LINEAR_VRANGE macro
      regulator: s2mps11: drop two needless variable initialisations
      regulator: s2mps11: use dev_err_probe() where appropriate
      regulator: s2mps11: place constants on right side of comparison tests
      regulator: s2mps11: update node parsing (allow -supply properties)
      regulator: s2mps11: refactor handling of external rail control
      regulator: s2mps11: add S2MPG10 regulator
      regulator: s2mps11: refactor S2MPG10  ::set_voltage_time() for S2MPG11 reuse
      regulator: s2mps11: refactor S2MPG10 regulator macros for S2MPG11 reuse
      regulator: s2mps11: add S2MPG11 regulator
      regulator: s2mps11: more descriptive gpio consumer name

 .../bindings/firmware/google,gs101-acpm-ipc.yaml   |   54 +-
 .../bindings/mfd/samsung,s2mpg10-pmic.yaml         |  120 ++
 .../bindings/mfd/samsung,s2mpg11-pmic.yaml         |   88 ++
 .../devicetree/bindings/mfd/samsung,s2mps11.yaml   |   29 +-
 .../regulator/samsung,s2mpg10-regulator.yaml       |  158 +++
 .../regulator/samsung,s2mpg11-regulator.yaml       |  136 +++
 MAINTAINERS                                        |    1 +
 drivers/mfd/sec-acpm.c                             |  171 ++-
 drivers/mfd/sec-common.c                           |   17 +-
 drivers/mfd/sec-irq.c                              |   86 +-
 drivers/regulator/s2mps11.c                        | 1186 ++++++++++++++++++--
 .../regulator/samsung,s2mpg10-regulator.h          |   53 +
 include/linux/mfd/samsung/core.h                   |    1 +
 include/linux/mfd/samsung/irq.h                    |  105 ++
 include/linux/mfd/samsung/s2mpg10.h                |   44 +-
 include/linux/mfd/samsung/s2mpg11.h                |  434 +++++++
 include/linux/regulator/driver.h                   |    5 +
 17 files changed, 2527 insertions(+), 161 deletions(-)
---
base-commit: 76246f598ee3e8ba8796360f24cc8ea491350937
change-id: 20250603-s2mpg1x-regulators-7a41c8399abf

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>

[GIT PULL] Immutable branch for Regulator and Firmware containing MFD and RTC due for the v6.20 merge window
Posted by Lee Jones 2 days, 20 hours ago
Enjoy!

Appreciate that it's close to the merge-window now.  Your call to pull.

The following changes since commit 8f0b4cce4481fb22653697cced8d0d04027cb1e8:

  Linux 6.19-rc1 (2025-12-14 16:05:07 +1200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-for-regulator-firmware-v6.20

for you to fetch changes up to 3a17ba6557e28d5d99b7e3cad31f22ad28a36cc2:

  mfd: sec: Add support for S2MPG11 PMIC via ACPM (2026-02-04 10:37:29 +0000)

----------------------------------------------------------------
Immutable branch for Regulator and Firmware containing MFD and RTC due for the v6.20 merge window

----------------------------------------------------------------
André Draszik (8):
      mfd: sec: Add rtc alarm IRQ as platform device resource
      rtc: s5m: query platform device IRQ resource for alarm IRQ
      mfd: sec: Drop now unused struct sec_pmic_dev::irq_data
      dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
      dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
      dt-bindings: mfd: Add samsung,s2mpg11-pmic
      mfd: sec: s2mpg10: Reorder regulators for better probe performance
      mfd: sec: Add support for S2MPG11 PMIC via ACPM

 .../bindings/mfd/samsung,s2mpg10-pmic.yaml         | 120 ++++++
 .../bindings/mfd/samsung,s2mpg11-pmic.yaml         |  88 +++++
 .../devicetree/bindings/mfd/samsung,s2mps11.yaml   |  29 +-
 drivers/mfd/sec-acpm.c                             | 171 +++++++-
 drivers/mfd/sec-common.c                           |  62 ++-
 drivers/mfd/sec-core.h                             |   2 +-
 drivers/mfd/sec-irq.c                              | 150 +++++--
 drivers/rtc/rtc-s5m.c                              |  21 +-
 include/linux/mfd/samsung/core.h                   |   2 +-
 include/linux/mfd/samsung/irq.h                    | 105 +++++
 include/linux/mfd/samsung/s2mpg10.h                |  20 +-
 include/linux/mfd/samsung/s2mpg11.h                | 434 +++++++++++++++++++++
 12 files changed, 1098 insertions(+), 106 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/samsung,s2mpg10-pmic.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/samsung,s2mpg11-pmic.yaml
 create mode 100644 include/linux/mfd/samsung/s2mpg11.h

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by Lee Jones 2 weeks, 1 day ago
On Thu, 22 Jan 2026 15:43:27 +0000, André Draszik wrote:
> This series extends the existing S2MPG10 PMIC driver to add support for
> the regulators, and adds new S2MPG11 core and regulator drivers.
> 
> --- dependency note ---
> This series must be applied in-order, due to the regulator drivers
> depending on headers & definitions added by the bindings and core
> drivers.
> 
> [...]

Applied, thanks!

[04/20] dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
        commit: c19ccbf37758f90064f7b1e32ec291954d97b426
[05/20] dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
        commit: ac1068790221a421e7bc4dacadfe8d39d6bec3a9
[06/20] dt-bindings: mfd: Add samsung,s2mpg11-pmic
        commit: d0cd9ded4bdef73303e65abbeae47b00b7288059
[08/20] mfd: sec: s2mpg10: reorder regulators for better probe performance
        commit: 40b82c61c044e5ae7bbd532e841bd01507028c33
[09/20] mfd: sec: Add support for S2MPG11 PMIC via ACPM
        commit: 8e6c6e8ef5e241385eff14d4c8b8e45d5e762e84

--
Lee Jones [李琼斯]

Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by André Draszik 2 weeks ago
Hi Lee,

On Thu, 2026-01-22 at 16:35 +0000, Lee Jones wrote:
> On Thu, 22 Jan 2026 15:43:27 +0000, André Draszik wrote:
> > This series extends the existing S2MPG10 PMIC driver to add support for
> > the regulators, and adds new S2MPG11 core and regulator drivers.
> > 
> > --- dependency note ---
> > This series must be applied in-order, due to the regulator drivers
> > depending on headers & definitions added by the bindings and core
> > drivers.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [04/20] dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
>         commit: c19ccbf37758f90064f7b1e32ec291954d97b426
> [05/20] dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
>         commit: ac1068790221a421e7bc4dacadfe8d39d6bec3a9
> [06/20] dt-bindings: mfd: Add samsung,s2mpg11-pmic
>         commit: d0cd9ded4bdef73303e65abbeae47b00b7288059

Thanks for queuing these, but FYI, I think leaving out patches 1 to 3 will
give validation errors.

As mentioned in cover letter, the patches must be applied in order, for
bindings particularly the mfd-binding patches depend on the regulator-
binding updates, specifically patches 4 and 5 reference files added in
patches 2 and 3 respectively.

Also, without patch 1, I'd say there will be validation errors from the
example DTS that patch 1 updates in preparation for patch 4.

Maybe that's all OK while things are being merged via different trees, but
I just wanted to point it out.

Cheers,
Andre'
Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by Mark Brown 2 weeks ago
On Fri, Jan 23, 2026 at 09:39:00AM +0000, André Draszik wrote:

> Thanks for queuing these, but FYI, I think leaving out patches 1 to 3 will
> give validation errors.

> As mentioned in cover letter, the patches must be applied in order, for
> bindings particularly the mfd-binding patches depend on the regulator-
> binding updates, specifically patches 4 and 5 reference files added in
> patches 2 and 3 respectively.

So long as everything lands in the final release it'll be fine, people
aren't bisecting DT binding validation in the way that they do runtime
issues.
Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by Lee Jones 3 days, 14 hours ago
On Fri, 23 Jan 2026, Mark Brown wrote:

> On Fri, Jan 23, 2026 at 09:39:00AM +0000, André Draszik wrote:
> 
> > Thanks for queuing these, but FYI, I think leaving out patches 1 to 3 will
> > give validation errors.
> 
> > As mentioned in cover letter, the patches must be applied in order, for
> > bindings particularly the mfd-binding patches depend on the regulator-
> > binding updates, specifically patches 4 and 5 reference files added in
> > patches 2 and 3 respectively.
> 
> So long as everything lands in the final release it'll be fine, people
> aren't bisecting DT binding validation in the way that they do runtime
> issues.

This!

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by Lee Jones 2 weeks, 1 day ago
On Thu, 22 Jan 2026, Lee Jones wrote:

> On Thu, 22 Jan 2026 15:43:27 +0000, André Draszik wrote:
> > This series extends the existing S2MPG10 PMIC driver to add support for
> > the regulators, and adds new S2MPG11 core and regulator drivers.
> > 
> > --- dependency note ---
> > This series must be applied in-order, due to the regulator drivers
> > depending on headers & definitions added by the bindings and core
> > drivers.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [04/20] dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
>         commit: c19ccbf37758f90064f7b1e32ec291954d97b426
> [05/20] dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
>         commit: ac1068790221a421e7bc4dacadfe8d39d6bec3a9
> [06/20] dt-bindings: mfd: Add samsung,s2mpg11-pmic
>         commit: d0cd9ded4bdef73303e65abbeae47b00b7288059
> [08/20] mfd: sec: s2mpg10: reorder regulators for better probe performance
>         commit: 40b82c61c044e5ae7bbd532e841bd01507028c33
> [09/20] mfd: sec: Add support for S2MPG11 PMIC via ACPM
>         commit: 8e6c6e8ef5e241385eff14d4c8b8e45d5e762e84

Note to self: ib-mfd-for-regulator-firmware-6.20

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v7 00/20] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Posted by Mark Brown 1 day, 20 hours ago
On Thu, 22 Jan 2026 15:43:27 +0000, André Draszik wrote:
> This series extends the existing S2MPG10 PMIC driver to add support for
> the regulators, and adds new S2MPG11 core and regulator drivers.
> 
> --- dependency note ---
> This series must be applied in-order, due to the regulator drivers
> depending on headers & definitions added by the bindings and core
> drivers.
> 
> [...]

Applied to

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

Thanks!

[01/20] dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase
        commit: e4691f356b2c24467eadc8b20f267e9e046f74cd
[02/20] regulator: dt-bindings: add s2mpg10-pmic regulators
        commit: 71bc6adae4102550717a8eeaa21d3f76f5149ac6
[03/20] regulator: dt-bindings: add s2mpg11-pmic regulators
        commit: 030158c0528d1cbfbe9eebed09bad604f6135734
[10/20] regulator: add REGULATOR_LINEAR_VRANGE macro
        commit: 7d33c0a4c6a3356db2b2f599820baf75d3753d44
[11/20] regulator: s2mps11: drop two needless variable initialisations
        commit: 0809d3dcc0dd8f597adbcd4d881063eb1b437987
[12/20] regulator: s2mps11: use dev_err_probe() where appropriate
        commit: 6430d65d7b74712e9ff60e270687d66265dad6f2
[13/20] regulator: s2mps11: place constants on right side of comparison tests
        commit: 223cefd021fa6ef5687159836871907aa3084fe2
[14/20] regulator: s2mps11: update node parsing (allow -supply properties)
        commit: 5b3c95739d674794730fbf3c678206f302609d27
[15/20] regulator: s2mps11: refactor handling of external rail control
        commit: 0042c880e43c54c9bf19c24a72e54eeea37995e3
[16/20] regulator: s2mps11: add S2MPG10 regulator
        commit: a2b8b9f33ce30ab51b33b52dc52e55d6930b9a02
[17/20] regulator: s2mps11: refactor S2MPG10 ::set_voltage_time() for S2MPG11 reuse
        commit: 8f23cfbe4463c3de2e552aed106e179c0c932b6e
[18/20] regulator: s2mps11: refactor S2MPG10 regulator macros for S2MPG11 reuse
        commit: 102dd11fc98261675a0664de1466616d7dad8d91
[19/20] regulator: s2mps11: add S2MPG11 regulator
        commit: 979dd8da76eb98b212f4e8cafc3c4019cfa3d93d
[20/20] regulator: s2mps11: more descriptive gpio consumer name
        commit: fe8429a2717fc01082502b0adf680a50b230eff7

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