From patchwork Mon Feb 18 11:30:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Ni X-Patchwork-Id: 2157011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 410EE3FCFC for ; Mon, 18 Feb 2013 11:36:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7Oyh-0006IN-I2; Mon, 18 Feb 2013 11:33:47 +0000 Received: from hqemgate03.nvidia.com ([216.228.121.140]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U7OxA-0005WE-N7 for linux-arm-kernel@lists.infradead.org; Mon, 18 Feb 2013 11:32:14 +0000 Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Mon, 18 Feb 2013 03:36:04 -0800 Received: from hqemhub01.nvidia.com ([172.20.150.30]) by hqnvupgp08.nvidia.com (PGP Universal service); Mon, 18 Feb 2013 03:26:55 -0800 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 18 Feb 2013 03:26:55 -0800 Received: from hkemhub02.nvidia.com (10.18.67.13) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server (TLS) id 8.3.297.1; Mon, 18 Feb 2013 03:31:17 -0800 Received: from niwei-ubuntu.nvidia.com (10.18.67.5) by hkemhub02.nvidia.com (10.18.67.13) with Microsoft SMTP Server id 8.3.297.1; Mon, 18 Feb 2013 19:31:13 +0800 From: Wei Ni To: , , , Subject: [RFC PATCH 8/9] ARM: dt: t30 cardhu: add dt entry for thermal driver Date: Mon, 18 Feb 2013 19:30:30 +0800 Message-ID: <1361187031-3679-9-git-send-email-wni@nvidia.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361187031-3679-1-git-send-email-wni@nvidia.com> References: <1361187031-3679-1-git-send-email-wni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130218_063212_944922_33C00A23 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [216.228.121.140 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-kernel@vger.kernel.orgrs.org, linux-pm@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Wei Ni , lm-sensors@lm-sensors.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable thermal driver in the dts file. Set sensor as lm90 remote sensor, and set throttle data. Signed-off-by: Wei Ni --- .../devicetree/bindings/thermal/tegra3-thermal.txt | 41 ++++++++++++++++++++ arch/arm/boot/dts/tegra30-cardhu.dtsi | 19 +++++++++ 2 files changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/tegra3-thermal.txt diff --git a/Documentation/devicetree/bindings/thermal/tegra3-thermal.txt b/Documentation/devicetree/bindings/thermal/tegra3-thermal.txt new file mode 100644 index 0000000..dc3f922 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/tegra3-thermal.txt @@ -0,0 +1,41 @@ +* Nvidia Tegra30 Thermal + +** Thermal node properties: + +- compatible : "nvidia,tegra30-thermal"; +- sensors: the sensor device node which we want to use in the thermal zone, + the arguments is the index of the sensor in sensor device node; +- passive-delay: passive delay; +- num-passive-trips : number of passive trip points, this is required, set + it 0 if none, if greater than 0, the following properties must be defined; +- passive-trips : temperature of passive trip points; +- num-active-trips: number of active trip points, this is required, set + it 0 if none, if greater than 0, the following properties must be defined; +- active-trips: temperature of active trip points; +- throt-tab-size: size of the throttle table, it's the max cooling state. +- throt-tab: throttle table. the cooling state will be defined according to + this table. + +Usually these properties are separated in board related dts files. + +Example: +thermal { + compatible = "nvidia,tegra30-thermal"; + sensors = <&nct1008 0>; + passive-delay = <2000>; + num-passive-trips = <3>; + passive-trips = <70 80 90>; + num-active-trips = <4>; + active-trips = < 60 70 80 90>; + throt-tab-size = <10>; + throt-tab = <0 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 760000 1050 + 760000 1050 + 1000000 1050 + 1000000 1050>; +}; diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi index 3f6ab89..9748b9b 100644 --- a/arch/arm/boot/dts/tegra30-cardhu.dtsi +++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi @@ -492,4 +492,23 @@ nvidia,spkr-en-gpios = <&wm8903 2 0>; nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ }; + + thermal { + compatible = "nvidia,tegra30-thermal"; + sensors = <&nct1008 0>; + passive-delay = <2000>; + num-passive-trips = <1>; + passive-trips = <80>; + throt-tab-size = <10>; + throt-tab = <0 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 640000 1000 + 760000 1050 + 760000 1050 + 1000000 1050 + 1000000 1050>; + }; };