[PATCH] arm64: dts: rockchip: rk3588: Fix USB PD clocks

Heiko Stuebner heiko at sntech.de
Sun Dec 24 11:54:45 PST 2023


On Fri, 15 Dec 2023 19:10:19 -0700, Sam Edwards wrote:
> The QoS blocks saved/restored when toggling the PD_USB power domain are
> clocked by ACLK_USB. Attempting to access these memory regions without
> that clock running will result in an indefinite CPU stall.
> 
> The PD_USB node wasn't specifying this clock dependency, resulting in
> hangs when trying to toggle the power domain (either on or off), unless
> we get "lucky" and have ACLK_USB running for another reason at the time.
> This "luck" can result from the bootloader leaving USB powered/clocked,
> and if no built-in driver wants USB, Linux will disable the unused
> PD+CLK on boot when {pd,clk}_ignore_unused aren't given. This can also
> be unlucky because the two cleanup tasks run in parallel and race: if
> the CLK is disabled first, the PD deactivation stalls the boot. In any
> case, the PD cannot then be reenabled (if e.g. the driver loads later)
> once the clock has been stopped.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: rk3588: Fix USB PD clocks
      commit: 44de8996ed5a10f08f2fe947182da6535edcfae5

I've changed the patch to only add the ACLK_USB.
For the HCLK_* type, Rockchip added both the root as well as the
actual controller clocks, so I guess it should be the same
for the ACLK-type. Powerdomains are strange with their clock-
synchronization, so I'm opting for better save than sorry ;-)

Best regards,
-- 
Heiko Stuebner <heiko at sntech.de>



More information about the Linux-rockchip mailing list