Skip to content

arm64: dts: apple: t6050-k114s: enable the Secure Enclave and Touch ID - #2115

Draft
chrisohearn wants to merge 1 commit into
aurora-silicon:mainfrom
chrisohearn:soc-apple-sep-admit-k114s
Draft

chrisohearn wants to merge 1 commit into
aurora-silicon:mainfrom
chrisohearn:soc-apple-sep-admit-k114s

Conversation

@chrisohearn

@chrisohearn chrisohearn commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What: Enable the Secure Enclave and Touch ID sensor in the K114s board tree. The SEP driver uses the T6050 profile through the SoC selection already in main (#2631).

Tested: The K114s DTB at aee6ef0f9434d builds and passes schema validation with zero diagnostics. Hardware testing at this head is pending.

Risk: One-way door, K114s only. SEP attach can provision the identity keybag, and enrollment and verification can update the xART root record shared with macOS. Reverting the board file disables the mailbox again. Shared storage changes persist.

Not yet: K114s cold-boot SEP and sensor readiness, fresh enrollment, enrolled-finger match, wrong-finger rejection, and the regression counts. Three deep sleeps with a first-try match and clean SEP, SPI and DART logs need a deep-sleep-capable K114s kernel. macOS Touch ID and unlock after Linux enrollment and the second T6050 Mac regression row are also pending.

Details

The K114s ADT describes the same SEP and sensor hardware as the J714s and K116s. The sep alias lets the boot loader reserve SEP firmware and add its manifests. The board enables the SEP mailbox and its power domain, marks the two fabric parents firmware-owned, and leaves SEP and its DART for the driver to enable.

SPI2 uses the 24 MHz reference. The fingerprint sensor runs at 8 MHz in mode 2, with NUB GPIO 21 for power and AP GPIO 138 for the data-ready interrupt. The board opens GPIO 138 in the reserved ranges and names the per-device calibration and root key files.

Evidence

make LLVM=1 ARCH=arm64 CHECK_DTBS=y apple/t6050-k114s.dtb passed on main 61c7b88aca91 and the candidate with Clang 23.1.3 and dtschema 2026.9. Direct dt-validate emitted no diagnostics on either DTB.

An earlier K114s run exercised SEP readiness and sensor binding with a local DT and a kernel carrying the SoC selection. Its enrolled identity survived reboot. The prepared trial substitutes the exact PR-head DTB in Aura Stage 2 and keeps the running r3f kernel, which also carries the SoC selection. Earlier K114s results

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T01:09:27.209620Z 2f5e9eb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chrisohearn added a commit to chrisohearn/omarchy-m5p-oled that referenced this pull request Nov 17, 2026
…176)

* Touch ID works on the K114s: trial, enrolment and PAM recorded (#49)

docs/r3-touchid.md records phases 3 to 7 of 2026-11-16: the unattended
trial boot, the read-only load, the backups (one off the Mac), the
promoted Touch ID Stage 2, the keybag (guard level 1, no xART write),
enrolment of the right index, match and no-match, the restore after a
reboot, and sudo, polkit and the lock screen through Omarchy's own PAM
setup. The upstream profile line is aurora-silicon/linux#2115. README
and the matrix row say working; macOS Touch ID is the owner's check at
the next macOS boot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Touch ID record: keep the macOS check open and claim only what was tested

Review of #176: phases 5 and 6 stay open for the macOS boot check, and
phase 6 says the enrolment was restored without re-enrolling. Only the
keybag creation left xART unwritten; enrolment and matching updated one
shared root record. sudo and the lock screen are owner-tested, polkit is
configured but untried. The undo runs as root and removes the new
polkit-1 file. The read-only check expects the 12 endpoints macOS lists
plus srep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for checking the K114s ADT so carefully, and for the read-only-first test sequence.

This adds apple,k114s to a list of board names in drivers/soc/apple/profile.rs:706-708. That works, but each new T6050 board then needs another patch. We select behaviour by a hardware or device-tree property rather than by the list of machines it was tested on, and here the device tree already describes the hardware: the apple,t6050 SoC compatible, plus the SEP mailbox and the fingerprint@0 sensor node on spi2. Could select() return the T6050 profile for apple,t6050 whenever those nodes are present, and take the sensor controller address from the DT node rather than the profile? A T6050 board without the nodes would still get -ENODEV, so nothing becomes fail-open.

The branch also needs a rebase. We can run no-regression rows on our other Macs if that helps.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A follow-up to the earlier note on the board list. We are changing select() so that the T6050 profile is picked by apple,t6050, and the device tree's SEP and sensor nodes decide whether anything binds. With it, adding apple,k114s to profile.rs is no longer needed, and the branch's conflict there goes away.

What the K114s still lacks at the current tip is the device tree: in t6050-k114s.dts the SEP mailbox, ps_sep and spi2 are disabled, there is no sep alias and no sensor node. So the change that brings Touch ID to the K114s is the follow-up you offered. Could this PR carry it instead of the profile line? That means the J714s block (t6050-j714s.dts:498-556: sep_mbox, ps_sep and the two firmware-owned fabric parents, ps_nub_gpio/nub_gpio0, ps_spi2, spi2 with fingerprint@0), the sep alias, pin 138 opened in gpio-reserved-ranges, and firmware-name = "apple/mesacal-k114s.bin", "apple/msrk-k114s.bin". Please rebase onto integration/aurora and drop the profile.rs hunk.

Your hardware results already cover most of the row. At the new head we would ask for:

  • cold boot: SEP ready, sensor registered;
  • fprintd-enroll, then fprintd-verify match and wrong-finger verify-no-match;
  • three deep sleeps, each followed by a first-try fprintd-verify match and no SEP, SPI or DART errors in dmesg.

Until that change is merged, keep the profile.rs line as a local commit for the test only. After that we will run no-regression rows on our A18 Pro (Neo) and M4 Pro machines.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A short follow-up: the change to pick the SEP profile by SoC is now #2311. With it, the apple,k114s line in profile.rs is no longer needed, so this PR can drop that hunk and carry the K114s SEP, spi2 and sensor device tree instead, as described above. The row at the new head is the same: cold-boot SEP ready and sensor registered, fprintd-enroll then match and wrong-finger verify-no-match, and three deep sleeps each followed by a first-try match with no SEP, SPI or DART errors. Testing on top of #2311 instead of a local profile commit is fine.

One more K114s row, for thermal (PMP): the ADT board-id and dram-vendor-id from the K114s. Once the pmp0 DT lands: the PMP probe log, then stress-ng --cpu 0 for 5 minutes, showing cpufreq capping as the fast-die sensor nears its trip.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The SoC-based profile choice mentioned above is now #2631 (#2311 was closed in its favour). Once it lands, the apple,k114s line in profile.rs is not needed; until then the branch conflicts only because apple,j716c was added to the same condition. Either way the K114s still needs its device tree (SEP mailbox, ps_sep, spi2 with fingerprint@0, the sep alias, pin 138 opened) before Touch ID can bind, so carrying that here in place of the profile hunk would keep the PR useful.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026

@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.

Verdict: HOLD at b5efdaffdcdc

Blockers:

  • drivers/soc/apple/profile.rs:471, drivers/soc/apple/profile.rs:706-708 (Merge conflict): Branch is dirty against main (mergeable: false) because main already updated T6050.name and select() for apple,j716c (50d4c943c0fd). Rebase onto current main.
  • drivers/soc/apple/profile.rs:706-708 (§1 No model gating): Adds apple,k114s to a per-board allowlist in select(). Per §1, selection must use hardware/DT properties rather than a per-board list. #2631 moves SEP profile selection to SoC-level matching (apple,t6050), where DT SEP and sensor nodes control binding; drop the profile.rs board-list hunk once #2631 lands (or stack on #2631) and carry the K114s DT enablement (sep_mbox, ps_sep, spi2/fingerprint@0, sep alias, GPIO 138 unreserved in arch/arm64/boot/dts/apple/t6050-k114s.dts) instead, as requested in the thread.
  • Commit b5efdaffdcdc and PR body (§4 No attribution): Commit b5efdaffdcdc carries Assisted-by and tool Co-Authored-By trailers, and the PR body includes tool/agent attribution text. Per §4, remove all non-human attribution from the commit message (keep human author and human Signed-off-by only) and from the PR body.
  • PR body (§5 Evidence): Hardware testing was run on an out-of-tree v272-11 kernel with separate DT nodes rather than at the exact PR head b5efdaffdcdc, and lacks the regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) and a no-regression row on another T6050 Mac. Re-run on the K114s at the updated PR head (cold boot, enroll/match/no-match, deep-sleep resume verify, regression counts) and include a no-regression row on another T6050 board.

Checked: Reviewed the 3-line diff in drivers/soc/apple/profile.rs, commit b5efdaffdcdc, PR metadata/body/comments, CI status, and mergeability against current main (arch/arm64/boot/dts/apple/t6050-k114s.dts and drivers/soc/apple/profile.rs) per pre-PR checklist §1–§6. No §2 (no new cmdline/module params or timing hacks), §3 (no hardcoded safety limits; inherits xart_guard: 1), or §6 (naming) issues found in the diff.

Evidence
  • PR state: OPEN, fork chrisohearn/linux:soc-apple-sep-admit-k114s -> main, headRefOid: b5efdaffdcdc0eaf8574a23c6e86af0df4cb85fe.
  • Mergeability: mergeable: false, mergeable_state: dirty (conflicts with main commit 50d4c943c0fd in drivers/soc/apple/profile.rs:472,707-709).
  • CI checks at b5efdaffdcdc: 7/7 passed (host-tests, source, rust-build, kunit, DWC3/ATC builtin-no-atc, DWC3/ATC modular-no-atc, DWC3/ATC builtin-modular-atc).
  • Checklist summary:
    • §1 Model gating: FAIL — per-board allowlist addition in drivers/soc/apple/profile.rs:706-708; #2631 (open) replaces per-board matching with SoC selection.
    • §2 Production-ready: PASS — no new parameters, sleeps, or hacks in the diff.
    • §3 Safety: PASS — inherits T6040 (xart_guard: 1), no hardcoded safety values.
    • §4 Clean-room / attribution: FAIL — non-human trailers in commit b5efdaffdcdc and attribution lines in the PR body.
    • §5 Evidence: FAIL — no hardware row at exact PR head b5efdaffdcdc, no regression counts, and no second T6050 Mac regression row.
    • §6 Naming: PASS — no prohibited terms in diff, commit, or PR body.

@github-actions github-actions Bot added changes-requested A reviewer requested changes (bot) merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026
@chrisohearn
chrisohearn marked this pull request as draft November 25, 2026 00:58
@chrisohearn
chrisohearn force-pushed the soc-apple-sep-admit-k114s branch from b5efdaf to 2f5e9eb Compare November 25, 2026 00:58
@chrisohearn
chrisohearn requested review from a team as code owners November 25, 2026 00:58
@chrisohearn chrisohearn changed the title soc: apple: sep: Admit the K114s to the T6050 profile arm64: dts: apple: t6050-k114s: enable the Secure Enclave and Touch ID Nov 25, 2026
@github-actions github-actions Bot removed changes-requested A reviewer requested changes (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 25, 2026
The K114s ADT describes the same SEP and Touch ID hardware as the
J714s and K116s. Add the SEP alias for the boot loader and enable the
mailbox and power domain, with the fabric parents firmware-owned.
The SEP driver selects the profile by SoC and enables SEP and its
DART when the mailbox is available.

Describe the fingerprint sensor on SPI2 with the K114s calibration
and root key filenames. Expose AP GPIO 138 for its data-ready
interrupt and keep the remaining AP GPIOs reserved.

Signed-off-by: Chris O'Hearn <[email protected]>
@chrisohearn
chrisohearn force-pushed the soc-apple-sep-admit-k114s branch from 2f5e9eb to aee6ef0 Compare November 26, 2026 03:50
@RyanTheTide

Copy link
Copy Markdown
Contributor

@chrisohearn checking open drafts today. To come out of draft, this still needs:

  • Review changes requested by @DjDeveloperr are still open.
  • Then a test run at the final head on a Mac with the hardware it touches, and mark it ready for review.

If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done.

@chrisohearn

Copy link
Copy Markdown
Contributor Author

K114s (Mac17,13, T6050) at aee6ef0f9434: PASS for SEP and sensor readiness, one reboot with this head's t6050-k114s.dtb as the tree. Not a cold boot.

  • Build: make LLVM=1 ARCH=arm64 CHECK_DTBS=y apple/t6050-k114s.dtb at this head, exit 0, dtschema 2026.9; 109,051 bytes, no schema diagnostics. The Stage 2 was the configured loader (Aura 1.0.0b15), this tree and the configured trailer, booted once through aura-try.
  • Kernel: aurora-silicon/linux main 4abf0f83c290 plus local K114s patches, which already carry the SoC-based SEP profile from soc: apple: sep: select the platform profile by SoC #2631. OS firmware 27.2. Kernel command line not the default (the same additions as the arm64: dts: apple: t6050-k114s: describe the NVRAM partition #3103 row).
  • SEP: apple_sep 502600000.sep: SEP platform profile: T6050/J714s, K116s, J716c, K114s, then ready in 1444 ms: 13 endpoints (cntl sbio scrd sse hdcp xars sks xarm hibe pnon skdl stac srep), key store open. The SEP DART 500b80000.iommu is bound to apple-dart, and SEP has an IOMMU group.
  • Sensor: apple-mesa spi0.0: sep sensor: bound, 8000000 Hz, mode 2 (CPOL=1 CPHA=0). fprintd sees one device, and the finger enrolled earlier on this Mac is still listed. Nothing was enrolled, deleted or verified on this boot.
  • Regression counts on the same boot, taken about 7 s into the boot, before startup had finished: 0 failed units (system and user), no new distinct error-priority kernel lines against the previous boot, no SEP, Mesa, SPI or DART error lines. spi_apple_qspi.read_only stayed Y.
  • Not checked: a cold boot (SEP and sensor readiness and the regression counts); a fresh enrollment, an enrolled-finger match and a wrong-finger rejection; three deep sleeps with a first-try match and clean SEP, SPI and DART logs (this kernel offers s2idle only); macOS Touch ID and unlock after a Linux enrollment; a second T6050 Mac. What the board file does not describe yet (panel DCP, sound, Wi-Fi) was absent, as expected.

The PR stays in draft until the cold-boot, enrollment and match rows are in.

@chrisohearn

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr thanks for the review at b5efdaffdcdc. At the current head aee6ef0f9434:

  1. Merge conflict: rebased onto main 61c7b88aca91. The branch is mergeable.
  2. §1 model gating: the profile.rs hunk is gone. soc: apple: sep: select the platform profile by SoC #2631 has merged, and SEP selection now comes from the SoC. The PR carries only the K114s device tree: the sep alias, sep_mbox, ps_sep, spi2 with fingerprint@0, and AP GPIO 138 opened in the reserved ranges.
  3. §4 attribution: the single commit has the human author and Signed-off-by only. The PR body has no tool or agent text.
  4. §5 evidence: the row above is at this head: one boot with this head's DTB as the tree, SEP ready with the T6050 profile, the sensor bound, regression counts (0 failed units, no new error-priority kernel lines), and schema validation clean.

Still open, and not something I can run on this Mac right now: a cold boot, a fresh enroll plus match and wrong-finger rejection, deep-sleep resumes (the K114s kernel offers s2idle only), and a no-regression row on a second T6050 Mac. If a reboot row with these SEP and sensor checks is not enough to come out of draft, the PR can stay a draft until those rows exist. I'm happy to re-test any later head on the K114s.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@chrisohearn the K114s SEP and Touch ID device tree is now part of #3376, which moves the J714s/J716c/K116s copies into one shared t6050-touchid.dtsi and adds it to K114s, K114c and K116c. It carries your K114s block (alias, sep_mbox, ps_sep, firmware-owned fabric parents, spi2 with fingerprint@0, pin 138). The pin list there is built on main's current K lists, which leave the jack and SD-reader pins open; this PR's <0 138>, <139 82> would reserve them again. Your K114s readiness evidence above is cited there. A row from your K114s at #3376's head would be welcome; if you're happy with it, this draft can close in its favour.

This branch has not been deployed

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

Labels

area:platform Area from CODEOWNERS (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants