diff mbox series

[v2] arm64: dts: meson: odroid-n2: extend cpu opp-points

Message ID 20200418214223.GA4484@imac (mailing list archive)
State New, archived
Headers show
Series [v2] arm64: dts: meson: odroid-n2: extend cpu opp-points | expand

Commit Message

Tim Lewis April 18, 2020, 9:42 p.m. UTC
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
Signed-off-by: Tim Lewis <elatllat@gmail.com>

---
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Christian Hewitt April 22, 2020, 2:54 p.m. UTC | #1
> On 19 Apr 2020, at 1:42 am, Tim Lewis <elatllat@gmail.com> wrote:
> 
> 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
> Signed-off-by: Tim Lewis <elatllat@gmail.com>

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.

Tested-by: Christian Hewitt <christianshewitt@gmail.com>

> ---
> .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> index 42f154057..6f32ac83f 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> @@ -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 {
> -- 
> 2.17.1
>
Neil Armstrong April 22, 2020, 3:08 p.m. UTC | #2
Hi,

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

On 22/04/2020 16:54, Christian Hewitt wrote:
> 
>> On 19 Apr 2020, at 1:42 am, Tim Lewis <elatllat@gmail.com> wrote:
>>
>> 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
>> Signed-off-by: Tim Lewis <elatllat@gmail.com>
> 
> 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.
> 
> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
> 
>> ---
>> .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
>> index 42f154057..6f32ac83f 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
>> @@ -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 {
>> -- 
>> 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
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 42f154057..6f32ac83f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -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 {