From patchwork Wed Jun 28 10:18:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 106506 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp830961qge; Wed, 28 Jun 2017 03:19:01 -0700 (PDT) X-Received: by 10.99.54.131 with SMTP id d125mr9598463pga.274.1498645141745; Wed, 28 Jun 2017 03:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498645141; cv=none; d=google.com; s=arc-20160816; b=0V8cUZjVVZoXS6GqwltCRoL7iYAWn3wUIfv4H1VT6xq6PnkMlMT9dB0jof3pAERDsx s3tiBPw+0pczsjihbkXWequtF2Jqcjde9RrH2RMHJ+NeL21aDUDKvxWXYm29jCh5CV8R /finmVHLg1zVoAqEuYZHLWQlbmnHxWaXycfL47bhdtIlpFbR6U4s2kkknRA9HOhccVA2 NfwOUAwTGi6hpmiY3dI8mRLlkwg2fniHaqjXwx1jiwacx1YLilo43jL36j3Mgoz/UzHr HP/qXSkAt+1a7mh6ZFnDaRP7t09B3BsTX9hMCiIGMHPl9b434cn+uOaWgsdpxNJAR8ir vudQ== 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=qPsvxnOEs7xjRH8tQpP7bhRlTUwuo6YNaTRwR6PHNcw=; b=c5XmPzRiLvkvXiXx4SIc2P+ZRq+g58H/gHW0WVLmcujia2fG9ZSy+8Oa+pNqGQEYmf hBkNS8CRpnyOj5zqj7nJHjKnV4zojc94pTZG+uf4vxRYMB+dgxGD5oKHWQmPxhFhCwI+ 8YyPSGYoFOvfrQ8jDnzbHyG2Uw9jUkkXm+ILQQYoxgKAJkmd2YiVD1vvnMwCpKrxR+Tp KCcfz6Cmi1GGrKIMZoeg49Eo7ex5ugNw2vS8AFWgVg7PVtcAIVo9eGzgfS1qnmOFvGbA d8ZlDADGbmiGxD7GL61bRlYlulW7o5AcORGMhdO/QeutEt+L12wjDUKvC/GKRkR8hcAx llCA== 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 q6si1199027pgf.559.2017.06.28.03.19.01; Wed, 28 Jun 2017 03:19:01 -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 S1751758AbdF1KSx (ORCPT + 25 others); Wed, 28 Jun 2017 06:18:53 -0400 Received: from mx.socionext.com ([202.248.49.38]:16329 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbdF1KSu (ORCPT ); Wed, 28 Jun 2017 06:18:50 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 28 Jun 2017 19:18:49 +0900 Received: from mail.mfilter.local (unknown [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 467EF6007B; Wed, 28 Jun 2017 19:18:49 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 28 Jun 2017 19:18:49 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id B1D2A1A0E89; Wed, 28 Jun 2017 19:18:48 +0900 (JST) From: Kunihiko Hayashi To: robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, masami.hiramatsu@linaro.org, jaswinder.singh@linaro.org, Kunihiko Hayashi Subject: [PATCH v2 1/2] ARM: dts: uniphier: add nodes of thermal monitor and thermal zone for PXs2 Date: Wed, 28 Jun 2017 19:18:28 +0900 Message-Id: <1498645109-25985-2-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498645109-25985-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1498645109-25985-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 is included in sysctrl. Furthermore, add cpuN labels for reference in cooling-device property. Signed-off-by: Kunihiko Hayashi --- arch/arm/boot/dts/uniphier-pxs2.dtsi | 43 ++++++++++++++++++++++++++++++++---- 1 file changed, 39 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 e9e031d..1ff5531 100644 --- a/arch/arm/boot/dts/uniphier-pxs2.dtsi +++ b/arch/arm/boot/dts/uniphier-pxs2.dtsi @@ -52,7 +52,7 @@ #address-cells = <1>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0>; @@ -60,9 +60,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>; @@ -72,7 +73,7 @@ operating-points-v2 = <&cpu_opp>; }; - cpu@2 { + cpu2: cpu@2 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <2>; @@ -82,7 +83,7 @@ operating-points-v2 = <&cpu_opp>; }; - cpu@3 { + cpu3: cpu@3 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <3>; @@ -150,6 +151,34 @@ }; }; + 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 (-1) (-1)>; + }; + }; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -387,6 +416,12 @@ compatible = "socionext,uniphier-pxs2-reset"; #reset-cells = <1>; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-pxs2-thermal"; + interrupts = <0 3 4>; + #thermal-sensor-cells = <0>; + }; }; }; }; From patchwork Wed Jun 28 10:18:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 106507 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp831157qge; Wed, 28 Jun 2017 03:19:17 -0700 (PDT) X-Received: by 10.98.40.132 with SMTP id o126mr10133434pfo.238.1498645157111; Wed, 28 Jun 2017 03:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498645157; cv=none; d=google.com; s=arc-20160816; b=gf7yXORb7Uf29+yzCxqS2ay8bXD/gY6vGIGSy40ryXKNmqqMlAZzeJM8dPfQyKJAGU vaiUM21GJF9ZGCe/AEJFLkjAkP+pHLj/NRmXoo7uZURJNKmlMyjxayx11KpYbmy7lXnH SW3CY3i/U6x28TUMSK2iYZ1abNza3Mvhzg4ahANFn0iRNKa3JwGcHXK7uIYE84a3jlDM I38cSdGfysleOnO7kXv7YKM3Sme5R0tpxDXZxL+J2pGN4HFY8RB1r3yEI5GiyUH4yKpT dp2HP1NfkFFKFJp/S+YydzFsrFGi7hBrUj0S7TvZrg2ceLw32V8UUuZ3QDhlI0j/UZnC p+MQ== 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=Z6saWYAP2A2tYpxy8LzuhrVS3wiTQMhBxiAxgbGkQmA=; b=Fwuqbc2JiiJPxpi/NQsT/ERATONKlzNPzzdfj/uH01mGNo4x87C+rgD1oJW6tDxGeK RxkHg1eXmFpajRNTQ+l7fySvee9tabqiLeV3u+BjJIG3aYHeNdBPPiFci8G+0iEpnCIv jmjJw87Ydvsbr9v43b5AgMYp9w7mac21ul0FeSQqE7D7K/h96Y9Yb6JQvNB8zSK0Ren6 Ofc/3xE98g6dbyFaO0PgzgUnPqrnGnCOnYUlzr0sJjCU0+gyGjgy38xGSUn2k1ssxrdz ZWmS3uf2EKwenrsgpUsY4uR2LrgGDfcB3By0rBEE95LQt9PKJyXbqTzQKhFCeFAsZ8wQ /d/Q== 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 r9si1301615pfb.74.2017.06.28.03.19.16; Wed, 28 Jun 2017 03:19:17 -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 S1751689AbdF1KSw (ORCPT + 25 others); Wed, 28 Jun 2017 06:18:52 -0400 Received: from mx.socionext.com ([202.248.49.38]:16334 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbdF1KSu (ORCPT ); Wed, 28 Jun 2017 06:18:50 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 28 Jun 2017 19:18:49 +0900 Received: from mail.mfilter.local (unknown [10.213.24.62]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 4A1B71800E0; Wed, 28 Jun 2017 19:18:49 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 28 Jun 2017 19:18:49 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id EE05D1A0ED9; Wed, 28 Jun 2017 19:18:48 +0900 (JST) From: Kunihiko Hayashi To: robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, masami.hiramatsu@linaro.org, jaswinder.singh@linaro.org, Kunihiko Hayashi Subject: [PATCH v2 2/2] arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 Date: Wed, 28 Jun 2017 19:18:29 +0900 Message-Id: <1498645109-25985-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498645109-25985-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1498645109-25985-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 is included in sysctrl. Signed-off-by: Kunihiko Hayashi --- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 40 ++++++++++++++++++++++++ 1 file changed, 40 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 a6b3a70..22d04111 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -82,6 +82,7 @@ clocks = <&sys_clk 32>; enable-method = "psci"; operating-points-v2 = <&cluster0_opp>; + #cooling-cells = <2>; }; cpu1: cpu@1 { @@ -100,6 +101,7 @@ clocks = <&sys_clk 33>; enable-method = "psci"; operating-points-v2 = <&cluster1_opp>; + #cooling-cells = <2>; }; cpu3: cpu@101 { @@ -209,6 +211,38 @@ <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 (-1) (-1)>; + }; + map1 { + trip = <&cpu_alert>; + cooling-device = <&cpu2 (-1) (-1)>; + }; + }; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -417,6 +451,12 @@ compatible = "socionext,uniphier-ld20-reset"; #reset-cells = <1>; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-ld20-thermal"; + interrupts = <0 3 4>; + #thermal-sensor-cells = <0>; + }; }; }; };