From patchwork Tue Oct 9 19:47:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10633231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75A7D933 for ; Tue, 9 Oct 2018 19:47:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60099297C8 for ; Tue, 9 Oct 2018 19:47:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F9F6297CB; Tue, 9 Oct 2018 19:47:52 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E993D297C8 for ; Tue, 9 Oct 2018 19:47:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbeJJDGX (ORCPT ); Tue, 9 Oct 2018 23:06:23 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35214 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726476AbeJJDGX (ORCPT ); Tue, 9 Oct 2018 23:06:23 -0400 Received: by mail-lf1-f67.google.com with SMTP id r191-v6so2207572lff.2 for ; Tue, 09 Oct 2018 12:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E3okyjkclF8gP80BSulMWQkyde6Ucl7R3dBGVnZGyA8=; b=hSCFE5bGvzBuUqmP7PqxxGD+yrQ93/uChzTW2d8Q0p7LF2Qz/bnhZOC1Z1qumFlIcU 3ELGN2xynNoauv67TuGo6hTYmX0isZdtozAML6DD0J7fOULls62zh+BO7Mp16tRJ3s4D hjQ1q5fHDdAoLjekUv81vtN6ctJG23Bq5xASUYny7nulfvHUVz/N/X3KIeg8OGcECv8e so7P5953dJbH6ko/PtmJoJtXmLSM+bfaJPzGx/s4rAYg2ReF0nhyxCuuXdbhkQjSv2j9 kZQqaIX6fU60Puw523Sxl1MQNbQq41vgCat3GtHhk6qPQtKoMfujpfgb9w4+bNDFPET+ 2UXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=E3okyjkclF8gP80BSulMWQkyde6Ucl7R3dBGVnZGyA8=; b=GQHPxuuz3jNIfMjmKGZQ1dHjmdf2oawyOLabFRsttWVY/KYPXcE0QTlE6oNGy+uiiD wKCdxpwyZ5oqpNhXMALnGzyiPWZyvM+lJrpnYcan7cYaI9vsnEQXAm1td1354LnJYD4w yv6p02ELDYVDc0unNdD6Y1Sg+/xc8uF5K7gM/rRzawba/KXojf9TNZCyHj894F+J6Hxv altwvX8noSm+c4ESRp/AZ1/R2R7VYuZs0SlAHUQwzhK8bMCwutCQkN/G1pRrk8mMw6Nn M1pbRIALHoU4Ia8GTnTCigJ+4VVow+JHKO5rFbtq/PF13p+lHkGVWRNFZijqTN2svjsy ihAw== X-Gm-Message-State: ABuFfojT2VlQsrK61Kqftl3PcVGWAC2wYIFXsLvONICp7d+i11rAJ3yq IlsfnZOa+BM00IxUC5fVT4gIKQ== X-Google-Smtp-Source: ACcGV60QBwsRphqUR/5HYj7RLG66p5ZQEXhn+mv1A+hZR4EaiTZdjt6mGqzyUwf7XA0muC/hhhFWhw== X-Received: by 2002:a19:974d:: with SMTP id z74-v6mr16027971lfd.17.1539114469298; Tue, 09 Oct 2018 12:47:49 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.83.100]) by smtp.gmail.com with ESMTPSA id l124-v6sm4533340lfb.58.2018.10.09.12.47.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 12:47:47 -0700 (PDT) From: Sergei Shtylyov Subject: [PATCH v2] arm64: dts: renesas: r8a77970: add thermal support To: Simon Horman , Rob Herring , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org Cc: Magnus Damm , Mark Rutland References: Organization: Cogent Embedded Message-ID: <575ebd1f-165a-756f-f76a-14a11bba7f19@cogentembedded.com> Date: Tue, 9 Oct 2018 22:47:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-MW Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Describe THS/CIVM in the R8A77970 device tree. Based on the original (and large) patches by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven --- This patch is against the 'renesas-devel-20181004-v4.19-rc6' tag of Simon Horman's 'renesas.git' repo. Changed in version 2: - fix the "reg" prop in the thermal device node; - fixed wrong plural in the patch description. arch/arm64/boot/dts/renesas/r8a77970.dtsi | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) Index: renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi =================================================================== --- renesas.orig/arch/arm64/boot/dts/renesas/r8a77970.dtsi +++ renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi @@ -300,6 +300,19 @@ #power-domain-cells = <1>; }; + thermal: thermal@e6190000 { + compatible = "renesas,thermal-r8a77970"; + reg = <0 0xe6190000 0 0x10 + 0 0xe6190100 0 0x120>; + interrupts = , + , + ; + clocks = <&cpg CPG_MOD 522>; + power-domains = <&sysc R8A77970_PD_ALWAYS_ON>; + resets = <&cpg 522>; + #thermal-sensor-cells = <0>; + }; + intc_ex: interrupt-controller@e61c0000 { compatible = "renesas,intc-ex-r8a77970", "renesas,irqc"; #interrupt-cells = <2>; @@ -1033,6 +1046,25 @@ }; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&thermal>; + + trips { + cpu-crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,