Skip to content

arm64: dts: apple: t8103: wire USB4 DP-IN AIC interrupts - #3220

Merged
RyanTheTide merged 2 commits into
mainfrom
fix/t8103-usb4-dpin-irqs
Nov 28, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
fix/t8103-usb4-dpin-irqs

Conversation

@erikwb

@erikwb erikwb commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What: Wire the dpin0 and dpin1 AIC interrupts (807/808 on usb4_0_acio, 887/888 on usb4_1_acio) in t8103.dtsi so USB4 DP-IN uses interrupts instead of the 20 ms polling timer fallback.
Tested: J313 (M1 Air, T8103) in fleet candidate 5509a254a6bd (main fcb124279183 plus the unchanged heads 038ab73f52a6 (#3220), 5c89fbdf4ddc (#3221), 2b1bab104938 (#3297), 4b09f0691c2d (#3300), d3cf4ca61518 (#3329), b8530d17c96b (#3332), 262e263dae4c (#3333) and 77114190bfb4 (#3274), merged without conflicts), default command line, the J313 device tree built from the candidate on the default Stage 2 (1.0.0b17-gf5ddfff2) as a one-shot aura-try, kernel installed next to the default and removed afterwards, the Mac docked (Thunderbolt 5 dock with Ethernet and a 3840x2160@120 external display on dcpext): all 4 dpin0/dpin1 AIC IRQs are registered in /proc/interrupts (381ac0000.cio-dpin0/-dpin1 on 807/808, 501ac0000.cio-dpin0/-dpin1 on 887/888) with 0 spurious (/proc/irq/N/spurious: count 0 unhandled 0) at boot and after every sleep; deep S2R x2 and s2idle resume (see Evidence for the one run that hung in s2idle); the dock's display is routed through dpin0 of usb4_1 (display routed to Thunderbolt DP tunnel dpin0, rebuilt after each deep sleep) and the counters of both controllers stayed 0 through 3 DPMS cycles, 2 deep sleeps and an s2idle; 0 failed units, 0 AppArmor denials. Earlier run at 857b0abe13f3 (before conflict-free main merge 038ab73f52a6) also registered all 4 IRQs with 0 spurious interrupts and passed s2idle/deep S2R.
Risk: two-way door · T8103 Macs (M1 Air/Pro/mini/iMac).
Not yet: a DP-IN hotplug (display or dock connect/disconnect) counted by dpin0/dpin1: the dock stayed attached for the whole J313 pass, so none was exercised and the counters stayed 0.

Details

The interrupt numbers and IRQ_TYPE_LEVEL_HIGH flags match the existing DP-IN interrupt assignments on T8103 (t8103-peripherals.dtsi: 807/808 for atc0_dpin0/atc0_dpin1, 887/888 for atc1_dpin0/atc1_dpin1) and the ACIO DT binding (Documentation/devicetree/bindings/thunderbolt/apple,t8103-usb4-acio.yaml: dpin0, dpin1). Without them, drivers/thunderbolt/apple.c falls back to a 20 ms polling timer (APPLE_DPIN_POLL_MS) while docked.

Evidence

Wire the dpin0 and dpin1 AIC level-high interrupts (807/808 on
usb4_0_acio and 887/888 on usb4_1_acio) matching the existing DP-IN
interrupt assignments on T8103. Without these interrupts, the USB4
host interface falls back to a 20 ms polling timer while docked.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team as code owners November 26, 2026 09:39
@erikwb
erikwb requested review from LiamRay11 and maralcbr November 26, 2026 09:40

@RyanTheTide RyanTheTide 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: MERGE at 857b0abe13f3 once CI is green

Blockers: none.

Checked: this is t8103.dtsi, the shared SoC file, so every T8103 board gets it. There's no per-board copy. Both ACIO nodes gain interrupt-parent = <&aic>, two level-high AIC lines and interrupt-names = "dpin0", "dpin1" as the binding names them. The driver keeps its 20 ms poll as the fallback when they're absent, so a wrong line would only bring the poll back, with nothing breaking. The row at this head: J313, default cmdline, all 4 IRQs registered, 0 spurious, s2idle + deep pass.

Non-blocking: as your Not yet says, a docked DP-IN hot-plug that shows those counters move would complete the evidence. That can follow as a row on the PR after merge.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at 038ab73f: ready to merge

Check Detail
CI at head ok 4 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at 038ab73f
Conflicts ok none
PR text ok Risk: two-way · T8103 Macs (M1 Air/Pro/mini/iMac).

Areas: area:platform
Merge: gh pr merge 3220 --merge (Owners and Core through the bypass: add --admin).

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

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) ci-failing A check failed at the PR head (bot) and removed ready-to-merge Meets the merge policy: merge it (bot) ci-failing A check failed at the PR head (bot) labels Nov 26, 2026
@erikwb

erikwb commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

@RyanTheTide Commit 038ab73f52a6 is a conflict-free merge of main (b14959b819cf) onto 857b0abe13f3 with no diff to arch/arm64/boot/dts/apple/t8103.dtsi or drivers/thunderbolt/.

The failing host-tests check at 038ab73f52a6 (run 45822722351) was CANCELLED 15 seconds into tools/asahi/run-host-tests.py rather than failing a test; dt-checks, pr-text, and readiness all passed at 038ab73f52a6. Local verification at 038ab73f52a6 passed checkpatch.pl --strict (0 errors, 0 warnings, 0 checks on 857b0abe13f3), dt_binding_check (apple,t8103-usb4-acio.yaml), CHECK_DTBS=y across all five T8103 DTBs (t8103-j313.dtb, t8103-j293.dtb, t8103-j274.dtb, t8103-j456.dtb, t8103-j457.dtb), and tools/asahi/run-host-tests.py targeted runs (--only usb4 1/1, --only hardware-defaults 1/1).

J313 (M1 Air) at 038ab73f52a6 in fleet candidate 5509a254a6bd, default command line, docked: all 4 dpin0/dpin1 AIC IRQs registered in /proc/interrupts (807/808 on 381ac0000.cio, 887/888 on 501ac0000.cio) with 0 spurious interrupts, deep S2R x2 and s2idle resumed in the clean runs, 0 failed units, 0 AppArmor denials. The counters of both USB4 controllers stayed 0 while docked (no DP-IN event occurred through 3 DPMS cycles, 2 deep sleeps and an s2idle; no dock hotplug was possible), so a counted interrupt remains under **Not yet:**. One full run hung in s2idle and was reset by the watchdog; it did not reproduce and is not attributed to a PR (details in the PR body).

@RyanTheTide
RyanTheTide deleted the fix/t8103-usb4-dpin-irqs branch November 28, 2026 02:02
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) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants