summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/amlogic
diff options
context:
space:
mode:
authorDmitry Rokosov <ddrokosov@salutedevices.com>2024-02-10 00:28:06 +0300
committerNeil Armstrong <neil.armstrong@linaro.org>2024-02-13 11:40:42 +0300
commita06d4fdec1ce800188bec15c0219d6774dd145f8 (patch)
tree8c55bfdefdfe90654c74045d61828255095e80d4 /arch/arm64/boot/dts/amlogic
parent7c3215fe05fe3b8faacc03245cc922c4b98075d7 (diff)
downloadlinux-a06d4fdec1ce800188bec15c0219d6774dd145f8.tar.xz
arm64: dts: amlogic: axg: initialize default SoC capacitance
The capacitance value is required for the usage of the cpufreq cooling device and power_allocator thermal governor in the appropriate energy model. It helps to compute the power estimated by the SoC at the appropriate frequency. If it is the frequency of an existing OPP, or at the frequency of the first OPP above the requested value otherwise. The power is estimated as P = C * V^2 * f, with C being the SoC's capacitance and V and f respectively representing the voltage and frequency of the OPP. Since AXG SoC doesn't have SCMI protocol support, we need to initialize capacitance using the 'dynamic-power-coefficient' DT entry. Its value is retrieved from the vendor kernel, and it gives us the following freq2power mapping: +-----------+--------+ | frequency,| power, | | MHz | uW | +-----------+--------+ | 100 | 10354 | +-----------+--------+ | 250 | 27104 | +-----------+--------+ | 500 | 55447 | +-----------+--------+ | 667 | 77327 | +-----------+--------+ | 1000 | 129024 | +-----------+--------+ | 1200 | 164656 | +-----------+--------+ | 1296 | 192489 | +-----------+--------+ | 1416 | 239870 | +-----------+--------+ Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240209212816.11187-3-ddrokosov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Diffstat (limited to 'arch/arm64/boot/dts/amlogic')
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-axg.dtsi4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index ea96fef328e8..6d12b760b90f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -74,6 +74,7 @@
enable-method = "psci";
next-level-cache = <&l2>;
clocks = <&scpi_dvfs 0>;
+ dynamic-power-coefficient = <140>;
#cooling-cells = <2>;
};
@@ -84,6 +85,7 @@
enable-method = "psci";
next-level-cache = <&l2>;
clocks = <&scpi_dvfs 0>;
+ dynamic-power-coefficient = <140>;
#cooling-cells = <2>;
};
@@ -94,6 +96,7 @@
enable-method = "psci";
next-level-cache = <&l2>;
clocks = <&scpi_dvfs 0>;
+ dynamic-power-coefficient = <140>;
#cooling-cells = <2>;
};
@@ -104,6 +107,7 @@
enable-method = "psci";
next-level-cache = <&l2>;
clocks = <&scpi_dvfs 0>;
+ dynamic-power-coefficient = <140>;
#cooling-cells = <2>;
};