From patchwork Wed Dec 10 12:09:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 5468551 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F26A99F1CD for ; Wed, 10 Dec 2014 12:13:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B92E20166 for ; Wed, 10 Dec 2014 12:13:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A665B2011D for ; Wed, 10 Dec 2014 12:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753770AbaLJMN1 (ORCPT ); Wed, 10 Dec 2014 07:13:27 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:23196 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752815AbaLJMN1 (ORCPT ); Wed, 10 Dec 2014 07:13:27 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGD002JO8MDWV90@mailout2.samsung.com>; Wed, 10 Dec 2014 21:13:25 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-ba-548838e5b1dd Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 91.FD.20081.5E838845; Wed, 10 Dec 2014 21:13:25 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NGD004CJ8GLGMG0@mmp1.samsung.com>; Wed, 10 Dec 2014 21:13:25 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Zhang Rui Cc: Linux PM list , "linux-samsung-soc@vger.kernel.org" , Bartlomiej Zolnierkiewicz , Lukasz Majewski , Kukjin Kim , Amit Daniel Kachhap , Abhilash Kesavan , Abhilash Kesavan , Kyungmin Park , Chanwoo Choi , Lukasz Majewski Subject: [PATCH v2 12/17] thermal: exynos: dts: Provide device tree bindings identical to one in exynos_tmu_data.c Date: Wed, 10 Dec 2014 13:09:51 +0100 Message-id: <1418213396-743-13-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1418213396-743-1-git-send-email-l.majewski@samsung.com> References: <1412872737-624-1-git-send-email-l.majewski@samsung.com> <1418213396-743-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsVy+t9jAd2nFh0hBgtOqlo8XrOYyaLhaojF xhnrWS2uf3nOajH/yjVWizV/lSx6F1xlszjb9Ibd4s0jbos3DzczWnzuPcJoMeP8PiaLJw/7 2Bx4PXbOusvusXjPSyaPddPeMnv0bVnF6PF5k1wAaxSXTUpqTmZZapG+XQJXxsH+Q0wFHQ4V /f2iDYwbjbsYOTkkBEwkjk7sYIOwxSQu3FsPZHNxCAksYpT4/mM1K4TTxSSxcMYXZpAqNgE9 ic93nzKB2CIC3hKv901nBCliFuhikdixYj7YKGGBEonPM1YzgtgsAqoS/as/sXQxcnDwCrhK vNycArFNUaL72QSwck6g8JlTN8BmCgnUSyxa/IZ1AiPvAkaGVYyiqQXJBcVJ6bmGesWJucWl eel6yfm5mxjBofhMagfjygaLQ4wCHIxKPLwBl9tDhFgTy4orcw8xSnAwK4nwvpHsCBHiTUms rEotyo8vKs1JLT7EKM3BoiTOq2TfFiIkkJ5YkpqdmlqQWgSTZeLglGpgnPH7MNuB1yeWLJd8 yvBErbif+VDvw/glm493pYpZHr6+8dFTwSlRnt9Fyqu+1Pg5RIRMrWWym3WNY0fgB5NvbAq7 y9qNY6p1mm7paW9nE/i7Tubmkaatwbn3Dh4MFLly75mf5RpJLnYB5Z0PffeZcgpPUvH+4pLa lCUefXxli215PI9lQMRjJZbijERDLeai4kQALKRs40ECAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Presented device tree bindings provide data already hardcoded in the exynos_tmu_data.c file. After this commit, it should be possible to reuse common thermal core framework in Exynos SoCs. Signed-off-by: Lukasz Majewski --- Changes for v2: - Add proper TMU entries for exynos3250.dtsi --- arch/arm/boot/dts/exynos3250.dtsi | 4 ++++ arch/arm/boot/dts/exynos4.dtsi | 5 +++++ arch/arm/boot/dts/exynos4210.dtsi | 23 ++++++++++++++++++++++- arch/arm/boot/dts/exynos4x12.dtsi | 3 +++ arch/arm/boot/dts/exynos5250.dtsi | 7 +++++-- arch/arm/boot/dts/exynos5420.dtsi | 33 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos5440.dtsi | 18 ++++++++++++++++++ 7 files changed, 90 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 693a327..6edfa76 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi @@ -18,7 +18,9 @@ */ #include "skeleton.dtsi" +#include "exynos4-cpu-thermal.dtsi" #include +#include / { compatible = "samsung,exynos3250"; @@ -188,6 +190,8 @@ interrupts = <0 216 0>; clocks = <&cmu CLK_TMU_APBIF>; clock-names = "tmu_apbif"; + type = ; + #include "exynos4412-tmu-sensor-conf.dtsi" status = "disabled"; }; diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index e0278ec..1735bb3 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -21,6 +21,7 @@ #include #include +#include #include "skeleton.dtsi" / { @@ -645,4 +646,8 @@ samsung,sysreg = <&sys_reg>; status = "disabled"; }; + + tmu: tmu@100C0000 { + #include "exynos4412-tmu-sensor-conf.dtsi" + }; }; diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 10e8915..1c52681 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -21,6 +21,8 @@ #include "exynos4.dtsi" #include "exynos4210-pinctrl.dtsi" +#include "exynos4-cpu-thermal.dtsi" +#include / { compatible = "samsung,exynos4210", "samsung,exynos4"; @@ -146,16 +148,35 @@ reg = <0x03860000 0x1000>; }; - tmu@100C0000 { + tmu: tmu@100C0000 { compatible = "samsung,exynos4210-tmu"; interrupt-parent = <&combiner>; reg = <0x100C0000 0x100>; interrupts = <2 4>; clocks = <&clock CLK_TMU_APBIF>; clock-names = "tmu_apbif"; + gain = <15>; + reference_voltage = <7>; + type = ; status = "disabled"; }; + thermal-zones { + cpu_thermal: cpu-thermal { + trips { + cpu_alert0: cpu-alert-0 { + temperature = <85000>; /* millicelsius */ + }; + cpu_alert1: cpu-alert-1 { + temperature = <100000>; /* millicelsius */ + }; + cpu_alert2: cpu-alert-2 { + temperature = <110000>; /* millicelsius */ + }; + }; + }; + }; + g2d@12800000 { compatible = "samsung,s5pv210-g2d"; reg = <0x12800000 0x1000>; diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 2e9f1f7..ee24d83 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -19,6 +19,8 @@ #include "exynos4.dtsi" #include "exynos4x12-pinctrl.dtsi" +#include "exynos4-cpu-thermal.dtsi" +#include / { aliases { @@ -279,6 +281,7 @@ reg = <0x100C0000 0x100>; clocks = <&clock 383>; clock-names = "tmu_apbif"; + type = ; status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index a5bbc1a..2167394 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -20,8 +20,9 @@ #include #include "exynos5.dtsi" #include "exynos5250-pinctrl.dtsi" - +#include "exynos4-cpu-thermal.dtsi" #include +#include / { compatible = "samsung,exynos5250", "samsung,exynos5"; @@ -236,12 +237,14 @@ status = "disabled"; }; - tmu@10060000 { + tmu: tmu@10060000 { compatible = "samsung,exynos5250-tmu"; reg = <0x10060000 0x100>; interrupts = <0 65 0>; clocks = <&clock CLK_TMU>; clock-names = "tmu_apbif"; + type = ; + #include "exynos4412-tmu-sensor-conf.dtsi" }; thermal-zones { diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 8617a03..23d488b 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -756,6 +756,8 @@ interrupts = <0 65 0>; clocks = <&clock CLK_TMU>; clock-names = "tmu_apbif"; + #include "exynos4412-tmu-sensor-conf.dtsi" + type = ; }; tmu_cpu1: tmu@10064000 { @@ -764,6 +766,8 @@ interrupts = <0 183 0>; clocks = <&clock CLK_TMU>; clock-names = "tmu_apbif"; + #include "exynos4412-tmu-sensor-conf.dtsi" + type = ; }; tmu_cpu2: tmu@10068000 { @@ -772,6 +776,8 @@ interrupts = <0 184 0>; clocks = <&clock CLK_TMU>, <&clock CLK_TMU>; clock-names = "tmu_apbif", "tmu_triminfo_apbif"; + #include "exynos4412-tmu-sensor-conf.dtsi" + type = ; }; tmu_cpu3: tmu@1006c000 { @@ -780,6 +786,8 @@ interrupts = <0 185 0>; clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>; clock-names = "tmu_apbif", "tmu_triminfo_apbif"; + #include "exynos4412-tmu-sensor-conf.dtsi" + type = ; }; tmu_gpu: tmu@100a0000 { @@ -788,6 +796,31 @@ interrupts = <0 215 0>; clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>; clock-names = "tmu_apbif", "tmu_triminfo_apbif"; + #include "exynos4412-tmu-sensor-conf.dtsi" + type = ; + }; + + thermal-zones { + cpu0_thermal: cpu0-thermal { + thermal-sensors = <&tmu_cpu0>; + #include "exynos5420-trip-points.dtsi" + }; + cpu1_thermal: cpu1-thermal { + thermal-sensors = <&tmu_cpu1>; + #include "exynos5420-trip-points.dtsi" + }; + cpu2_thermal: cpu2-thermal { + thermal-sensors = <&tmu_cpu2>; + #include "exynos5420-trip-points.dtsi" + }; + cpu3_thermal: cpu3-thermal { + thermal-sensors = <&tmu_cpu3>; + #include "exynos5420-trip-points.dtsi" + }; + gpu_thermal: gpu-thermal { + thermal-sensors = <&tmu_gpu>; + #include "exynos5420-trip-points.dtsi" + }; }; watchdog: watchdog@101D0000 { diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 8f3373c..59d9416 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi @@ -219,6 +219,7 @@ interrupts = <0 58 0>; clocks = <&clock CLK_B_125>; clock-names = "tmu_apbif"; + #include "exynos5440-tmu-sensor-conf.dtsi" }; tmuctrl_1: tmuctrl@16011C { @@ -227,6 +228,7 @@ interrupts = <0 58 0>; clocks = <&clock CLK_B_125>; clock-names = "tmu_apbif"; + #include "exynos5440-tmu-sensor-conf.dtsi" }; tmuctrl_2: tmuctrl@160120 { @@ -235,6 +237,22 @@ interrupts = <0 58 0>; clocks = <&clock CLK_B_125>; clock-names = "tmu_apbif"; + #include "exynos5440-tmu-sensor-conf.dtsi" + }; + + thermal-zones { + cpu0_thermal: cpu0-thermal { + thermal-sensors = <&tmuctrl_0>; + #include "exynos5440-trip-points.dtsi" + }; + cpu1_thermal: cpu1-thermal { + thermal-sensors = <&tmuctrl_1>; + #include "exynos5440-trip-points.dtsi" + }; + cpu2_thermal: cpu2-thermal { + thermal-sensors = <&tmuctrl_2>; + #include "exynos5440-trip-points.dtsi" + }; }; sata@210000 {