From patchwork Mon Sep 4 01:16:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 111531 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp915101qge; Sun, 3 Sep 2017 18:17:09 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6Ep3KwZ/Pxt4JgjedTPlwRHUS3uvIop5mnVz9VJvbuNDLQjikk/4Z9BGKrKB4jxCF2sMDI X-Received: by 10.84.132.13 with SMTP id 13mr10678361ple.136.1504487829053; Sun, 03 Sep 2017 18:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504487829; cv=none; d=google.com; s=arc-20160816; b=qPNV7/Ss9ueltIKDCXqw4ayV+XI7kOzK0bsq6vdlmAkdCKv85k6dB8mzFLcJo1xtWA SfZEBsPo2qkKrBxaXHJBDnc9qmRb1++CeK6kwRrTlOUJ6OTKpvBMT5Q4npxnr90jI30N p1AE4DJV4EdjQU6CRVAhzLlNbxWTPBDwiK5ek54CheKWN9ptKYQkpK47INsNpz09u+dK mLFz+hlW5BMhBlL9IEQAPgAi6aKyKwQTiZ6H+VCDL6/hLV7IJvtmyDeeKfPPSpiL6fTq 4TjkVxKzNn7Vz0kzC7t0YVyaIIeBRYMippO9jNvmYz5DQbLXjxYGv25NCf8hgXzozWDY F2Bw== 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=o6xFIzLNkwJxNlNNSSfVstPXVsA/bFDEIgZ6B0/w8SM=; b=KaT1i+47ROu9yyBVt2xgnZXUjqzBh5QcCgX6H9ChqJz31Ps6ro8goMEGON1sya92o2 E47k2a1gY4rysxK9uRgKAIH49+UNz0kF5W0tJ4bDY5neI4Iz2+JZVM4nvIa8CK0KJ4FN EVuo+T0nuXWLpalnRif12b6AstD2MLzBX5xV5+zc+SBZYkmIVRJcIxtli6Ny3V3fWoPl wJGI1RAFEhsVT/BUu2hF4iefVSCiYSZwDC3dfeqsrWZm9bvRM8lyGlRTvdp3hTe4tRmz +2n8EwwsZ6aCVqC4SHTqAmD9aFSHvUIx8q8wc4WBYlgcNSrgFrRlzXtTbeLe/dAp2nkN W8Lw== 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 f16si4505113plk.749.2017.09.03.18.17.08; Sun, 03 Sep 2017 18:17:09 -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 S1753237AbdIDBRC (ORCPT + 26 others); Sun, 3 Sep 2017 21:17:02 -0400 Received: from mx.socionext.com ([202.248.49.38]:11085 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108AbdIDBQp (ORCPT ); Sun, 3 Sep 2017 21:16:45 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Sep 2017 10:16:46 +0900 Received: from mail.mfilter.local (unknown [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id B218C180223; Mon, 4 Sep 2017 10:16:44 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Mon, 4 Sep 2017 10:16:44 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 55F641A121E; Mon, 4 Sep 2017 10:16:44 +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 v4 2/2] arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 Date: Mon, 4 Sep 2017 10:16:31 +0900 Message-Id: <1504487791-20582-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504487791-20582-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1504487791-20582-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 the reference board doesn't have a calibrated value of thermal monitor, this patch gives the default value for LD20 reference board. Signed-off-by: Kunihiko Hayashi --- .../arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 4 +++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 40 ++++++++++++++++++++++ 2 files changed, 44 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 1ca0c86..5bb63a2 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts @@ -50,3 +50,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 a29c279..0f733ad 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -46,6 +46,7 @@ clocks = <&sys_clk 32>; enable-method = "psci"; operating-points-v2 = <&cluster0_opp>; + #cooling-cells = <2>; }; cpu1: cpu@1 { @@ -64,6 +65,7 @@ clocks = <&sys_clk 33>; enable-method = "psci"; operating-points-v2 = <&cluster1_opp>; + #cooling-cells = <2>; }; cpu3: cpu@101 { @@ -173,6 +175,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@0 { compatible = "simple-bus"; #address-cells = <1>; @@ -410,6 +444,12 @@ watchdog { compatible = "socionext,uniphier-wdt"; }; + + pvtctl: pvtctl { + compatible = "socionext,uniphier-ld20-thermal"; + interrupts = <0 3 4>; + #thermal-sensor-cells = <0>; + }; }; nand: nand@68000000 {