All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/2] arm64: dts: Use OPP table for Adreno GPU
Date: Mon, 18 Dec 2017 16:27:34 -0700	[thread overview]
Message-ID: <1513639655-9023-2-git-send-email-jcrouse@codeaurora.org> (raw)
In-Reply-To: <1513639655-9023-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

Add a nvmem cell to let the GPU driver read a speed bin from the
fuses (if applicable). Then switch the cpu frequency table definitions
to real OPP v2 tables so we can take advantage of the hardware matching
mechanism.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 65fd370..f136d4c 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -642,6 +642,11 @@
 				reg = <0x24f 0x1>;
 				bits = <1 4>;
 			};
+
+			gpu_speed_bin: gpu_speed_bin@133 {
+				reg = <0x133 0x1>;
+				bits = <5 3>;
+			};
 		};
 
 		phy@34000 {
@@ -1099,6 +1104,19 @@
 			status = "okay";
 		};
 
+		gpu_opp_table: opp_table {
+			compatible  ="operating-points-v2";
+
+			opp-624000000 {
+				opp-hz = /bits/ 64 <624000000>;
+				opp-supported-hw = <0x01>;
+			};
+			opp-510000000 {
+				opp-hz = /bits/ 64 <510000000>;
+				opp-supported-hw = <0xFF>;
+			};
+		};
+
 		gpu@b00000 {
 			compatible = "qcom,adreno-530.2", "qcom,adreno";
 			#stream-id-cells = <16>;
@@ -1124,21 +1142,13 @@
 			power-domains = <&mmcc GPU_GDSC>;
 			iommus = <&adreno_smmu 0>;
 
+			nvmem-cells = <&gpu_speed_bin>;
+			nvmem-cell-names = "speed_bin";
+
 			qcom,gpu-quirk-two-pass-use-wfi;
 			qcom,gpu-quirk-fault-detect-mask;
 
-			/* This is a safe speed for bring up in all bin levels.
-			 * This isn't the fastest the chip can go, but we can
-			 * get there eventually */
-			qcom,gpu-pwrlevels {
-				compatible = "qcom,gpu-pwrlevels";
-				qcom,gpu-pwrlevel@0 {
-					qcom,gpu-freq = <624000000>;
-				};
-				qcom,gpu-pwrlevel@1 {
-					qcom,gpu-freq = <27000000>;
-				};
-			};
+			operating-points-v2 = <&gpu_opp_table>;
 
 			zap-shader {
 				memory-region = <&zap_shader_region>;
-- 
1.9.1

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2017-12-18 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 23:27 [PATCH 0/2] drm/msm: device tree changes to support devfreq Jordan Crouse
     [not found] ` <1513639655-9023-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-18 23:27   ` Jordan Crouse [this message]
2017-12-18 23:27 ` [PATCH 2/2] arm64: dts: Add full GPU frequency table for 8996 Jordan Crouse

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=1513639655-9023-2-git-send-email-jcrouse@codeaurora.org \
    --to=jcrouse-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.