arm64: dts: allwinner: h6: Add cooling map for GPU
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/4 arm64: defconfig: Enable devfreq cooling device
From: Clément Péron <[email protected]>
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature.
Enable this driver for ARM64 SoC.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -584,6 +584,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_INA3221=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y +CONFIG_DEVFREQ_THERMAL=y CONFIG_THERMAL_EMULATION=y CONFIG_IMX_SC_THERMAL=m CONFIG_IMX8MM_THERMAL=m
Signature · 1 line
2.34.1
PATCH 2/4 arm64: dts: allwinner: h6: Add cooling map for GPU
In reply to a message not in the archiveFrom: Clément Péron <[email protected]>
Add a simple cooling map for the GPU.
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +22 -0
@@ -186,6 +186,7 @@ gpu: gpu@1800000 { clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; clock-names = "core", "bus"; resets = <&ccu RST_BUS_GPU>; + #cooling-cells = <2>; status = "disabled"; };
@@ -1075,6 +1076,27 @@ gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>; + + trips { + gpu_alert: gpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; }; };
Signature · 1 line
2.34.1
Jernej Škrabec
maintainerDne četrtek, 18. avgust 2022 ob 22:39:26 CEST je Clément Péron napisal(a):
Quoted 5 lines
From: Clément Péron <[email protected]>
Add a simple cooling map for the GPU.
Signed-off-by Clément Péron <[email protected]>
Is this really patch 2/4? I only got patches 2-4, but not patch 1.
Best regards,
Jernej
Quoted 21 lines
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsiindex5a28303d3d4c..943ae5374dd6100644arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +1
-0@@ -186,6 +186,7 @@ gpu: gpu@1800000 { clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; clock-names = "core", "bus"; resets = <&ccu RST_BUS_GPU>; + #cooling-cells = <2>; status = "disabled"; };@@ -1075,6 +1076,27 @@ gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>;
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi gpu-thermal { · line 1088
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ + trips { + gpu_alert: gpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu-crit { + temperature =
<100000>;
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi gpu-thermal {
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +9
-0+ hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert>; + cooling-device = <&gpu
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +2
-0+ }; + }; }; }; };
Hi Jernej,
Quoted 9 lines · Jernej Škrabec
Dne četrtek, 18. avgust 2022 ob 22:39:26 CEST je Clément Péron napisal(a):
Quoted 5 lines
From: Clément Péron <[email protected]>
Add a simple cooling map for the GPU.
Signed-off-by Clément Péron <[email protected]>Is this really patch 2/4? I only got patches 2-4, but not patch 1.
Sorry I have updated the way I send my patches, so each patch is sent regarding what is outputted by 'scripts/get_maintainer.pl'
Which has been sent to :
Catalin Marinas / Will Deacon <[email protected]>
And CC to :
[email protected] / [email protected]
I will resend and force this patch to be sent to linux ML / Maintainer too.
Best regards,
Clement
Quoted 55 lines
Best regards,
JernejQuoted 21 lines
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsiindex5a28303d3d4c..943ae5374dd6100644arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +1
-0@@ -186,6 +186,7 @@ gpu: gpu@1800000 { clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; clock-names = "core", "bus"; resets = <&ccu RST_BUS_GPU>; + #cooling-cells = <2>; status = "disabled"; };@@ -1075,6 +1076,27 @@ gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>;arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi gpu-thermal { · line 1088
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ + trips { + gpu_alert: gpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu-crit { + temperature =<100000>;
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi gpu-thermal {
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +9
-0+ hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert>; + cooling-device = <&gpu
THERMAL_NO_LIMITTHERMAL_NO_LIMIT>;Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +2
-0+ }; + }; }; }; };
PATCH 3/4 arm64: dts: allwinner: h6: Add GPU OPP table
In reply to a message not in the archiveFrom: Clément Péron <[email protected]>
Add an Operating Performance Points table for the GPU to enable Dynamic Voltage & Frequency Scaling on the H6.
The voltage range is set with minival voltage set to the target and the maximal voltage set to 1.2V. This allow DVFS framework to work properly on board with fixed regulator.
--- .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi new file +88 -0
@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2022 Clément Péron <[email protected]> + +/ { + gpu_opp_table: gpu-opp-table { + compatible = "operating-points-v2"; + + opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000 820000 1200000>; + }; + + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000 830000 1200000>; + }; + + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000 840000 1200000>; + }; + + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000 850000 1200000>; + }; + + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000 860000 1200000>; + }; + + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000 870000 1200000>; + }; + + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000 890000 1200000>; + }; + + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000 910000 1200000>; + }; + + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000 930000 1200000>; + }; + + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000 950000 1200000>; + }; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000 1040000 1200000>; + }; + }; + +}; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +};
Signature · 1 line
2.34.1
PATCH 4/4 arm64: dts: allwinner: beelink-gs1: Enable GPU OPP
In reply to a message not in the archiveEnable GPU OPP table for Beelink GS1
--- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +2 -0
@@ -5,6 +5,7 @@ #include "sun50i-h6.dtsi" #include "sun50i-h6-cpu-opp.dtsi" +#include "sun50i-h6-gpu-opp.dtsi" #include <dt-bindings/gpio/gpio.h>
@@ -261,6 +262,7 @@ reg_dcdca: dcdca { }; reg_dcdcc: dcdcc { + regulator-always-on; regulator-enable-ramp-delay = <32000>; regulator-min-microvolt = <810000>; regulator-max-microvolt = <1080000>;
Signature · 1 line
2.34.1