Repository navigation
Conversation
On T8152 the video decoder, the USB4 routers and their PHYs and the USB controllers are powered through PMGR2 PSD services instead of PMGR power-state registers. Each service has a 0x100-byte block with a target state, an acknowledge bit and the current state. Describe one service per node as a power domain, with an optional apple,always-on for a service whose consumers cannot restore what another agent set up in its blocks yet. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Provide each T8152 PMGR2 PSD service as a power domain. Power-on requests state 0 and power-off the cold state 6. The driver waits for the acknowledge before it reads the state, because reading the state consumes the acknowledge. A service marked apple,always-on is powered at probe and kept on. Otherwise the domain starts in the state the hardware reports, so genpd powers off a service that nothing uses. The consumers include IRQ-safe devices, the DARTs, so the domains are IRQ-safe and a transition is polled atomically, as the PMGR power states are. On the J873g the AVD service (50) reaches state 0 in 390-500 us and the cold state in about 240 us; the timeout is 10 ms. The AVD and the USB4 routers' CIO services, which so far each had their own variant of this, and the USB controllers (services 175 and 176) use it. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
sithglan
force-pushed
the
thomas/t8152-psd
branch
from
November 19, 2026 20:07
f14a6b8 to
a0994c9
Compare
Contributor
Author
|
J873g results, on #2178's stack (which carries #2139's AVD with this provider) plus a TEST-only commit that logged every transition.
I'm taking this out of draft. |
sithglan
marked this pull request as ready for review
November 19, 2026 20:09
This was referenced Nov 19, 2026
Open
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 T8152 several blocks are powered through PMGR2 PSD services rather than PMGR power-state registers: the video decoder (service 50), the USB4 routers and their PHYs (the CIO services) and the USB controllers (175, 176). So far #2139 and #2178 each carried their own variant of a PSD power domain: one compatible per user, AVD always on, CIO with power-off. As agreed on #1797, this replaces them with one generic per-service provider.
apple,t8152-psd): one node per service, its 0x100-byte block asreg,#power-domain-cells = <0>, an optionallabel, and an optionalapple,always-onfor a service whose consumers can't yet restore what another agent set up in its blocks.apple,always-onservice is powered at probe and kept on. Any other starts in the state the hardware reports, so genpd powers off a service nobody uses.Users:
apple,always-on, so the decoder and its DART power off when idle.apple,always-onuntil the T8152 ATC PHY support (J873g: USB3 on the front ports (T8152 in the ATC PHY driver, M6 Mac mini) #1799'satc.crework) can restore the USB2 PHY the loader set up.Checks:
pmgr-psd.obuilds with no W=1 warnings,dt_binding_checkpasses for the new schema, checkpatch is clean. Hardware results for the AVD power-off and the CIO services are in the comments.