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: 9936671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C06A860237 for ; Mon, 4 Sep 2017 01:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0687286BE for ; Mon, 4 Sep 2017 01:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4D63286C0; Mon, 4 Sep 2017 01:20:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46EBE286BE for ; Mon, 4 Sep 2017 01:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=oH2jgUt3ttYWUtg0zkX4BTBXTlxxAslTctVAnNnxPZc=; b=r5QU6DxILRXKsedGlFAeDdx4U2 sLQ9rvsSfyN5H+xRQq6Bg/isPihCMJxqRh4ousK5ZdHF6vqUsMQqmWs+AA5MWJ+MNeNNjZKV7toYH w/6fcCX5QuvMzcVUEjeJlpbkR8IsCr3IX+bkN8Ld81epatEN4BDbQo2X8aHlnsO1MVfwTutZjO1g+ PcV4GhlEr8UjJY4QKUIZdnJ1MjwVXTrQEJOqjYTB+FK3bC57KmMaB+Ob36H4D5I8OCieztNlhwXC0 VSUZ8ISbH/ZGWuxDZLRctABBIZ5bp5UuEa1vwy+O3uEjyDW1dXNcMPYGlilGGM1Vi2g3ldZQqG3Di 8n9E7gVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dog3p-0001Uk-87; Mon, 04 Sep 2017 01:20:21 +0000 Received: from mx.socionext.com ([202.248.49.38]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dog0d-0007hJ-R0 for linux-arm-kernel@lists.infradead.org; Mon, 04 Sep 2017 01:17:07 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170903_181704_047197_07C88F23 X-CRM114-Status: UNSURE ( 8.51 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Kunihiko Hayashi , masami.hiramatsu@linaro.org, linux-kernel@vger.kernel.org, jaswinder.singh@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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 {