Skip to content

arm64: dts: apple: t6050-j716c: Add the Touch ID sensor - #2162

Open
erikwb wants to merge 1 commit into
integration/aurorafrom
j716c/dts-touchid
Open

erikwb wants to merge 1 commit into
integration/aurorafrom
j716c/dts-touchid

Conversation

@erikwb

@erikwb erikwb commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The J716c wires the Touch ID sensor the same way as the J714s (spi2 at 0x505108000, 8 MHz, chip select 0, power on NUB GPIO 21, data ready on AP GPIO 138). Without a device tree node, apple_sep fell back to the T6020 controller address, found nothing, and never registered the sensor.

Change

Adds the Touch ID sensor to arch/arm64/boot/dts/apple/t6050-j716c.dts, matching 4b9a1718b27f for the J714s:

  • Enable nub_gpio0, spi2, and their power states.
  • Add the fingerprint@0 node with the J714s timing and SPI mode, naming apple/mesacal-j716c.bin and apple/msrk-j716c.bin.
  • Expose AP GPIO 138 in pinctrl_ap's gpio-reserved-ranges (<0 80>, <81 57>, <139 82>, leaving only 80 and 138 open while 112 stays reserved).

Testing

On a J716c (M5 Max, 128 GB), 27.2 stub, with integration/aurora (b3445d72) plus this patch (identical DT diff), #1956/#1957, and #2144:

  • Cold boot: apple_sep ready in 1454 ms (1459 ms after reboot) and apple-mesa spi0.0: sep sensor: bound, 8000000 Hz, mode 2 (CPOL=1 CPHA=0) with no bring-up retries.
  • Enrol and verify: fprintd-enroll -f right-index-finger completed; fprintd-verify matched the enrolled finger (verify-match) and rejected another finger (verify-no-match).
  • Three deep sleeps (rtcwake -m mem -s 30, mem_sleep=deep): each resume logged the enclave is back from its sleep request with no SEP, SPI, or DART errors, and fprintd-verify matched after every wake (first touch on sleeps 1 and 3, second touch on sleep 2).
  • Reboot persistence: fprintd-list retained right-index-finger (identity count 1 after Catacomb restore with sensor registered) and fprintd-verify matched on the first touch.
  • make CHECK_DTBS=y apple/t6050-j716c.dtb apple/t6050-j714s.dtb with dtschema: no warnings on any touched node (spi2, nub_gpio0, pinctrl_ap, fingerprint@0). scripts/checkpatch.pl: 0 errors, 0 warnings.

Still to run

  • Full §5 fleet regression check (explicit 0 SELinux denials, 0 failed units, and 0 new kernel errors check on J716c; J716c runs Arch ARM without SELinux enabled, so SELinux denials are N/A on that host).

Assisted-by: LLM (Anthropic:Claude, Google:Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for this. The node matches the J714s block (spi2 at 0x505108000, 8 MHz, mode 2, NUB GPIO 21 power, AP GPIO 138 data ready), the reserved-range split opens only pin 138, and the J716c is already admitted to the T6050 SEP profile at the current tip. So this PR only needs the device tree. We are also moving the SEP profile choice to the SoC compatible, after which no T6050 machine needs a board admit.

The code looks good to us. What is still missing is the user-visible half of the hardware row. On the J716c, at this PR's head (with #1956/#1957 if you need them):

  1. Cold boot: dmesg | grep -i sep shows the SEP ready and the sensor registered, with no bring-up retries.
  2. fprintd-enroll for one finger completes, then fprintd-verify with that finger gives verify-match, and with another finger verify-no-match.
  3. Three deep sleeps (rtcwake -m mem -s 30, or lid close/open). After each resume, fprintd-verify matches on the first try, and dmesg has no SEP, SPI or DART errors.
  4. After a reboot the enrolled finger is still listed (fprintd-list) and still matches.

Please paste the fprintd-verify output for each step and the resume dmesg lines. With that row we can run no-regression rows on our A18 Pro (Neo) and M4 Pro machines. The change is board-local, so we expect no change there.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A short follow-up: the SoC-based SEP profile choice we mentioned is now #2311. With it, the J716c no longer needs its entry in the profile list, and this PR stays device tree only. The J716c row we asked for is unchanged (cold-boot SEP lines, enrol plus match and no-match, three deep sleeps each followed by a first-try match, and the finger still listed and matching after a reboot).

@erikwb

erikwb commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Claude Opus 5.5 responding on behalf of erikwb

J716c row. The kernel was 7.3.0 from integration/aurora b3445d7 plus this PR's head ff2b720, with #1956/#1957 and #2144, on the 27.2 stub. There was no enrolment beforehand.

  1. Boot: apple_sep ... ready in 1454 ms: 12 endpoints (... sbio ...), key store open, then apple-mesa spi0.0: sep sensor: bound, 8000000 Hz, mode 2 (CPOL=1 CPHA=0). There were no bring-up retries. After a reboot, the same came up in 1459 ms.

  2. Enrol and verify:

    • fprintd-enroll -f right-index-finger ended in enroll-completed.
    • With that finger, fprintd-verify gave verify-match on the second touch; the first was verify-no-match.
    • With another finger it gave verify-no-match.
    • Before any of this, verify answered verify-password-required-after-boot until a password authentication through system-auth armed it (Touch ID: armed by the first password since this boot). That needs a root PAM path such as pkexec. Neither passwordless sudo nor su (which uses pam_unix directly on Arch) does it.
  3. Three deep sleeps (rtcwake -m mem -s 30, mem_sleep deep, each about 37 s on the wall clock). Each resume logged the enclave is back from its sleep request, and dmesg had no SEP, SPI or DART errors.

    Sleep fprintd-verify
    1 verify-match on the first touch
    2 verify-no-match on the first touch, then verify-match
    3 verify-match on the first touch
  4. Reboot: fprintd-list still lists right-index-finger. The enclave restored it (identity count 1 after Catacomb restore with sensor registered). After the password, verify-match came on the first touch.

The first-touch match rate was 2/3 after sleep, and about the same before any sleep. Each miss was a clean capture that the enclave scored as no match (enclave answered user -1), with no sensor or transport error. It looks like match quality from a short enrolment, not something the resume breaks.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of ff2b7209 against the pre-PR checklist.

Checklist summary

  • DT / Code / CI: 0 code blockers.
    • arch/arm64/boot/dts/apple/t6050-j716c.dts: &pinctrl_ap gpio-reserved-ranges = <0 80>, <81 57>, <139 82>; splits <81 140> cleanly (81 + 57 = 138, 139 + 82 = 221), exposing only AP GPIO 138 while keeping pin 112 and all other unused pins reserved.
    • &ps_nub_gpio, &nub_gpio0, &ps_spi2, and &spi2 / mesa: fingerprint@0 match t6050-j714s.dts (with board-specific apple/mesacal-j716c.bin and apple/msrk-j716c.bin per-device factory firmware names), and all referenced labels exist in t6050-peripherals.dtsi (spi2 is enabled for T6050_J716C, nub_gpio0 has 61 pins).
    • dt-checks and host-tests are both green.
  • §1–§3, §6: Pass.
  • §4 (Attribution): 1 blocker below.
  • §5 (Evidence): J716c Touch ID boot, enroll/verify, 3x deep sleep (rtcwake -m mem -s 30), and reboot persistence are verified on ff2b7209cb26 (no SEP/SPI/DART errors). Please also confirm 0 SELinux denials, 0 failed units, and 0 new kernel errors overall for full §5 completeness.

Blocker

  1. §4 Attribution in commit message: Commit ff2b7209cb26 contains Developed with Claude Code. in the commit body. Per §4 of the pre-PR checklist, commits must carry human identity and a human Signed-off-by: only (no AI attribution lines or trailers in commits). Please amend the commit to remove Developed with Claude Code. (keeping the DT diff identical) and replace the PR body footer (🤖 Generated with [Claude Code]...) with a plain Assisted-by: line at the end of the PR body.

Assisted-by: LLM (Gemini 4 Neon)

The J716c ADT wires the Mesa sensor as on the J714s: sensor-id 0x3356 on
spi2 at 0x505108000, 8 MHz, chip select 0, power on NUB GPIO 21
(function-mesa_pwr) and data ready on AP GPIO 138. The device tree did
not describe it, so apple_sep fell back to the T6020 controller address,
found nothing there and never registered the sensor.

Enable nub-gpio0, spi2 and their power states and add the fingerprint
node with the J714s timing and SPI mode, naming the J716c calibration
and root-key files. Expose AP GPIO 138: while it was reserved, gpiolib
would have refused the data-ready interrupt's mapping.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb

erikwb commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Gemini 4 Neon responding on behalf of erikwb

Fixed the §4 attribution blocker in 92d43be3161f:

  • Amended the commit message to remove Developed with Claude Code., keeping the t6050-j716c.dts diff byte-for-byte identical to ff2b7209cb26 (git diff ff2b7209cb26 is empty) with only Signed-off-by: Erik Bourget <erik@ebourget.net>.
  • Updated the PR body to replace the Generated with footer with a plain Assisted-by: line and folded the J716c enroll/verify/sleep/reboot results into the Testing section.
  • Re-verified scripts/checkpatch.pl (0 errors, 0 warnings) and make CHECK_DTBS=y apple/t6050-j716c.dtb apple/t6050-j714s.dtb (no warnings on any touched node).
  • Regarding §5 regression counts: the J716c Touch ID boot/sleep/reboot run had no SEP, SPI, or DART errors, and J716c runs Arch ARM without SELinux enabled (so SELinux denials are N/A locally); an explicit 0 failed units / full-dmesg 0 new kernel errors capture was not saved during that run and is noted under "Still to run".

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the J716c row. It covers everything we asked for: the SEP comes up with no retries, enrolment and match/no-match work, the finger still matches after each of the three deep sleeps with no SEP, SPI or DART errors, and it persists across a reboot. A 2/3 first-touch rate with clean captures looks like enrolment quality to us, not a resume problem.

92d43be only changes the commit message: same tree (2d55af36) and parent as ff2b720, so the row applies to it unchanged. Nothing more from us.

Assisted-by: LLM (Claude:Opus 5.5)

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.

3 participants