From patchwork Wed Jul 5 11:53:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 107060 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp676809qge; Wed, 5 Jul 2017 04:53:48 -0700 (PDT) X-Received: by 10.99.1.81 with SMTP id 78mr20882579pgb.110.1499255628135; Wed, 05 Jul 2017 04:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499255628; cv=none; d=google.com; s=arc-20160816; b=t0i4L350PQewgn8DKpBSt1+ydU2hn5TVhK9fKLPkZATXANhflsz+irLVdLBPfHr1F7 Dm7ENmhoGc2xpN2ODE6etB13y6PlTwTGh/8ZUxQYCrDpW1Iq4HYxaDRpkQ+PCBd0D9D5 W1dNGQznAXa9DyFvMtFRG2zvwm2VmBMmqN2eKkLHOiKqvd+QqvxkxdKgE3n5mkl77rTc KFDpO2RNKmqne8febz+w0MdyufujwI8+g/CUljbcfflu2kTHiRaoFo9T9oeDv0SgPEKp GFh3OQdZ0NuHBzWOu8rN6ipSEhh0g4Eg+7LS/LnuocRYnwprl/GlTnZzNeYcBmo5V0xO GOXg== 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=slhdCM6DtuTOVzmCcPsM92pB21C5eUDPzANqgIpzlfksgH+w2tFLMr5hBt8eVFL79c YIhwv0pV7N2HDxF6zKRiaLrkcNygvTWPA/CjZOw8qWtL4oMWdeRvYkHVdn9Cy7mXzOjj E6NULDL21aJXuu34kJl7hGQvPxu3qpYqr81XTkOjRNfig/I0jNuTRyzZJpGyxkbVn8ps /t5s5Jm7x6pKV38wRPYSlVn9JEvDWw8UgS/egJbExzh7tZlrOUUjqiViSoD8BN0OuKVi u/gX1c43IMpXl7FbF06nP1g3+vf/aKM90p71RV+Skdft8f/t++nnWzvk4Q07ZgSqEFmN Ezkg== 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 b26si16568412pfh.9.2017.07.05.04.53.47; Wed, 05 Jul 2017 04:53:48 -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 S1752748AbdGELxi (ORCPT + 25 others); Wed, 5 Jul 2017 07:53:38 -0400 Received: from mx.socionext.com ([202.248.49.38]:11418 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694AbdGELxg (ORCPT ); Wed, 5 Jul 2017 07:53:36 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 05 Jul 2017 20:53:34 +0900 Received: from mail.mfilter.local (unknown [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 273156007B; Wed, 5 Jul 2017 20:53:35 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 5 Jul 2017 20:53:35 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 8B7021A0E7B; Wed, 5 Jul 2017 20:53:34 +0900 (JST) From: Kunihiko Hayashi To: robh+dt@kernel.org, mark.rutland@arm.com, yamada.masahiro@socionext.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: [PATCH v3 1/2] ARM: dts: uniphier: add nodes of thermal monitor and thermal zone for PXs2 Date: Wed, 5 Jul 2017 20:53:14 +0900 Message-Id: <1499255595-31805-2-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499255595-31805-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1499255595-31805-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>; + }; }; }; };