[PATCH v17 1/3] pmdomain: rockchip: switch off the subdomains of a regulator domain at probe

Vladimir Bely vlwwwwww at gmail.com
Sat Nov 14 01:45:00 PST 2026


On Sat, Nov 14, 2026 at 04:04:59PM +1300, Jiaxing Hu wrote:
> 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.

I tested this patch on the board I reported the hang on, a FriendlyElec
NanoPi R76S (RK3576), and it fixes it.

What I ran: Armbian's 7.3.4 edge kernel (armbian/build main, which
carries v14 of the RK3576 NPU series, so PD_NPU already needs a
regulator there) plus this patch as armbian/build#11366 carries it.
The code is the same as this 1/3 (I compared the diff). I did not
test 2/3 and 3/3 of v17.

DT: the R76S DT with the NPU disabled, i.e. no domain-supply on pd_npu,
which is the case that hung. No regulator_ignore_unused, no
regulator-always-on. Serial console attached, warm reboots, PMU read
from the regmap debugfs about 42 s after the kernel started, after
regulator_late_cleanup() has turned vdd_npu_s0 off.

Without the patch (Armbian 7.3.3, same DT): hung on 3 of 4 boots; on
the boots that survived, NPUTOP, NPU0 and NPU1 were still powered and
not idled while genpd listed them off.

With the patch: 11 of 11 boots, no hang. "vdd_npu_s0: disabling" is
in the log on every boot, and every boot reads

               without     with this patch
  0x110 req    0x000013e0  0x000013fe
  0x214 pwr    0x0000003e  0x000001fe

so the three subdomains are idled and off before the rail goes away.
(Bit 9 of 0x214 is clear because the GPU is in use on this board.)

With the NPU enabled on the same kernel, rocket probes both cores and
an LLM runs on them, with identical output on two runs.

Tested-by: Vladimir Bely <vlwwwwww at gmail.com>

Thanks for the quick fix,
Vladimir



More information about the Linux-rockchip mailing list