Repository navigation
usb: typec: tipd: don't leave M1/M2 Type-C ports deferred when the USB4 router never binds - #327
Merged
Merged
Conversation
On the M1 and M2 machines every CD321x Type-C connector is linked through its port@2 endpoint to the USB4 router serving that port, and cd321x_register_port() looks up the router's Thunderbolt switch with fwnode_typec_thunderbolt_switch_get(). The lookup returns -EPROBE_DEFER until the router driver (USB4_APPLE_SOC) has registered the switch. So when that driver is not built, or the router fails to probe, every linked PD controller stays deferred for good: no Type-C port, no partners, no USB role switching and no DisplayPort alternate mode, although the router only takes part in USB4 and Thunderbolt links. Kernels configured for the M1 Pro and M2 from configurations that predate the router driver show exactly that: only the connector-less MagSafe controller binds, and the others stay in devices_deferred with no recorded reason. Handle the switch like other providers that may never get a driver: keep deferring while the driver core still waits for missing dependencies, and once driver_deferred_probe_check_state() gives up, register the port without a switch, as for a connector with no router link. Ports whose router registers its switch in time behave as before. Fixes: fc76d0f ("usb: typec: tipd: Hook up tbt switch for Apple platforms") Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Test cd321x_tbt_switch_get() on a software node graph shaped like the M1 and M2 device trees: a connector whose port@2 is linked to a node with the thunderbolt-switch property. A connector without that link, and a router that has registered its switch, must not consult the driver core. A router that has not registered its switch must defer the port while the driver core keeps waiting, and must no longer hold the port back once it gives up. Move the driver core query into cd321x_tbt_switch_keep_waiting() so that the tests can redirect it with a static stub. Without KUnit both helpers stay static and the stub compiles away. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide
added a commit
to aurora-silicon/omarchy-pkgs
that referenced
this pull request
Oct 16, 2026
Moves the pin from 99b5f912 to a6cfa4dd59a5, which is 99b5f912 plus merged aurora-silicon/linux#327 (tipd: don't leave M1/M2 Type-C ports deferred when the USB4 router never binds). The package config has CONFIG_USB4 off, so without it M1/M2 users would get no Type-C ports. pkgver stays 7.1.12.aurora6 while the bump PR is unmerged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the M1 Pro (t600x) and M2 (t8112), every CD321x Type-C connector in our devicetree links port@2 to its USB4 router.
cd321x_register_port()waits for the router's Thunderbolt switch withfwnode_typec_thunderbolt_switch_get(), which returns-EPROBE_DEFERuntilUSB4_APPLE_SOCregisters it. Our published and linux-aurora configs haveCONFIG_USB4off. So with our DTB, every linked PD controller stayed deferred forever: no Type-C ports, no partners, no USB role switching, no DP alt mode, and no charging partner. Only the connector-less MagSafe controller bound.The fix keeps deferring while the driver core still waits for missing dependencies. Once
driver_deferred_probe_check_state()gives up, it registers the port without a switch, the same as a connector with no router link. Ports whose router registers in time are unchanged.7fd578b19usb: typec: tipd: Stop waiting for a USB4 router that never binds (Fixes: fc76d0f20c29)6b59e8a69usb: typec: tipd: Add KUnit tests for the USB4 router lookup (fail before, pass after)Testing (hardware, 2026-10-16)
M1 Pro (j316s) and M2 (j413), aurora DTB, one-shot boots:
USB4_APPLE_SOC:devices_deferredis empty;USB4_APPLE_SOC=m: Asahi's router driver probes cleanly (M1 Pro 3 routers + 3 switches, M2 2 + 2), and the ports bind immediately without the fallback.MacBook Neo (J700):
devices_deferredempty, AC online;KUnit passes, and checkpatch reports 0 errors.
🤖 Generated with Claude Code