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: 11985105 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=unavailable 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 BB3D4C433DB for ; Mon, 21 Dec 2020 18:15:13 +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 6327D22D08 for ; Mon, 21 Dec 2020 18:15:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6327D22D08 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-arm-kernel-bounces+linux-arm-kernel=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=ImXxulo0yWDtOfqMEbOrIUjoYn8qOsPakeTibSD07m8=; b=mMcgwGODeDWpeyI+WycRRTAYP Oynd/1g27nLL8SQFkdE3Wdl4ErAzld3c0+xWw0kOv9sVAsYid+C7xT+bDc9fiB8m4xR33WTfXzPeG APKUOjlanEEJOXmYyDzMPNqLgk4OFsWx53j1dYD9JG4cwPXe2xKGFkYNy/NY87DXIVhBHhfHHGOZr /NmpWcQHhIOT44A+2Ua1HF4/VUCNT/7tb0Oc1Vcxmmkwhe7UqNhB98NQ8+65lQLqzsbC5gOO0/kqZ dMVRjj2lxcUdASIZcMMORhCjE/VuoikQMPyEswxkhHSAZK+K1n7go46T7LcqJZwqSAjaGR6WOEANu YvvARIkgA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgw-0001wD-Sp; Mon, 21 Dec 2020 18:13:54 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 11985103 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 4DBAAC433E6 for ; Mon, 21 Dec 2020 18:15:03 +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 12EFC230FC for ; Mon, 21 Dec 2020 18:15:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12EFC230FC 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-arm-kernel-bounces+linux-arm-kernel=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=55KaFrnRdU8jp+aPx8RxzXmbZ4T1OGoOHYz4PDRJsLo=; b=1va61uYEEN9gVH3wxbBiQ5UZz RVGLeUHiBytxSUywYBzmwX5U5W9Nh3W8tY9XEO/7gmk7mxRqzCi4XerDdQtgcrqH9vilsHrbVJ6xF o1x3ksrLJet9LCUHxW2sHn5LJVX5eu9GPr0njxnN486grXtbcWm9E+7GY6zY3VUoni1BuzwIoimPx NcYtFYQMhXN0ZBuUahnLMW4qZZCY0Wyzc9PvR7zPGLhUUsRszwApLN/JEqu8oANxbkYaqCxAKBABq rSfxdJfxZMh//GpCws8fMC5Rnh62Sgd5vEJOW4gD3fWxDw5g97bizQgKAvgTd6MTMlaltjo65UpgA Bhf89vMYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPgq-0001ug-CQ; Mon, 21 Dec 2020 18:13:48 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 11985107 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=unavailable 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 300FBC433DB for ; Mon, 21 Dec 2020 18:15:20 +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 DAF6522D08 for ; Mon, 21 Dec 2020 18:15:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAF6522D08 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-arm-kernel-bounces+linux-arm-kernel=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=89jwgt96l5ZvAE91RyanzwgTy4HR361Y865uSjdlXNg=; b=ElpQxobak5meQkyVwc7yS8k0N jEh3PYnuwnLsfavdmGaLMrCX9sEvDBo/W/3H8c3F+URI4P/Dd1aWKSN8SUMQRnTHUPsgXUOea61dk 4JRWJthCQ/irmkN+f7rqk/dZKblLg1Vt/HsKqjl9gOSFfZMgS6/D/OWq14KZ+su72dvGgT+6HbRlf 77i7vmFCt8qVXldZnC13TmeiTkxO7f7A2I+09aMc2EbQX8BlRbaLO3MiJTDgywp1q0TaJbsfBj/oI YlZQPPrjYnrUieqzJ14spSmLPlQTamam7DGjAeYSgxqKrH3UnAUCtXxlPvAL1ttFLk4lvUkYuEvYA gruLSkgPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPhA-0001zo-E5; Mon, 21 Dec 2020 18:14:08 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 11985109 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=unavailable 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 D0EF6C433DB for ; Mon, 21 Dec 2020 18:15:22 +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 93E1D22D08 for ; Mon, 21 Dec 2020 18:15:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93E1D22D08 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-arm-kernel-bounces+linux-arm-kernel=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=utueZWbI6+3B/90T+Ar5t2eZTpPajMnn1C28iZ8vAUI=; b=02EMQ3Y3VjGpJgq+zxqSN4X0C 7zhhtWdFYAx3K8G3InbFTrEauFlVVUZvI/S7KJ82pR1juTHT3F5cc0SuYx9Gltg2z+TRAkFPLrK4O xKknX0h1gnalu73BiwricbxnywXmPpRtnRm38PYaP5kY0v9CGKj+nua510eMIEdPBBRiSt0pw+4OP mhYfnKose8tCAWXepmJk/4usVfnyq0JHt7kc1DO25KE+QXrLdVlS+5cDBA7a8+0pByNAjUXbSpuba E5b1t//9JyJhEcUdwDOTbHfXHBLi9MYGgCfVHBqCBgFImg7o3KyKjI6vQ+SyJf1/vWKOqKO2gAhf7 +0Fy33SGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPhJ-00022U-4j; Mon, 21 Dec 2020 18:14:17 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 11985111 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 F04BAC433E0 for ; Mon, 21 Dec 2020 18:15:32 +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 B3C4C22D08 for ; Mon, 21 Dec 2020 18:15:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3C4C22D08 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-arm-kernel-bounces+linux-arm-kernel=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=a9TIrX6pEyIMjGc4bS5Psr/Si+bZDAgdlWomP5BploU=; b=iMZ4p8jrZbD2El0idie+eZcfM qDjMUEax5hcZMCHavJ/OOjdPXNmGKDS/YXx8HM+eb8fiWlrxZDLP/MyOC8G90fLnS3iHHY4UEJWN8 W0y4vbKL0Pj/7F0xEpLWmLt1p+smw4vLmcImir3daWV0OTDrU7R2c1YPvfi3jZVaXnfhMoxAmUND0 p7Daq2OPthGYC+oK55RSNISgTpPsl4l16MW4qliV0WMaQylbmdpt5YybJ5TbhW66bRxknPPHWxrWF T8fK1nWLkFfyaliKnokjOiArYeEsYf6XCT07FkwixqPwqUkeP5WPtFAoT1xeNZ1kSNAyzUQEa+dIM 2jppHre/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krPhM-00025W-Mg; Mon, 21 Dec 2020 18:14:20 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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