Skip to contentSkip to conversation

arm64: dts: meson: odroid-n2: extend cpu opp-points

PATCH Superseded Tim Lewis 3 participants 3 messages Apr 18, 2020 – Apr 22, 2020

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Tim Lewis

author
#0 lore raw

PATCH v2 1/1 arm64: dts: meson: odroid-n2: extend cpu opp-points

Odroid N2 has a large heatsink and HardKernel supports overclock through the addition to extra opp points in their official kernel sources [1]. Add these to the N2 dts only, as other S922X devices may not have suitable heatsinks.

[1] https://github.com/hardkernel/linux/commit/f86cd9487c7483b2a05f448b9ebacf6bd5a2ad2f

---
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +19 -0
index 42f154057..6f32ac83f 100644
@@ -260,6 +260,25 @@
 			};
 		};
 	};
+
+	cpu_opp_table_0: opp-table-0 {
+		opp-1992000000 {
+			opp-hz = /bits/ 64 <1992000000>;
+			opp-microvolt = <1001000>;
+		};
+	};
+
+	cpub_opp_table_1: opp-table-1 {
+		opp-1800000000 {
+			opp-hz = /bits/ 64 <1800000000>;
+			opp-microvolt = <981000>;
+		};
+
+		opp-1908000000 {
+			opp-hz = /bits/ 64 <1908000000>;
+			opp-microvolt = <1022000>;
+		};
+	};
 };
 
 &arb {
Signature · 1 line
2.17.1
Tested-by on v2 1/1
#1 lore raw
Quoted 10 lines · Tim Lewis

Odroid N2 has a large heatsink and HardKernel supports overclock through the addition to extra opp points in their official kernel sources [1]. Add these to the N2 dts only, as other S922X devices may not have suitable heatsinks.

[1] https://github.com/hardkernel/linux/commit/f86cd9487c7483b2a05f448b9ebacf6bd5a2ad2f

Kodi is not a demanding workload, but the extra opp points are being used:

N2:~ # cat /sys/devices/system/cpu/cpufreq/policy0/stats/trans_table
From : To

         :    100000    250000    500000    667000   1000000   1200000   1398000   1512000   1608000   1704000   1896000   1992000 
   100000:         0     20465       294        81        47         0         1         0         0         0         0       183 
   250000:     20388         0       161        52        59         0         0         0         1         0         1       169 
   500000:       199       256         0         9        47         1         2         0         0         0         0        57 
   667000:       177        50        10         0       284         1         1         0         0         0         0       136 
  1000000:       230        12        15       284         0         1         2         0         0         0         0       285 
  1200000:         0         0         0         1         0         0         0         0         0         1         0         2 
  1398000:         1         1         0         2         0         0         0         0         1         1         0         3 
  1512000:         0         0         0         0         0         0         0         0         0         1         0         2 
  1608000:         0         0         0         0         0         0         0         1         0         0         0         2 
  1704000:         0         1         0         0         0         0         1         0         0         0         0         2 
  1896000:         0         0         1         0         0         0         0         0         0         0         0         1 
  1992000:        76        47        90       230       392         0         2         2         1         1         1         0 

N2:~ # cat /sys/devices/system/cpu/cpufreq/policy2/stats/trans_table
From : To

         :    100000    250000    500000    667000   1000000   1200000   1398000   1512000   1608000   1704000   1800000   1908000 
   100000:         0      1698       130        76        87         0         0         0         1         0         1       199 
   250000:      1655         0        25        15       357         1         2         0         1         0         0        12 
   500000:       258        54         0     50102        30         3         1         0         0         0         1        32 
   667000:       267       151     49708         0        77         3         0         0         0         0         0        11 
  1000000:         3         5       525        15         0         3         2         0         1         1         0         6 
  1200000:         0         2         1         2         2         0         3         0         0         0         1         4 
  1398000:         1         0         1         1         4         0         0         1         1         0         2         2 
  1512000:         0         0         0         0         0         0         1         0         0         0         0         1 
  1608000:         1         0         0         1         0         1         0         0         0         0         0         3 
  1704000:         0         0         0         0         0         1         0         1         0         0         0         1 
  1800000:         0         0         1         1         0         0         1         0         1         0         0         1 
  1908000:         8       158        90         4         3         3         3         0         1         2         0         0 

Board boots in under 4 seconds, Kodi home-screen in about 7 seconds. I haven’t seen the N2 rise over 44ºC.

I’ve also tested some S922X box devices (moving the change to meson-g12b-s922x.dtsi) and no obvious issues.

Quoted 37 lines

---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++

1 file changed, 19 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +19 -0
index 42f154057..6f32ac83f 100644
@@ -260,6 +260,25 @@
 			};
 		};
 	};
+
+	cpu_opp_table_0: opp-table-0 {
+		opp-1992000000 {
+			opp-hz = /bits/ 64 <1992000000>;
+			opp-microvolt = <1001000>;
+		};
+	};
+
+	cpub_opp_table_1: opp-table-1 {
+		opp-1800000000 {
+			opp-hz = /bits/ 64 <1800000000>;
+			opp-microvolt = <981000>;
+		};
+
+		opp-1908000000 {
+			opp-hz = /bits/ 64 <1908000000>;
+			opp-microvolt = <1022000>;
+		};
+	};
 };
 
 &arb {
Signature · 1 line
2.17.1
#2 lore raw

Hi,

Could you add "[PATCH vX]" in the subject ?

Quoted 84 lines · Christian Hewitt
Quoted 10 lines · Tim Lewis

Odroid N2 has a large heatsink and HardKernel supports overclock through the addition to extra opp points in their official kernel sources [1]. Add these to the N2 dts only, as other S922X devices may not have suitable heatsinks.

[1] https://github.com/hardkernel/linux/commit/f86cd9487c7483b2a05f448b9ebacf6bd5a2ad2f

Kodi is not a demanding workload, but the extra opp points are being used:

N2:~ # cat /sys/devices/system/cpu/cpufreq/policy0/stats/trans_table
From : To

         :    100000    250000    500000    667000   1000000   1200000   1398000   1512000   1608000   1704000   1896000   1992000 
   100000:         0     20465       294        81        47         0         1         0         0         0         0       183 
   250000:     20388         0       161        52        59         0         0         0         1         0         1       169 
   500000:       199       256         0         9        47         1         2         0         0         0         0        57 
   667000:       177        50        10         0       284         1         1         0         0         0         0       136 
  1000000:       230        12        15       284         0         1         2         0         0         0         0       285 
  1200000:         0         0         0         1         0         0         0         0         0         1         0         2 
  1398000:         1         1         0         2         0         0         0         0         1         1         0         3 
  1512000:         0         0         0         0         0         0         0         0         0         1         0         2 
  1608000:         0         0         0         0         0         0         0         1         0         0         0         2 
  1704000:         0         1         0         0         0         0         1         0         0         0         0         2 
  1896000:         0         0         1         0         0         0         0         0         0         0         0         1 
  1992000:        76        47        90       230       392         0         2         2         1         1         1         0 

N2:~ # cat /sys/devices/system/cpu/cpufreq/policy2/stats/trans_table
From : To

         :    100000    250000    500000    667000   1000000   1200000   1398000   1512000   1608000   1704000   1800000   1908000 
   100000:         0      1698       130        76        87         0         0         0         1         0         1       199 
   250000:      1655         0        25        15       357         1         2         0         1         0         0        12 
   500000:       258        54         0     50102        30         3         1         0         0         0         1        32 
   667000:       267       151     49708         0        77         3         0         0         0         0         0        11 
  1000000:         3         5       525        15         0         3         2         0         1         1         0         6 
  1200000:         0         2         1         2         2         0         3         0         0         0         1         4 
  1398000:         1         0         1         1         4         0         0         1         1         0         2         2 
  1512000:         0         0         0         0         0         0         1         0         0         0         0         1 
  1608000:         1         0         0         1         0         1         0         0         0         0         0         3 
  1704000:         0         0         0         0         0         1         0         1         0         0         0         1 
  1800000:         0         0         1         1         0         0         1         0         1         0         0         1 
  1908000:         8       158        90         4         3         3         3         0         1         2         0         0 

Board boots in under 4 seconds, Kodi home-screen in about 7 seconds. I haven’t seen the N2 rise over 44ºC.

I’ve also tested some S922X box devices (moving the change to meson-g12b-s922x.dtsi) and no obvious issues.

Quoted 33 lines

---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++

1 file changed, 19 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +19 -0
index 42f154057..6f32ac83f 100644
@@ -260,6 +260,25 @@
 			};
 		};
 	};
+
+	cpu_opp_table_0: opp-table-0 {
+		opp-1992000000 {
+			opp-hz = /bits/ 64 <1992000000>;
+			opp-microvolt = <1001000>;
+		};
+	};
+
+	cpub_opp_table_1: opp-table-1 {
+		opp-1800000000 {
+			opp-hz = /bits/ 64 <1800000000>;
+			opp-microvolt = <981000>;
+		};
+
+		opp-1908000000 {
+			opp-hz = /bits/ 64 <1908000000>;
+			opp-microvolt = <1022000>;
+		};
+	};
 };
 
Quoted 5 lines
Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +0 -0
 &arb {
Signature · 1 line
2.17.1

I think it could be moved to all s922x devices since we have dvfs and thermal management enabled by default, so other devices with inferior cooling will use lower OPPs automatically.

Neil