From ff2b7209cb268d55e5e066e5872c38982337a799 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Tue, 17 Nov 2026 11:21:30 -0500 Subject: [PATCH] arm64: dts: apple: t6050-j716c: Add the Touch ID sensor 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. Developed with Claude Code. Signed-off-by: Erik Bourget --- arch/arm64/boot/dts/apple/t6050-j716c.dts | 42 +++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-j716c.dts b/arch/arm64/boot/dts/apple/t6050-j716c.dts index 8fdea5242027b..68895b2cc7f20 100644 --- a/arch/arm64/boot/dts/apple/t6050-j716c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j716c.dts @@ -176,11 +176,12 @@ /* * Pin 112's register (0x29c0001c0) takes an SError when read, so only the pins a node - * here names are exposed: 80 (PCIe port 0's PERST#, ADT pci-bridge0 function-perst). + * here names are exposed: 80 (PCIe port 0's PERST#, ADT pci-bridge0 function-perst) and + * 138 (the Touch ID sensor's data-ready line). * A reserved line cannot be requested, so a node that names a new pin opens it here too. */ &pinctrl_ap { - gpio-reserved-ranges = <0 80>, <81 140>; + gpio-reserved-ranges = <0 80>, <81 57>, <139 82>; }; /* This board's SMC fan and power keys are not yet checked */ @@ -246,6 +247,43 @@ 63 2e 00 06 02 69 4f 53 00 00 00 00]; }; +/* + * Touch ID (ADT spi2/mesa), wired as on the J714s: the Mesa sensor (sensor-id + * 0x3356) at 8 MHz on chip select 0, powered by NUB GPIO 21 (function-mesa_pwr), + * data ready on AP GPIO 138. The controller's clock (ADT clock-ids 451) is the + * 24 MHz reference. + */ +&ps_nub_gpio { + status = "okay"; +}; + +&nub_gpio0 { + status = "okay"; +}; + +&ps_spi2 { + status = "okay"; +}; + +&spi2 { + clocks = <&clkref>; + 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 = <&nub_gpio0 21 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <138 IRQ_TYPE_EDGE_RISING>; + /* Per-device factory data from this Mac's own iBoot system container */ + firmware-name = "apple/mesacal-j716c.bin", "apple/msrk-j716c.bin"; + }; +}; + #include "t6050-j716c-isp.dtsi" #include "t6050-j716c-gpu-panel.dtsi"