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 {