Skip to content

arm64: dts: apple: t8122-j613-j615: describe the Touch ID data-ready line - #2678

Merged
RyanTheTide merged 1 commit into
mainfrom
airs-touchid/j615-mesa-drdy
Nov 25, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
airs-touchid/j615-mesa-drdy

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem. The J613/J615 (M3 MacBook Air) Touch ID sensor has a data-ready line, but the device tree leaves it out, so the SEP driver polls the sensor's SPI status every 2 ms whenever a capture is armed (enrolment, a login or unlock prompt waiting for a finger). On a J615 that is about 1450 spi2 interrupts a second for as long as the prompt is up.

Change. Describe the line on the shared J613/J615 &mesa node: AP GPIO 199, rising edge. The value comes from the J615 ADT (/arm-io/spi2/mesa, interrupts = <199 3> on gpio0). J713 (199) and J616c (116) carry the same encoding in their ADTs and are described as IRQ_TYPE_EDGE_RISING in our trees, where capture already runs on the interrupt. The T8122 SEP device tree test now checks the line instead of its absence. DT only, no driver change.

Testing. J615, default kernel 7.3.0-aurora-fleet77, the production Stage 2 with only this DTB change, default command line:

  • data-ready IRQ ... configured for interrupt capture, sensor: interrupt-driven capture; an enrolment opens and waits for a finger, and cancels cleanly.
  • spi2 interrupts while an enrolment waits 30 s with no finger: 1453/s polling → 16/s with the line (the 250 ms status backstop). Both go to 0 after the cancel.
  • One s2idle round (PMU RTC wake), then an enrolment again: it opens and the data-ready interrupt still fires.
  • Regression: 0 AVC, 0 failed units, no new kernel errors (the one extra line, a dwc3 genpd_prepare -11, comes from the s2idle and shows on earlier fleet77 s2idle boots too).
  • tools/aurora-sep/tests/test_t8122_sep.py: 4/4. dtc warnings unchanged on j613, j615, j613-25g83 and j615-25g83 (13 each).

Still to run. A fingered enrolment and match on the J615 (needs a person at the machine). No J613 in the lab; it shares this node and ADT value.

Related: #1596 (draft) adds the same J613 line from the J613 ADT, together with a driver change that drops polling. This PR is the DT half on its own, for J613 and J615 both.

Measurements and kit

Per-second spi2 (2a1108000.spi) interrupt deltas from /proc/interrupts, enrolment held 30 s with fprintd-enroll, nobody touching the sensor, same script on both boots:

boot enrolment opens (t=1 s) armed, mean t=2..30 s 10 s after cancel
default DTB (polling) 24.9k 1453/s 0
with the data-ready line 13.0k 16/s 0

The t=1 s burst is the sensor re-registration that opens every enrolment. A 40 s no-finger enrolment on a J713 (data-ready line already described) for comparison: data-ready interrupt 12 times, spi interrupts +2.0k in total.

Test boot: one aura-try one-shot of the J615 production Stage 2 with its embedded DTB swapped for one carrying only the two &mesa properties (interrupt-parent, interrupts); aura and U-Boot bytes identical (cmp). Kernel unchanged (fleet77).

…line

The J613/J615 Mesa sensor raises its data-ready line on AP GPIO 199. The
ADT's /arm-io/spi2/mesa node gives it as interrupts = <199 3> on gpio0,
the same encoding as J713 (199) and J616c (116), whose device trees
describe it as IRQ_TYPE_EDGE_RISING and capture on the interrupt.

Without the line the driver polls the SPI status every 2 ms while a
capture is armed. On a J615 waiting for a finger that is about 1450
spi2 interrupts a second; with the line described it is 16 a second,
the 250 ms status backstop.

Describe the line so the J613/J615 capture is interrupt driven like
the other Mesa sensors, and update the T8122 SEP device tree test.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looks good; approve once the fingered J615 row is in.

Checked: &mesa at arch/arm64/boot/dts/apple/t8122-j613-j615.dtsi:126-127 points at pinctrl_ap (t8122.dtsi:909, interrupt-controller, #interrupt-cells = <2>, 224 pins, so pin 199 is in range), the encoding matches the J713 node and the binding (apple,mesa-fingerprint.yaml:32, one item), and all four J613/J615 DTBs (plain and -25g83) pick it up through the shared dtsi. The test change at tools/aurora-sep/tests/test_t8122_sep.py:88-91 checks the phandle and both cells rather than just presence, which is the right strength.

HW row: J615, fleet77 + this DTB, default command line: one fingered enrolment and one match (fprintd-verify) with the data-ready IRQ count rising per touch and no fallback-to-polling line, then the same after one s2idle round; 0 AVC, 0 failed units, 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge-train adversarial review (MERGETRAIN-LINUX2) at 67b0890: NO BLOCKERS.

Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below.

Full review

#2678 arm64: dts: apple: t8122-j613-j615: describe the Touch ID data-ready line @67b0890b

VERDICT: NO BLOCKERS

What I checked:

  • arch/arm64/boot/dts/apple/t8122-j613-j615.dtsi:126-127: the line is on pinctrl_ap with 199 IRQ_TYPE_EDGE_RISING. pinctrl_ap (t8122.dtsi:909-928) has apple,npins = <224>, #interrupt-cells = <2> and is an interrupt controller, so pin 199 is in range. No other T8122 node uses pin 199 (grep of t8122*).
  • The driver path already exists. drivers/soc/apple/sensor_shim.c:712-716 uses sep_spi->irq when the SPI child has an interrupt. It requests the line IRQF_ONESHOT | IRQF_TRIGGER_RISING (:756), which matches the DT flag, so there is no trigger-type mismatch warning. The data-ready interrupt only completes a completion; the capture loop still confirms state over SPI (:687-691, :813-821). A wrong pin or polarity would therefore degrade to the 250 ms status backstop, not break capture. That keeps the blast radius small.
  • No new gates, params or delays. The pre-existing of_machine_is_compatible("apple,j414s") fallback (sensor_shim.c:717) is untouched and not reached here.

Nits:

  1. tools/aurora-sep/tests/test_t8122_sep.py:88 says "as on J713 and J616s", but the commit message says "J713 (199) and J616c (116)". Both t604x J614/J616 and t6041 J614c/J616c carry 116; pick one wording.
  2. The line is not wake-enabled. Under s2idle the IRQ core masks it and replays a latched edge on resume, so a stale "fired" can wake the capture loop once after resume. This is harmless (the status read gates it), but it is worth knowing when reading a post-resume trace.
  3. The base moved under this PR's measurements. arm64: dts: apple: t8122: SPI2 and SPI4 run from the 24 MHz reference, not 200 MHz #1598 (3f09f2d2, merged 2026-11-22) changed SPI2's input clock from clk_200m to clkref (t8122.dtsi, spi2 node). The real SPI2 clock goes from about 0.96 MHz to 8 MHz. The 1453/s → 16/s numbers and the enrolment-open check were taken on fleet77 with the old clock.

Missing rows:

  • J615, kernel and DTB from integration/aurora plus this PR (that is, with arm64: dts: apple: t8122: SPI2 and SPI4 run from the 24 MHz reference, not 200 MHz #1598's 8 MHz SPI2): enrolment opens, the data-ready IRQ count rises in /proc/interrupts, and polling stays off.
  • J615 fingered enrolment and match. This is the only row that proves the line is the real data-ready and not a pin that happens to toggle.
  • J613: none in the lab. It shares the node and ADT value.
  • 25G83 variants (j613-25g83, j615-25g83) inherit this; there is no boot on either.

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

Adversarial review at 67b0890b against pre-pr-checklist.md (§1–§6): 0 code/policy/attribution blockers (and all 8 CI checks are green); holding only for the remaining §5 hardware rows below.

Verification

  • arch/arm64/boot/dts/apple/t8122-j613-j615.dtsi:126-127 wires &mesa data-ready to pinctrl_ap pin 199, IRQ_TYPE_EDGE_RISING. pinctrl_ap (t8122.dtsi:910-922) has apple,npins = <224>, interrupt-controller, #interrupt-cells = <2>, and pin 199 has no conflicts across t8122*.dts*.
  • Matches Documentation/devicetree/bindings/input/apple,mesa-fingerprint.yaml:32-34,125-126 and drivers/soc/apple/sensor_shim.c:712-716,756-758 (IRQF_ONESHOT | IRQF_TRIGGER_RISING, no trigger mismatch).
  • tools/aurora-sep/tests/test_t8122_sep.py:88-91 checks both the pinctrl_ap phandle and <199 1> cells across all four Air DTBs (j613, j615, j613-25g83, j615-25g83).
  • §1–§4, §6: Pass (shared dtsi, default cmdline, ADT-derived GPIO, human-only commit metadata + Signed-off-by:, PR body Assisted-by:, clean naming).
  • Non-blocking nit: tools/aurora-sep/tests/test_t8122_sep.py:88 says "as on J713 and J616s" while the commit message says "J713 (199) and J616c (116)" (both J616s and J616c use 116 IRQ_TYPE_EDGE_RISING).

Remaining §5 HW rows before approval

  1. J615 fingered Touch ID enrolment + verification (fprintd-enroll + fprintd-verify) on current integration/aurora + this PR (which now includes #1598 / 3f09f2d2 switching spi2 from clk_200m to clkref ~8 MHz since the earlier fleet77 no-finger measurement), default command line: confirm the pinctrl_ap pin 199 data-ready IRQ count increments per touch in /proc/interrupts without falling back to polling, and repeat a match after an s2idle round.
  2. Regression counts on that run: 0 AVC denials, 0 failed units, 0 new kernel errors.

(J613 is not in the lab and shares the node/ADT value; -25g83 variants inherit the shared dtsi.)

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

Formal §1–§6 review at verified live head 67b0890bd3081e1006311a09c70016c5d43a1940 (live integration/aurora 0f111a0dc307, not superseded; all 8/8 live CI checks green: dt-checks, host-tests, source, rust-build, kunit, and all three DWC3/ATC build matrices).

Checklist Summary

  • §1 No model gating, §2 Production-ready, §3 Safety, §4 Attribution, §6 Naming: PASS (0 code/policy/attribution/naming/CI blockers).
    • arch/arm64/boot/dts/apple/t8122-j613-j615.dtsi:126-127 describes &mesa data-ready on pinctrl_ap pin 199, IRQ_TYPE_EDGE_RISING, matching the J615 ADT, apple,mesa-fingerprint.yaml, and drivers/soc/apple/sensor_shim.c (IRQF_ONESHOT | IRQF_TRIGGER_RISING). pinctrl_ap (t8122.dtsi) has apple,npins = <224> with no pin 199 conflicts.
    • tools/aurora-sep/tests/test_t8122_sep.py validates both the pinctrl_ap phandle and <199 1> cells across all four Air DTBs (j613, j615, j613-25g83, j615-25g83).
    • Commit 67b0890bd308 carries human author/committer (Ryan Murray) and human Signed-off-by: only.

Blocker (§5 Evidence)

  1. Fingered Touch ID enrolment/match on current integration/aurora + exact PR head missing: The existing J615 measurement was no-finger only and ran on older 7.3.0-aurora-fleet77 (before #1598 / 3f09f2d2 switched t8122.dtsi spi2 from clk_200m to clkref ~8 MHz). Before approval/merge, please post a J615 default-cmdline run on current integration/aurora + 67b0890bd308 proving:
    • Fingered fprintd-enroll and fprintd-verify succeed with the pinctrl_ap pin 199 data-ready IRQ count incrementing per touch in /proc/interrupts and no fallback to polling;
    • A repeat match after one s2idle cycle;
    • Regression counts: 0 SELinux denials, 0 failed units, and 0 new kernel errors.

Non-blocking nit

  • tools/aurora-sep/tests/test_t8122_sep.py:88 comment says "as on J713 and J616s" while the commit message says "J713 (199) and J616c (116)" (both J616s and J616c use 116).

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 67b0890b: not ready yet

Check Detail
CI at head ok 8 checks passed
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head no no line with the head SHA 67b0890b, a Mac and a result in the PR body or a comment
Conflicts ok not computed yet
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: area:platform

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

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

Verdict: FINISH, then merge at 67b0890bd308: the code is ready; it needs only a row at this head.

Blockers: none in the code. Missing row: the J615 run had no finger on the sensor and predates #1598, which moved spi2 to the ~8 MHz clkref. Needed: a J615 at this head on current main, with fprintd-enroll and fprintd-verify succeeding, the pin 199 data-ready count in /proc/interrupts going up with each touch (no fallback to polling), and one more match after an s2idle.

Checked: no Apple material, DT only, plus the test. The data-ready line is described on the shared J613/J615 dtsi. test_t8122_sep.py covers it, and CI is green. This replaces my earlier review.

Evidence

Read 67b0890b.

@DjDeveloperr
DjDeveloperr dismissed their stale review November 24, 2026 19:49

Superseded by the review at 67b0890

@github-actions github-actions Bot removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 24, 2026
@RyanTheTide
RyanTheTide merged commit 3777510 into main Nov 25, 2026
9 checks passed
@RyanTheTide
RyanTheTide deleted the airs-touchid/j615-mesa-drdy branch November 27, 2026 13:21
maralcbr added a commit to omacom/linux-aurora that referenced this pull request Dec 2, 2026
Follow aurora-silicon/linux main (integration/aurora no longer exists)
at 4a42f31, which brings in #3133 (T8112 DCP on firmware 27.2).

Retire, each merged upstream and in this intake:
  aurora-silicon/linux#2145 as 6f84f56
  aurora-silicon/linux#2150 as 15b1e2e
  aurora-silicon/linux#2152 as 8bd4942
  aurora-silicon/linux#2153 as a2801d4
  aurora-silicon/linux#2154 as 90d3f11
  aurora-silicon/linux#2156 as dff34de
  aurora-silicon/linux#2199 as d51160c
  aurora-silicon/linux#2147, closed in favour of #3114 (merged as
  e8d93e4, in this intake)
  j613-touchid-data-ready, superseded by aurora-silicon/linux#2678
  (merged as 3777510), which describes the same line for the J613
  and J615 in t8122-j613-j615.dtsi

Update remaining carries:
- #2146, #2148, #2149 and #2151 re-pinned to their main-merged PR heads
  (carried via merge = true).
- #2155 pinned to ad63582 (last reviewed commit before #2155
  rebased onto the post-4a42f3105002 IIO API change in #3473; adds the
  describe-by-role follow-up).
- #3490 (merged on integration/aurora-7.3 in #529) re-pinned cleanly to
  upstream 717a6ff..e6e8509, dropping the 00cbc67 rebase
  commit d98f2a8.
- #370 replaced by merged upstream
  aurora-silicon/linux#3770 (6b8d44f + 9dab09e, adding the D0
  sleep quiesce/resume fix for BCM4388 s2idle).
- #3607 now carries all three commits including KUnit tests in
  drivers/bluetooth/hci_bcm4377_test.c (present in 4a42f31).
- xart-pin-7.3 note updated (#486 open, #506 closed).

Based-on-work-by: Satya Benson <satya@benson.earth>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants