ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS
Subsystems (2)
PATCH 1/1 ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS
The current hardware is not able to run with all cores enabled at a cluster frequency superior at 1536MHz.
But the currently shipped u-boot for the platform still reports an OPP table with possible DVFS frequency up to 2GHz, and will not change since the off-tree linux tree supports limiting the OPPs with a kernel parameter. A recent u-boot change reports the boot-time DVFS around 100MHz and the default performance cpufreq governor sets the maximum frequency. Previous version of u-boot reported to be already at the max OPP and left the OPP as is.
Nevertheless, other governors like ondemand could setup the max frequency and make the system crash.
This patch disables the DVFS clock and disables cpufreq.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +4 -0
@@ -137,6 +137,10 @@ }; }; +&scpi_dvfs { + status = "disabled"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;
Signature · 1 line
1.9.1
Hello.
The patch causes cpufreq module (scpi-cpufreq) not to detect cpufreq, so it actually works, but...
Loading the module causes few errors because of not found frequencies or something, then it is all okay. However after loading scpi-cpufreq you cannot actually power the cpu off and on. You will power it off successfully, but when trying to power it on, the cpufreq driver will error out, and then after it happens, the cpu that was trying to go online will be offline again, and that is a little... unfortunate. The question is, and I cannot really test that: will the module actually autoload after this change?
W dniu 05.01.2017 o 16:02, Neil Armstrong pisze:
Quoted 26 lines
The current hardware is not able to run with all cores enabled at a cluster frequency superior at 1536MHz.
But the currently shipped u-boot for the platform still reports an OPP table with possible DVFS frequency up to 2GHz, and will not change since the off-tree linux tree supports limiting the OPPs with a kernel parameter. A recent u-boot change reports the boot-time DVFS around 100MHz and the default performance cpufreq governor sets the maximum frequency. Previous version of u-boot reported to be already at the max OPP and left the OPP as is.
Nevertheless, other governors like ondemand could setup the max frequency and make the system crash.This patch disables the DVFS clock and disables cpufreq.
Fixes 70db166a2baa ("ARM64: dts: meson-gxbb: Add SCPI with cpufreq & sensors Nodes")Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0
-0
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 146
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +4
-0@@ -137,6 +137,10 @@ }; }; +&scpi_dvfs { + status = "disabled"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20170105/9c0439b7/attachment.sig>
Quoted 12 lines · Micha? Zegan
Hello.
The patch causes cpufreq module (scpi-cpufreq) not to detect cpufreq, so it actually works, but...
Loading the module causes few errors because of not found frequencies or something, then it is all okay. However after loading scpi-cpufreq you cannot actually power the cpu off and on. You will power it off successfully, but when trying to power it on, the cpufreq driver will error out, and then after it happens, the cpu that was trying to go online will be offline again, and that is a little... unfortunate. The question is, and I cannot really test that: will the module actually autoload after this change?
Hi Michal,
You are right, it breaks cpufreq and the cpu hotplug feature, I will send a v2 completely disabling cpufreq instead.
For the module autoloading, the arm_scpi.ko must be loaded before the other scpi modules.
Please ask Sudeep Holla <[email protected]> if module autoloading for scpi is meant to work.
Neil
Quoted 30 lines
W dniu 05.01.2017 o 16:02, Neil Armstrong pisze:
Quoted 28 lines
The current hardware is not able to run with all cores enabled at a cluster frequency superior at 1536MHz.
But the currently shipped u-boot for the platform still reports an OPP table with possible DVFS frequency up to 2GHz, and will not change since the off-tree linux tree supports limiting the OPPs with a kernel parameter. A recent u-boot change reports the boot-time DVFS around 100MHz and the default performance cpufreq governor sets the maximum frequency. Previous version of u-boot reported to be already at the max OPP and left the OPP as is.
Nevertheless, other governors like ondemand could setup the max frequency and make the system crash.This patch disables the DVFS clock and disables cpufreq.
Fixes 70db166a2baa ("ARM64: dts: meson-gxbb: Add SCPI with cpufreq & sensors Nodes")Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0
-0@@ -137,6 +137,10 @@ }; };
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 146
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +4
-0+&scpi_dvfs { + status = "disabled"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20170106/f360c5ac/attachment.sig>
PATCH 1/1 ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS
In reply to Michał ZeganHi Micha?,
Quoted 9 lines · Micha? Zegan
Hello.
The patch causes cpufreq module (scpi-cpufreq) not to detect cpufreq, so it actually works, but...
Loading the module causes few errors because of not found frequencies or something, then it is all okay. However after loading scpi-cpufreq you cannot actually power the cpu off and on. You will power it off successfully, but when trying to power it on, the cpufreq driver will error out,
Yes I had noticed this in past, this needs to be fixed. I had a patch and seems like it slipped through the cracks. I will fins and post it.
Quoted 2 lines
and then after it happens, the cpu that was trying to go online will be offline again, and that is a little... unfortunate. The
IIUC, you mean the cpufreq drive spits error on every hotplug event ? If so yes, otherwise I think I didn't understand you concern above.
Quoted 3 lines
question is, and I cannot really test that: will the module actually autoload after this change?
It should work, I had tested this in past.
Signature · 2 lines
Regards, Sudeep
Yes, I meant what you think I meant. :) thanks
W dniu 06.01.2017 o 12:54, Sudeep Holla pisze:
Quoted 19 lines
Hi Micha?,
Quoted 9 lines · Micha? Zegan
Hello.
The patch causes cpufreq module (scpi-cpufreq) not to detect cpufreq, so it actually works, but...
Loading the module causes few errors because of not found frequencies or something, then it is all okay. However after loading scpi-cpufreq you cannot actually power the cpu off and on. You will power it off successfully, but when trying to power it on, the cpufreq driver will error out,Yes I had noticed this in past, this needs to be fixed. I had a patch and seems like it slipped through the cracks. I will fins and post it.
Quoted 2 lines
and then after it happens, the cpu that was trying to go online will be offline again, and that is a little... unfortunate. The
Quoted 9 lines
IIUC, you mean the cpufreq drive spits error on every hotplug event ? If so yes, otherwise I think I didn't understand you concern above.
Quoted 3 lines
question is, and I cannot really test that: will the module actually autoload after this change?
It should work, I had tested this in past.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20170106/37f9d743/attachment.sig>