From patchwork Thu Feb 25 03:27:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 8418331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E03109F1D4 for ; Thu, 25 Feb 2016 03:28:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F19A5202B8 for ; Thu, 25 Feb 2016 03:28:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 094132022A for ; Thu, 25 Feb 2016 03:28:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYmZv-000544-Mu; Thu, 25 Feb 2016 03:26:59 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYmZr-00050x-PR for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2016 03:26:57 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O3300WK52W7N0E0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2016 12:26:31 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.132]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id AD.BF.04790.7647EC65; Thu, 25 Feb 2016 12:26:31 +0900 (KST) X-AuditID: cbfee691-f79766d0000012b6-f4-56ce74676043 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 4C.E1.09068.7647EC65; Thu, 25 Feb 2016 12:26:31 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O33006YT2VU3J20@mmp1.samsung.com>; Thu, 25 Feb 2016 12:26:31 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: dts: Add tmu node for exynos7 Date: Thu, 25 Feb 2016 08:57:45 +0530 Message-id: <1456370865-10086-1-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsWyRsSkRTe95FyYwf5uXYsH87axWbxf1sNo Mf/IOVaL1y8MLTY9vsZqcXnXHDaLGef3MVm8/HiCxYHDY828NYwem5fUe/RtWcXo8XmTXABL FJdNSmpOZllqkb5dAldGy54NTAWXlSvOzYxqYGyT7WLk5JAQMJE4sHUvE4QtJnHh3nq2LkYu DiGBFYwSy148Y4Ep+jv1HlRiKaPE1DU7WUESQgI/GSX2tZaA2GwCuhJP3s9lBrFFBDQkpnQ9 ZgdpYBa4yCjRsnA1I0hCWMBU4v+Hc2DrWARUJQ70zgTbwCvgIbHk1l82iG1yEiePTWYFaZYQ +M8m8bXlLyNEg4DEt8mHgBo4gBKyEpsOMEPUS0ocXHGDZQKj4AJGhlWMoqkFyQXFSelFpnrF ibnFpXnpesn5uZsYgSF7+t+ziTsY7x+wPsQowMGoxMPL8PNsmBBrYllxZe4hRlOgDROZpUST 84GRkVcSb2hsZmRhamJqbGRuaaYkzqsj/TNYSCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dUA6Nn +f7jC7u9/Le5L+JrbHRqvfR+RvrUDFb+Q9Ya0dXaccuPrJ1Rau3ereg5dfbkd4k7uKdy7zJ7 9DPY5WAe6x6mIo41GY+cT5xvv1m/4dhBvc9mk7IyA383NyQXzrONslpqniUWqvv9yVehp3Xi PttXK2XNZjHYHbw40+2xsrovm9+BMy5l+5RYijMSDbWYi4oTAeQUQxFUAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeLIzCtJLcpLzFFi42I5/e+xgG56ybkwgxOT1S0ezNvGZvF+WQ+j xfwj51gtXr8wtNj0+BqrxeVdc9gsZpzfx2Tx8uMJFgcOjzXz1jB6bF5S79G3ZRWjx+dNcgEs UQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlAVygp lCXmlAKFAhKLi5X07TBNCA1x07WAaYzQ9Q0JgusxMkADCesYM1r2bGAquKxccW4m0EFtsl2M nBwSAiYSf6feY4OwxSQu3FsPZHNxCAksZZSYumYnK0hCSOAno8S+1hIQm01AV+LJ+7nMILaI gIbElK7H7CANzAIXGSVaFq5mBEkIC5hK/P9wjgnEZhFQlTjQO5MFxOYV8JBYcusv1DY5iZPH JrNOYORewMiwilEitSC5oDgpPdcoL7Vcrzgxt7g0L10vOT93EyM4Lp5J72A8vMv9EKMAB6MS Dy/Dz7NhQqyJZcWVuYcYJTiYlUR4dYrPhQnxpiRWVqUW5ccXleakFh9iNAU6YCKzlGhyPjBm 80riDY1NzIwsjcwsjEzMzZXEeR//XxcmJJCeWJKanZpakFoE08fEwSnVwOgZwz3rve3SIrf9 QRoeNbJL7aeWyNyMFlS9KRXYZb5hy9N5L5aI7t/lUhSeNLdGxMU/9Jf5k6vOeszTVGsYXhRP ibph+UXmVHdqcU3jsoDjEmcmij1f8P+i4CNHcekNAqdXBemdakhs1b8e13JBtOLkHtF8poUP BNUdbZ40LfQ7n1XDHKQrocRSnJFoqMVcVJwIAA4twMWhAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160224_192655_978386_645C0B4F X-CRM114-Status: GOOD ( 17.71 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, k.kozlowski@samsung.com, linux-samsung-soc@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, Alim Akhtar MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alim Akhtar This patch adds tmu node, related temprature sensor and triping point data for Atlas cpu core found on exynos7 SoC. Signed-off-by: Alim Akhtar --- .../boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi | 25 +++++++++ .../arm64/boot/dts/exynos/exynos7-trip-points.dtsi | 55 ++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos7.dtsi | 20 +++++++ 3 files changed, 100 insertions(+) create mode 100644 arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi create mode 100644 arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi diff --git a/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi b/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi new file mode 100644 index 0000000..1d6dcf2 --- /dev/null +++ b/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi @@ -0,0 +1,25 @@ +/* + * Device tree sources for Exynos7 TMU sensor configuration + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include + +#thermal-sensor-cells = <0>; +samsung,tmu_gain = <9>; +samsung,tmu_reference_voltage = <17>; +samsung,tmu_noise_cancel_mode = <4>; +samsung,tmu_efuse_value = <75>; +samsung,tmu_min_efuse_value = <15>; +samsung,tmu_max_efuse_value = <100>; +samsung,tmu_first_point_trim = <25>; +samsung,tmu_second_point_trim = <85>; +samsung,tmu_default_temp_offset = <50>; +samsung,tmu_cal_type = ; diff --git a/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi b/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi new file mode 100644 index 0000000..3970545 --- /dev/null +++ b/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi @@ -0,0 +1,55 @@ +/* + * Device tree sources for default Exynos7 thermal zone definition + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +trips { + cpu-alert-0 { + temperature = <75000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-1 { + temperature = <80000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-2 { + temperature = <85000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-3 { + temperature = <90000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-4 { + temperature = <95000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-5 { + temperature = <100000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + cpu-alert-6 { + temperature = <110000>; /* millicelsius */ + hysteresis = <10000>; /* millicelsius */ + type = "passive"; + }; + /* HW Trip point */ + cpu-crit-0 { + temperature = <115000>; /* millicelsius */ + hysteresis = <0>; /* millicelsius */ + type = "critical"; + }; +}; diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi index c662f98..fc9d130 100644 --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi @@ -27,6 +27,7 @@ pinctrl6 = &pinctrl_fsys0; pinctrl7 = &pinctrl_fsys1; pinctrl8 = &pinctrl_bus1; + tmuctrl0 = &tmuctrl_0; }; cpus { @@ -538,6 +539,25 @@ clocks = <&clock_peric0 PCLK_PWM>; clock-names = "timers"; }; + + tmuctrl_0: tmu@10060000 { + compatible = "samsung,exynos7-tmu"; + reg = <0x10060000 0x200>; + interrupts = <0 108 0>; + clocks = <&clock_peris PCLK_TMU>, + <&clock_peris SCLK_TMU>; + clock-names = "tmu_apbif", "tmu_sclk"; + #include "exynos7-tmu-sensor-conf.dtsi" + }; + + thermal-zones { + atlas_thermal: atlas-thermal { + polling-delay-passive = <0>; /* milliseconds */ + polling-delay = <0>; /* milliseconds */ + thermal-sensors = <&tmuctrl_0>; + #include "exynos7-trip-points.dtsi" + }; + }; }; };