diff options
| author | Jiaxing Hu <gahing@gahingwoo.com> | 2026-11-14 16:04:59 +1300 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-11-23 16:23:53 +0100 |
| commit | 458777762756acfc7d2c20067cca6cc817cc8dec (patch) | |
| tree | 8d67e2b7603e1d249fe64386de8c91ec551e61da /tools/lib/python | |
| parent | ce02e68b40f92d86395a39d5f2a096295151e3d1 (diff) | |
pmdomain: rockchip: switch off the subdomains of a regulator domain at probe
A power domain that needs a regulator is switched off at probe, because
the state of its regulator is unknown at that point. Its subdomains are
added only after that, so a subdomain the bootloader left on stays
powered and not idled behind a parent that is off. genpd reads it as off
and never touches it again, and when the regulator core later disables
the regulator as unused, the bus hangs on the NIUs of those subdomains.
On the RK3576 this hangs boards that do not enable the NPU once PD_NPU
manages its supply (next patch): U-Boot leaves NPUTOP, NPU0 and NPU1 on,
and the SoC locks up when regulator_late_cleanup() disables vdd_npu_s0.
Mark a regulator domain and every domain below it as off when it is
added, and once the subtree is complete, switch it off from the leaves
up. If a subdomain fails to switch off, leave its parents on and warn.
Tested on a Radxa ROCK 4D with the NPU disabled in the DT. Without this
patch, all 14 boots left NPUTOP, NPU0 and NPU1 on, and one of them hung.
With it, all 10 boots switched them off, with no hang.
Reported-by: Vladimir Bely <vlwwwwww@gmail.com>
Closes: https://lore.kernel.org/all/20261113132323.159015-1-vlwwwwww@gmail.com/
Signed-off-by: Jiaxing Hu <gahing@gahingwoo.com>
Tested-by: Sidong Yang <sidong.yang@furiosa.ai> # RK3588, ROCK 5B+
Tested-by: Vladimir Bely <vlwwwwww@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
