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>,
"Piotr Oniszczuk" <warpme@o2.pl>
Subject: [PATCH] arm64: dts: allwinner: h6: Use dedicated CPU OPP table for Tanix TX6
Date: Sun, 26 Apr 2020 14:17:09 +0200 [thread overview]
Message-ID: <20200426121709.1216-1-peron.clem@gmail.com> (raw)
Tanix TX6 has a fixed regulator. As DVFS is instructed to change
voltage to meet OPP table. The DVFS is not working as expected.
Introduce a dedicated OPP Table where voltage are equals to
the fixed regulator.
Reported-by: Piotr Oniszczuk <warpme@o2.pl>
Fixes: add1e27fb703 ("arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6")
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
.../sun50i-h6-tanix-tx6-cpu-opp.dtsi | 116 ++++++++++++++++++
.../dts/allwinner/sun50i-h6-tanix-tx6.dts | 2 +-
2 files changed, 117 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-cpu-opp.dtsi
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-cpu-opp.dtsi
new file mode 100644
index 000000000000..062940115563
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-cpu-opp.dtsi
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com>
+
+/ {
+ cpu_opp_table: cpu-opp-table {
+ compatible = "allwinner,sun50i-h6-operating-points";
+ nvmem-cells = <&cpu_speed_grade>;
+ opp-shared;
+
+ opp@480000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <480000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@720000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <720000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@816000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <816000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@888000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <888000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1080000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1080000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1320000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1320000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1488000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1488000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1608000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1608000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1704000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1704000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+
+ opp@1800000000 {
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ opp-hz = /bits/ 64 <1800000000>;
+
+ opp-microvolt-speed0 = <1135000>;
+ opp-microvolt-speed1 = <1135000>;
+ opp-microvolt-speed2 = <1135000>;
+ };
+ };
+};
+
+&cpu0 {
+ operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu1 {
+ operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu2 {
+ operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu3 {
+ operating-points-v2 = <&cpu_opp_table>;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index be81330db14f..3eaa4f49e3d3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -4,7 +4,7 @@
/dts-v1/;
#include "sun50i-h6.dtsi"
-#include "sun50i-h6-cpu-opp.dtsi"
+#inlcude "sun50i-h6-tanix-tx6-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
--
2.20.1
next reply other threads:[~2020-04-26 12:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-26 12:17 Clément Péron [this message]
2020-04-26 12:18 ` [PATCH] arm64: dts: allwinner: h6: Use dedicated CPU OPP table for Tanix TX6 Clément Péron
2020-04-28 7:51 ` Maxime Ripard
2020-04-28 8:45 ` Clément Péron
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=20200426121709.1216-1-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=warpme@o2.pl \
--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 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).