All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	"Clément Péron" <peron.clem@gmail.com>
Subject: [PATCH v2 7/7] arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Orange Pi boards
Date: Sun,  5 Apr 2020 19:36:01 +0200	[thread overview]
Message-ID: <20200405173601.24331-8-peron.clem@gmail.com> (raw)
In-Reply-To: <20200405173601.24331-1-peron.clem@gmail.com>

Enable CPU and GPU opp tables for Orange Pi boards.

This needs to change the CPU regulator max voltage to fit
the OPP table.

Also add the ramp-delay information to avoid any out of spec
running as the regulator is slower at reaching the voltage
requested compare to the PLL reaching the frequency.

There is no such information for AXP805 but similar PMIC (AXP813)
has a DVM (Dynamic Voltage scaling Management) ramp rate equal
to 2500uV/us.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 37f4c57597d4..f3ba500ce4c6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -5,6 +5,8 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
+#include "sun50i-h6-gpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -45,6 +47,10 @@
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdca>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -161,7 +167,8 @@
 			reg_dcdca: dcdca {
 				regulator-always-on;
 				regulator-min-microvolt = <810000>;
-				regulator-max-microvolt = <1080000>;
+				regulator-max-microvolt = <1160000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-cpu";
 			};
 
@@ -169,6 +176,7 @@
 				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-gpu";
 			};
 
-- 
2.20.1


WARNING: multiple messages have this Message-ID (diff)
From: "Clément Péron" <peron.clem@gmail.com>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	"Clément Péron" <peron.clem@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 7/7] arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Orange Pi boards
Date: Sun,  5 Apr 2020 19:36:01 +0200	[thread overview]
Message-ID: <20200405173601.24331-8-peron.clem@gmail.com> (raw)
In-Reply-To: <20200405173601.24331-1-peron.clem@gmail.com>

Enable CPU and GPU opp tables for Orange Pi boards.

This needs to change the CPU regulator max voltage to fit
the OPP table.

Also add the ramp-delay information to avoid any out of spec
running as the regulator is slower at reaching the voltage
requested compare to the PLL reaching the frequency.

There is no such information for AXP805 but similar PMIC (AXP813)
has a DVM (Dynamic Voltage scaling Management) ramp rate equal
to 2500uV/us.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 37f4c57597d4..f3ba500ce4c6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -5,6 +5,8 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
+#include "sun50i-h6-gpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -45,6 +47,10 @@
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdca>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -161,7 +167,8 @@
 			reg_dcdca: dcdca {
 				regulator-always-on;
 				regulator-min-microvolt = <810000>;
-				regulator-max-microvolt = <1080000>;
+				regulator-max-microvolt = <1160000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-cpu";
 			};
 
@@ -169,6 +176,7 @@
 				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-gpu";
 			};
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-04-05 17:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 17:35 [PATCH v2 0/7] Add support for Allwinner H6 DVFS Clément Péron
2020-04-05 17:35 ` Clément Péron
2020-04-05 17:35 ` [PATCH v2 1/7] arm64: dts: allwinner: h6: Add clock to CPU cores Clément Péron
2020-04-05 17:35   ` Clément Péron
2020-04-05 17:35 ` [PATCH v2 2/7] arm64: dts: allwinner: h6: Add thermal trip points/cooling map Clément Péron
2020-04-05 17:35   ` Clément Péron
2020-04-05 17:35 ` [PATCH v2 3/7] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table Clément Péron
2020-04-05 17:35   ` Clément Péron
2020-04-06  8:14   ` Maxime Ripard
2020-04-06  8:14     ` Maxime Ripard
2020-04-06 18:03     ` Clément Péron
2020-04-06 18:03       ` Clément Péron
2020-04-07  8:47       ` Maxime Ripard
2020-04-07  8:47         ` Maxime Ripard
2020-04-05 17:35 ` [PATCH v2 4/7] arm64: dts: allwinner: h6: Add GPU " Clément Péron
2020-04-05 17:35   ` Clément Péron
2020-04-06  8:16   ` Maxime Ripard
2020-04-06  8:16     ` Maxime Ripard
2020-04-06  8:58     ` Clément Péron
2020-04-06  8:58       ` Clément Péron
2020-04-05 17:35 ` [PATCH v2 5/7] arm64: configs: Enable sun50i cpufreq nvmem Clément Péron
2020-04-05 17:35   ` Clément Péron
2020-04-06  8:16   ` Maxime Ripard
2020-04-06  8:16     ` Maxime Ripard
2020-04-05 17:36 ` [PATCH v2 6/7] arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Beelink GS1 Clément Péron
2020-04-05 17:36   ` Clément Péron
2020-04-05 17:36 ` Clément Péron [this message]
2020-04-05 17:36   ` [PATCH v2 7/7] arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Orange Pi boards Clément Péron
2020-04-06  9:10   ` Clément Péron
2020-04-06  9:10     ` Clément Péron
2020-04-06  8:10 ` [PATCH v2 0/7] Add support for Allwinner H6 DVFS Maxime Ripard
2020-04-06  8:10   ` Maxime Ripard
2020-04-06  9:07   ` Clément Péron
2020-04-06  9:07     ` Clément Péron
2020-04-13 13:37     ` Clément Péron
2020-04-13 13:37       ` Clément Péron
2020-04-15 10:28       ` Maxime Ripard
2020-04-15 10:28         ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200405173601.24331-8-peron.clem@gmail.com \
    --to=peron.clem@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.