Hi Shawn,
Before your v2 about this path, I would like to ask why you need this?
The dw_mmc-rockchip controller is always under A power domain on every
SoC, none of the predecessors need this kind of change. If you see
some errors during RPM, perhaps you should have a look[1] and check your
DTS.
Thank you very much for pointing out my mistake.
I wrote this patch after observing repeated SD card resets and recovery.
After several tests, I found that keeping NVM1 powered prevented the
problem. I checked the SD supply and pin settings against Forlinx's
vendor DTS. The settings matched.
I then searched the mainline history for RK3576 and found its SDHCI
workaround that keeps PD_NVM powered. I therefore assumed this was a
shared design issue in the RK357x family.
After your email, I carefully reviewed and compared the Forlinx
OK3572-C schematic and DTS.
The OK3572-C_Linux6.12.58_Alpha1 BSP incorrectly references RK806 PLDO4
as the SD card supply. The card actually uses a separate 3.3 V supply
through a switch controlled by GPIO0_B6. The original DTS uses native
PWREN, which loses the enable state when NVM1 powers down.
I incorrectly assumed that Forlinx had validated its vendor kernel
and the corresponding device tree.
I am very sorry for this incorrect assumption.
I will report this issue to Forlinx and replace this patch with the DTS
fix in the next revision.
Best regards,
Cunhao