From patchwork Mon May 29 09:15:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 100648 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp246858qge; Mon, 29 May 2017 02:18:04 -0700 (PDT) X-Received: by 10.99.158.17 with SMTP id s17mr18002982pgd.219.1496049484613; Mon, 29 May 2017 02:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496049484; cv=none; d=google.com; s=arc-20160816; b=wpX+1U9mxu/cDFjPJBA58oUG79gqlMfQopxyFlrA9zhKAx8fQpQgVT2+fslZ+9+Pmp E3n+ovd2tNRDcyzHN5vjt8OVVrEh4dyjnh5BQG434ept/zfLkDEmZAkxs13BB8nEuTb3 dsRPARxvZfMA1Vmg3tqiblxKcYS7AeLbuePtGv0TdJfPVpxmJzrAb1zZfE+FFvqmifSj UNgWL/u9oNSdFKnGD0l6BA6l1XaG0fnCDN5gJoPgDGHfjIAYCKtrTMjHsAAg8feLvtUP BUV26cFFj9AoFlT8LDWbxl0H9aKhOfHXtjoLXPWOLbxLNEr4CS+mynlfPrsF7/RcG0kG UxUQ== 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=fcrw6PhtVGYkZeWfVd+AqcoAUiTGB4uSEJ8U9VTlOyA=; b=DZAN/8to0G1D+nLvDc5cDTwZIrqWnUEnMNXniCr++TMJPA6dZN4TB9gkhthndmmYck 3StEMgnZZMxiupBKPMBfQK7JsDV9wq5/iJMo/bHIqYwZFH78PZXSOzbkrWnyPekrQLLh UtAI1fb+Ekcf4+4Qg7jv9X/8KhZzKsoAISOXVvH3ukw6f7MHU47Iqec0BRBelbMObWbA e2Y5aRk9hQH0gjsSI0eM9ATbLkU6+SHi8bzNPyGEu5dl7z3aTdp6akcAPnPrKHOL1nYO exmsBEDPNQ520w9NtV6fCwujTNiJXdIhPCBhoEZLX8LqHb36/PenOaPaRMrFYjPBrGKs fxOA== 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 o189si9682896pgo.173.2017.05.29.02.18.04; Mon, 29 May 2017 02:18:04 -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 S1751209AbdE2JR7 (ORCPT + 25 others); Mon, 29 May 2017 05:17:59 -0400 Received: from mx.socionext.com ([202.248.49.38]:16085 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbdE2JRN (ORCPT ); Mon, 29 May 2017 05:17:13 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 29 May 2017 18:17:00 +0900 Received: from mail.mfilter.local (unknown [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 396C961166; Mon, 29 May 2017 18:17:00 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Mon, 29 May 2017 18:17:00 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 8BCF21A1208; Mon, 29 May 2017 18:16:59 +0900 (JST) From: Kunihiko Hayashi To: rui.zhang@intel.com, edubezval@gmail.com Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, yamada.masahiro@socionext.com, masami.hiramatsu@linaro.org, jaswinder.singh@linaro.org, Kunihiko Hayashi Subject: [PATCH 4/4] arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 Date: Mon, 29 May 2017 18:15:45 +0900 Message-Id: <1496049345-14649-5-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496049345-14649-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1496049345-14649-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. Furthermore, since SoC installed in the reference board doesn't have a calibrated value of thermal monitor, this patch gives the default value for LD20 Reference board via device-tree property. Signed-off-by: Kunihiko Hayashi --- .../arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 25 ++++++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 6 ++++++ 2 files changed, 31 insertions(+) -- 2.7.4 diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts index 609162a..79e1363 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts @@ -73,6 +73,27 @@ i2c4 = &i2c4; i2c5 = &i2c5; }; + + 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"; + }; + }; + }; + }; }; ðsc { @@ -86,3 +107,7 @@ &i2c0 { status = "okay"; }; + +&pvtctl { + socionext,tmod-calibration = <0x0f22 0x68ee>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index a6b3a70..effa2e3 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -417,6 +417,12 @@ compatible = "socionext,uniphier-ld20-reset"; #reset-cells = <1>; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-ld20-thermal"; + interrupts = <0 3 1>; + #thermal-sensor-cells = <0>; + }; }; }; };