[PATCH RESEND] pmdomain: rockchip: keep PD_NVM on RK3576 always on
Nicolas Frattaroli
nicolas.frattaroli at collabora.com
Thu Apr 10 05:44:03 PDT 2025
On Thursday, 10 April 2025 14:10:56 Central European Summer Time Ulf Hansson wrote:
> + Shawn Lin
>
> On Tue, 8 Apr 2025 at 17:28, Nicolas Frattaroli
> <nicolas.frattaroli at collabora.com> wrote:
> >
> > Due to what seemingly is a hardware bug, PD_NVM never comes up quite the
> > same after being turned off once. The result is that the sdhci
> > controller will lock up the entire SoC when it's accessing its CQHCI
> > registers.
> >
> > The downstream kernel hacks around this by setting
> > GENPD_FLAG_RPM_ALWAYS_ON in the mmc host driver, which does not seem
> > like the right place for this.
> >
> > Set GENPD_FLAG_ALWAYS_ON in the pmdomain driver for PD_NVM. I'm using
> > the non-RPM version of the flag here because I have my doubts a
> > suspend-resume cycle will fix it. Suspend-resume currently seems busted,
> > so I couldn't test this.
> >
> > Fixes: cfee1b507758 ("pmdomain: rockchip: Add support for RK3576 SoC")
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
>
> Shawn Lin recently made some changes [1] to make UFS work for this
> platform, as you probably know of. In particular the changes affected
> how to handle the UFS controller from the power-domain point of view.
> Could it be that something similar is missing for NVM too?
>
> In any case, I am happy to apply this as a fix if you still think it
> makes sense.
>
> Kind regards
> Uffe
>
> [1]
> https://lore.kernel.org/all/1738736156-119203-1-git-send-email-shawn.lin@rock-chips.com/
Oh my, good catch. That does look like a similar kind of thing, and
potentially a better solution than what I'm going for.
I'll have to do some testing on my side, thank you for bringing this
particular part of the UFS series to my attention. I'll either respond
here or post a new version of the patch series depending on the outcome
of said testing.
Kind regards,
Nicolas Frattaroli
More information about the linux-arm-kernel
mailing list