Skip to content

mfd, regulator: the S2MPG15 sub-PMIC (Pixel 9a) and its LDOs - #101

Merged
derekross merged 3 commits into
derekross:omamobilefrom
W4HO-ham:tegu-s2mpg15
Nov 1, 2026
Merged

derekross merged 3 commits into
derekross:omamobilefrom
W4HO-ham:tegu-s2mpg15

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This adds the S2MPG15, the Pixel 9a's sub-PMIC on ACPM, with the seven LDOs Linux consumers use:

  • LDO5S and LDO7S: the AoC sensors' 3.3 V and 1.8 V.
  • LDO9S-LDO11S: the GNSS core, RF front end and auxiliary supply. They're off at hand-off and stock turns them on.
  • LDO12S: the camera sensors' shared 1.8 V.
  • LDO15S: the fingerprint sensor's 3.3 V. It's off at hand-off, as LDO15S is on the 7 Pro. Until it's on, the Goodix trusted app reads chip id 0.

The series has three patches:

  1. The bindings: the PMIC and its regulators node.
  2. mfd: the ACPM bus data (channel 2, speedy 1, no interrupt yet), a read-only common regmap with only the revision, and a pmic regmap limited to the seven LDO controls.
  3. regulator: the seven LDOs with the S2MPG14's ops (enable and voltage readback; the firmware's voltage is kept), registered only when the board describes them.

Offsets and voltage groups come from Google's GPL s2mpg15-register.h and s2mpg15-regulator.c.

Tested on the 9a (7.3.0-rc6-omamobile-tegu-s2mpg15-m1) with the integration tree's version of this code, which also carries the S2MPG15 GPIO block (not in this series):

  • LDO5S and LDO7S run the AoC sensors.
  • LDO12S runs the cameras.
  • ldo15s described as always on reads enabled at 3.3 V, and the fingerprint HAL then finds the sensor (sensor0 at (540, 1769), radius 113).

checkpatch --strict (only the MAINTAINERS notes for new files), the W=1 builds of the four objects, and dt_binding_check of both schemas are clean on today's omamobile. The 9a's DT nodes come with the board DT once #80 is in.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Force-pushed before review: the three GNSS rails, LDO9S (core), LDO10S (RF front end) and LDO11S (auxiliary supply), are now in all three commits (binding pattern, pmic regmap range 0x37-0x39, regulator descriptors with Google's voltage groups 5 and 6). They're off at hand-off on the palmtop and stock turns them on; the palmtop has been running with them described since round gn2. Same checks as before: checkpatch --strict, W=1 for s2mps11.o and sec-acpm.o, dt_binding_check.

@derekross

Copy link
Copy Markdown
Owner

Thank you for this. I checked every value against Google's GPL sources (s2mpg15-register.h and s2mpg15-regulator.c in soc/gs): the CTRL offsets 0x33, 0x35, 0x37-0x39, 0x3A and 0x3D, CHIPID 0x0B, the enable bit, the 128 µs enable time, and the voltage groups (LDO5S 7, LDO7S 6, LDO9S 5, LDO10S-LDO12S 6, LDO15S 7, 64 steps each) all match. The regmaps expose only the seven LDO controls and a read-only CHIPID, and only rails the board describes are registered.

The checks pass on today's omamobile (clean merge, sign-offs, checkpatch with the two new-file MAINTAINERS notes, W=1 on all four objects, CI's dt_binding_check on both schemas), and the middle commit builds on its own. On the Pixel 7 Pro's config, sec-common.o, sec-irq.o and s2mps11.o change only where a compare moves by one, because S2MPG15 goes into the enum before S2MPS11X; S2MPG12 and S2MPG13 keep their values, so cheetah's paths are the same.

Small things, since these land commit by commit:

  1. After the GNSS push, three descriptions still list four LDOs: the comment above s2mpg15_regulators ("voltage groups 7, 6, 6 and 7", now 7, 6, 5, 6, 6, 6 and 7), the description in samsung,s2mpg15-regulator.yaml (LDO5S, LDO7S, LDO12S, LDO15S), and the one in samsung,s2mpg15-pmic.yaml (no GNSS).
  2. The run was on your integration tree's version of this code. Could you give the blob ids of the s2mps11.c and sec-acpm.c you ran (git rev-parse <commit>:<path>), or confirm they match this head?

And one thing for the board PR, not this one: a rail the DT describes with neither a consumer nor regulator-always-on gets switched off about 30 s after boot. Stock marks LDO5S and LDO7S regulator-boot-on and gives LDO15S regulator-always-on (zumapro-tegu-udfps.dtsi), and the AoC's sensor rails have no Linux consumer, so they'll need regulator-always-on there, as you already plan for LDO15S.

With the three descriptions fixed, I'll merge it.

W4HO-ham added a commit to W4HO-ham/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
…lies

LDO5S and LDO7S feed the AoC's sensors.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
W4HO-ham added a commit to W4HO-ham/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
W4HO-ham added a commit to W4HO-ham/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The S2MPG15 is the sub-PMIC paired with Google's Tensor G4 (Pixel 9a),
reached through ACPM like the S2MPG14. Describe it with its LDOs that
Linux consumers use: LDO5S and LDO7S (the AoC sensors), LDO9S-LDO11S
(the GNSS core, RF front end and auxiliary supply), LDO12S (the camera
sensors' 1.8 V) and LDO15S (the fingerprint sensor's 3.3 V).

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add the Tensor G4's sub-PMIC on ACPM channel 2, speedy channel 1, with
no interrupt line yet. Its common regmap exposes only the revision, read
only; its pmic regmap only the LDO controls the regulator driver uses.
One cell, the regulators.

Register offsets from Google's GPL s2mpg15-register.h.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add LDO5S and LDO7S (the AoC sensors), LDO9S-LDO11S (the GNSS core, RF
front end and auxiliary supply), LDO12S (the camera sensors' 1.8 V) and
LDO15S (the fingerprint sensor's 3.3 V) of the Tensor G4's sub-PMIC,
with the S2MPG14's ops: enable control and voltage readback, keeping the
firmware's voltage. As for the S2MPG14, only those the board describes
are registered.

On the Pixel 9a LDO15S is off at hand-off, and the fingerprint trusted
app reads chip id 0 until it is on; with ldo15s described as always on
it reads 3.3 V and the sensor answers. The three GNSS rails are off at
hand-off too, and stock turns them on.

Voltage groups from Google's GPL s2mpg15-regulator.c.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Sorry this sat. Both points are done, and I rebased onto today's omamobile (clean):

  1. The three descriptions now list all seven LDOs. The comment above s2mpg15_regulators reads "voltage groups 7, 6, 5, 6, 6, 6 and 7". The regulator binding names LDO9S, LDO10S and LDO11S as the GNSS receiver's core, RF front end and auxiliary supply. The PMIC binding lists the GNSS receiver among the consumers. Only those lines changed.
  2. What ran. The boot of arm64: dts: exynos: google: zumapro-tegu: Add the fingerprint sensor #165's head (7.3.0-rc6-omamobile-push1-gb533af3f1cbc) carried this PR's code byte for byte: s2mps11.c is blob 39a0015a8a0f and sec-acpm.c is ef1834d7b01e, the same as this PR's previous head. On that boot LDO15S came on from the device tree and goodix-fp bound. Pixel 9a (zumapro): the three cameras from the device tree #164's boot (…-g4023f585ccae) had the same s2mps11.c, with LDO12S feeding the cameras. My integration tree's copies differ only in comments and in the name of the ops struct, whose body is the same.

checkpatch --strict gives only the two new-file MAINTAINERS notes you'd already seen.

@derekross
derekross merged commit 8b8235e into derekross:omamobile Nov 1, 2026
1 check passed
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham, no need to apologise. Both points are done:

  1. The comment above s2mpg15_regulators and both binding descriptions now list all seven LDOs, with LDO9S-LDO11S as the GNSS receiver's supplies. Those are the only lines that changed: the middle commit is identical, and the range-diff shows nothing else.
  2. The blob ids check out. At your previous head, s2mps11.c is 39a0015a8a0f and sec-acpm.c is ef1834d7b01e, and arm64: dts: exynos: google: zumapro-tegu: Add the fingerprint sensor #165's booted head b533af3f1cbc has the same two blobs. So that boot ran this code. At the new head sec-acpm.c is the same blob, and s2mps11.c differs only by the comment.

Nothing in drivers/mfd, s2mps11.c or the Samsung PMIC headers has changed on omamobile since I checked the Pixel 7 Pro side on the 28th, so that still holds (S2MPG12 and S2MPG13 keep their enum values).

Checks on this head, merged onto today's omamobile: it merges cleanly, all three commits are signed off, checkpatch --strict gives only the two new-file MAINTAINERS notes, and W=1 builds all four touched objects. CI is green, including dt_binding_check on both schemas.

Merged with "Rebase and merge". #164 and #165 then pick up this version when they rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants