From 56856841716045820f6261b4edf4a7bd188af30b Mon Sep 17 00:00:00 2001 From: WJW Date: Wed, 2 Dec 2026 01:47:43 +0800 Subject: [PATCH] arm64: dts: apple: t8142-j704: Enable Touch ID sensor 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 (#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 --- arch/arm64/boot/dts/apple/t8142-j704.dts | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8142-j704.dts b/arch/arm64/boot/dts/apple/t8142-j704.dts index 3c6947a2b4a49..1dd92d8a9a0bb 100644 --- a/arch/arm64/boot/dts/apple/t8142-j704.dts +++ b/arch/arm64/boot/dts/apple/t8142-j704.dts @@ -329,3 +329,53 @@ #include "t8142-j704-hdmi.dtsi" #include "t8142-j704-audio.dtsi" #include "t8142-j704-usbc-display.dtsi" + +/* Touch ID uses SPI2, with power on NUB GPIO 36 and data ready on AP GPIO 200. */ +&pmgr { + ps_spi2: power-controller@440 { + compatible = "apple,t8142-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x440 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + power-domains = <&ps_spi_p>; + label = "spi2"; + }; +}; + +&{/soc} { + spi2: spi@3a5108000 { + compatible = "apple,t8142-spi", "apple,t8103-spi"; + reg = <0x3 0xa5108000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clkref>; + power-domains = <&ps_spi2>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + mesa: fingerprint@0 { + compatible = "apple,mesa-fingerprint"; + reg = <0>; + spi-max-frequency = <8000000>; + spi-cpol; + spi-cs-setup-delay-ns = <20>; + spi-cs-hold-delay-ns = <20>; + enable-gpios = <&pinctrl_nub 36 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <200 IRQ_TYPE_EDGE_RISING>; + /* Per-device files, built from the Mac's own factory records. */ + firmware-name = "apple/mesacal-j704.bin", "apple/msrk-j704.bin"; + status = "okay"; + }; + }; +}; + +/* Expose the sensor's two pins next to the ones sound uses. */ +&pinctrl_ap { + gpio-reserved-ranges = <0 100>, <101 49>, <152 48>, <201 23>; +}; + +&pinctrl_nub { + gpio-reserved-ranges = <0 18>, <19 17>, <37 3>; +};