mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rocky Hao <rocky.hao@rock-chips.com>
To: rui.zhang@intel.com, edubezval@gmail.com, heiko@sntech.de,
	robh+dt@kernel.org, mark.rutland@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com
Cc: shawn.lin@rock-chips.com, cl@rock-chips.com,
	william.wu@rock-chips.com, linux-pm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, xxx@rock-chips.com,
	jay.xu@rock-chips.com, wxt@rock-chips.com,
	huangtao@rock-chips.com, rocky.hao@rock-chips.com
Subject: [PATCH 4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC
Date: Thu, 24 Aug 2017 18:27:54 +0800	[thread overview]
Message-ID: <1503570475-7850-5-git-send-email-rocky.hao@rock-chips.com> (raw)
In-Reply-To: <1503570475-7850-1-git-send-email-rocky.hao@rock-chips.com>

Add thermal zone and dynamic CPU power coefficients for RV1108

Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
---
 arch/arm/boot/dts/rv1108.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index dbdd8c2180e7..cae920b6a145 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -43,6 +43,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/rv1108-cru.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/thermal/thermal.h>
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -69,6 +70,8 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0xf00>;
+			#cooling-cells = <2>; /* min followed by max */
+			dynamic-power-coefficient = <75>;
 		};
 	};
 
@@ -275,6 +278,43 @@
 		status = "disabled";
 	};
 
+	thermal-zones {
+		soc_thermal: soc-thermal {
+			polling-delay-passive = <20>;
+			polling-delay = <1000>;
+			sustainable-power = <50>;
+
+			thermal-sensors = <&tsadc 0>;
+
+			trips {
+				threshold: trip-point0 {
+					temperature = <70000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				target: trip-point1 {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				soc_crit: soc-crit {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&target>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+					contribution = <4096>;
+				};
+			};
+		};
+
+	};
+
 	tsadc: tsadc@10370000 {
 		compatible = "rockchip,rv1108-tsadc";
 		reg = <0x10370000 0x100>;
-- 
1.9.1

  parent reply	other threads:[~2017-08-24 10:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao
2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao
2017-08-31 17:57   ` Rob Herring
2017-09-15  1:49   ` Caesar Wang
2017-09-15  3:20     ` rocky.hao
2017-08-24 10:27 ` [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver Rocky Hao
2017-09-15  2:10   ` Caesar Wang
2017-09-15  3:19     ` Caesar Wang
2017-08-24 10:27 ` [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC Rocky Hao
2017-09-15  2:25   ` Caesar Wang
2017-09-15  3:52     ` rocky.hao
2017-10-17 19:00   ` Heiko Stuebner
2017-08-24 10:27 ` Rocky Hao [this message]
2017-09-15  6:32   ` [PATCH 4/5] arm: dts: rockchip: add thermal nodes " rocky.hao
2017-10-17 19:00   ` Heiko Stuebner
2017-08-24 10:32 ` [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board Rocky Hao
2017-10-17 19:01   ` Heiko Stuebner
2017-10-17  0:15 ` [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Eduardo Valentin

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=1503570475-7850-5-git-send-email-rocky.hao@rock-chips.com \
    --to=rocky.hao@rock-chips.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=jay.xu@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=will.deacon@arm.com \
    --cc=william.wu@rock-chips.com \
    --cc=wxt@rock-chips.com \
    --cc=xxx@rock-chips.com \
    /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

all inboxes | Powered by JetHome®