Skip to content

mux: apple: display-crossbar: select the T6030 and T8140 flows by compatible - #2414

Closed
RyanTheTide wants to merge 1 commit into
mainfrom
hack/drm-board-gates2-a
Closed

RyanTheTide wants to merge 1 commit into
mainfrom
hack/drm-board-gates2-a

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Apple display crossbar driver (drivers/mux/apple-display-crossbar.c) chose two behaviours by the machine's root compatible instead of by the crossbar block:

  • apple_dpxbar_probe() (~1325) turned on the T6030 flow, where selecting an output only routes it and its link-up starts its clocks, when of_machine_is_compatible("apple,t6030"). This came from 6a6ee2a ("thunderbolt, phy, soc: apple: T6030 USB4/Thunderbolt, Type-C and DP tunnel support").
  • apple_dpxbar_set_t602x() (~381) kept the original T602x gate sequence on the physical DP output when of_machine_is_compatible("apple,j700"). In that sequence CROSSBAR_ATC_EN and CROSSBAR_DISPEXT_EN are not written, and teardown restores the read reset in FIFO_RD_PCLK1_EN. This came from aa41619 ("mux: apple: retain the physical J700 crossbar gate sequence").

Both are properties of the crossbar IP. The T6030 crossbars already carry "apple,t6030-display-crossbar", "apple,t6020-display-crossbar" in t6030.dtsi and the binding, but the driver only matched the fallback. The J700 crossbar is the T8140's, which t8140.dtsi described with the T6020 compatible alone.

Change

  • New match entry apple,t6030-display-crossbar: the T6020 data plus t6030_flow, which the T6041 and T8132 entries already use.
  • New match entry apple,t8140-display-crossbar: the T6020 data plus a new dpphy_t602x_gates flag. A comment on the struct says what the flag does.
  • The binding lists apple,t8140-display-crossbar with the T6020 fallback, and t8140.dtsi gives dpxbar0 that compatible.
  • Neither machine check is left in the driver.

Why every SoC is safe: the T6030 crossbars (J514s, J516s) and the one T8140 crossbar (J700) get the flows they had. Every other crossbar node matches the same entry as before: T8103, T8112, T6000, T6020, T6031, T8122, T6041, T8132, T8142 and T6050. The other users of the T6020 compatible in drm/apple, display-gate and the J613 gate check of_device_is_compatible() on the fallback, which is still there. A J700 booted with an older DTB that lacks the new compatible gets the T6020 sequence on its DP output. The DTB ships with the kernel.

Original work: Chris Kearney (T6030 flow) and the J700 gate sequence commit; this only changes how each is selected.

Testing

  • arm64 LLVM W=1 build of drivers/mux/apple-display-crossbar.o: no warnings.
  • t8140-j700.dtb and t6030-j514s.dtb build. The J700 dtb has compatible = "apple,t8140-display-crossbar", "apple,t6020-display-crossbar" on display-crossbar@40b04c000.
  • Host tests dcpext26-crossbar-union, tiled-split and t6030-wiring pass.
  • No KUnit suite covers this driver.

Still to run

  • Neo (T8140 J700): plug a DP/HDMI display into the physical DP output (DPPHY). Expect apple-display-crossbar 40b04c000.display-crossbar: Switched dpphy to dispext... and a picture, the same as on the base kernel. A/B against the base kernel: picture on 5/5 hotplugs on both.
  • M3 Pro (J514s/J516s, if one is available): a Thunderbolt dock display comes up as on the base kernel (t6030_dpin path).
  • J616s, M1 Pro and M2 are not affected.
Hardware rows (combined test kernel, 2026-11-20)

This change was booted in a combined test kernel: integration/aurora 0abc2f3 plus the open gate-sweep drafts plus this and the related drafts (7.3.0-aurora-hk2/pwr1/hk3). It ran once on each lab Mac (M1 Pro J316s, M2 J413, J616s, Neo J700) and was compared against the production kernel on the same Mac, using the same silent row script:

  • kernel errors, failed units and SELinux denials;
  • microphone capture byte counts;
  • camera frame counts;
  • USB speeds;
  • panel brightness steps;
  • every retry/refusal message these drafts touch;
  • 2 s2idle cycles on M1 Pro, M2 and J616s.

M1 Pro, M2 and J616s matched production on every row, apart from the new counters and lines the drafts add. The Neo row found the old-DTB display regression that #2358's follow-up commit fixes.

This PR: Neo (hk3, production DTB without the new crossbar compatible): boot-clean, internal panel up, 0 kernel errors. The physical DP output row with an attached display is still to run.

…patible

Two crossbar behaviours were selected by the root compatible:

 - the T6030 flow, where selecting an output only routes it and its
   link-up starts its clocks, by of_machine_is_compatible("apple,t6030")
   in apple_dpxbar_probe();
 - the original T602x gate sequence of the physical DP output (no
   CROSSBAR_ATC_EN/CROSSBAR_DISPEXT_EN writes, read reset restored in
   FIFO_RD_PCLK1_EN), by of_machine_is_compatible("apple,j700") in
   apple_dpxbar_set_t602x().

Both follow the crossbar block, not the board. The T6030 crossbars are
already "apple,t6030-display-crossbar", "apple,t6020-display-crossbar"
in t6030.dtsi and the binding, but the driver only matched the fallback.
The J700 crossbar is the T8140's, which t8140.dtsi described with the
T6020 compatible alone.

Add match entries for both: apple,t6030-display-crossbar (the T6020 data
with t6030_flow, as the T6041 and T8132 entries already set it) and
apple,t8140-display-crossbar (the T6020 data with a new
dpphy_t602x_gates flag), list the T8140 compatible in the binding with
the T6020 fallback, and give the T8140 node its own compatible.

No functional change on the in-tree device trees: the T6030 crossbars
and the one T8140 (J700) crossbar get the flows they had; every other
crossbar matches the same entry as before. A J700 booted with an older
DTB, which lacks the T8140 compatible, gets the T6020 sequence on its
DP output; the DTB ships with the kernel.

Fixes: aa41619 ("mux: apple: retain the physical J700 crossbar gate sequence")
Fixes: 6a6ee2a ("thunderbolt, phy, soc: apple: T6030 USB4/Thunderbolt, Type-C and DP tunnel support")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 1.

  1. drivers/mux/apple-display-crossbar.c:389 and arch/arm64/boot/dts/apple/t8140.dtsi:773: the J700 DP output sequence now depends on a compatible that the DTB the Neo boots today does not carry. The Neo takes its DTB from Stage 2, not from the kernel package. The Neo row in this PR ran on exactly that DTB ("production DTB without the new crossbar compatible"). On that DTB, dpphy_t602x_gates is false, so apple_dpxbar_set_t602x() writes CROSSBAR_ATC_EN and CROSSBAR_DISPEXT_EN on MUX_DPPHY (lines 508 and 516) and tears down through T602X_FIFO_RD_PCLK2_EN (line 456). aa41619 removed that sequence from the J700 DP output. So the old-DTB case the commit message calls harmless brings back the behaviour that commit fixed, on the only Mac that has this output. The boot-clean row could not see this because no display was on the DP output. Fix: land the t8140.dtsi compatible in a Stage 2 DTB refresh first. Until then, keep today's selection as the fallback for a node that has only the T6020 compatible, with a comment that it goes away once the refreshed DTB has shipped. Or show the DP output working on the old DTB with the new sequence (5/5 hotplugs) and say so in the commit message.

The rest checks out. apple_dpxbar_hw_t6030 and _t8140 copy the T6020 entry (n_mux, n_ufp, ops) and add only their one flag. of_match_node() ranks by the node's compatible order, so the new entries win over the fallback. The T6030 compatible has been in t6030.dtsi since 6604bc1 (10-06), so J514s/J516s DTBs keep t6030_dpin. The T6031, T8122 and other crossbars still match the entries they matched before. The two of_device_is_compatible(..., "apple,t6020-display-crossbar") users (dcp-fabric.c:2245, j613_dcp_activate.c:417) still find the fallback.

HW row: Neo J700 on this head, once with the production Stage 2 DTB and once with the refreshed DTB. A DP/HDMI display on the physical DP output shows a picture on 5/5 hotplugs and logs "Switched dpphy to dispext", A/B against the base kernel, 0 AVC, 0 failed units, no new kernel errors. Add an M3 Pro J514s/J516s Thunderbolt dock display row if one is available.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Both machine checks are still in apple-display-crossbar.c on integration/aurora (4a17f73): apple,j700 in apple_dpxbar_set_t602x() and apple,t6030 in probe. The branch merges onto that tip without conflicts. The open blocker from the review stands: a J700 whose boot DTB lacks apple,t8140-display-crossbar would get the plain T6020 gate sequence on its DP output, which aa41619 removed for that machine. It needs either the T8140 compatible shipped in the boot DTB first with today's selection kept as the fallback for a T6020-only node, or a row showing the DP output works 5/5 hotplugs on the old DTB. Hardware rows still to run: J700 physical DP output on old and refreshed DTB, and an M3 Pro Thunderbolt dock display if one is available.

RyanTheTide added a commit that referenced this pull request Nov 25, 2026
…0 and T8140 flows by compatible

Folds #2414 into this PR unchanged.

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

Copy link
Copy Markdown
Contributor Author

Folded into #2457, which now carries this PR's commits unchanged (merge commit); review continues there.

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