devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64
@ 2020-01-08  4:20 Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 1/4] arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes Vasily Khoruzhick
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08  4:20 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree
  Cc: Vasily Khoruzhick

This series introduces new DTSI with operating points for A64,
adds cooling maps and thermal tripping points and enables DVFS
on all the supported A64-based boards

v2: - drop two commits that were merged
    - mention where tripping points and OPP were taken from
    - add new line after each node in OPP table
    - split adding CPU clock and OPP into separate commits
    - put operating points into their own dtsi

Vasily Khoruzhick (4):
  arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes
  arm64: dts: allwinner: a64: add cooling maps and thermal tripping
    points
  arm64: dts: allwinner: a64: add dtsi with CPU operating points
  arm64: dts: allwinner: a64: enable DVFS

 .../allwinner/sun50i-a64-amarula-relic.dts    | 17 +++++
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 17 +++++
 .../dts/allwinner/sun50i-a64-cpu-opp.dtsi     | 75 +++++++++++++++++++
 .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 17 +++++
 .../dts/allwinner/sun50i-a64-olinuxino.dts    | 17 +++++
 .../dts/allwinner/sun50i-a64-orangepi-win.dts | 17 +++++
 .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 17 +++++
 .../dts/allwinner/sun50i-a64-pinebook.dts     | 17 +++++
 .../boot/dts/allwinner/sun50i-a64-sopine.dtsi | 17 +++++
 .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 17 +++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 52 +++++++++++++
 11 files changed, 280 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi

-- 
2.24.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
@ 2020-01-08  4:20 ` Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 2/4] arm64: dts: allwinner: a64: add cooling maps and thermal tripping points Vasily Khoruzhick
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08  4:20 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree
  Cc: Vasily Khoruzhick

Add CPU clock to the CPU nodes since it is a prerequisite for enabling
DVFS.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 5e3f16c3b706..77b33087866d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -90,6 +90,8 @@ cpu0: cpu@0 {
 			reg = <0>;
 			enable-method = "psci";
 			next-level-cache = <&L2>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 		};
 
 		cpu1: cpu@1 {
@@ -98,6 +100,8 @@ cpu1: cpu@1 {
 			reg = <1>;
 			enable-method = "psci";
 			next-level-cache = <&L2>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 		};
 
 		cpu2: cpu@2 {
@@ -106,6 +110,8 @@ cpu2: cpu@2 {
 			reg = <2>;
 			enable-method = "psci";
 			next-level-cache = <&L2>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 		};
 
 		cpu3: cpu@3 {
@@ -114,6 +120,8 @@ cpu3: cpu@3 {
 			reg = <3>;
 			enable-method = "psci";
 			next-level-cache = <&L2>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 		};
 
 		L2: l2-cache {
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/4] arm64: dts: allwinner: a64: add cooling maps and thermal tripping points
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 1/4] arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes Vasily Khoruzhick
@ 2020-01-08  4:20 ` Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 3/4] arm64: dts: allwinner: a64: add dtsi with CPU operating points Vasily Khoruzhick
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08  4:20 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree
  Cc: Vasily Khoruzhick

Add cooling maps and thermal tripping points to prevent CPU overheating when
running at the highest frequency. Tripping points are taken from A33 dts since
A64 user manual doesn't mention when we should start throttling.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 77b33087866d..54a741f3cd8c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -92,6 +92,7 @@ cpu0: cpu@0 {
 			next-level-cache = <&L2>;
 			clocks = <&ccu CLK_CPUX>;
 			clock-names = "cpu";
+			#cooling-cells = <2>;
 		};
 
 		cpu1: cpu@1 {
@@ -102,6 +103,7 @@ cpu1: cpu@1 {
 			next-level-cache = <&L2>;
 			clocks = <&ccu CLK_CPUX>;
 			clock-names = "cpu";
+			#cooling-cells = <2>;
 		};
 
 		cpu2: cpu@2 {
@@ -112,6 +114,7 @@ cpu2: cpu@2 {
 			next-level-cache = <&L2>;
 			clocks = <&ccu CLK_CPUX>;
 			clock-names = "cpu";
+			#cooling-cells = <2>;
 		};
 
 		cpu3: cpu@3 {
@@ -122,6 +125,7 @@ cpu3: cpu@3 {
 			next-level-cache = <&L2>;
 			clocks = <&ccu CLK_CPUX>;
 			clock-names = "cpu";
+			#cooling-cells = <2>;
 		};
 
 		L2: l2-cache {
@@ -226,6 +230,46 @@ cpu_thermal: cpu0-thermal {
 			polling-delay-passive = <0>;
 			polling-delay = <0>;
 			thermal-sensors = <&ths 0>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+				map1 {
+					trip = <&cpu_alert1>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <75000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_alert1: cpu_alert1 {
+					/* milliCelsius */
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <110000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
 		};
 
 		gpu0_thermal: gpu0-thermal {
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/4] arm64: dts: allwinner: a64: add dtsi with CPU operating points
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 1/4] arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 2/4] arm64: dts: allwinner: a64: add cooling maps and thermal tripping points Vasily Khoruzhick
@ 2020-01-08  4:20 ` Vasily Khoruzhick
  2020-01-08  4:20 ` [PATCH v2 4/4] arm64: dts: allwinner: a64: enable DVFS Vasily Khoruzhick
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08  4:20 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree
  Cc: Vasily Khoruzhick

Add operating points for A64. These are taken from FEX file from BSP
for A64.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 .../dts/allwinner/sun50i-a64-cpu-opp.dtsi     | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi
new file mode 100644
index 000000000000..578c37490d90
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 Vasily khoruzhick <anarsoul@gmail.com>
+ */
+
+/ {
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-648000000 {
+			opp-hz = /bits/ 64 <648000000>;
+			opp-microvolt = <1040000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-816000000 {
+			opp-hz = /bits/ 64 <816000000>;
+			opp-microvolt = <1100000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-912000000 {
+			opp-hz = /bits/ 64 <912000000>;
+			opp-microvolt = <1120000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-960000000 {
+			opp-hz = /bits/ 64 <960000000>;
+			opp-microvolt = <1160000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-1008000000 {
+			opp-hz = /bits/ 64 <1008000000>;
+			opp-microvolt = <1200000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-1056000000 {
+			opp-hz = /bits/ 64 <1056000000>;
+			opp-microvolt = <1240000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-1104000000 {
+			opp-hz = /bits/ 64 <1104000000>;
+			opp-microvolt = <1260000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp-1152000000 {
+			opp-hz = /bits/ 64 <1152000000>;
+			opp-microvolt = <1300000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+	};
+};
+
+&cpu0 {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
+
+&cpu1 {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
+
+&cpu2 {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
+
+&cpu3 {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 4/4] arm64: dts: allwinner: a64: enable DVFS
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
                   ` (2 preceding siblings ...)
  2020-01-08  4:20 ` [PATCH v2 3/4] arm64: dts: allwinner: a64: add dtsi with CPU operating points Vasily Khoruzhick
@ 2020-01-08  4:20 ` Vasily Khoruzhick
  2020-01-08 16:04 ` [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Maxime Ripard
  2020-01-09 16:33 ` Maxime Ripard
  5 siblings, 0 replies; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08  4:20 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree
  Cc: Vasily Khoruzhick

Add CPU regulator and operating points for all the A64-based boards
that are currently supported to enable DVFS.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 .../dts/allwinner/sun50i-a64-amarula-relic.dts  | 17 +++++++++++++++++
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts   | 17 +++++++++++++++++
 .../dts/allwinner/sun50i-a64-nanopi-a64.dts     | 17 +++++++++++++++++
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 17 +++++++++++++++++
 .../dts/allwinner/sun50i-a64-orangepi-win.dts   | 17 +++++++++++++++++
 .../boot/dts/allwinner/sun50i-a64-pine64.dts    | 17 +++++++++++++++++
 .../boot/dts/allwinner/sun50i-a64-pinebook.dts  | 17 +++++++++++++++++
 .../boot/dts/allwinner/sun50i-a64-sopine.dtsi   | 17 +++++++++++++++++
 .../boot/dts/allwinner/sun50i-a64-teres-i.dts   | 17 +++++++++++++++++
 9 files changed, 153 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
index 5634245d11db..6ee7291293ec 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
@@ -7,6 +7,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -65,6 +66,22 @@ wifi_pwrseq: wifi-pwrseq {
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &csi {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 208373efee49..9b80e06f40d6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -43,6 +43,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -108,6 +109,22 @@ &codec_analog {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &dai {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 9b9d9157128c..6b81b91da504 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -43,6 +43,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -87,6 +88,22 @@ wifi_pwrseq: wifi_pwrseq {
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &de {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 01a9a52edae4..fb45c32558c5 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -43,6 +43,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -87,6 +88,22 @@ wifi_pwrseq: wifi_pwrseq {
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &de {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index f54a415f2e3b..a510cf40a9fe 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -44,6 +44,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -123,6 +124,22 @@ &codec_analog {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &dai {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 409523cb0950..7cb01886aa32 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -43,6 +43,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -84,6 +85,22 @@ &codec_analog {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &dai {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 78c82a665c84..74a8569c677f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
@@ -98,6 +99,22 @@ &codec_analog {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &dai {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
index 9d20e13f0c02..e64f330ca420 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
@@ -44,6 +44,7 @@
  */
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -51,6 +52,22 @@ &codec_analog {
 	cpvdd-supply = <&reg_eldo1>;
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index 970415106dcf..0356608ce467 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "sun50i-a64.dtsi"
+#include "sun50i-a64-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
@@ -104,6 +105,22 @@ &de {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci1 {
 	status = "okay";
 };
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
                   ` (3 preceding siblings ...)
  2020-01-08  4:20 ` [PATCH v2 4/4] arm64: dts: allwinner: a64: enable DVFS Vasily Khoruzhick
@ 2020-01-08 16:04 ` Maxime Ripard
  2020-01-08 16:38   ` Vasily Khoruzhick
  2020-01-09 16:33 ` Maxime Ripard
  5 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2020-01-08 16:04 UTC (permalink / raw)
  To: Vasily Khoruzhick
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, linux-arm-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

Hi,

On Tue, Jan 07, 2020 at 08:20:14PM -0800, Vasily Khoruzhick wrote:
> This series introduces new DTSI with operating points for A64,
> adds cooling maps and thermal tripping points and enables DVFS
> on all the supported A64-based boards

Thanks for that new series.

I'm not sure I've seen the answer, but how did you test that the OPPs
were stable?

So far, the only method that proved to be reliable was to run
https://github.com/ssvb/cpuburn-arm/blob/master/cpufreq-ljt-stress-test

Could you paste the result (one board should be enough) ?

Thanks
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64
  2020-01-08 16:04 ` [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Maxime Ripard
@ 2020-01-08 16:38   ` Vasily Khoruzhick
  2020-01-09 16:30     ` Maxime Ripard
  0 siblings, 1 reply; 9+ messages in thread
From: Vasily Khoruzhick @ 2020-01-08 16:38 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, arm-linux, devicetree

On Wed, Jan 8, 2020 at 8:04 AM Maxime Ripard <mripard@kernel.org> wrote:
>
> Hi,
>
> On Tue, Jan 07, 2020 at 08:20:14PM -0800, Vasily Khoruzhick wrote:
> > This series introduces new DTSI with operating points for A64,
> > adds cooling maps and thermal tripping points and enables DVFS
> > on all the supported A64-based boards
>
> Thanks for that new series.
>
> I'm not sure I've seen the answer, but how did you test that the OPPs
> were stable?

I've been using them for close to 2 years and haven't seen any issues so far.

> So far, the only method that proved to be reliable was to run
> https://github.com/ssvb/cpuburn-arm/blob/master/cpufreq-ljt-stress-test
>
> Could you paste the result (one board should be enough) ?

Here is a run on Pine64-LTS:
https://gist.github.com/anarsoul/23c361b42bcdf4f2e23624f74c4c94bc

Regards,
Vasily

> Thanks
> Maxime

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64
  2020-01-08 16:38   ` Vasily Khoruzhick
@ 2020-01-09 16:30     ` Maxime Ripard
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-01-09 16:30 UTC (permalink / raw)
  To: Vasily Khoruzhick
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, arm-linux, devicetree

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

On Wed, Jan 08, 2020 at 08:38:10AM -0800, Vasily Khoruzhick wrote:
> On Wed, Jan 8, 2020 at 8:04 AM Maxime Ripard <mripard@kernel.org> wrote:
> >
> > Hi,
> >
> > On Tue, Jan 07, 2020 at 08:20:14PM -0800, Vasily Khoruzhick wrote:
> > > This series introduces new DTSI with operating points for A64,
> > > adds cooling maps and thermal tripping points and enables DVFS
> > > on all the supported A64-based boards
> >
> > Thanks for that new series.
> >
> > I'm not sure I've seen the answer, but how did you test that the OPPs
> > were stable?
>
> I've been using them for close to 2 years and haven't seen any
> issues so far.

I'm sure you did, but those issues can be easily masked depending on
your config (and the default governor you have) and the workload.

> > So far, the only method that proved to be reliable was to run
> > https://github.com/ssvb/cpuburn-arm/blob/master/cpufreq-ljt-stress-test
> >
> > Could you paste the result (one board should be enough) ?
>
> Here is a run on Pine64-LTS:
> https://gist.github.com/anarsoul/23c361b42bcdf4f2e23624f74c4c94bc

Awesome, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64
  2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
                   ` (4 preceding siblings ...)
  2020-01-08 16:04 ` [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Maxime Ripard
@ 2020-01-09 16:33 ` Maxime Ripard
  5 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-01-09 16:33 UTC (permalink / raw)
  To: Vasily Khoruzhick
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, linux-arm-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Tue, Jan 07, 2020 at 08:20:14PM -0800, Vasily Khoruzhick wrote:
> This series introduces new DTSI with operating points for A64,
> adds cooling maps and thermal tripping points and enables DVFS
> on all the supported A64-based boards
>
> v2: - drop two commits that were merged
>     - mention where tripping points and OPP were taken from
>     - add new line after each node in OPP table
>     - split adding CPU clock and OPP into separate commits
>     - put operating points into their own dtsi

Applied, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-09 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  4:20 [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Vasily Khoruzhick
2020-01-08  4:20 ` [PATCH v2 1/4] arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes Vasily Khoruzhick
2020-01-08  4:20 ` [PATCH v2 2/4] arm64: dts: allwinner: a64: add cooling maps and thermal tripping points Vasily Khoruzhick
2020-01-08  4:20 ` [PATCH v2 3/4] arm64: dts: allwinner: a64: add dtsi with CPU operating points Vasily Khoruzhick
2020-01-08  4:20 ` [PATCH v2 4/4] arm64: dts: allwinner: a64: enable DVFS Vasily Khoruzhick
2020-01-08 16:04 ` [PATCH v2 0/4] arm64: allwinner: a64: Enable DVFS on A64 Maxime Ripard
2020-01-08 16:38   ` Vasily Khoruzhick
2020-01-09 16:30     ` Maxime Ripard
2020-01-09 16:33 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).