From patchwork Mon Dec 21 18:13:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11987123 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 382E5C433E0 for ; Mon, 21 Dec 2020 18:13:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4FA522D08 for ; Mon, 21 Dec 2020 18:13:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4FA522D08 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=vRDoedb0rOoVasB7iMQ33MtTincy53IzSBVqDaWAsTU=; b=vQOdtxqWT8ZcyrIq17XKrVVO4 s5PVCrl9TQZrQ0tG+baNK9mkxG6xoh8Zp+r/aiGMyzbu6y34Qlc7CzuYFxahmvrhtedubzfpEgojy h6Tru1bzccG+nFH2NP9Sqtkl0bErw8prFiuxDSE6BQJzW7MLK4RyESei8KKPoaywpff9/K2C/pqEU 82L6E/qscuTr/gZsAwgVEfKoAT0Yg5tqIoknrBxBj1bdzM5P0MHtA/rtNf4no/FStcBNnTdTy9FgZ 3N8o/dtvoXolK+wKHJDOmrYLW9lS2zZKGiAUhPeHvJxOyzEEfmtuYSLEr22dPHhoOKWg9uhHwA2qx DGFB5lWyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgs-0001v0-3p; Mon, 21 Dec 2020 18:13:50 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgk-0001rd-65; Mon, 21 Dec 2020 18:13:43 +0000 Received: by mail-wm1-x334.google.com with SMTP id x22so10710547wmc.5; Mon, 21 Dec 2020 10:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zBG38fqf3nkMjryFRLlDYpQKv2p+mxjnCoJD3PtsF7E=; b=pyq3hcgB3dqgN6x6iV8m3tKTuu97ztx1JRM8yRKUY3g7PoBWX+j7RZznGGHPZL8YNq FtMPrxMV525KDwWzwG5uS2fGNchjwIg6tNEa9NEVGf8Y2es+GQJ3N7BwvjmjxGhmkM8c D/c1FKPsHfTNHbX3LS8dEZnOMp7cVxrwO8nbXMdpjub5Cj8w9JXHKf28pyjro59UywH7 xKy3Qq6XIkXJVQKS84Vm6lBC3KM5YegQVuln3UYlWEMQ3pKfmAnSs0PFRwAMhjoRIgJ8 sHsETo1+4kwmuU1jNdUlbCPY8H0RDOFH/JmrWUk8zcLgx993sOTlGMBRe7ICvf4rRgAg LuHg== 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:mime-version:content-transfer-encoding; bh=zBG38fqf3nkMjryFRLlDYpQKv2p+mxjnCoJD3PtsF7E=; b=gtuEl65XT3ZniKIEn54d+pcgBpoRjGBbk7NRe57t/AVwvyOELaa0wj0WAWgEMQGYzl kaKPH4R2BXWSYAWNW5n7YH9k+DUzXfhyugqjULDofS3I54CUW6jMo6S+jhPXPGMwWzQ/ DFNvfVUXjBNGadGzRRBQvR0JLVu8uptfrp2htsox+8vp2ei4K/XeV9siO40meHTeT8Z8 mOvQ7j7otvoyAlL+ZPPMYXQ2saLm9gfpi8zEYjxGH4RxOT9rK9/7MwyApiyL8zVi+k7Y PzJEtAWu1Ho8zB0XloTV/Vant39gjm3puF3HqaFR4HWKutkCrjn/hOG+lA7IxFRNS/9F uStw== X-Gm-Message-State: AOAM532dFXZZsGCJCsO4Nx0OeHOKrughdaN4RG6KvLQGHcJPJOXCct85 Jbzixw8OQgJvSta9TlqaTY6fjBqkM4o= X-Google-Smtp-Source: ABdhPJwS7jYu0jsAngYbml49mXApBSnIpKpO60xi05KFbIF1ikmaTorH5qXetfn0BLYr0yTfuS8sqA== X-Received: by 2002:a1c:1bcc:: with SMTP id b195mr18075018wmb.131.1608574418715; Mon, 21 Dec 2020 10:13:38 -0800 (PST) Received: from localhost.localdomain (p200300f137019000428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3701:9000:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id m11sm23434936wmi.16.2020.12.21.10.13.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 10:13:38 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 1/5] ARM: dts: meson: move iio-hwmon for the SoC temperature to meson.dtsi Date: Mon, 21 Dec 2020 19:13:02 +0100 Message-Id: <20201221181306.904272-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> References: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_131342_276183_1F2D40B7 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The SoC temperature can be retrieved from ADC channel 8 on all 32-bit SoCs (Meson6, Meson8, Meson8b and Meson8m2). Move the iio-hwmon instance to meson.dtsi instead of duplicating it in all board.dts. If the temperature sensor calibration data is missing for a board then iio-hwmon will simply not probe. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong --- arch/arm/boot/dts/meson.dtsi | 5 +++++ arch/arm/boot/dts/meson8b-ec100.dts | 5 ----- arch/arm/boot/dts/meson8b-mxq.dts | 5 ----- arch/arm/boot/dts/meson8b-odroidc1.dts | 5 ----- arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 5 ----- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 7649dd1e0b9e..5f074f7aa1a2 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -11,6 +11,11 @@ / { #size-cells = <1>; interrupt-parent = <&gic>; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&saradc 8>; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts index ed06102a4014..8e48ccc6b634 100644 --- a/arch/arm/boot/dts/meson8b-ec100.dts +++ b/arch/arm/boot/dts/meson8b-ec100.dts @@ -70,11 +70,6 @@ gpio-poweroff { timeout-ms = <20000>; }; - iio-hwmon { - compatible = "iio-hwmon"; - io-channels = <&saradc 8>; - }; - leds { compatible = "gpio-leds"; diff --git a/arch/arm/boot/dts/meson8b-mxq.dts b/arch/arm/boot/dts/meson8b-mxq.dts index 33037ef62d0a..f3937d55472d 100644 --- a/arch/arm/boot/dts/meson8b-mxq.dts +++ b/arch/arm/boot/dts/meson8b-mxq.dts @@ -27,11 +27,6 @@ memory { reg = <0x40000000 0x40000000>; }; - iio-hwmon { - compatible = "iio-hwmon"; - io-channels = <&saradc 8>; - }; - vcck: regulator-vcck { compatible = "pwm-regulator"; diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 5963566dbcc9..c440ef94e082 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -85,11 +85,6 @@ tf_io: gpio-regulator-tf_io { 1800000 1>; }; - iio-hwmon { - compatible = "iio-hwmon"; - io-channels = <&saradc 8>; - }; - rtc32k_xtal: rtc32k-xtal-clk { /* X3 in the schematics */ compatible = "fixed-clock"; diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts index 8f4eb1ed4581..fa6d55f1cfb9 100644 --- a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts +++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts @@ -45,11 +45,6 @@ button-function { }; }; - iio-hwmon { - compatible = "iio-hwmon"; - io-channels = <&saradc 8>; - }; - vcc_3v3: regulator-vcc3v3 { compatible = "regulator-fixed"; regulator-name = "VCC3V3"; From patchwork Mon Dec 21 18:13:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11987119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A83BDC433E0 for ; Mon, 21 Dec 2020 18:13:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A15B22D08 for ; Mon, 21 Dec 2020 18:13:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A15B22D08 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=wjBFoNx2Cox/jNY+3BoztZi8Ubd+thtJWgld618Nln8=; b=VLsInyGMvkaGIZscTWx5m0CL/ zyI7bmG8yLvM1K2uQgLirulTS+FDV2OHtuvWKxtFp9XR2sMftvPWW9hIDiYDvRJEURG2XkBM/fyWj mFyH7Rl8wcJpjdXrrU4NOOSRYehDyHYPlTmaYxOyNrCdR4iaM+ADVU4t0d2WXAaN4uE6n9gfwgKjc mxrkx3XQHBLlVtIGuVD5JXBYjxcy94uUAg7Uk+MbnxJvl7qJLOAkR/PlWQUJvr19kkc64mMCinuhk 5Bz9CAwtu8SzC+JGBf71elAmRqVK1PFdVJCV4uxNeYGKyVdfQNTXMuXGDqo464jT0Tx5dSozq8Skv PoBQ6adKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgm-0001tZ-D4; Mon, 21 Dec 2020 18:13:44 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgj-0001rf-Cx; Mon, 21 Dec 2020 18:13:42 +0000 Received: by mail-wm1-x32b.google.com with SMTP id k10so10726847wmi.3; Mon, 21 Dec 2020 10:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8CNSVuVCy6pDq2pHryyGIphjcVCtjSNpbEXQSGcq8K8=; b=ro6PZ8miBiXxczKWKMmWYIo1Te0lOA0LqkzB2dAYSaCiQeyoPlCU8opDLWmnVdr7ZO lVXbJx7ca9QgLyYzr7D6Pb+8xuzdYMtjMtSSRUtpBfyw1TngSeUOCwLvcsgNNcDFVeCm nUpWIuCT0Yf/jhvEF8nIU1U9FQZprnhw+iqfxSDop3ibXGNUQzXhMNLQXSSAWqxF+7OF nNxe2knkUAJSqFpt4zXk2r6ddQwTBXnrH0LV+G4HwLLMF4poun6d3j32vbjFqrh/vXmR aoqr6MvUOA8Ndbgk7uB4UDsICxSQyVQdMSJDgPq4HyUHIiIw4e0Bj7NencTpgPjUQlg8 YrAw== 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:mime-version:content-transfer-encoding; bh=8CNSVuVCy6pDq2pHryyGIphjcVCtjSNpbEXQSGcq8K8=; b=j6bRqY/8HbSdVevZC83A5Quyeg1ag61T389gytOSAq84VfZDoVwA7+ZjvRixIKkpdO cscaXXomK9f9bBp58+lZ6Tj1mR0tMS9nSt6nP63xl7x9/VDeaM3nzqqv1rxj1O1N39Kp gGNsykboFc7Xjd+t1RTWw5ZDlBcRqJydzg/YokbyyuAFHnu5dDOSlKlj72i3BB3QANoS RhBZ1+zDNRDSjcQ81sA1NJ4obrV6FdsjCc97eTdybzhBdKRsiWGXM3kKwG1IZyUBwXLn Zs0qwrpAiH8UNUSbv13em621gNawDDFFKdenQte2nd0mLiJKr1ytOvCr6LTNv31PgnSY ZKwg== X-Gm-Message-State: AOAM53385Ka1q/xyV8ZsU0eN7bHRH41s+kD6CuFmw1qwcCbkKQXCxc7T rpCxUg/i9GEAeSX4WQbyUmBUI6JhMuQ= X-Google-Smtp-Source: ABdhPJyi00a0kPHjXm/9YZxrLDUId8sVOiXhBlq9M5WMxU2WTU0Z+Zr5rkidENtHt8xrOrirc2HfzA== X-Received: by 2002:a7b:c40b:: with SMTP id k11mr18174342wmi.36.1608574419608; Mon, 21 Dec 2020 10:13:39 -0800 (PST) Received: from localhost.localdomain (p200300f137019000428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3701:9000:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id m11sm23434936wmi.16.2020.12.21.10.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 10:13:39 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 2/5] ARM: dts: meson: add the ADC thermal sensor to meson.dtsi Date: Mon, 21 Dec 2020 19:13:03 +0100 Message-Id: <20201221181306.904272-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> References: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_131341_451837_AB11481F X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The SoC temperature can be retrieved from ADC channel 8 on all 32-bit SoCs (Meson6, Meson8, Meson8b and Meson8m2). Add a "generic-adc-thermal" instance to meson.dtsi so the thermal sensor is available for all SoCs. If the temperature sensor calibration data is missing for a board then the "generic-adc-thermal" will not probe and not register a thermal sensor. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong --- arch/arm/boot/dts/meson.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 5f074f7aa1a2..e0ca5f08d07d 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -298,6 +298,13 @@ efuse: nvmem@0 { }; }; + thermal_sensor: thermal-sensor { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&saradc 8>; + io-channel-names = "sensor-channel"; + }; + xtal: xtal-clk { compatible = "fixed-clock"; clock-frequency = <24000000>; From patchwork Mon Dec 21 18:13:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11987125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72D86C433E6 for ; Mon, 21 Dec 2020 18:13:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3020822D08 for ; Mon, 21 Dec 2020 18:13:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3020822D08 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=zVE/V/iDQhLle7A+nLi3Mdn/3WOzjScRylc1uJ7Nlkc=; b=2coBFI5zCCacJRF+OqSDGEEnt JqOaYqGId3yb+OUd8Aqa1ZUzaUbB6VBi8nGBJuUvJJGrhaE5Vi2fG67+ASK5Q5PSc4a47Vs2QRopK 9cYVgC2vCdtRE0ZxDvcM8BcL7AJ7H1N+MvX/bneoetC1D/vk3HwM3VxXhD9fmTs+23GnFnibZxzNz UHL4WFgsx1Sww4jXYhmOdQbl5etV72Yi7B8SZrPz2Iy7a6sOz6Zm2wFQSwaDj1Vt4Abky22/jeHdE 6VtRYpKUjS7Cl4yx/hy3cPfJFn2x/uCNEtToGQKqQLX/uDE33Y2qgUqiVRnf+WSpcLRnyLPWclT4T ND1fUSOuA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgt-0001vJ-3b; Mon, 21 Dec 2020 18:13:51 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgk-0001rj-E0; Mon, 21 Dec 2020 18:13:43 +0000 Received: by mail-wm1-x335.google.com with SMTP id a6so10724165wmc.2; Mon, 21 Dec 2020 10:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X+KwutHWyzn9PxtO0N7Iinmf9zYdkryZ816NS71BKk8=; b=ldqnx1j7Ks6lRYx/UBvTxWvpVOMc1MSs4mTUo2PPiSCjT6jKuSWNo1JatbusOuJ5d+ G0pp1XqnL/0Jk3u8aJdk3wBIvWX3b+0Bq4Z0xUbSUntDV1j05E9OA8bZOYVOnwmqoVv7 HtgUOw/+DshQZ70V/JebtPpcyiW7frdWWj4ggztpLzJkemtTCsMn4YL39kX1M9cClw7+ 8SBiSZuPWEBUAfvjRtGebyBQLpVkhX7OyL76V8gygAyaw/JYinZesGpBnKxh4aBFk3iP R/jL7T3NmSuQhPlWt3mvIEHG19LUwN6VJI+ngNC7Iw4KkcRs9Cav4T8xa7sH9KYrSpGB E67Q== 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:mime-version:content-transfer-encoding; bh=X+KwutHWyzn9PxtO0N7Iinmf9zYdkryZ816NS71BKk8=; b=aBIH8xKTu9JdX7uc8e8cjkDKT5/c8ImZTgWCUQ5LU4i/OUXK1BnGZ+CyUoEGBUXmD/ ZD9r/IQMXIhe7S+GtfMmpjy0fklBYc3iOy1n3E2ouGyNCDeY/riGS4ziO8P37ExCiaIB qfGJmSc4spsKNnIikL6mquo/7rNq6JNSGdOKd3isd0FjyzIEjyaejeZ2tg56n21lIawC iXKN+tCvZZVc/Xwb11KnRs0h2w+XXU4jhgh4NggkhhzVa8qucqgspHYdQnWhjNcuBgKq KsWMZYGt0wv2hVl36ZkwHiXJ4An5RlOQCnYnohuSNYJd+PrqGMXXB4UL2VCU1LmkfgRo HUFQ== X-Gm-Message-State: AOAM533blG2dBejA/mBmPu5Hqc31drAe6Ry60v2eXSVuucFuW+lc+8Yn vd3FO7l0RgS0MUI7OLmZ0KqwZ8a6dfU= X-Google-Smtp-Source: ABdhPJwf8vXQx3eHs+teSa2YTnl5HqIFCWKxtP2N2IDsGLEMXb60Hsx2tBX///tGDY966BvVeROyIQ== X-Received: by 2002:a1c:2b46:: with SMTP id r67mr17753384wmr.162.1608574420525; Mon, 21 Dec 2020 10:13:40 -0800 (PST) Received: from localhost.localdomain (p200300f137019000428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3701:9000:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id m11sm23434936wmi.16.2020.12.21.10.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 10:13:39 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 3/5] ARM: dts: meson8: add the thermal-zones with cooling configuration Date: Mon, 21 Dec 2020 19:13:04 +0100 Message-Id: <20201221181306.904272-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> References: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_131342_532407_6E2263BE X-CRM114-Status: GOOD ( 17.00 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The vendor kernel uses the following thermal-zone settings: <= 70°C: - CPU frequency limited to 1.608GHz - GPU limited to 511MHz and 5 cores (pixel processors) <= 80°C: - CPU frequency limited to 1.2GHz - GPU limited to 435MHz and 4 cores (pixel processors) <= 90°C: - CPU frequency limited to 0.804GHz - GPU limited to 328MHz and 3 cores (pixel processors) Add simplified thermal configuration which is taken from the GXBB/GXL/GXM SoC family (which uses the same manufacturing process and has the same maximum junction temperature of 125°C). With this the thermal framework will try to keep the SoC temperature at or below 80°C which is identical to the vendor kernel (with the exception of one GPU pixel processor). The number of GPU cores are not taken into account as this is not supported. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong --- arch/arm/boot/dts/meson8.dtsi | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 04688e8abce2..420324ea2ad7 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -9,6 +9,7 @@ #include #include #include +#include #include "meson.dtsi" / { @@ -28,6 +29,7 @@ cpu0: cpu@200 { resets = <&clkc CLKC_RESET_CPU0_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu1: cpu@201 { @@ -39,6 +41,7 @@ cpu1: cpu@201 { resets = <&clkc CLKC_RESET_CPU1_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu2: cpu@202 { @@ -50,6 +53,7 @@ cpu2: cpu@202 { resets = <&clkc CLKC_RESET_CPU2_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu3: cpu@203 { @@ -61,6 +65,7 @@ cpu3: cpu@203 { resets = <&clkc CLKC_RESET_CPU3_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; }; @@ -190,6 +195,54 @@ power-firmware@4f00000 { }; }; + thermal-zones { + soc { + polling-delay-passive = <250>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + thermal-sensors = <&thermal_sensor>; + + cooling-maps { + map0 { + trip = <&soc_passive>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&soc_hot>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + + trips { + soc_passive: soc-passive { + temperature = <80000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + + soc_hot: soc-hot { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "hot"; + }; + + soc_critical: soc-critical { + temperature = <110000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + }; + }; + mmcbus: bus@c8000000 { compatible = "simple-bus"; reg = <0xc8000000 0x8000>; @@ -254,6 +307,7 @@ mali: gpu@c0000 { clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>; clock-names = "bus", "core"; operating-points-v2 = <&gpu_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; }; }; /* end of / */ From patchwork Mon Dec 21 18:13:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11987127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8138C433E0 for ; Mon, 21 Dec 2020 18:14:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52A8F22D08 for ; Mon, 21 Dec 2020 18:14:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52A8F22D08 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=hTvxXWuTBORi11Zp/x2bTLBlMOwAhSwYjM+jOsM3ZnA=; b=dtHQij8+y3ij9oDks9ySS05au qWzdV4eRKWM9KdOcK5Px44rUTvY/nEKPXmmdpKFN61bsJePi9sGZd5kVI51BuP75CxS4gIaitk48L FT1Coi9FHDEuP9y2ZyxUd86GyEemSCpEm6UTu+/oZ9+uihiyGXVa4T15rFBNGAFbyffjFc+CXncZW /tMBJ2sFMavlzpiOYhkUjbVpAzxrNcNG2RJSLtX+vMkoqjBEXndA7AgehCwR+W4x1deaK/bhJPDQB DSzi8jBtT7FwhTsDGLBEYlsPwJEyIpCoxW6GTGwVFUd1zI35/DJG9hJUrhytgztVc+6jtmQgkIaTH 1wcz2EmwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPh6-0001z2-SK; Mon, 21 Dec 2020 18:14:04 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgl-0001sE-4h; Mon, 21 Dec 2020 18:13:44 +0000 Received: by mail-wm1-x336.google.com with SMTP id 3so11822894wmg.4; Mon, 21 Dec 2020 10:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=htWpp3iKagAp/qem+WLHc63LEn5Nif+eGu8hyXoZAoY=; b=MOnQAKHEImD9X64/gcEyDfGlMI84eE0HnR8ZqMOb8Zp39e38nDGCaaj32uQumTrqjX iuMJSVwSHRPDweKbfjcmnwAcVdYxY9q4seeWG5F/91coHSMpXGN7c/CTNAoLe2ZYjR03 Pi8BPVqqqtHRsI2p2KeEjyFoY7SXOWMrINXyoZq/djUxtjBalzh8lMVhs/5V4zf7FPxB jsZbUtG3WVrAPGJ828je10I4L74XOuvB64tmffslqgNxiF2SR+jKXr/p9RsuMwbefB9q i1LuX3/49qv0M5SPNItpIVnOoAjhH+93RpUklJggFhCIep0BuHJYsitFUSldmkgOgl4H 6pCg== 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:mime-version:content-transfer-encoding; bh=htWpp3iKagAp/qem+WLHc63LEn5Nif+eGu8hyXoZAoY=; b=GbtnHQpub/tinssGDCMruVJDtBonvk5VjJu3YVll6NB+eJ8BUMIZwERMgIXOhwjS3Q tGvtJDvfa92Htu2biSs450tC564AcQD7yKWzf8i22BZDkYOF+CrdBbtbqAOxN8/AxnED Vra7GmRzqDWp2F9G0XvP0oCAoa8fKM8Eqp+oi/YkuSk3sBfyarworPa5eno82pquexy4 oHYbdAku3xZuwnQCsREVeRTRVJwQw/6Mdw3sZJDRphZ/v81YeposI9TbqZMyEMWKYEXW SSBouQJFtYrvDZJX/TQZg2Vdzom6hExrTJ09TKZ0lAwxCNn/auuGzzrVD3UnXlR/qddb CHxw== X-Gm-Message-State: AOAM532sKCKioTF5sHTKVl5Sme52flKiijxvEweuNfdO4HBUH+OPxB+t 3EnNW8cZSf5rKTYxpv7STGRQo22fFi4= X-Google-Smtp-Source: ABdhPJwPVeC/S2fOq4AHcgYMmdO6siU97r4ZLGePCER4Vy3o/0t1Sshm+A23OGyh+e1krTVohsuGLA== X-Received: by 2002:a1c:8085:: with SMTP id b127mr17547256wmd.16.1608574421478; Mon, 21 Dec 2020 10:13:41 -0800 (PST) Received: from localhost.localdomain (p200300f137019000428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3701:9000:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id m11sm23434936wmi.16.2020.12.21.10.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 10:13:40 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 4/5] ARM: dts: meson8b: add the thermal-zones with cooling configuration Date: Mon, 21 Dec 2020 19:13:05 +0100 Message-Id: <20201221181306.904272-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> References: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_131343_268515_CF1B4F37 X-CRM114-Status: GOOD ( 16.90 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The vendor kernel uses the following thermal-zone settings: <= 70°C: - CPU frequency limited to 1.488GHz - GPU limited to 511MHz and 2 cores (pixel processors) <= 80°C: - CPU frequency limited to 1.2GHz - GPU limited to 435MHz and 2 cores (pixel processors) <= 90°C: - CPU frequency limited to 0.804GHz - GPU limited to 328MHz and 1 core (pixel processor) Add simplified thermal configuration which is taken from the GXBB/GXL/GXM SoC family (which uses the same manufacturing process and has the same maximum junction temperature of 125°C). With this the thermal framework will try to keep the SoC temperature at or below 80°C which is identical to the vendor kernel (with the exception of one CPU frequency step from 1.488GHz to 1.536GHz). The number of GPU cores are not taken into account as this is not supported. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong --- arch/arm/boot/dts/meson8b.dtsi | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index 2401cdf5f751..dbf7963b6c87 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include "meson.dtsi" / { @@ -26,6 +27,7 @@ cpu0: cpu@200 { resets = <&clkc CLKC_RESET_CPU0_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu1: cpu@201 { @@ -37,6 +39,7 @@ cpu1: cpu@201 { resets = <&clkc CLKC_RESET_CPU1_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu2: cpu@202 { @@ -48,6 +51,7 @@ cpu2: cpu@202 { resets = <&clkc CLKC_RESET_CPU2_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; cpu3: cpu@203 { @@ -59,6 +63,7 @@ cpu3: cpu@203 { resets = <&clkc CLKC_RESET_CPU3_SOFT_RESET>; operating-points-v2 = <&cpu_opp_table>; clocks = <&clkc CLKID_CPUCLK>; + #cooling-cells = <2>; /* min followed by max */ }; }; @@ -167,6 +172,54 @@ hwrom@0 { }; }; + thermal-zones { + soc { + polling-delay-passive = <250>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + thermal-sensors = <&thermal_sensor>; + + cooling-maps { + map0 { + trip = <&soc_passive>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&soc_hot>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + + trips { + soc_passive: soc-passive { + temperature = <80000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + + soc_hot: soc-hot { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "hot"; + }; + + soc_critical: soc-critical { + temperature = <110000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + }; + }; + mmcbus: bus@c8000000 { compatible = "simple-bus"; reg = <0xc8000000 0x8000>; @@ -221,6 +274,7 @@ mali: gpu@c0000 { clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>; clock-names = "bus", "core"; operating-points-v2 = <&gpu_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; }; }; /* end of / */ From patchwork Mon Dec 21 18:13:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11987129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC849C433E9 for ; Mon, 21 Dec 2020 18:14:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D4F422D08 for ; Mon, 21 Dec 2020 18:14:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D4F422D08 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=qrRcGsg26YKoVkZ5MnQxrYKDXQZlNCHG4MHr6+jv8g8=; b=uXXo0dVN6SOb8PTF0HjhNYQ0G rbyO2w38P3xUZ2ud8zo1q8EQMT0T2uou9x0Kf6Tr1HtJ276BKmnW6LQwZ1zltFg21OJ/DpM2E9Y6c Vxct3LDep5LBa37dHv+HEEGBgzks3M625lQdkcNSovtSC0xPZVUq9IsSu9YfDJrgO5cFbbH/Yv45s qKx1ds+oComsbwNKEcc9JDJ70EuXMFK32m9ZkGyD64Mn9OqFygGN7Niw9SSgqCEtPwTH3jWBCoxVk 9ZRqXuAlmznBTz89KAhUiKZivUW8KofuLNTejIkxH6heSPf4JtP1+7ElwuaHXPZFIBelTyw0zODyt QYTYITzCA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPhD-00021S-CI; Mon, 21 Dec 2020 18:14:11 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgl-0001su-VG; Mon, 21 Dec 2020 18:13:45 +0000 Received: by mail-wm1-x330.google.com with SMTP id 190so10731332wmz.0; Mon, 21 Dec 2020 10:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CYNvrmyBcR24qaTBP8yatBcY626HdS4K9apXn77mSNM=; b=lD267zahUVgA3DLau9u4L0oNjrXSi3d0rZHEzzA3ci0+hZfHJbDbQeSqa8dyZZgm8A Qiha3IP/O97P1NRVUm0/yueKbU9MfRiUZHURyi+oJEyoYaZM7wI6vFuICqR6Gc2kZRdw FwOC3bM/EiuB+KT3rgLfkgO+GNvW3GF6mmoRWejfhG1mIfGBt4ybgUSmynzTnDj25MP2 JrWt0W1TCL+AK9vAssOHE5EH8fl7HjedxcbAkXmylnqJweqfKLeZK61Lywe7lAnDG9N+ Lzlq+ssfe7dKMtc9646Gzs9+XgQ4WV6b5gJbQ7QGW1Mv/Az/unY+Zh2fkPyDh56cNYGW 9jXg== 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:mime-version:content-transfer-encoding; bh=CYNvrmyBcR24qaTBP8yatBcY626HdS4K9apXn77mSNM=; b=gMDtrTEivDMyaG6pF7xgs41/Psym6IWnnqYmvSwxghhuZA+kfPH5+JV1CuuhdqBbFI L8urOWE5a4mA6SVsPZD9BJmphLK85d6rbPazwKlr10LKw6SuQOpoL+TrFgkrWJYPHOKG B63yIXruZ/pBS2oYz2nvPPGze7anwAsDbfPg8/1+4vrqMyLSlfklBO6ddaRqZZAn0X3Z s6aRTOUY2iM1aSgoy8PFFES4aw7ijiyZDIKsljwAg8Lm7xXZrf+WrVSzWbM4F8MJTBr8 pgfMzxjrOMgpq7MK8Wb2dVx/NXjKnURc4+IUz0TXGt5TEW7S/Qi0DIptoeI4lxXyZu3J Chow== X-Gm-Message-State: AOAM5325t58ylBdjg3jtPvEDREzcjnywefly2JpkGJMVQ1pQOKz7XfaU +YtMW6APrbQaaNGXsL0esKJU0Yn7CI0= X-Google-Smtp-Source: ABdhPJxbLR3uHnt07Oa6Z3aVJYz+7qis1B/0BHuj/Kq0dNDM4BADbUR3yfKav7Fm5wX8dC42z5Lizg== X-Received: by 2002:a7b:c1c1:: with SMTP id a1mr17698718wmj.104.1608574422400; Mon, 21 Dec 2020 10:13:42 -0800 (PST) Received: from localhost.localdomain (p200300f137019000428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3701:9000:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id m11sm23434936wmi.16.2020.12.21.10.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 10:13:41 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 5/5] ARM: multi_v7_defconfig: Enable support for the ADC thermal sensor Date: Mon, 21 Dec 2020 19:13:06 +0100 Message-Id: <20201221181306.904272-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> References: <20201221181306.904272-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_131344_101113_800F5F56 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org 32-bit Amlogic Meson platforms are using a special ADC channel to read the SoC temperature. Enable the "generic ADC thermal" driver so this data can be used to cool the SoC for example by reduing the maximum CPU and GPU frequencies temporarily. Signed-off-by: Martin Blumenstingl --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index c5f25710fedc..0a55240ce2fc 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -515,6 +515,7 @@ CONFIG_ARMADA_THERMAL=y CONFIG_BCM2711_THERMAL=m CONFIG_BCM2835_THERMAL=m CONFIG_BRCMSTB_THERMAL=m +CONFIG_GENERIC_ADC_THERMAL=m CONFIG_ST_THERMAL_MEMMAP=y CONFIG_UNIPHIER_THERMAL=y CONFIG_DA9063_WATCHDOG=m