From patchwork Thu Aug 30 15:45:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582221 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 E8BE2920 for ; Thu, 30 Aug 2018 16:07:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6C562C0D5 for ; Thu, 30 Aug 2018 16:07:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA8532C116; Thu, 30 Aug 2018 16:07:09 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 367592C117 for ; Thu, 30 Aug 2018 16:07:09 +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=z92R+DKp05DrC6FYLl9HLTyaljslnwjqN5N1qtDu/yo=; b=IniR8CskHxArHP4XNmc9h6x2xA tdaiEM/1hh0PEFDPolcxEeNpvYntapjRGq8nYHCEmg95zuMEiR7xDUvaZdr/ad1U8djeIk/nWumeA 4A+AfjR3cwjJXSr4USghELNmnI26e85Nse32BV1xOKoE9WsA10Gl8aEfjqBGejV49qoJp67xrCiIl ab3O8f1UHVSf/VSmHiqQ5j6lk3bPqgGeMJKE7OmLL8IxIksjPE0YhECNGW6LPCT1+xcHpoKTCMdK7 KPSCHsL0SRXckkKFZgT27ASKGSWItAU7g30QsnBsJZ7zzJPNhqHob9qltEFWk7qQ3W6qJWR+j4H5x 0ffnF1cQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPTB-0007VR-Jr; Thu, 30 Aug 2018 16:06:53 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvP8w-0001l3-Kd for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 15:46:02 +0000 Received: by mail-wr1-x442.google.com with SMTP id o37-v6so8509699wrf.6 for ; Thu, 30 Aug 2018 08:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CrbjzCGKhuy1hrMWFjimT5Qh6ZU+NM8doLLYCKA9NAU=; b=qb8wKlxN8ikE8T9BDdtgn/W5hhtut7faqPOVpHaPelKnSWMqpgdxRy/1KVJexwbnE1 QPPwPWsXnMFU6fr4x/X01yC6CQ1uCPHP2l8oDZYuE4CeUzFGoEve711z5j54qN6+tLet GUpUOfDgWTDE73HpW6HllXyHBZ7nOXvQTCXqpiU34Fki4IGdpFhpx2NbVGVCaIXlMgMk s87CECAcyq+qfzPZMEa/JVajSaG6AfQn34QJUKEp5vhtruikchZOTlamYgnLHpRNh5H7 TqOxYpNsC004LJyoJwCDlaedW9/f9w0OI0zAPhJ5cvUYiVFJTiW4gVud4sYnLlR8OMoF oUwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CrbjzCGKhuy1hrMWFjimT5Qh6ZU+NM8doLLYCKA9NAU=; b=B5i6IFzyMugbN1TwnX9fKw6lN862fbcxvZGBd6r+c5o+Hos3bEj8yjuhThe74tbVrb Vx6dOqmEluleVvk+TPNM5uYCwQz+ywhciB6F3/dQuJtuNldh2PDReMtFBbDNkAWnbHUO oaFTlPZn8rI4l8j4YBK4qNsrMONMJq9fDLYnzmE6vOWBhAgMdSD53dy80fPbm9ReL1hH T88UV8HmyMouR7vbl432j49tVrssKYEOUyUHRWUXLorqK/TIU4VBX0B4M2etS2D6zuAL 1ZR/mKf3f4c7+z5QjLm+iQKmHrskTvruHOpnEBx/zFlIZ4c/pugTiu5PXchF/L0oJqq3 bGGw== X-Gm-Message-State: APzg51CwdRccurJbm+VbQNlSgGXwwU4cLX9IxBO+LEEpkNb6YDk2l3Wp zACbTno5eJr9uSlzWfoYe3U= X-Google-Smtp-Source: ANB0VdZP4PYxxNOjOMzNiV+xt7u6wr8jjl4VjFuXGazBQIsNzc0NEBrxi9riWD9Hd9ZUOnghnMxBxg== X-Received: by 2002:adf:ea4f:: with SMTP id j15-v6mr8358259wrn.224.1535643946851; Thu, 30 Aug 2018 08:45:46 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:46 -0700 (PDT) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com Subject: [PATCH v3 25/30] ARM: dts: sun8i: h3: add thermal zone to H3 Date: Thu, 30 Aug 2018 17:45:13 +0200 Message-Id: <20180830154518.29507-26-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_084558_986323_253F078D X-CRM114-Status: GOOD ( 15.77 ) 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: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.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 This patch adds the thermal zones to the H3. We have only one sensor and that is placed in the cpu. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sun8i-h3.dtsi | 31 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 1 + 2 files changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 5b7994cb1471..954848d5df50 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi @@ -78,6 +78,8 @@ clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; + cooling-min-level = <0>; + cooling-max-level = <15>; }; cpu@1 { @@ -102,6 +104,35 @@ }; }; + thermal-zones { + cpu-thermal { + /* milliseconds */ + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&ths>; + + trips { + cpu_hot_trip: cpu-warm { + temperature = <65000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_very_hot_trip: cpu-very-hot { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + cpu-warm-limit { + trip = <&cpu_hot_trip>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + timer { compatible = "arm,armv7-timer"; interrupts = , diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 3520e4ad6042..2c83f4893757 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -47,6 +47,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>;