From patchwork Mon Sep 4 06:58:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 111536 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1151823qge; Sun, 3 Sep 2017 23:59:10 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7WBMymksKsTOvcwHvGg73HoZWKoKDMjK4+vOIiL2p2+bKY6xtqG3nGz3JG3KAG5RS5qznS X-Received: by 10.101.83.143 with SMTP id x15mr10609024pgq.302.1504508350255; Sun, 03 Sep 2017 23:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504508350; cv=none; d=google.com; s=arc-20160816; b=PfVJMuVb6/bs8LQ/iuJPqSQXvVVzCD7V4GA/VayNkRaWbp7Rto3sn2R+dSvG0nHsrO p2+bsnn27Cpc3bPW5W1lZwbJ2FN8bwTjUbkN+xJCxxTjT4OpvhOKrrNf/36E7tkM9pQy OJLbMv0yGk3BxrImKrxlg4g3aA6x/CSFuwgwuAweYUB42q/838Afaci+NDmxbpTQYLiu dpoXUAesslgk7BNaub3l61rC0ElR2mu1ETJuGIzeTe//0r7h/WLeIK/eIs1waJn/+hoj 5h84nrFhvi7bwC4DZW3QHqsTJnhYptbr0Q63drIbHDPYpl1Q+Iv8ds6h5cXjVsUTzc4P XvlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=n/qtlYgoakq+os0/EXTOPYrSrvYWn1NEZhd8SW4Q9wk=; b=pblYB0RU98r2ZiSrVbadZlgUleYvE+0kdlGrWg+vnZyePEXUbzuvJALENTridQOl2F E9B5CMYVvKvP84Lj3xkO0PmVOJrnx3XEWIYLmfpYaP6HFPWwO9OUkglbezj9VJpHDrsa gaSUl0r4LAsHxOro2gopGP1DLdAq3VFbZugB2W5XfTSdhPL/rUZRyu8TFsohpeKzyCeK m3lfE5jb71YmOlMREcdryiVNZFBwYs+EB0/Sy+oqtd7XjvV42a2xSSDiKA122TIP7h5I s71AAW6TOuBhaANtexzce+W62dCmcqlnpfZbj6In4FHXKw9UCoVylujv/iAx2h4pP8hk oGSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d188si4447869pfa.85.2017.09.03.23.59.09; Sun, 03 Sep 2017 23:59:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753283AbdIDG6y (ORCPT + 26 others); Mon, 4 Sep 2017 02:58:54 -0400 Received: from mx.socionext.com ([202.248.49.38]:17130 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753230AbdIDG6w (ORCPT ); Mon, 4 Sep 2017 02:58:52 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Sep 2017 15:58:51 +0900 Received: from mail.mfilter.local (unknown [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 3482F1800AA; Mon, 4 Sep 2017 15:58:51 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Mon, 4 Sep 2017 15:58:51 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 633ED1A0E11; Mon, 4 Sep 2017 15:58:50 +0900 (JST) From: Kunihiko Hayashi To: yamada.masahiro@socionext.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, masami.hiramatsu@linaro.org, jaswinder.singh@linaro.org, Kunihiko Hayashi Subject: [RESEND PATCH v4 1/2] ARM: dts: uniphier: add nodes of thermal monitor and thermal zone for PXs2 Date: Mon, 4 Sep 2017 15:58:36 +0900 Message-Id: <1504508317-12076-2-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504508317-12076-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1504508317-12076-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add nodes of thermal monitor and thermal zone for UniPhier PXs2 SoC. The thermal monitor node is included in sysctrl. Since the efuse might not have a calibrated value of thermal monitor, this patch gives the default value for PXs2. Furthermore, add cpuN labels for reference in cooling-device property. Signed-off-by: Kunihiko Hayashi --- arch/arm/boot/dts/uniphier-pxs2.dtsi | 47 +++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/arch/arm/boot/dts/uniphier-pxs2.dtsi b/arch/arm/boot/dts/uniphier-pxs2.dtsi index 90b020c..f2dfebe 100644 --- a/arch/arm/boot/dts/uniphier-pxs2.dtsi +++ b/arch/arm/boot/dts/uniphier-pxs2.dtsi @@ -7,6 +7,8 @@ * SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +#include + / { compatible = "socionext,uniphier-pxs2"; #address-cells = <1>; @@ -16,7 +18,7 @@ #address-cells = <1>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0>; @@ -24,9 +26,10 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; - cpu@1 { + cpu1: cpu@1 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <1>; @@ -36,7 +39,7 @@ operating-points-v2 = <&cpu_opp>; }; - cpu@2 { + cpu2: cpu@2 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <2>; @@ -46,7 +49,7 @@ operating-points-v2 = <&cpu_opp>; }; - cpu@3 { + cpu3: cpu@3 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <3>; @@ -114,6 +117,35 @@ }; }; + thermal-zones { + cpu_thermal { + polling-delay-passive = <250>; /* 250ms */ + polling-delay = <1000>; /* 1000ms */ + thermal-sensors = <&pvtctl>; + + trips { + cpu_crit: cpu_crit { + temperature = <95000>; /* 95C */ + hysteresis = <2000>; + type = "critical"; + }; + cpu_alert: cpu_alert { + temperature = <85000>; /* 85C */ + hysteresis = <2000>; + type = "passive"; + }; + }; + + cooling-maps { + map { + trip = <&cpu_alert>; + cooling-device = <&cpu0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -358,6 +390,13 @@ compatible = "socionext,uniphier-pxs2-reset"; #reset-cells = <1>; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-pxs2-thermal"; + interrupts = <0 3 4>; + #thermal-sensor-cells = <0>; + socionext,tmod-calibration = <0x0f86 0x6844>; + }; }; nand: nand@68000000 { From patchwork Mon Sep 4 06:58:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 111535 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1151635qge; Sun, 3 Sep 2017 23:58:57 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7oYyfvrzMRrpeq2BsD+WhXYqvmANNICPOgGj+XMhAhvHt1JOoI5kfBAPcBm5yzghY7kVJl X-Received: by 10.84.168.67 with SMTP id e61mr11544300plb.53.1504508337534; Sun, 03 Sep 2017 23:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504508337; cv=none; d=google.com; s=arc-20160816; b=T6bQSG/pyp5Sas8zW/fetaK7OQxIG6e/l6KaOYjAd0jJkB4aKTKUFrr3MnmShaBZPN MYQyLneaFV38VhxroNFYz2PWeOBjg1N1leaEiHzOVr1RhpCXd7N10uL47VWWJRYviRcZ lTAjkK6HW7JIfAYXovm1pSDWLhCHbTZgFYIlbjxw9vSD9fh3mr0v76SlOA0LXAcT4Bis VH+8mfRpJl3FFxoqDcWWwafTmBwcjlDYgzHM8xGhmbzJHj/yeRxIlhFJfYRv8UdYLrxV bnj7PqTYrl/jONJO5uwMYiFn4aK//4RaNJYgSgbWTkzCslj51GkakZIT7T0ClDo/gTRQ KdEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=/kyGoQ45Nwm3QsWar8jSCSDR942cVB9PMeHdOdveO54=; b=Oc2WwBXK/bhJLmBSc0rzIBVYkmAdhg1bqsK4+XobyE7MCY0U4s1m3AT9IejJWHXrlY bSo+JjcyC9rvFu0khfAQpi9SxjUVLRnO+9FKXrA6GPA7qMp70lS5YMk53vneEJBhsxam DrCPGfK89SbrIAguvuIzMtAe33Clmuu5NFMQHlJPfDz0CPUtrXlEbPV2YPErxDoetRhd FDVKmgAFJHECHwBcelmVHx4hDQuUOWxIDAebH2CFpdrKyfScvPWH5zwjIC8T0jgQeUZ1 Jl+NcSdLottesKZNSFr04vULGBC1Vmj88T5FRXU4YOk/qN5ThxGmXT+TyFqBUrGPGWEU cjWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 13si4404469pfr.595.2017.09.03.23.58.57; Sun, 03 Sep 2017 23:58:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753306AbdIDG6z (ORCPT + 26 others); Mon, 4 Sep 2017 02:58:55 -0400 Received: from mx.socionext.com ([202.248.49.38]:17130 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751949AbdIDG6x (ORCPT ); Mon, 4 Sep 2017 02:58:53 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Sep 2017 15:58:52 +0900 Received: from mail.mfilter.local (unknown [10.213.24.62]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 35F2E180B9A; Mon, 4 Sep 2017 15:58:52 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Mon, 4 Sep 2017 15:58:52 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id B723A1A0E11; Mon, 4 Sep 2017 15:58:51 +0900 (JST) From: Kunihiko Hayashi To: yamada.masahiro@socionext.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, masami.hiramatsu@linaro.org, jaswinder.singh@linaro.org, Kunihiko Hayashi Subject: [RESEND PATCH v4 2/2] arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 Date: Mon, 4 Sep 2017 15:58:37 +0900 Message-Id: <1504508317-12076-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504508317-12076-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1504508317-12076-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add nodes of thermal monitor and thermal zone for UniPhier LD20 SoC. The thermal monitor node is included in sysctrl. Since the efuse might not have a calibrated value of thermal monitor, this patch gives the default value for LD20. Signed-off-by: Kunihiko Hayashi --- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) -- 2.7.4 diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index a29c279..59e5ae6 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -7,6 +7,8 @@ * SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +#include + /memreserve/ 0x80000000 0x02000000; / { @@ -46,6 +48,7 @@ clocks = <&sys_clk 32>; enable-method = "psci"; operating-points-v2 = <&cluster0_opp>; + #cooling-cells = <2>; }; cpu1: cpu@1 { @@ -64,6 +67,7 @@ clocks = <&sys_clk 33>; enable-method = "psci"; operating-points-v2 = <&cluster1_opp>; + #cooling-cells = <2>; }; cpu3: cpu@101 { @@ -173,6 +177,40 @@ <1 10 4>; }; + thermal-zones { + cpu_thermal { + polling-delay-passive = <250>; /* 250ms */ + polling-delay = <1000>; /* 1000ms */ + thermal-sensors = <&pvtctl>; + + trips { + cpu_crit: cpu_crit { + temperature = <110000>; /* 110C */ + hysteresis = <2000>; + type = "critical"; + }; + cpu_alert: cpu_alert { + temperature = <100000>; /* 100C */ + hysteresis = <2000>; + type = "passive"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = <&cpu0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + map1 { + trip = <&cpu_alert>; + cooling-device = <&cpu2 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + soc@0 { compatible = "simple-bus"; #address-cells = <1>; @@ -410,6 +448,13 @@ watchdog { compatible = "socionext,uniphier-wdt"; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-ld20-thermal"; + interrupts = <0 3 4>; + #thermal-sensor-cells = <0>; + socionext,tmod-calibration = <0x0f22 0x68ee>; + }; }; nand: nand@68000000 {