arm64: dts: imx8mm-kontron-n801x-som: do not allow to switch off buck2
Subsystems (2)
PATCH 1/1 arm64: dts: imx8mm-kontron-n801x-som: do not allow to switch off buck2
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +1 -0
@@ -102,6 +102,7 @@ reg_vdd_arm: BUCK2 { regulator-min-microvolt = <850000>; regulator-max-microvolt = <950000>; regulator-boot-on; + regulator-always-on; regulator-ramp-delay = <3125>; nxp,dvs-run-voltage = <950000>; nxp,dvs-standby-voltage = <850000>;
Signature · 1 line
2.30.0
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Mh, have this ever worked? Is there a commit which introduced a regression?
-michael
Quoted 3 lines
Fixes 8668d8b2e67f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs andbaseboards")
Signed-off-by Heiko Thiery <[email protected]>
Quoted 6 lines · Michael Walle
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disabling
While on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in imx8mq-librem5-devkit.dts [1] that has not set this property.
I agree with you and don't understand why this is happening. Has anyone else an explanation?
Signature · 1 line
Heiko
Am 17. September 2021 09:28:51 MESZ schrieb Heiko Thiery <[email protected]>:
Quoted 25 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disabling
Quoted 7 lines
While on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.I agree with you and don't understand why this is happening. Has anyone else an explanation?
Do you have the CPU frequency scaling driver enabled?
-michael
HI Michael,
Am Fr., 17. Sept. 2021 um 10:21 Uhr schrieb Michael Walle <[email protected]>:
Quoted 32 lines
Am 17. September 2021 09:28:51 MESZ schrieb Heiko Thiery <[email protected]>:
Quoted 30 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.
Quoted 4 lines
Quoted 2 lines
I agree with you and don't understand why this is happening. Has anyone else an explanation?
Do you have the CPU frequency scaling driver enabled?
That was a good hint. What I now see is in my case the driver is not loaded (I boot via network). In the default kernel config the module is marked as 'm'. When switching to 'y' as expected it will be probed and the the buck2 (cpu-supply) will not be deactivated after 30 seconds.
Signature · 1 line
Heiko
Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery:
Quoted 30 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.
Quoted 5 lines
I agree with you and don't understand why this is happening. Has anyone else an explanation?
Maybe your kernel config is missing the cpufreq driver, so you don't have a consumer of the regulator?
Marking the regulator as always-on seems like the right thing to do, you don't want to depend on a consumer showing up to make sure that your CPU voltage isn't cut...
Regards,
Lucas
Hi Lucas,
Am Fr., 17. Sept. 2021 um 13:44 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 35 lines
Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery:
Quoted 33 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.I agree with you and don't understand why this is happening. Has anyone else an explanation?
Quoted 8 lines
Quoted 2 lines
Maybe your kernel config is missing the cpufreq driver, so you don't have a consumer of the regulator?
Marking the regulator as always-on seems like the right thing to do, you don't want to depend on a consumer showing up to make sure that your CPU voltage isn't cut...
shouldn't it be that the node cpu-supply here is a consumer of the referenced voltage?
Signature · 1 line
Heiko
Frieder Schrempf
Reviewed-byQuoted 44 lines · Heiko Thiery
Hi Lucas,
Am Fr., 17. Sept. 2021 um 13:44 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 40 lines
Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery:
Quoted 30 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.Quoted 5 lines
I agree with you and don't understand why this is happening. Has anyone else an explanation?
Maybe your kernel config is missing the cpufreq driver, so you don't have a consumer of the regulator?
Quoted 6 lines
Quoted 3 lines
Marking the regulator as always-on seems like the right thing to do, you don't want to depend on a consumer showing up to make sure that your CPU voltage isn't cut...
shouldn't it be that the node cpu-supply here is a consumer of the referenced voltage?
Yes, but as Michael and Lucas noted, the consumer is only active if the cpufreq driver is loaded and we don't want to depend on this. In my config I always had this compiled into the kernel so I didn't notice that the always-on property is missing.
I'm not sure if shutting down the regulator is allowed to save power in suspend, but that's something we could tackle later, for now:
Thanks Heiko for investigating and Michael and Lucas for helping!
Am 20. September 2021 09:31:20 MESZ schrieb Frieder Schrempf <[email protected]>:
Quoted 49 lines · Heiko Thiery
Quoted 48 lines
Hi Lucas,
Am Fr., 17. Sept. 2021 um 13:44 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 43 lines
Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery:
Quoted 30 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.Quoted 5 lines
I agree with you and don't understand why this is happening. Has anyone else an explanation?
Maybe your kernel config is missing the cpufreq driver, so you don't have a consumer of the regulator?
Marking the regulator as always-on seems like the right thing to do, you don't want to depend on a consumer showing up to make sure that your CPU voltage isn't cut...
Quoted 7 lines
Quoted 2 lines
shouldn't it be that the node cpu-supply here is a consumer of the referenced voltage?
Yes, but as Michael and Lucas noted, the consumer is only active if the cpufreq driver is loaded and we don't want to depend on this. In my config I always had this compiled into the kernel so I didn't notice that the always-on property is missing.
Hm. So any cpu core voltage has to have the "always-on" property? On any SoC? Shouldn't there be some code to prevent the disabling of the voltage if the cpu nodes have a cpu-supply phandle?
-michael
Am Montag, dem 20.09.2021 um 09:43 +0200 schrieb Michael Walle:
Quoted 53 lines
Am 20. September 2021 09:31:20 MESZ schrieb Frieder Schrempf <[email protected]>:
Quoted 52 lines · Heiko Thiery
Quoted 50 lines
Hi Lucas,
Am Fr., 17. Sept. 2021 um 13:44 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 35 lines
Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery:
Quoted 33 lines
Hi Frieder,
Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf <[email protected]>:
Quoted 7 lines · Michael Walle
Quoted 5 lines
Am 2021-09-15 14:03, schrieb Heiko Thiery:
Quoted 3 lines
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Quoted 6 lines
Quoted 1 line
Mh, have this ever worked? Is there a commit which introduced a regression?
Yes, this did work before, even without 'regulator-always-on'. I currently don't understand why this is needed. The regulator is referenced in the CPU nodes as 'cpu-supply'. This should be enough to not disable it as long as the CPU is up.
I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the same issue:
[ 31.716031] vdd-5v: disabling [ 31.719032] rst-usb-eth2: disabling [ 31.722553] buck2: disablingWhile on that I tried to compare with other boards and see that they also have the cpu-voltage marked as "regulator-always-on". The only exception in dts/freescale is in
imx8mq-librem5-devkit.dts[1] that has not set this property.I agree with you and don't understand why this is happening. Has anyone else an explanation?
Quoted 8 lines
Maybe your kernel config is missing the cpufreq driver, so you don't have a consumer of the regulator?
Marking the regulator as always-on seems like the right thing to do, you don't want to depend on a consumer showing up to make sure that your CPU voltage isn't cut...
shouldn't it be that the node cpu-supply here is a consumer of the referenced voltage?
Quoted 8 lines
Quoted 4 lines
Yes, but as Michael and Lucas noted, the consumer is only active if the cpufreq driver is loaded and we don't want to depend on this. In my config I always had this compiled into the kernel so I didn't notice that the always-on property is missing.
Hm. So any cpu core voltage has to have the "always-on" property? On any SoC? Shouldn't there be some code to prevent the disabling of the voltage if the cpu nodes have a cpu-supply phandle?
Yes, all regulators that must not be shut down for proper system operation must be marked as always-on. Just because it is a CPU supply doesn't make it special in any way. Otherwise where would you stop with adding special code to keep supplies enabled without a consumer? Have code to keep the DDR memory regulators on when no DDR controller driver is loaded? Code to keep 3.3V for the board level peripherals enabled? Just mark those as always-on.
Regards,
Lucas
Shawn Guo
AppliedQuoted 6 lines · Heiko Thiery
The buck2 output of the PMIC is the VDD core voltage of the cpu. Switching off this will poweroff the CPU. Add the 'regulator-always-on' property to avoid this.
Fixes 8668d8b2e67f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")Signed-off-by Heiko Thiery <[email protected]>
Applied, thanks!