Repository navigation
pmdomain: apple: T8152 PSD services as power domains - #2459
Conversation
f14a6b8 to
a0994c9
Compare
|
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. |
|
No blockers. I checked drivers/pmdomain/apple/pmgr-psd.c and the binding. The ack-then-state poll is atomic and bounded (10 ms against the measured 240-500 us). The early state read before writing the target clears any stale acknowledge. An always-on domain is powered before pm_genpd_init() so its initial state is consistent. The provider and genpd are torn down in the right order on error and unbind. GENPD_FLAG_IRQ_SAFE matches the DART consumers.
HW row: J873g on the default command line: a USB4 device hot-plugged on a rear port (CIO services go from cold to on, the device enumerates, then back to cold within a few seconds of unplug), the USB controllers on services 175/176 working with Assisted-by: LLM (Claude:Opus 5.5) |
a0994c9 to
9dbf0f0
Compare
|
Assisted-by: LLM (Claude:Opus 5.5) |
9dbf0f0 to
c02baf4
Compare
|
@RyanTheTide fixed in The J873g row (rear-port USB4 hotplug, services 175/176 with Assisted-by: LLM (Claude:Opus 5.5) |
|
J873g rows. The kernel was the #2178 stack (
Kernel AVD, service 50 (not always-on).
CIO services, rear USB4 ports.
Services 175/176 (USB controllers' DARTs): not done, and the description was wrong about them.
Regression line.
The M6 is back on its default kernel. Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-checked at 28434d5. Both earlier points are fixed: The new binding text in 28434d5 is right: the driver takes each service's block from
Rows: the AVD and CIO rows from 11-21 were on a kernel with pmgr-psd.c identical to c02baf4, and the new commit only touches the binding, so they carry over to this head. One row is still missing: a real cable unplug and replug on a rear USB4 port (CIO services go from cold to on, the device enumerates, then back to cold after unplug). The router unbind/bind rounds cover the driver side but not the port's own hotplug path. Assisted-by: LLM (Claude:Opus 5.5) |
|
I applied the binding correction in I built the PR on public
All 12 CPUs were online and kernel taint was 0 after each run. The corrected schema, both test DTBs and the hardware-defaults suite passed validation. This hardware run covered the provider and its two power policies on service 50. The author's separate J873 run covers hardware video decode and USB4 router rebinds. Earlier J873 consumer results The PR was subsequently updated to I also ran the repository’s eight CI jobs locally on the proposed merge tree |
On T8152 the video decoder and the USB4 routers and their PHYs are powered through PMGR2 PSD services instead of PMGR power-state registers. Each service has a 0x100-byte block, given by its node's reg, with a target state, an acknowledge bit and the current state. The address comes from reg, not from the service number: the USB controllers' service numbers point at blocks that abort when read. 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. Co-developed-by: Acelogic <miguelc4600@gmail.com> Signed-off-by: Acelogic <miguelc4600@gmail.com> 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, use it. It has its own Kconfig symbol, APPLE_PMGR_PSD, on by default with ARCH_APPLE and built in by the shared asahi.config profile. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
28434d5 to
5eaa213
Compare
|
@RyanTheTide done, head 5eaa213:
The rear USB4 cable unplug and replug row needs a hand at the M6; the enclosure is on the back-right port now. I'll run it in the morning: CIO services from cold to on, the enclosure enumerating, then back to cold after the unplug. Assisted-by: LLM (Claude:Opus 5.5) |
|
The rear USB4 cable unplug and replug row I said was owed, now that this has merged. Kernel: The PSD states and the router devices were polled every 0.5 s from
Assisted-by: LLM (Claude:Opus 5.5) |
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, by the ADT, 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.base + 0x100 * servicelike services 50-89: a test node there aborts on the first access (see the rows in the comments), so their blocks still have to be found. They will needapple,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.Assisted-by: LLM (Claude:Opus 5.5)