Repository navigation
phy: apple: atc, mux: display-crossbar: select tunnel clocks and crossbar flows by compatible, retry only an owed SuperSpeed power-on - #2457
RyanTheTide wants to merge 12 commits into
Conversation
…owed atcphy_mux_update_to() hands every USB-side failure to atcphy_usb3_port_retry(), also a failure to look up the root hub or to take the port down. When no port was held off, nothing is owed: the retry work only takes the controller, xHCI and root hub locks five times over about three seconds, which waits for any enumeration in progress, and if the lookup keeps failing it ends in "SuperSpeed port left off" for a port that was never off. The same happens for a port held off once its host or root hub is gone (-ENODEV, -ESHUTDOWN): no retry can bring that port back, and the next host powers the ports of its root hubs itself as it starts, where atcphy_usb3_set_mode() drops the debt. Schedule a retry only for a port that is still held off, and not for a host that is gone. What is left is the case the retry was added for: a power-on request to a running root hub that failed for want of memory, a failed runtime resume, or a controller or hub driver not bound yet. Nothing signals when such a request would succeed, so the bounded backoff stays, and each failed power-on is still logged as it happens. Document what is retried and why. Fixes: 5f5dc5f ("phy: apple: atc: Retry a SuperSpeed port power-on that a mux update owes") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
… compatibles
The T6030 display paths were selected by the root compatible
(of_machine_is_compatible("apple,t6030")):
- dcp-fabric.c: the tunnel pixel clock sources a route may use
(dcp_route_tunnel_clock_blocked(), dcp_route_clock_rate(),
dcp_tunnel_set_rate()) and the explicit crossbar link-up of a direct
output (dcp_direct_crossbar_link());
- atc.c: the T8122-generation tunnel clock (apple_atc_tunnel_t8122_clock())
and the matching stop before a mode change (atcphy_configure()).
What these follow is hardware: the T6030 display crossbars, where a
selected output is only routed until its link is brought up and only
external sources 0 and 2 reach the ATC PHY's tunnel pixel clocks, and
the T6030 ATC PHY, which clocks both DP IN outputs from its own AUSPLL
tunnel clock. Every display processor behind those crossbars is an
apple,t6030-dcp or apple,t6030-dcpext, and every such PHY an
apple,t6030-atcphy.
Select them by those compatibles, through match data: a t6030_fabric
flag for the two T6030 processors, read by dcp_is_t6030_fabric(), and a
t8122_tunnel_clock flag for the PHY, set in a new apple,t6030-atcphy
entry (the T8122 PHY data plus the flag) and in the T8132 PHY data. The
PHY's mode change reads the same flag; a T8132 PHY never reaches that
path (atcphy_configure_t8132()), so it is the condition it had.
No functional change on any in-tree device tree: the T6030 machines
(J514s, J516s) carry exactly these compatibles, and no other SoC does
(T6031/T6034 use apple,t6031-*, T8122 apple,t8122-*). Whether the T8122
and T6031 PHYs, of the same generation, want the same tunnel clock
sequence is not known and is not changed here.
The host fixtures that replay these functions model the match data the
way they modelled the machine check, and the ATC USB3 host test now
resolves the new apple,t6030-atcphy entry.
Fixes: 6a6ee2a ("thunderbolt, phy, soc: apple: T6030 USB4/Thunderbolt, Type-C and DP tunnel support")
Fixes: 9e03c19 ("drm/apple: reserve the T6030 HDMI processor with source-aware tunnel clocks")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…s unused The PHY host fixtures in phy.py define of_machine_is_compatible() for the ATC functions they extract. Since the T6030 tunnel clock stop in atcphy_configure() reads the PHY's match data instead of the machine, no extracted function calls the mock any more, and the units fail to build under -Werror=unused-function. Mark the two mocks unused, as the fixtures do for other optional stubs. Fixes: 6cb4c3e ("drm/apple, phy: apple: atc: select the T6030 display fabric by its IP compatibles") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…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>
…atible
The DP tunnel pixel clock sequence of a T8103-generation PHY was picked
by the root compatible: apple_atc_tunnel_is_t600x() (apple,t6000 or
apple,t6001) and apple_atc_tunnel_is_t8103_style() (apple,t8103,
apple,t8112 or T600x). A T8103-style PHY feeds both DP IN adapters from
one AUSPLL pixel clock; a T600x one also runs PCLK2 and the DPRX clock
and is opened before the first rate request; every other PHY took the
per-DP IN T602x sequence.
Which of these a PHY needs is a property of the PHY: the T8103 and
T8112 PHYs ("apple,t8103-atcphy", the T8112 one through its fallback),
the T600x PHY ("apple,t6000-atcphy") and the T602x PHY
("apple,t6020-atcphy") all share the T8103 register generation and match
data today. Give the T600x and T602x PHYs their own match entries (the
T8103 data, which they get now through the fallback) and say in the
match data which tunnel clock they have: tunnel_t8103_clock for the
T8103 entry and T600x, tunnel_dprx_clock for T600x only.
apple_atc_dp_tunnel_open() now answers -EOPNOTSUPP for a PHY of another
driver before it looks at the match data, as it did on every machine
but T6000/T6001.
No functional change on T8103, T8112, T6000, T6001 and T602x. T6002
(M1 Ultra), whose PHYs are the same apple,t6000-atcphy blocks
(t600x-dieX.dtsi) but whose root compatible was not in the list, now
gets the T600x sequence instead of the T602x one; there the T602x path
refused every rate with -EOPNOTSUPP, as T6002 has no T602x tunnel
wiring (apple_atc_t602x_qualified()).
The ATC USB3 host test resolves the two new entries.
Fixes: 49fa065 ("phy: apple: atc: run the t8103 tunnel clock sequence on t600x")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
When atcphy_common_restore() cannot set a USB3 mode up again after a sleep in place, it falls back to USB2 and warns "USB2 for now", saying that the mux update after the wake tries the mode again. That second attempt is atcphy_sleep_ss_up(), which logs its result at debug level only: if it fails too, the port stays at USB2 until the next Type-C event, and the log has nothing beyond the first warning to say so. Warn when atcphy_sleep_ss_up() fails, and say in the fallback's comment and message which path applies the mode again, and that after a power cycle outside a sleep in place only the next Type-C event does. Why the set-up can fail after the sleep is not known yet; that is tracked in #2314. The sleep path is Diljit Singh's, from commit d9b438c ("arm64: apple: support coordinated suspend-to-RAM on T8140"). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…nnector wiring The per-DP IN tunnel pixel clock of the T602X PHY (atc_tunnel_set_t602x()) was admitted by three checks in atc-tunnel.h: - apple_atc_t602x_qualified(): the root compatible is apple,t6020 or apple,t6021, read in apple_atc_tunnel_wiring() at probe; - apple_atc_t602x_core_valid(): the PHY is an apple,t6020-atcphy whose core registers start at 0x703000000, 0xb03000000 or 0xf03000000 and are at least 0x7048 bytes long; - the PHY's connector is wired to both DP IN adapters of its router (apple_dp_tunnel_dual_stream()), or -EINVAL instead of -EOPNOTSUPP if some other connector is. The address list comes from Oliver Lukschander's first T602X tunnel clock, commit 14f86a8 ("phy: apple: atc: add DisplayPort tunnel clock support for USB4/TBT"), as "a recognized Type-C core address". On J414/J416, the only T602X boards whose display routes reach the DP IN adapters, atcphy0-2 (those three addresses) serve the Type-C ports and atcphy3 (0x1303000000) drives the HDMI port. Chris Kearney's commit c30adcc ("thunderbolt: apple: Qualify display tunnels by connector wiring") then added the connector wiring, which says the same from the device tree: atcphy3 there has no Type-C connector, so it has no dual-stream wiring, and neither has any connector of the T602X desktops (J474/J475, T6022). The address list was kept only to keep the -EINVAL. The root check stood for "this PHY has a clock per DP IN", which is a property of the PHY: every apple,t6020-atcphy (atcphy0-3 of every T602X die) has it, and the PHYs of other SoCs that reach this path (T8122, T6031, T8140 and later) do not; they reached it only because they are neither T8103- nor T6030-style. Say it in the match data: a tunnel_dpin_clocks flag in the apple,t6020-atcphy entry added by commit e583b4e ("phy: apple: atc: select the T8103 and T600x tunnel clocks by PHY compatible"), read at probe instead of the root compatible, and admit a rate only for such a PHY whose connector has the dual-stream wiring. The address list, the scan of the other connectors and tunnel_routes_present go. So does the core size check: every atcphy core is 0x4c000 bytes, and the lane setup of every mode change (atcphy_configure_lanes()) already writes LN1_AUSPMA_RX_TOP at 0x10000, past the highest tunnel clock register (ACIOPHY_DP_PCLK_STAT at 0x7044), so a PHY in the USB4 mode the clock requires has that much. No change in which PHYs get a tunnel clock on any in-tree device tree: atcphy0-2 of J414s/J414c/J416s/J416c as before, nothing elsewhere. The J414/J416 atcphy3, to which no caller routes a tunnel, now answers -EOPNOTSUPP instead of -EINVAL. KUnit checks the gate and which tunnel clock each PHY compatible selects. Fixes: c30adcc ("thunderbolt: apple: Qualify display tunnels by connector wiring") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Looks good; approve once #2415 has landed, this is rebased onto it, and the M2 Pro/Max owner row has run. What I checked in the top commit (71e7424):
Nit: HW row: on an M2 Pro/Max laptop (J414s/J416s/J414c/J416c), on this head, put a display behind a Thunderbolt dock on each of the three USB-C ports. Each should light with Assisted-by: LLM (Claude:Opus 5.5) |
Conflicts: dcp-fabric.c (dcp_direct_crossbar_link: keep dcp_is_t6030_fabric() plus integration's dcp_t6041_ext_v27()), dcpext26-crossbar-union-tests.py (extract both dcp_t6041_ext_v27 and dcp_is_t6030_fabric). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
No conflicts: integration/aurora comes in through the updated hack/drm-board-gates-b (81af464), merged cleanly. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
No conflicts: integration/aurora comes in through the updated hack/drm-board-gates2-b (10ccffe), merged cleanly. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Status 12-05: parked. A merge of main (f02bd68) conflicts in 9 files: dcp-fabric.c, dcp.c, apple-display-crossbar.c (3 hunks), atc.c (3), atc-tunnel.h, atc-tunnel-test.c and three host tests. Main reworked the same paths since this branch: |
|
Second-pass assessment 12-05 against main @ef8a1bf8 (merge-base d1b022d, 11-22). Stays PARKED; nothing pushed. The goal (select by compatible/match data, not the machine) still stands: main still has every machine gate this PR removes, and added more. Mapping onto main:
So this is a rewrite of ~330 lines across atc.c, the crossbar, dcp-fabric.c and dcp.c, touching M1 Pro/M2/M3 Pro/Neo display routing; not small enough to do blind. Rows after the redo: M3 Pro (J514s/J516s) dock display on each of the 3 USB-C ports (HDMI unchanged), boot regression on M1 Pro, M2, J616s and Neo. |
What: phy: apple: atc, mux: display-crossbar: select tunnel clocks and crossbar flows by compatible, retry only an owed SuperSpeed power-on. This PR now carries these drafts as one feature (merge commits, the commits themselves unchanged):
Tested: each part as tested on its own PR (folded bodies below; no hardware row on this head yet). Combined with current main (ba29027) together with the other folds of 11-25: full arm64 build (Image, modules, dtbs; fleet89 config, clang 22, rustc 1.97.1) clean.
Risk: two-way · M1/M2 Pro/Max, M3 Pro, Neo (ATC, display crossbar)
Not yet: dock/USB-C display rows on M1 Pro (J316s) and M2 (J413) and a Neo crossbar row on this head.
#2457 original description
Stacked on #2415 (
hack/drm-board-gates2-b), whoseapple,t6020-atcphymatch entry this uses; review only the top commit. Merge #2415 first.Problem
The T602X (M2 Pro/Max) DP tunnel pixel clock in
drivers/phy/apple/atc.cwas admitted by checks indrivers/phy/apple/atc-tunnel.hthat do not describe the hardware:apple_atc_t602x_qualified()(atc-tunnel.h:9) read the root (machine) compatible,apple,t6020orapple,t6021, at probe (apple_atc_tunnel_wiring()).apple_atc_t602x_core_valid()(atc-tunnel.h:15) accepted only PHYs whose core registers start at 0x703000000, 0xb03000000 or 0xf03000000, and were at least 0x7048 bytes long.Both came in with Oliver Lukschander's first T602X tunnel clock (14f86a8, "a recognized Type-C core address", then gated to
apple,j416s) and were kept by Chris Kearney's c30adcc, which added the real qualification: the PHY's Type-C connector must be wired to both DP IN adapters of its router (apple_dp_tunnel_dual_stream()). The address list stood for "atcphy0-2 of J414/J416, not atcphy3", because on those boards atcphy3 drives the HDMI port. The connector wiring already says that: atcphy3 has no Type-C connector there. The list was kept only so that atcphy3 answered -EINVAL instead of -EOPNOTSUPP. The root check stood for "this PHY has a clock per DP IN adapter", which is a property of the PHY block.Change
tunnel_dpin_clocksflag in the match data ofapple,t6020-atcphy(the entry from phy: apple: atc: select the T8103 and T600x tunnel clocks by PHY compatible #2415) says the PHY has the per-DP IN clock (atc_tunnel_set_t602x()). Probe reads it instead of the root compatible.apple_atc_dp_tunnel_rate()admits a T602X-style rate only if the PHY has that flag and its connector has the dual-stream wiring (apple_atc_dpin_clock_gate()). Otherwise it returns -EOPNOTSUPP.tunnel_routes_presentare removed. The size check is removed too. Every atcphy core is 0x4c000 bytes. The lane setup of every mode change (atcphy_configure_lanes()) already writesLN1_AUSPMA_RX_TOPat 0x10000, beyond the highest tunnel clock register (ACIOPHY_DP_PCLK_STAT, 0x7044).No device tree or binding change is needed. The distinguishing property (the
typecN-dpin0/typecN-dpin1crossbar controls plus twoport@3endpoints, or the legacytypecN-usb4names) is already inapple,dcp-typec-routes.yamland int602x-j414-j416.dtsi.Every SoC this reaches gets the same tunnel clock decision as before:
Testing
CONFIG_PHY_APPLE_ATC_KUNIT_TEST=y):drivers/phy/apple/atc.obuilt with no compiler warnings. The kernel-doc warnings forstruct apple_atcphyare identical before and after.--no-treealways gives.apple-atc-tunnel: the old root/address cases are replaced byatc_tunnel_dpin_clock_gate(the gate) andatc_tunnel_clock_by_compatible(which tunnel clock each PHY compatible's match data selects). Ran on arm64 QEMU withkunit.py run --arch=arm64 --kunitconfig=drivers/phy/apple/.kunitconfig.apple-atc 'apple-atc-tunnel': 6/6 passed.tools/asahi/run-host-tests.py --only ...): atc-usb3 (with mutations), atc-cio-sleep, t6030-clock, tunnel-route and hardware-defaults: all passed.Still to run
No lab Mac has a T602X PHY. The paths the lab Macs run (T8103-style on M1 Pro and M2, and the T8140 PHY on Neo, which gets -EOPNOTSUPP as before) are unchanged. Regression rows:
dmesg | grep -i 'tunnel'shows no new refusals.dmesg | grep -iE 'atcphy|tunnel'matches the base kernel.Owner row (J414s/J416s/J414c/J416c, M2 Pro/Max laptop): with
echo 'file atc.c +p' > /sys/kernel/debug/dynamic_debug/control, connect a display through a Thunderbolt dock to each of the three USB-C ports in turn. Each should light, withDP tunnel clock rate 0x..: 0in dmesg and nono DP tunnel pixel clock on dpinwarning, the same as on the base kernel. The HDMI port should behave as before.Why the address list is equivalent to the connector wiring
t602x-dieX.dtsideclares atcphy0-3 identically (apple,t6020-atcphy, core 0x4c000 bytes at 0x703000000, 0xb03000000, 0xf03000000, 0x1303000000; die 1 adds 0x2000000000). On J414/J416,t602x-j414-j416.dtsigives atcphy3 onlyport@2(the dcpext0 HDMI output), soof_graph_get_remote_node(np, 0, -1)is NULL andapple_dp_tunnel_dual_stream()is false. typec0-2 (atcphy0-2) have twoport@3endpoints whose routes nametypecN-dpin0/typecN-dpin1. On J474/J475, T6021 display2 and T6022, no route names DP IN controls, so no connector is dual-stream. Before this change, those PHYs got -EOPNOTSUPP becausetunnel_routes_presentwas false, and they still do.Original T602X tunnel clock by Oliver Lukschander. Connector wiring qualification by Chris Kearney.
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:
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: No lab Mac has a T602x; boot-clean regression rows only.
#2409 original description
Problem
drivers/phy/apple/atc.cretries the power-on of a fixed-hub controller's SuperSpeed root port that a Type-C mux update still owes (atcphy_usb3_port_retry(), added in 5f5dc5f, "phy: apple: atc: Retry a SuperSpeed port power-on that a mux update owes"). It is reached only on a fixed-hub PHY with the T8140 DisplayPort path, which is the J700 rear port today.atcphy_mux_update_to()hands every USB-side failure to the retry, also a failure to look up the root hub or to take the port down. When no port was held off there is nothing to power on: the retry work still takes the controller, xHCI and root hub locks up to five times over about three seconds, which waits for any enumeration in progress, and if the lookup keeps failing it warns "SuperSpeed port left off" about a port that was never off. The same happens for a port held off once its host or root hub is gone (-ENODEV,-ESHUTDOWN). No retry can bring that port back. The next host powers its root hub ports itself as it starts, andatcphy_usb3_set_mode()drops the debt then.After a sleep in place,
atcphy_common_restore()falls back to USB2 when it cannot set a USB3 mode up again, and warns "USB2 for now". The second attempt that this message promises isatcphy_sleep_ss_up(), which logged its result at debug level only. If that attempt failed as well, the port stayed at USB2 until the next Type-C event, and the log said nothing beyond the first warning.Change
atcphy_usb3_port_retry()now schedules a retry only for a port that is still held off (usb3_port_off), and not after-ENODEVor-ESHUTDOWN. The case the retry was added for is unchanged: a power-on request to a running root hub that failed for want of memory, after a failed runtime resume, or while a controller or hub driver was not bound yet. Nothing signals when such a request would succeed, so the bounded backoff (100 ms doubling, five tries, about 3 s, then a warning) stays. Each failed power-on is still logged byatcphy_usb3_port_on()as it happens. The comment now says what is retried and why.atcphy_sleep_ss_up()warns when applying the mode again fails. The fallback's comment and message name the path that applies the mode again, and say that after a power cycle outside a sleep in place only the next Type-C event does. Why the set-up can fail after a sleep is not known yet. That is tracked in phy: apple: atc: USB3 mode not set up again after a sleep falls back to USB2, cause unknown #2314.Both changes only affect the error paths of the fixed-hub T8140 PHY. On every other ATC PHY
atcphy_usb3_pm_get()returns 0 without a root hub,usb3_port_offis never set, and the retry was not reachable before either. The sleep-in-place path exists only on fixed-hub T8140. No register access changes.The sleep path is Diljit Singh's, from d9b438c ("arm64: apple: support coordinated suspend-to-RAM on T8140").
Testing
atc.o(with the KUnit tests compiled in) at both commits, release config: 0 warnings. checkpatch --strict is clean.atcphy_test_update_port_unowed. With no port held off, a root hub that is not bound yet leaves no retry queued. A held-off port behind such a hub is retried, until the host is gone (-ENODEV). A dead controller that fails the power-on with-ESHUTDOWNqueues no retry. The existing retry cases (-ENOMEMpower-on retried, given up after five tries, host gone) are unchanged.KUnit and build
Objects built against an O= dir prepared from base 0abc2f3 with the release config (
CONFIG_PHY_APPLE_ATC=m,CONFIG_PHY_APPLE_ATC_KUNIT_TEST=y, so the tests are compiled intoatc.o):make ARCH=arm64 LLVM=1 W=1 atc.o, run at each of the two commits. Both builds: rc 0, 0 warnings. checkpatch --strict: 0 errors, 0 warnings, 0 checks on both patches.The KUnit suite was compiled but not run. Running it needs a full arm64 kernel and modules for QEMU, which was not built for this change. Run with:
./tools/testing/kunit/kunit.py run --arch=arm64 --kconfig_add CONFIG_PHY_APPLE_ATC=y --kconfig_add CONFIG_PHY_APPLE_ATC_KUNIT_TEST=y 'phy-apple-atc*'(or loadphy-apple-atc.koon any arm64 kernel with KUnit and read/sys/kernel/debug/kunit/*/results).Still to run
phy-apple-atcon arm64 (command below).On J700 (T8140), with a USB3 device on the rear port:
lsusb -t: the device is at 5000M, anddmesg | grep -c 'SuperSpeed port left off'is 0. It was also expected to be 0 before this change, so the row checks for regressions.rtcwake -m freeze -s 15, then the deep sleep path): after resumelsusb -tshows 5000M again, and the log has neither "not set up again after the sleep" nor "not applied again after the sleep". If either line shows up, it goes to phy: apple: atc: USB3 mode not set up again after a sleep falls back to USB2, cause unknown #2314 with the error code.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:
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: "SuperSpeed port left off" and "not set up again after the sleep": 0 on all four Macs, including after 2 s2idle cycles on J616s, M1 Pro and M2.
#2414 original description
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, whenof_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 whenof_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
apple,t6030-display-crossbar: the T6020 data plust6030_flow, which the T6041 and T8132 entries already use.apple,t8140-display-crossbar: the T6020 data plus a newdpphy_t602x_gatesflag. A comment on the struct says what the flag does.apple,t8140-display-crossbarwith the T6020 fallback, and t8140.dtsi givesdpxbar0that compatible.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
drivers/mux/apple-display-crossbar.o: no warnings.t8140-j700.dtbandt6030-j514s.dtbbuild. The J700 dtb hascompatible = "apple,t8140-display-crossbar", "apple,t6020-display-crossbar"on display-crossbar@40b04c000.dcpext26-crossbar-union,tiled-splitandt6030-wiringpass.Still to run
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.t6030_dpinpath).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:
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.