Skip to content

soc: apple: sep: Touch ID lines from DT only; alias the SEP on the M2 desktops - #2256

Closed
RyanTheTide wants to merge 2 commits into
integration/aurorafrom
spec12/sep-m2
Closed

RyanTheTide wants to merge 2 commits into
integration/aurorafrom
spec12/sep-m2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On apple,j414s only, 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 no sep alias, so the driver can never attach on them. The SEP node is disabled in t8112.dtsi and t602x-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 from enable-gpios (or the J700 SMC rails) and data-ready from the node's interrupt, on every board. t602x-j414-j416.dtsi already describes the same two lines for J414s.
  • sensor.rs: remove the power-source value that only the fallback produced.
  • Add the sep alias to J473, J474s and J475c.
  • Add a comment at the SEP node: it stays disabled because apple_sep enables it and its DART at module load (warm attach).

Testing

  • make W=1 drivers/soc/apple/ builds, with no warnings in the touched files.
  • I built 13 M1/M2 DTBs before and after. The only change is the new alias on J473, J474s and J475c. All other boards decompile to identical source, including the J413, J414s/c, J416s/c and J316s.

Still to run

  • M2 J413 hardware row: apple_sep ... ready, "power line from the device node", /dev/sep-bio, then a Touch ID match.
  • M1 Pro J316s hardware row: the same checks; no change is expected.
  • J414s/J416s and the M2 desktops need board owners.
Why the SEP node ships disabled on M2

On T8112 and T602x the SEP is already running when Linux starts. When apple_sep loads, it picks the SoC profile, sets the DART window and enables sep_dart and 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 the sep alias 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) describes enable-gpios = <&pinctrl_ap 122 GPIO_ACTIVE_HIGH> and interrupts = <121 IRQ_TYPE_EDGE_RISING>, and pinctrl_ap is pinctrl@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_sep is 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)

RyanTheTide and others added 2 commits November 19, 2026 22:35
…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 RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J473 hardware row for the sep = &sep DTS hunk, on the macOS 27.2 (26B123) stub and Fedora kernel 7.3.0-40.fc44.aurora.aarch64.

Boot SEP handoff Linux result
Existing DTB Stage 2 reports FDT: sep alias not found in devtree. Both boot manifests are absent. apple_sep refuses warm attach and aurora-sep.service fails.
One-shot with the alias Stage 2 publishes the SEP firmware reservation and both boot manifests. apple_sep binds, discovers 7 endpoints in 18 messages, and aurora-sep.service succeeds.

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.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

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.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Replaced by #2802: the same changes with the commit trailers fixed, on the current integration/aurora.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant