powerdetection for unused blocks

The kernel on my custom board gives the following powerdetect output:

[    0.660268] tegra: failed to map regulator to power detect cell pwrdet_pex_ctl(-517)
[    0.660329] tegra: failed to map regulator to power detect cell pwrdet_sdmmc3(-517)
[    0.660456] tegra: failed regulators mapping - io power detection is left always on

This makes sense, since we do not power on the PEX_CTL and SDMMC3 blocks in our design, but I’m not sure how to fix this. powerdetect.c looks for regulators supplying pwrdet_pex_ctl/pwrdet_sdmmc3, which I do not have, and the code is not board specific, but soc specific.

I see that I can turn off powerdetect, but I suspect that is not what I want…

Hello,
Please check the DTS part for these 2 power regulator consumer. They should be declared according to hardware design in DTS.

br
ChenJian

In our hardware design they are not connected/powered, and I do not know how to handle that in the DTS.

Hello,
I’m assuming that you are using TK1 21.3.
From that message, it seems that the 2 power regulator comsumer are missed in DTS. (Have you ever changed the code? I can see that in my code base.)
Please check the code @ arch/arm/mach-tegra/powerdetect.c, and corresponding DTS source code (For default Jetson TK1 board, it is arch/arm/boot/dts/tegra124-platforms/tegra124-jetson_tk1-pmic-pm375-0000-c00-00.dtsi. check the corresponding file if you’ve changed the board config.)

Hope that helps.

br
ChenJian

I’ve created DTS file for our own board. We do not power up those blocks, so I have no regulator supplies for them, and therefore I have no place to add consumers. At least no place where it is correct :)

Hello,
Those 2 items can be removed from pwr_detect_cells @ arch/arm/mach-tegra/powerdetect.c if they are unused. And then the error messages will be gone.

br
ChenJian