Skip to content

arm64: dts: exynos: google: zumapro-tegu: Add the fingerprint sensor - #165

Draft
W4HO-ham wants to merge 1 commit into
derekross:omamobilefrom
W4HO-ham:tegu-dt-fingerprint
Draft

W4HO-ham wants to merge 1 commit into
derekross:omamobilefrom
W4HO-ham:tegu-dt-fingerprint

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

One commit of mine: the 9a's under-display fingerprint sensor node, on top of #161 (charger, on #119, on #96). It merges #101 for LDO15S and carries #147's binding and driver commits (edec836, b1e4b89) as they are in #147. The rest of #147 is the Pixel 7 Pro stack on another base.

The node is the gpa7 interrupt and the event line gpa7-6, reset on gpp1-0, and LDO15S always on. It has no SPI bus, because the integration tree and Google's source agree the secure world owns that bus. Every value comes from the integration DT, where the sensor answered and matched on 10-29.

Tested on the palmtop today, head b533af3. The kernel was defconfig + omarchy-mobile's fragment with omarchy-mobile#227, then olddefconfig; uname -r was 7.3.0-rc6-omamobile-push1-gb533af3f1cbc. At boot, from the device tree:

input: goodix_fingerprint as /devices/platform/fingerprint/input/input2
goodix-fp fingerprint: irq 47, supply none, netlink 25
/dev/goodix_fp (10, 258)
47: ... gpa7 6 Edge goodix-fp

omamobile-fp.service and storageproxyd.service stayed masked for the whole boot, so nothing touched Trusty's secure storage. Matching through the HAL hasn't been run on this kernel; it needs the AoC/Trusty stack of #162 and the owner's go for the service.

Why draft: it depends on #101 and #147, both still in review, and my commit needs the owner's sign-off. The DTB builds W=1 clean, and dt-validate shows 0 errors.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. This is a tidy node, and keeping it off the SPI bus because the secure world owns that bus is right. I checked it against Google's zumapro-tegu-udfps.dtsi (kernel/devices/google/tegu @ 6276884d9940): the event line on gpa7-6 as EINT, the reset on gpp1-0 active low, its pull and power-down settings, and LDO15S always on all match. Your boot of this head's tree shows goodix-fp binding from the device tree with omamobile-fp and storageproxyd masked the whole time. That's the careful way to do it, thank you. The carried #147 commits have the same patch ids as mine, and the push at 00:07 changed only messages (the tree is identical to b533af3f1cbc, the head you booted).

CI passed on all fifteen commits, on a base from before yesterday evening. It still merges cleanly onto today's omamobile.

What I'd like changed:

  1. Pin LDO15S at stock's 3.3 V. Stock has regulator-min-microvolt = <3300000> and regulator-max-microvolt = <3300000> on s_ldo15_reg. Without limits, regulator-always-on turns the LDO on at whatever its voltage field holds, and you note that it's off at hand-off, so nothing guarantees that field was set to 3.3 V. With min = max, the core sets 3.3 V before enabling it. 3.3 V is an exact step in mfd, regulator: the S2MPG15 sub-PMIC (Pixel 9a) and its LDOs #101's table (1.8 V + 60 × 25 mV, selector 60 of 64).
  2. pmic-2 collides with Pixel 9a (zumapro): the three cameras from the device tree #164. Both PRs add pmic_sub: pmic-2 { compatible = "samsung,s2mpg15-pmic"; … } to zumapro-tegu.dts, and they conflict there and in &pinctrl_peric0. Whichever lands second needs a single pmic_sub node with Pixel 9a (zumapro): the three cameras from the device tree #164's gpio child, ldo12s, and this PR's ldo15s, and the pin groups from both. When the first one is in, I'm happy to send you the merged hunk.
  3. The commit's test paragraph says "Run on the 9a with the integration tree". Your description reports a boot of this exact tree (7.3.0-rc6-omamobile-push1-gb533af3f1cbc). Please put that boot in the message, since that's the evidence for this commit.

A small one: stock's fp_rst also sets samsung,pin-drv = <ZUMA_PIN_DRV_X1>. We have no named constant for it, so it would be a plain number, as zumapro.dtsi already does elsewhere (please check the value in Google's header). If the bootloader already leaves that drive strength, a word in the message is enough.

On order: this waits for #161 (and the #96/#119 stack under it), #101 and my #147. Then it needs a rebase onto omamobile without the merge commit, since kernel PRs land commit by commit. Matching through the HAL can stay for #162 and a separate go for the fingerprint service, as you said.

@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Done:

  1. LDO15S has regulator-min-microvolt = <3300000> and regulator-max-microvolt = <3300000>, and the comment says why.
  2. The pmic_sub collision with Pixel 9a (zumapro): the three cameras from the device tree #164: noted. Whichever lands second gets one pmic_sub node with Pixel 9a (zumapro): the three cameras from the device tree #164's gpio child, ldo12s and this ldo15s, and both sets of pin groups. I'll do that rebase when the first is in.
  3. The message now cites the boot of this tree (7.3.0-rc6-omamobile-push1-gb533af3f1cbc). It says that boot came before the 3.3 V pin and the drive line, and that matching ran on the integration tree, which has the same node.

On the drive strength: stock's built DTBO (the vendor dtbo_a) has samsung,pin-drv = <0x00> on fp-rst, so ZUMA_PIN_DRV_X1 is 0. The pin group now sets <0> with a comment naming the constant. The DTB still builds. This hasn't booted again since these two changes; the next palmtop boot of this branch will include them. #101's three descriptions are fixed and it's rebased, so that dependency should clear soon.

@W4HO-ham
W4HO-ham force-pushed the tegu-dt-fingerprint branch from 6619a7e to a9b70ef Compare November 1, 2026 18:21
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham, for turning these round so quickly, and for taking the drive strength from stock's built DTBO rather than guessing.

I owe you a correction on my first point. I asked you to pin LDO15S at 3.3 V because "with min = max, the core sets 3.3 V before enabling it". That's wrong for this driver, and my wording is now in your comment and your commit message. #101's LDO ops (s2mpg14_ldo_ops) have get_voltage_sel but no set_voltage_sel, on purpose: the selectors stay firmware-owned. With regulator-min-microvolt = regulator-max-microvolt, machine_constraints_voltage() reads the current voltage and:

  • if LDO15S already reads 3.3 V (selector 60), writes nothing, so the node behaves exactly like the one you booted;
  • if it reads anything else, tries to set it, gets -EINVAL because there's no set op, and fails registration ("failed to apply 3300000-3300000uV constraint"). s2mps11's probe returns on the first failed regulator, so the whole sub-PMIC would go, and once Pixel 9a (zumapro): the three cameras from the device tree #164 is in, the cameras' LDO12S would go with it.

So the pin is only safe if the hand-off voltage is already 3.3 V. Could you check that? The boot of b533af3f1cbc had no voltage constraints on LDO15S, so the core simply reported what the selector holds. Either that boot's regulator_summary line for udfps-3v3, or cat /sys/class/regulator/regulator.*/microvolts next to the matching name on the next boot of this branch, answers it.

  • If it reads 3300000: keep the two lines. They write nothing and record stock's value. Please reword the comment and the message to say that: the selector is firmware-owned, it reads 3.3 V at hand-off, and the constraint makes the core refuse the rail if it ever doesn't.
  • If it reads anything else: please drop the two lines and go back to the node you booted. I'd rather not add voltage setting to mfd, regulator: the S2MPG15 sub-PMIC (Pixel 9a) and its LDOs #101 just for this.

Sorry for the extra round on this one. The drive-strength line (<0> with the constant named in the comment) is fine as it is.

The rest is as we agreed: this waits for #161, #101 and my #147, then a rebase onto omamobile without the merge commit (right now it doesn't merge onto today's omamobile, which is expected for a branch that still carries the old #96 copies), and one combined pmic_sub node with #164's, whichever lands second.

@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

No need to apologise, and thanks for checking the driver. It reads 3.3 V. On the palmtop's daily kernel, whose ldo15s has no voltage constraints, /sys/class/regulator/*/ for udfps-3v3 reads microvolts 3300000 with empty min_microvolts/max_microvolts. So nothing set it, and that's the firmware's selector (60). An earlier boot's regulator_summary had the same: udfps-3v3 enabled 3300000 uV.

So I kept the two lines and reworded both places to say what they do (head dd18680, only the comment and the message changed). The comment now says the selector is firmware-owned and reads 3.3 V at hand-off, and that min = max records stock's value and makes the core refuse the rail if it ever reads anything else. The message says the same, and that the S2MPG15 LDOs have no voltage setting. checkpatch is clean. The rebase onto omamobile without the merge commit comes once #147 is in, with the combined pmic_sub node if #164 is in first.

@W4HO-ham
W4HO-ham force-pushed the tegu-dt-fingerprint branch from a9b70ef to dd18680 Compare November 1, 2026 20:19
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham, for checking the hand-off voltage and for the clear write-up. A 3300000 µV reading with empty min_microvolts/max_microvolts on a kernel without the constraint is exactly what I needed. It's selector 60 (1.8 V + 60 × 25 mV, within LDO15S's 64 selectors). On today's omamobile, #101's s2mpg14_ldo_ops still has no set_voltage_sel, so the two lines write nothing. The new comment and message describe that correctly. The push changed only that comment and the message: the tree differs from the previous head in those four comment lines only.

So the node is settled. What's left is the order:

  1. My GNSS and fingerprint on the Pixel 7 Pro: bcm4775x and Goodix (curated 8/8) #147 lands first. The rebase then drops the Goodix binding and driver commits.
  2. Rebase onto omamobile without the merge commit. mfd, regulator: the S2MPG15 sub-PMIC (Pixel 9a) and its LDOs #101 is in now, and in a newer version than the copy this branch carries (it also has the GNSS LDOs), so let the rebase drop your copy and keep omamobile's. The gate shows conflicts in both S2MPG15 bindings, s2mps11.c and the board file, which is expected while the old copy is here.
  3. arm64: dts: exynos: google: zumapro-tegu: Add the NFC controller #105 lands before this, and it adds the same &gpa7 interrupt block (GIC SPI 36-43). When you rebase, keep its block, drop yours, and change the comment above it to name both users, for example "The NFC controller's interrupt (gpa7-5) and the fingerprint sensor's event line (gpa7-6)." Then drop "and gpa7's interrupts (GIC SPI 36-43, as stock)" from the message.
  4. The combined pmic_sub node with Pixel 9a (zumapro): the three cameras from the device tree #164, if Pixel 9a (zumapro): the three cameras from the device tree #164 goes first, as we agreed.

After that rebase I'll run the builds and the binding checks again.

Describe the Pixel 9a's Goodix under-display fingerprint sensor as
Google's GPL zumapro-tegu-udfps.dtsi has it: the event line on gpa7-6
(EINT, rising edge) and the reset on gpp1-0 (active low, its previous
state kept in power-down). Its SPI bus belongs to the secure world, so
the node is on no bus. The pin state touches only gpp1-0; the
touchscreen's reset is gpp1-1 in the same bank.

Its 3.3 V, S2MPG15 LDO15S, is always on, as on stock. It is off at
hand-off, and until it is on the trusted app reads chip id 0. This adds
the sub-PMIC and gpa7's interrupts (GIC SPI 36-43, as stock).

LDO15S's selector is firmware-owned (the S2MPG15 LDOs have no voltage
setting) and reads stock's 3.3 V (1.8 V + 60 x 25 mV) at hand-off, so
min = max writes nothing: it records stock's value, and the core
refuses the rail if it ever reads anything else. gpp1-0's drive is
stock's X1 (0).

Tested on the 9a with this tree (7.3.0-rc6-omamobile-push1-gb533af3f1cbc,
before the 3.3 V constraint and the drive line): goodix-fp binds from
the device tree on gpa7-6 with /dev/goodix_fp, and touch, keys and
haptics are unaffected. Matching through the trusted app ran on the
integration tree, which has the same node, and with no voltage
constraint there the rail reads 3300000 uV.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@W4HO-ham
W4HO-ham force-pushed the tegu-dt-fingerprint branch from dd18680 to 1267286 Compare November 9, 2026 00:13
@W4HO-ham

W4HO-ham commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto today's omamobile tip (1a9d1d4), now 1267286. The tip's own pmic-2 node (the AoC's sensor rails) and this PR's met in the same place; they are one node now, pmic_sub: pmic-2, with the tip's ldo5s/ldo7s and this PR's ldo15s. The block comment above the NFC and fingerprint pins is in the kernel's style now (*/ on its own line), which was the one checkpatch --strict warning. W=1 on zumapro-tegu.dtb: 0 warnings; checkpatch: clean.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. The rebase is clean: one commit on today's omamobile, the gate passes there (checkpatch quiet, the device trees with no new warnings), CI's dtbs_check is green, and the merged pmic_sub node keeps the AoC's LDO5S and LDO7S next to your LDO15S, as it should. The &gpa7 comment now names both users, thank you.

Two small things before it comes out of draft:

  1. The message still says "This adds the sub-PMIC and gpa7's interrupts (GIC SPI 36-43, as stock)." On today's base both are already there, so the commit adds LDO15S and the node's label. Please drop that sentence (the gpa7 part was in my 11-01 list).
  2. The test paragraph is from b533af3f1cbc, which had its own S2MPG15 copy and no AoC rails. Since the sub-PMIC now carries the AoC's rails too, a refused LDO15S would fail the whole s2mps11 probe and take the AoC's supplies with it. The hand-off reads 3.3 V, so it shouldn't happen, but could you boot this head once and add it to the message: regulator_summary showing udfps-3v3, sensor-3v3 and sensor-1v8, goodix-fp bound, and the AoC up as on your daily? The node comment's "makes the core refuse the rail" could say "the sub-PMIC" for the same reason.

On order: this and #164 both add to pmic_sub and &pinctrl_peric0 now, so whichever lands second keeps both sides (one node with the GPIO child and LDO5S, LDO7S, LDO12S and LDO15S, and both sets of pin groups). It also needs a small resolution against #193.

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