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 {