Repository navigation
soc: apple: sep: Touch ID lines from DT only; alias the SEP on the M2 desktops - #2256
RyanTheTide wants to merge 2 commits into
Conversation
…e only The sensor shim had a board fallback: on a machine compatible with apple,j414s whose sensor node carried no power GPIO, it took line 122 of /soc/pinctrl@39b028000 for power, and on one with no node interrupt it took line 121 of the same controller for data-ready. Every other board had to describe both lines in its sensor node. The tree now describes them on J414s too: t602x-j414-j416.dtsi gives the J414s, J414c, J416s and J416c sensor enable-gpios = <&pinctrl_ap 122> and interrupts = <121 IRQ_TYPE_EDGE_RISING> on pinctrl_ap, which is pinctrl@39b028000. Those are the same two lines, so the fallback never runs on an in-tree J414s DTB. Every M1 and M2 laptop DT (J293, J313, J314s/c, J316s/c, J413, J415, J493, J414s/c, J416s/c) describes the power line in its node. Drop the board check and the fixed lines. Power comes from enable-gpios (or the J700 SMC rails), data-ready from the node's interrupt via spi->irq, on every board alike. Drop the chip-line power source from sensor.rs, which only that path produced. Fixes: f9fc10a ("soc: apple: restrict the fixed power-GPIO fallback to j414s") Fixes: bece4b1 ("soc: apple: sep: optional interrupt-driven fingerprint capture") Suggested-by: Diljit Singh <dj@aurorasilicon.org> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SEP node is disabled in t8112.dtsi and t602x-die0.dtsi on every board, laptops included. That is the warm-attach contract of apple_sep: on these SoCs the SEP is already running when Linux starts, and the driver enables the SEP node and sep_dart with a changeset at module load, after it has picked the SoC's profile and before the DART probes. The running M2 Air (J413) shows it: "SEP DART changeset applied", "SEP node enabled", then "ready ... 12 endpoints". Say so at the node, so the disabled status does not read as a missing enable. What a board must provide is the sep alias: m1n1 finds the SEP through it to add the sepfw region and the local-policy and iBoot manifests, and the warm registration refuses to attach without the manifests. The M2 laptops have it; the Mac mini (J473, J474s) and the Mac Studio M2 Max (J475c) have a SEP and a profile (T8112, T6020/T6021) but no alias, so the driver could never attach there (key store, Magic Keyboard Touch ID). Add it. These boards have no built-in sensor and leave the mesa node disabled. The M2 Ultra boards (J475d, J180d) get no alias: the driver has no T6022 profile, so it would only reserve memory for nothing. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RyanTheTide
left a comment
There was a problem hiding this comment.
Follow-up worth folding in before this leaves draft: with the sep alias on J473, J474s and J475c, apple_sep's module-load changeset also enables the Touch ID sensor child and its SPI controller on machines that have no built-in sensor. The sensor then refuses to start ("no power GPIO"), which is harmless but probes an SPI bus that nothing is wired to. Enabling the sensor only when the board describes it (for example, a sep-sensor child the board marks okay, or the presence of enable-gpios on it) would keep the desktops to the enclave alone, with no SPI probe.
|
J473 hardware row for the
The one-shot kept the same kernel, Stage 2 executable, and U-Boot payload. The embedded DTB changed only by the alias. SELinux stayed Enforcing with 0 AVCs and 0 failed units on the trial. |
|
The J473 alias row is in. Still needed: the J413 and J316s Touch ID rows (power line from the device node, /dev/sep-bio, a match), enabling the sensor child and its SPI controller only where the board describes a sensor, and both commits (b6d2a9b, 3191f94) re-committed with a human Signed-off-by only. |
|
Replaced by #2802: the same changes with the commit trailers fixed, on the current integration/aurora. |
Problem
On
apple,j414sonly, the Touch ID sensor shim falls back to fixed power and data-ready lines. Every other board has to describe these lines in its device tree. The Mac mini (J473, J474s) and the Mac Studio M2 Max (J475c) have a SEP and a driver profile but nosepalias, so the driver can never attach on them. The SEP node is disabled int8112.dtsiandt602x-die0.dtsi, and nothing in the tree says why, so it reads like a missing enable.Change
sensor_shim.c: remove the J414s fallback. Power now comes fromenable-gpios(or the J700 SMC rails) and data-ready from the node's interrupt, on every board.t602x-j414-j416.dtsialready describes the same two lines for J414s.sensor.rs: remove the power-source value that only the fallback produced.sepalias to J473, J474s and J475c.apple_sepenables it and its DART at module load (warm attach).Testing
make W=1 drivers/soc/apple/builds, with no warnings in the touched files.Still to run
apple_sep ... ready, "power line from the device node",/dev/sep-bio, then a Touch ID match.Why the SEP node ships disabled on M2
On T8112 and T602x the SEP is already running when Linux starts. When
apple_seploads, it picks the SoC profile, sets the DART window and enablessep_dartand the SEP node with an OF changeset (dt.rs). The J413 on the current fleet kernel logs "SEP DART changeset applied", "SEP node enabled", then "ready in 3117 ms: 12 endpoints". The boot loader DTB on that machine is byte-identical to the kernel's, where the node is disabled. m1n1 finds the SEP through thesepalias to add the sepfw region and the local-policy and iBoot manifests. The warm registration refuses to attach without those manifests, so the alias is what a board must provide.Old gate and why the change is safe
The gate was added in f9fc10a ("soc: apple: restrict the fixed power-GPIO fallback to j414s") and bece4b1 ("soc: apple: sep: optional interrupt-driven fingerprint capture"). It took lines 122 and 121 of
/soc/pinctrl@39b028000. The J414 to J416 DT (2b5d006) describesenable-gpios = <&pinctrl_ap 122 GPIO_ACTIVE_HIGH>andinterrupts = <121 IRQ_TYPE_EDGE_RISING>, andpinctrl_apispinctrl@39b028000. These are the same lines, so J414s behaves the same. Every M1/M2 laptop DT (J293, J313, J314s/c, J316s/c, J413, J415, J493, J414s/c, J416s/c) describes the power line in its sensor node.The alias only makes m1n1 reserve the SEP's own firmware region and copy two manifests.
apple_sepis not autoloaded on M2 (its node is disabled, and the packaging blacklists it), so a desktop's SEP is touched only when the module is loaded on purpose. The desktops have no built-in sensor and their mesa node stays disabled. J475d and J180d (T6022) get no alias because the driver has no T6022 profile.The sensor shim and its interrupt capture were written by Diljit Singh. The J414 to J416 sensor DT is by Chris Kearney.
Assisted-by: LLM (Claude:Opus 5.5)