From: qianfan Zhao <[email protected]>
Change history:
===============
v5(2022-05-17):
- Move opp tables to sun8i-r40-cpu-opp.dtsi
- cpufreq supports 720M, 912M, 1G, 1.1G, 1.2G
- Add cooling supports
v4(2022-05-16):
- Invert two patches.
- Drop the cpufreqs that exceeds 1G in opp tables.
v3:
- remove "allwinner-r40" compatible from allowlist.
- split dts in two part.
Test:
=====
cpufreq was tested by tools: https://github.com/ssvb/cpuburn-arm
1. cpufreq-ljt-stress-test
- root@ubuntu:~/cpuburn-arm-master# ./cpufreq-ljt-stress-test
- CPU stress test, which is doing JPEG decoding by libjpeg-turbo
- at different cpufreq operating points.
-
- Testing CPU 0
- 1200 MHz ............................................................ OK
- 1104 MHz ............................................................ OK
- 1008 MHz ............................................................ OK
- 912 MHz ............................................................ OK
- 720 MHz ............................................................ OK
-
- Testing CPU 1
- 1200 MHz ............................................................ OK
- 1104 MHz ............................................................ OK
- 1008 MHz ............................................................ OK
- 912 MHz ............................................................ OK
- 720 MHz ............................................................ OK
-
- Testing CPU 2
- 1200 MHz ............................................................ OK
- 1104 MHz ............................................................ OK
- 1008 MHz ............................................................ OK
- 912 MHz ............................................................ OK
- 720 MHz ............................................................ OK
-
- Testing CPU 3
- 1200 MHz ............................................................ OK
- 1104 MHz ............................................................ OK
- 1008 MHz ............................................................ OK
- 912 MHz ............................................................ OK
- 720 MHz ............................................................ OK
Overall result : PASSED
2. cpu freq slow down when cpuburn-a7.out running
- temperature: 79213, online: 0-3, freq: 1200000
- temperature: 79213, online: 0-3, freq: 1200000
- temperature: 80230, online: 0-3, freq: 1104000
- temperature: 78874, online: 0-3, freq: 1200000
- temperature: 80004, online: 0-3, freq: 1104000
- temperature: 79213, online: 0-3, freq: 1200000
- temperature: 78196, online: 0-3, freq: 1200000
- temperature: 79891, online: 0-3, freq: 1200000
- temperature: 78422, online: 0-3, freq: 1200000
- temperature: 80343, online: 0-3, freq: 1104000
- temperature: 80343, online: 0-3, freq: 1104000
qianfan Zhao (3):
ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board
ARM: dts: sun8i-r40: add opp table for cpu
ARM: dts: sun8i-r40: Add thermal trip points/cooling maps
.../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 5 ++
arch/arm/boot/dts/sun8i-r40-cpu-opp.dtsi | 52 +++++++++++++++++++
arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 5 ++
arch/arm/boot/dts/sun8i-r40.dtsi | 36 +++++++++++++
arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 5 ++
.../boot/dts/sun8i-v40-bananapi-m2-berry.dts | 5 ++
6 files changed, 108 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-r40-cpu-opp.dtsi
--
2.25.1
From: qianfan Zhao <[email protected]>
The CPU of sun8i-r40 is powered by PMIC, let's add "cpu-supply" node.
Signed-off-by: qianfan Zhao <[email protected]>
---
arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 4 ++++
arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 4 ++++
arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 4 ++++
arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 4 ++++
4 files changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
index a6a1087a0c9b..4f30018ec4a2 100644
--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
@@ -113,6 +113,10 @@ &ahci {
status = "okay";
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&de {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sun8i-r40-feta40i.dtsi b/arch/arm/boot/dts/sun8i-r40-feta40i.dtsi
index 265e0fa57a32..b872b51a346d 100644
--- a/arch/arm/boot/dts/sun8i-r40-feta40i.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40-feta40i.dtsi
@@ -6,6 +6,10 @@
#include "sun8i-r40.dtsi"
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&i2c0 {
status = "okay";
diff --git a/arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts b/arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts
index 6931aaab2382..0eb1990742ff 100644
--- a/arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts
+++ b/arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts
@@ -88,6 +88,10 @@ &ahci {
status = "okay";
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&de {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 47954551f573..fdf8bd12faaa 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -107,6 +107,10 @@ &ahci {
status = "okay";
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&de {
status = "okay";
};
--
2.25.1
On 5/16/22 8:36 PM, [email protected] wrote:
> From: qianfan Zhao <[email protected]>
>
> The CPU of sun8i-r40 is powered by PMIC, let's add "cpu-supply" node.
>
> Signed-off-by: qianfan Zhao <[email protected]>
Reviewed-by: Samuel Holland <[email protected]>
Tested-by: Samuel Holland <[email protected]>
Dne torek, 17. maj 2022 ob 03:36:04 CEST je [email protected] napisal(a):
> From: qianfan Zhao <[email protected]>
>
> Change history:
> ===============
> v5(2022-05-17):
> - Move opp tables to sun8i-r40-cpu-opp.dtsi
> - cpufreq supports 720M, 912M, 1G, 1.1G, 1.2G
> - Add cooling supports
>
> v4(2022-05-16):
> - Invert two patches.
> - Drop the cpufreqs that exceeds 1G in opp tables.
>
> v3:
> - remove "allwinner-r40" compatible from allowlist.
> - split dts in two part.
>
> Test:
> =====
>
> cpufreq was tested by tools: https://github.com/ssvb/cpuburn-arm
>
> 1. cpufreq-ljt-stress-test
>
> - root@ubuntu:~/cpuburn-arm-master# ./cpufreq-ljt-stress-test
> - CPU stress test, which is doing JPEG decoding by libjpeg-turbo
> - at different cpufreq operating points.
> -
> - Testing CPU 0
> - 1200 MHz ............................................................ OK
> - 1104 MHz ............................................................ OK
> - 1008 MHz ............................................................ OK
> - 912 MHz ............................................................ OK
> - 720 MHz ............................................................ OK
> -
> - Testing CPU 1
> - 1200 MHz ............................................................ OK
> - 1104 MHz ............................................................ OK
> - 1008 MHz ............................................................ OK
> - 912 MHz ............................................................ OK
> - 720 MHz ............................................................ OK
> -
> - Testing CPU 2
> - 1200 MHz ............................................................ OK
> - 1104 MHz ............................................................ OK
> - 1008 MHz ............................................................ OK
> - 912 MHz ............................................................ OK
> - 720 MHz ............................................................ OK
> -
> - Testing CPU 3
> - 1200 MHz ............................................................ OK
> - 1104 MHz ............................................................ OK
> - 1008 MHz ............................................................ OK
> - 912 MHz ............................................................ OK
> - 720 MHz ............................................................ OK
>
> Overall result : PASSED
>
> 2. cpu freq slow down when cpuburn-a7.out running
>
> - temperature: 79213, online: 0-3, freq: 1200000
> - temperature: 79213, online: 0-3, freq: 1200000
> - temperature: 80230, online: 0-3, freq: 1104000
> - temperature: 78874, online: 0-3, freq: 1200000
> - temperature: 80004, online: 0-3, freq: 1104000
> - temperature: 79213, online: 0-3, freq: 1200000
> - temperature: 78196, online: 0-3, freq: 1200000
> - temperature: 79891, online: 0-3, freq: 1200000
> - temperature: 78422, online: 0-3, freq: 1200000
> - temperature: 80343, online: 0-3, freq: 1104000
> - temperature: 80343, online: 0-3, freq: 1104000
>
>
> qianfan Zhao (3):
> ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board
> ARM: dts: sun8i-r40: add opp table for cpu
> ARM: dts: sun8i-r40: Add thermal trip points/cooling maps
Fixed opp table name and applied. Thanks!
Best regards,
Jernej
>
> .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 5 ++
> arch/arm/boot/dts/sun8i-r40-cpu-opp.dtsi | 52 +++++++++++++++++++
> arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 5 ++
> arch/arm/boot/dts/sun8i-r40.dtsi | 36 +++++++++++++
> arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 5 ++
> .../boot/dts/sun8i-v40-bananapi-m2-berry.dts | 5 ++
> 6 files changed, 108 insertions(+)
> create mode 100644 arch/arm/boot/dts/sun8i-r40-cpu-opp.dtsi
>
> --
> 2.25.1