Repository navigation
Conversation
|
Review at fe1c51d (non-author, draft). No blocker in the code; the booted row is the missing piece, as you say.
Points to consider:
Assisted-by: LLM (Claude:Opus 5.5) |
|
Tested #2836 ( Machine and build
Live J313 probe and
|
|
There is no technical reason behind the generation check. T8103 is what the J314s falls back to and the only one I could measure, and I did not want to write to a bridge on M3 or M4 before the first mode change without knowing those blocks: the T8132 has separate USB3 and CIO bridge windows, and as you say the M4 common bank is only acquired at USB3 admission, so I can't tell from here that an early write is safe there. If you'd rather have it apply whenever the DT provides @mmdisbrow, thanks for running it on the Air! Good to see both PHYs come up clean through s2idle there. I still owe a booted row on the J314s and the sign-off. |
2bd1d9d to
edb9b70
Compare
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. Signed-off-by: Andreas Fernandez <andreas.fernandez@hotmail.com>
edb9b70 to
9e36385
Compare
|
As I said on 26 Nov, I'm keeping the generation check and writing the reason into the comment. 9e36385 adds this above
What was measured: on the J314s, 13 of 13 tunable registers on each of the four PHYs match the device tree after boot, before any cable event. mmdisbrow's M1 Air row ran the write but had no register read-back. The M2 family (T8112, T6020) falls back to T8103 too, so it is inside the check and has not run the early write either. Widening it to every port with The commit changes no code: |
What: The AXI2AF bridge in front of each ATC PHY only gets its
apple,tunable-axi2afvalues on the first cable event, and until then it keeps the fabric branch behind the ports from clock gating: about 0.2 W at idle after a boot with nothing plugged in. This writes the tunables at probe, after the PHY reset, and again on resume.Tested: J314s M1 Pro at edb9b70 (candidate 2596602bfaf6 on main 972a566, plus a test-only commit for the HDMI rows): boots, the same failed units as plain main, all four bridges hold the tunable values from the device tree before any cable event. 9e36385 adds a comment only, so no runtime change, and that row stays:
atc.obuilt before and after with the J314s config, code and relocations identical, only the line numbers of 11 debug prints move (by 6).Risk: two-way door · every Mac whose ATC PHY uses the T8103-generation path (M1, M1 Pro, Max, Ultra; M2 family); only the J314s has run it.
Not yet: the resume write across a real s2idle sleep with a display attached (see #2835 for what happened to the USB-C display after sleep on the candidate; not known whether it is related); the idle power figure on this base.
Details
It is keyed on the PHY's compatible (the T8103 generation, which the T600x PHYs fall back to) and 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. The atc-t8132-usb3 selftest compilesatcphy_resume()on its own, so the patch adds a stub for the new helper there.Moved from omacom/linux-aurora#509.
Evidence
verify/axi2af-show.py): 13 of 13 tunable registers matching the device tree on each of the four PHYs.atc.obuilt at edb9b70 and at 9e36385 (make LLVM=1, 0 warnings both); stripped objects differ only in 11__dyndbgline-number fields; a third build with the 6 added lines emptied is byte-identical to the commit's object.Thanks for taking a look!