Skip to content

arm64: dts: apple: t8142-j704: Enable Touch ID sensor - #3823

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
rjianwei:feat/j704-touchid
Dec 2, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
rjianwei:feat/j704-touchid

Conversation

@rjianwei

@rjianwei rjianwei commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What: Add the SPI2 controller (ps_spi2, spi@3a5108000) and Mesa Touch ID fingerprint sensor node (apple,mesa-fingerprint, NUB GPIO 36 power, AP GPIO 200 data-ready IRQ, apple/mesacal-j704.bin and apple/msrk-j704.bin) to t8142-j704.dts, exposing the two sensor GPIOs in pinctrl_ap and pinctrl_nub.
Tested: J704 MacBook Pro 14-inch M5 at 56856841: PASS — apple-mesa spi0.0 binds at 8 MHz (CPOL=1 CPHA=0), aurora-touchid-setup rebuilds mesacal-j704.bin and msrk-j704.bin from factory data, aurora-sep-ready activates Touch ID, fprintd-enroll + fprintd-verify match enrolled identity in the Secure Enclave with persisted template update, checkpatch.pl --strict 0 errors / 0 warnings / 0 checks.
Risk: two-way · M5 J704 (T8142) only; zero impact on other Macs.
Not yet: Long-term Touch ID match verification across multiple deep sleep cycles on J704; requires SEP enabled (#3791) to activate /dev/sep-bio.

Details
  • Matches t8142-j813.dts and t8142-j815.dts:
    • ps_spi2: power-controller@440 under &pmgr (parent <&ps_spi_p>).
    • spi2: spi@3a5108000 (AIC_IRQ 1241, &clkref, &ps_spi2).
    • mesa: fingerprint@0 (apple,mesa-fingerprint, 8 MHz, spi-cpol, 20 ns CS setup/hold, enable-gpios = <&pinctrl_nub 36 GPIO_ACTIVE_HIGH>, interrupts = <200 IRQ_TYPE_EDGE_RISING>, firmware-name = "apple/mesacal-j704.bin", "apple/msrk-j704.bin").
    • Updates pinctrl_ap and pinctrl_nub gpio-reserved-ranges to expose AP GPIO 200 and NUB GPIO 36 alongside the existing audio pins.
Evidence

Tested on MacBook Pro (14-inch, M5, 24 GB, apple,j704) running macOS 27.2 stub, Aura Stage 2 (1.0.0b17-g378497cf), and Arch Linux ARM (7.3.0-j704-s2r+ with #3782 + #3791 + this commit):

  • apple-mesa spi0.0: sep sensor: CS timing 20 ns programmed in hardware
  • apple-mesa spi0.0: sep sensor: bound, 8000000 Hz, mode 2 (CPOL=1 CPHA=0)
  • aurora-sep-sensor-present: exit 0
  • aurora-sep-ready: rebuilt apple/mesacal-j704.bin and apple/msrk-j704.bin via aurora-touchid-setup.service, reported Touch ID is restored
  • fprintd-enroll: user 1000 now has 1 enrolled identity in the enclave
  • fprintd-verify: enclave matched identity ... (host index present), unlock policy after the match: satisfied true, template update persisted (user, then master)
  • scripts/checkpatch.pl --strict --git upstream/main..HEAD: 0 errors, 0 warnings, 0 checks.

Add the SPI2 controller (ps_spi2, spi@3a5108000) and Mesa Touch ID
fingerprint sensor node (apple,mesa-fingerprint, NUB GPIO 36 power,
AP GPIO 200 data-ready IRQ, per-device apple/mesacal-j704.bin and
apple/msrk-j704.bin) to t8142-j704.dts, matching t8142-j813.dts and
t8142-j815.dts.

Expose AP GPIO 200 and NUB GPIO 36 in pinctrl_ap and pinctrl_nub
gpio-reserved-ranges alongside the existing audio pins.

Verified on MacBook Pro 14-inch (M5 / J704) with SEP enabled (aurora-silicon#3791):
apple-mesa binds on spi0.0 at 8 MHz, aurora-touchid-setup builds
mesacal-j704.bin and msrk-j704.bin from factory data, aurora-sep-ready
activates Touch ID, and fprintd-enroll + fprintd-verify succeed with
enclave identity match and persisted template update.

Signed-off-by: WJW <rjianwei@gmail.com>
@rjianwei
rjianwei requested review from a team as code owners December 1, 2026 17:49
@rjianwei
rjianwei requested review from Acelogic and maralcbr December 1, 2026 17:49
@rjianwei

rjianwei commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Note on Deep S2R interaction: on J704 with #3782 + #3791 + this commit, pm_test=devices and pm_test=core both pass cleanly, and Touch ID enrollment survives reboot (Touch ID: restored 1 enrolled identity/identities; enrolment survived reboot), but a real hardware Deep S2R cycle (echo mem > /sys/power/state) did not wake on this combined DTB. Investigating whether this is caused by spi2/apple-mesa across hardware sleep or by omitting &mcc (#1847) from the combined test DTB; will report back once isolated.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at 56856841: not ready yet

Check Detail
CI at head ok 5 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 56856841
Conflicts ok not computed yet
PR text ok Risk: two-way · M5 J704 (T8142) only; zero impact on other Macs.

Areas: area:bringup

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@rjianwei

rjianwei commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Update after A/B DTB isolation on J704: this PR does not break Deep S2R.

The failed wake was caused by building the test DTB without ps_pmp { apple,always-on; } from #1847 (t8142-j704-peripherals.dtsi). When rebuilt identically with #1847 (ps_pmp apple,always-on, actuator, &mcc) + #3782 + #3791 + #3823 (apple-mesa bound at 8 MHz), real hardware Deep S2R (echo mem > /sys/power/state) wakes cleanly from the built-in keyboard (back from sleep, boot object resumes 0 -> 1, wake source: MTP.DOCK.CHANNELS.AP0.IRQ, apple_sep and apple_pmp resume cleanly), and post-wake Touch ID lock-screen unlock also succeeds (enclave matched identity ..., unlock policy after the match: satisfied true, template update persisted (user, then master)).

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

Reviewed 5685684. The SPI2 power domain, controller and sensor node match J813/J815, and the new reserved ranges expose exactly AP GPIO 200 and NUB GPIO 36 next to the audio pins from t8142-j813-audio.dtsi. The exact-head J704 row covers bind, enroll/verify and, with #1847 present, a clean deep-sleep wake.

@DjDeveloperr
DjDeveloperr merged commit 971fa22 into aurora-silicon:main Dec 2, 2026
6 checks passed
RyanTheTide pushed a commit that referenced this pull request Dec 2, 2026
In dcp_s2r_restart_done(), dcp_fabric_hdmi_reinit() was gated on
dcp->external_native (apple,t6030-dcpext). On fixed-HDMI external
pipelines that are not external_native (such as T8142 J704 dcpext1
driving atcphy2 and dpxbar2), deep sleep drops the PHY common power
domain and crossbar state behind genpd's back, causing
atcphy_resume_noirq() to mark pd_was_off so the next mux update restores
the PHY.

Because dcp_s2r_restart_done() only re-asserted the converter power GPIOs
without calling dcp_fabric_hdmi_reinit(), atcphy2 and dpxbar2 stayed
unconfigured after deep sleep and dcp_fixed_hdmi_reconnect() timed out
with firmware link fault 22/24 (-110).

Allow dcp_fixed_hdmi_reinit_locked() whenever dcp->fixed_phy and
dcp->hdmi_hpd are present, and call dcp_fabric_hdmi_reinit() from
dcp_s2r_restart_done() for any fixed-PHY HDMI pipeline. Leave the
non-S2R dcp_resume() caller gated on dcp->external_native so s2idle
behavior on other platforms is unchanged.

Tested on MacBook Pro (14-inch, M5, 24 GB, apple,j704) running macOS 27.2
stub with #1847 + #3782 + #3791 + #3823:
- Before: HDMI (3aae00000.dcp, 3840x2160@60) worked on cold boot, but
  failed after deep sleep with DPTXPort link fault 22/24 and
  'HDMI DPTX connect failed: -110'.
- After: 'HDMI: setting up the output again (after deep sleep)' runs on
  wake; 3aae00000.dcp reconnects immediately with 0 link faults and
  restores 3840x2160@60 alongside eDP-1.

Signed-off-by: WJW <rjianwei@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants