From patchwork Fri Oct 5 19:25: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: 10628681 X-Patchwork-Delegate: horms@verge.net.au 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 B54301731 for ; Fri, 5 Oct 2018 19:25:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A461429BAA for ; Fri, 5 Oct 2018 19:25:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 989F829C0A; Fri, 5 Oct 2018 19:25: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 37C0229BAA for ; Fri, 5 Oct 2018 19:25:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbeJFCZ7 (ORCPT ); Fri, 5 Oct 2018 22:25:59 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42978 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbeJFCZ7 (ORCPT ); Fri, 5 Oct 2018 22:25:59 -0400 Received: by mail-lf1-f67.google.com with SMTP id s10-v6so10112632lfc.9 for ; Fri, 05 Oct 2018 12:25: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=+UcS2tPl5y2M/7l7GdnBpo/Li9p6Y1x3a+4PJO21cLo=; b=lw2L9zT1QXNPzOG3Nr/7EJqBN3nf6/6jXWuuIFt6682kyAufB8wff9sLRKFMUX49Tu sgkZA1+Bm9dWyQWelbefsjLp5MDcbEY3vnmdxzNFN5zMBxrx4cDHN5SSRr0IrPkOQ0N/ 9ZhZagsluwqWgAVg/fImBRkRENbZM1tJijTQhmlfuBsZ32JLhGXoYpQLQ4Bx9+P1oyn3 0HSjTuFez4reZ875sLuhwWPggiUd6NrbZSXyG2P9PptUIm9BmrqrkImryKKOrhkgGIe+ GcdBI0ZBlkRU8zuW31oO6Gzm4UHntvwUDaRNVRExZ7uG6ANh6KUXdoVCETB3r3dxDxJn BK/g== 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=+UcS2tPl5y2M/7l7GdnBpo/Li9p6Y1x3a+4PJO21cLo=; b=FD5AoDyAieXcIY92FZafmOABlj0Sdo54AWAejPUNaXDKA2ekx6BKj8bmCfVCmTCPls 5slG371FuSs0s0PjcchqN4UFqEl5B69CsA5HrIeUxC6EYyXJL8WPhTN5JkFDeLncgUnd 5yk87iaI1lp9Itvnl0+6uT0VwGm8x+KGwy4UgrbbY7adfYumcxRh8OyZTq5Q4JQZJHEF j3oqm34H2jQltCXl49HxucbJq8MSvA2MHc0c9mZeQwCklevJmKBN1cmnPeSIASurGOzA Zle9Z96KQ6LIR9pYGYaOcMK90NgG4ZNSYoH7D6gjaNJc+5p/6YpHx2QjtioU2K71wtq1 K03w== X-Gm-Message-State: ABuFfog2CSPGXEV0BtEGIk8FPczVcgsBjY05tMkP9epCqNeV7XcYPgVG 12V7ZAfPg9QwjcjNs0CUJbl6HhBTGdA= X-Google-Smtp-Source: ACcGV63P2bxo44YVt+V+/JtzybIfGuRuMzODYHCOLPaR8f+Lizz2UjbLk2xW6qh0uoNsMwL3nEl4ig== X-Received: by 2002:a19:2a8c:: with SMTP id q12-v6mr7177992lfq.95.1538767549319; Fri, 05 Oct 2018 12:25:49 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.86.186]) by smtp.gmail.com with ESMTPSA id j4-v6sm2106747ljb.33.2018.10.05.12.25.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 12:25:48 -0700 (PDT) From: Sergei Shtylyov Subject: [PATCH] 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: <51491585-16fb-93b1-bb1a-09e89683f2f0@cogentembedded.com> Date: Fri, 5 Oct 2018 22:25: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 trees. 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. The thermal driver/bindings patches have been posted yesterday... 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 0x14 + 0 0xe6190100 0 0x38>; + 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)>,