Repository navigation
Conversation
The AXI2AF bridge in front of each ATC PHY gets its apple,tunable-axi2af values in atcphy_apply_tunables(), which only runs on a mode change. A port that has not seen a cable since boot keeps the bridge's reset values, and with those the fabric branch behind the ports does not clock gate. On a MacBook Pro 14" M1 Pro (J314s) booted with nothing plugged in, that costs about 0.2 W at idle with the screen off (1.21 W against 1.02 W), until every port has been used once. Write the tunables at the end of the probe-time reset, and again on resume in case the bridge lost them in system sleep. apple_tunable_apply() leaves a register alone that already holds its value, so the resume call does nothing on a bridge that kept them. Only the T8103 generation is touched, which the t600x PHYs fall back to, since that is where this was measured. A port behind a fixed hub keeps its first write for the first SuperSpeed mode change, as before. Assisted-by: LLM
This was referenced Nov 22, 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.
Hi everyone! This moves omacom/linux-aurora#509 over here, now that kernel work has moved to this repository. It is a small one for the Type-C PHY, found while chasing idle power on my M1 Pro (J314s), and it picked cleanly onto the current integration/aurora (3710668).
The AXI2AF bridge in front of each ATC PHY only gets its apple,tunable-axi2af values on the first cable event. Until a port has seen a cable its bridge sits at its reset values, and that keeps the fabric branch behind the ports (afnc1_lw1) from clock gating. After a boot with nothing plugged in the machine idled at 1.21 W with the screen off. With the same values written to the unused bridges it dropped to 1.02 W, so about 0.2 W is lost just because a port was never used.
The patch writes the AXI2AF tunables at probe, right after the PHY has been reset to its off state, and again on resume. It only does this on the T8103 generation, which the T600x PHYs fall back to, and it leaves ports behind a fixed hub alone. apple_tunable_apply() skips registers that already hold the right value, so the resume call does nothing on a bridge that kept its values. The existing write on every mode change stays as it is.
I want to be upfront about the testing, which is why this is a draft. I have not booted a kernel built from this commit. On this base it builds (kernel and modules on 3710668 with the 7.3.0 edge config, W=1 on drivers/phy/apple with no new warnings) and tools/asahi/run-host-tests.py gives the same result as on the base. The atc-t8132-usb3 selftest compiles atcphy_resume() on its own, so the patch adds a stub for the new helper there. What has run on real hardware is the identical set of register writes done from userspace: my J314s has done them at every boot since the 18th of November, on a local 7.3 kernel, through suspend and resume and through the first plug of a dock and two USB-C displays on ports that had never seen a cable. Everything came up (36 USB devices, both displays, Ethernet, charging and DP audio). That suspend was an out-of-tree suspend-to-RAM setup with a resume hook writing the values again, so I don't know whether s2idle resets the bridges, and the resume call is cheap insurance. Base M1, M2 and the Max chips take the same code path and are untested.
I'm happy to boot this on the J314s and report back before taking it out of draft. Any feedback is very welcome, and thanks for all the work on the ATC driver!