Repository navigation
J713: power the idle USB-C ports down - #528
Merged
RyanTheTide merged 4 commits intoOct 28, 2026
Merged
Conversation
The T8132 PMGR nodes are "apple,t8132-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd". Their best match here is "apple,t8103-pmgr" (ONLY_BUS), which is not their first compatible, so probe returns -ENODEV and both nodes stay unbound. The power domains in the mini PMGR take parents from the main PMGR, and fw_devlink keeps waiting for the unbound mini PMGR node as a consumer of those parents. On J713 this holds back the ATC common domains: sync_state() pending due to 388280000.power-management genpd keeps a domain on until its provider's sync_state(), so these never power down. Bind the T8132 PMGRs as plain buses, like the other Apple PMGRs. With sync_state() reached, genpd may switch off any unused domain the board does not keep on. On J713 the two ATC common domains were the only ones pending; the other T8132 boards were not tested. Signed-off-by: Erik Bourget <[email protected]>
A J713 (MacBook Air M4) Type-C port keeps its ATC power domains on with nothing plugged in. For the PHY's domain to drop, the PHY must runtime- suspend, and its domain has to be the controller's ATCn_USB: that domain also holds the PIPE handler, which the PHY writes to drive the USB controller's reset and to route the PIPE, also while the Type-C mux changes mode before the controller has resumed. A running controller keeps the shared domain on by itself. On T8132, once the PHY follows its PM domain with the genpd notifier, enable runtime PM before the PHYs are created, so that they follow it too. Power the device for each operation that can reach the hardware: the USB2 and USB3 PHY ops, the controller's reset, the Type-C mux, and the deferred SuperSpeed retry. The orientation switch only records the orientation, and T8132 creates no DisplayPort PHY. Shutdown touches the hardware only for an owned common epoch, which holds the device on. Hold a reference while a power-down would lose state: a mode or a host, a PIPE away from its parked dummy backend or between backends, and the common-power epoch of a USB3 admission, which only its own stop may end. The rest is the baseline the restore below sets up. With nothing held, the PHY autosuspends after 2 s, which spans the burst of mux, orientation and reset calls of one plug. Unbind drops a hold still taken. The domain then switches off with the controller's and resets the block, so also restore the PHY state after that on T8132, as on T8122. The T8132 baseline is the one its probe sets up: the common block is acquired only on USB3 admission, so it is not powered down, and the PIPE is set up as at probe, with the dummy PIPE clock the USB2 controller needs. System resume leaves a runtime-suspended PHY to its next operation, as its domain may switch off again once resume completes. Signed-off-by: Erik Bourget <[email protected]>
With no cable the controller's core is down, but on T8132 the controller stays runtime-active, which would keep its power domain, its DARTs and, through the PHY device link, the PHY powered. Allow runtime PM there as on T6040, so that the glue's reference alone decides. A port that has not seen a cable since boot has no core probe yet, and runtime PM stays disabled until dwc3_core_probe() enables it. Until then, on T8132, let the glue own runtime PM so that such a port can suspend too, and hand it over powered, before the first reset deassert. If that first core probe fails, runtime PM stays with the core and the controller powered, as before. Signed-off-by: Erik Bourget <[email protected]>
Place the USB controllers, their DARTs and the Type-C PHYs in their ATCn_USB domains, as on T8103, and let the J713 policy manage ATCn_USB and ATCn_COMMON: an idle port then switches both off. The ATCn_USB_AON parents stay on, as handed over (apple,inherited-on): they are left out of this change. The SoC and board parts go together: a consumer of a domain the J713 policy disables never probes. The PHY shares the controller's domain because it writes the PIPE handler in it, and the drivers must power the domain down only while both are idle, so a DTB with this change needs a kernel with the PHY and controller runtime PM changes. The other T8132 boards keep these nodes disabled. In three paired runs on a J713 on battery, with the display at 150 nits, both idle ports drew 90 and 130 mW less than with their domains held on; the first pair, 218 mW, included drift. Signed-off-by: Erik Bourget <[email protected]>
RyanTheTide
added a commit
that referenced
this pull request
Oct 28, 2026
J713: power the idle USB-C ports down (carry #528 with selftest fixtures)
Contributor
|
Thank you, this is in integration/aurora through #529 with your four commits unchanged. The only addition is a selftest fixture update: the apple-dcp host selftests build code from |
This was referenced Oct 29, 2026
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 a J713 (MacBook Air 13" M4), each USB-C port keeps its ATC power domains on with nothing plugged in. This series lets an idle port switch
ATCn_USBandATCn_COMMONoff, and brings them back on plug.Patches
bus: simple-pm-bus: Add apple,t8132-pmgr: binds the T8132 PMGR nodes like the other Apple PMGRs. Without it the mini PMGR node stays unbound, and fw_devlink holdssync_state()of the ATC common domains back forever (sync_state() pending due to 388280000.power-management), so genpd never powers them down.phy: apple: atc: Let an idle T8132 PHY runtime-suspend: T8132 runtime PM for the Type-C PHY, plus T8132 support in the existing T8122 restore-after-power-off mechanism.ATCn_USB, which holds the PIPE handler it writes.phy-apple-atc-t8132-pm.usb: dwc3: apple: Let an idle T8132 controller runtime-suspend: enables the existing T6040 idle runtime PM on T8132. The glue also owns runtime PM before the first core probe, so a port that has never had a cable can suspend too.arm64: dts: apple: t8132: Let the idle J713 USB-C ports power down: puts the controllers, DARTs and PHYs inATCn_USB, as on T8103, and lets the J713 policy manageATCn_USBandATCn_COMMON.ATCn_USB_AONstays inherited-on.The other T8132 boards (j604, j623, j624, j715, j773g) keep the USB-C nodes disabled. Patch 1 lets
sync_state()complete on all T8132 PMGRs. On J713 only the two ATC common domains were pending; the other boards were not tested.Testing (J713)
ATC0/1_USBandATC0/1_COMMONare off (onlyUSB_AONstays on). There are nosync_statepending messages and no oopses or warnings.calibration=1 common=1 ret=0).power/control=on) vs allowed off. Three paired runs: 90 and 130 mW less in two of them; the first pair, 218 mW, included drift.--strictis clean on all four commits;atc.cis the kernel-doc warnings already present onintegration/aurora);CHECK_DTBS+ W=1 for all six T8132 DTBs shows no new warnings.Not tested: DisplayPort alt mode, USB-C power delivery into the Mac, hubs.
This change was developed and tested by Claude (Anthropic), working with me on the J713.