From patchwork Mon May 10 21:10:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 433251 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 3BEBAC433ED for ; Mon, 10 May 2021 21:11:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 061EA611BF for ; Mon, 10 May 2021 21:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231661AbhEJVM7 (ORCPT ); Mon, 10 May 2021 17:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231310AbhEJVM5 (ORCPT ); Mon, 10 May 2021 17:12:57 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1685C061760; Mon, 10 May 2021 14:11:51 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id z9so25442999lfu.8; Mon, 10 May 2021 14:11:51 -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 :mime-version:content-transfer-encoding; bh=GQ2M+eZzU/1PiW9MJgPZXEsaqUdAgzr+AsgIN6calq4=; b=sm7XPvsPLsYJeiLoXtm9K3yqLdoh6VaZWudqVtlltSgXnrD76N/kSrBlDkXhQPrVAL R+xat50e7DU+o9cD1BAdVO/kWfyAvzGSRXNNXLdg/sDTGx5nsUCGRKryP72vCEyiAqTq qxLtEE+uY6U75vM6XLuEN0cbEMQ/vS0FMHo/oPHbsvdYGyqxI228Wg/FIKM4w8U0BJka bXPEc5VxjHg3rK415QFFbGGEkCoUjtLETuvKIrVTBalDh7FXRqic3JeqCxI8fmZ1U9Tj CLx+ONReDI5c0+aC+bl06F+AnkOcekqo8uAiDFZr0tAW7T5odQTAhxaZgSXyTQDA0X/E zFdg== 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=GQ2M+eZzU/1PiW9MJgPZXEsaqUdAgzr+AsgIN6calq4=; b=kb/WLbDiyynytMDbIzjU/cFqV8CYRY5jun4qO+lB8H/cb9Qgp4NjnI+O5fpOWNWNUq SoFayy5Mz/2lVeW0+JR5yjcm4UjhOP0bdPU9crF2Iz6diR/eSr+AVfhMmMKjTvVqOxGk yeebPKc/C5iUKKpxmeCc5oeMYoThio75uywHLXfjbnLvYuC9E/jg77PX6Dt4/h6XGXtl 0OyktJ8SczS2++YGRDKyWHKUB7GuR7hPPyEFp1dUDuv8waBedRamFGcYhKD1mfxNhkRt /5pEoykF+R1dVG4xzeoZBSFTpPjJdtVXei1UFggtNCytA4bNfVc7wFenciM2tTZcqGTs vYEA== X-Gm-Message-State: AOAM532JGf+wauDAkQvYgfJDlXNxvhSoOwnU98U/79haPpQS0Rx0S53d WyjfRe3RnCPtS7bKXPfCFiMrWdhNPgs= X-Google-Smtp-Source: ABdhPJxCstkRyjaQmTvbNIf/ZKsi8cw1NsrC4MQ/oXU3qzz5Gy2nkl6Y1UkWX0ajp2iMsMO/8IiYaA== X-Received: by 2002:ac2:5a4c:: with SMTP id r12mr12365304lfn.632.1620681110495; Mon, 10 May 2021 14:11:50 -0700 (PDT) Received: from localhost.localdomain (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.gmail.com with ESMTPSA id x4sm2365339lfa.173.2021.05.10.14.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 14:11:50 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Rob Herring , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Peter Geis , Matt Merhar Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 2/7] ARM: tegra_defconfig: Enable CONFIG_DEVFREQ_THERMAL Date: Tue, 11 May 2021 00:10:03 +0300 Message-Id: <20210510211008.30300-3-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510211008.30300-1-digetx@gmail.com> References: <20210510211008.30300-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Memory-related Tegra devfreq devices now could be used as a cooling devices. Enable CONFIG_DEVFREQ_THERMAL by default since this option enables cooling functionality of the devfreq drivers. Signed-off-by: Dmitry Osipenko --- arch/arm/configs/tegra_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index 13ef3e4dcbb7..3d8d8af9524d 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -167,6 +167,7 @@ CONFIG_SENSORS_LM95245=y CONFIG_THERMAL=y CONFIG_THERMAL_STATISTICS=y CONFIG_CPU_THERMAL=y +CONFIG_DEVFREQ_THERMAL=y CONFIG_TEGRA_SOCTHERM=m CONFIG_WATCHDOG=y CONFIG_MAX77620_WATCHDOG=y From patchwork Mon May 10 21:10:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 433250 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 EF60BC43619 for ; Mon, 10 May 2021 21:11:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D25A96143B for ; Mon, 10 May 2021 21:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231844AbhEJVNB (ORCPT ); Mon, 10 May 2021 17:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231727AbhEJVNA (ORCPT ); Mon, 10 May 2021 17:13:00 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F1F0C061760; Mon, 10 May 2021 14:11:54 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id t11so25407029lfl.11; Mon, 10 May 2021 14:11:53 -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 :mime-version:content-transfer-encoding; bh=ybiSyEHiHhpZwxGAHloT2ZV0d6LrcnSv5Cr6VIeCqOk=; b=RZ3Hvofan3xeL4p404LLxQOKHcRwb2zlOMHaZ4BV0B24BSnb1o0ZdFLGILHIur4EWx 1oPMZ+zWa4QWB4CE2WgJlN5ok+Yg5ZyUvOgGgYif3KEukDSD8sBxqMJ+n/yTtR/yWcHP z2uG2Ymcq5mma6NNssAV10sMpcTXCDpRVeL/qIQBUQBRlRffpV+pKIKX9QCBtWIrWhw4 tPWJZ7OjkKbWKVu2yErxtNCQsD2Z1ssKuq6Sywny39QyZ2EKM8PjK1IjdPohCsSCLPfk oSrZvKiRU0IpSGkVa8qyKoo5PQN3vlAIMxy0fxFT31J44dMVyJIPRyZgFJJXyi/MlSCW sSLA== 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=ybiSyEHiHhpZwxGAHloT2ZV0d6LrcnSv5Cr6VIeCqOk=; b=gwrSaLW6RnCIGtMEXGHDU5LB6U0ewpHHuv47lJjikRfnqQEA7dUxrLSSBya9PSuRQr +E4B0WlAi0CpKx+qIwyHb69BhMCkFL2KLMjrhJsFziMohKXH8PQuF7azskJR81wXuInt KJJcTKjRK97oGJ40KSeD2KpCd+Fqw2OGK1RU7hNJ7++U442YtyL8iBBlIifjF+x0mCg/ szzvUEmXeH37LNggZpylGgglVEddn0VhWSb+VGT40ktRTmqPGmNAuz9xs6nlnSvUJLoM pJDb0NtkOdcKyZQOlvTobAN0Rg5eQppIg80OqJQ3c2OjNF5a8iTAJ71hkX9HaHg5gKJp TYPA== X-Gm-Message-State: AOAM532XVp1MrVOussOG/Gaxc+Dc6NdvLVymEqir35ZJewW9H5pjqw+6 foruus2pe84sNR9Wf939/Hg= X-Google-Smtp-Source: ABdhPJzY5bf7qKfAVZRtbjolWvcRElCM93yIIsmKgXySglYMaiJNFUAxOip8Axt0PYOkc2fZ71zf1g== X-Received: by 2002:a05:6512:2287:: with SMTP id f7mr17746341lfu.475.1620681112593; Mon, 10 May 2021 14:11:52 -0700 (PDT) Received: from localhost.localdomain (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.gmail.com with ESMTPSA id x4sm2365339lfa.173.2021.05.10.14.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 14:11:52 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Rob Herring , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Peter Geis , Matt Merhar Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 5/7] ARM: tegra: Add cooling cells to ACTMON device-tree node Date: Tue, 11 May 2021 00:10:06 +0300 Message-Id: <20210510211008.30300-6-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510211008.30300-1-digetx@gmail.com> References: <20210510211008.30300-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The ACTMON module monitors activity of memory clients and decisions about a minimum required memory frequency are made based on info from ACTMON. Add cooling cells to ACTMON device-tree node in order to turn it into a cooling device that will throttle memory freq on overheat. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra124.dtsi | 3 ++- arch/arm/boot/dts/tegra30.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index 0b678afb2a5c..8b38f123f554 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi @@ -283,7 +283,7 @@ flow-controller@60007000 { reg = <0x0 0x60007000 0x0 0x1000>; }; - actmon@6000c800 { + actmon: actmon@6000c800 { compatible = "nvidia,tegra124-actmon"; reg = <0x0 0x6000c800 0x0 0x400>; interrupts = ; @@ -295,6 +295,7 @@ actmon@6000c800 { operating-points-v2 = <&emc_bw_dfs_opp_table>; interconnects = <&mc TEGRA124_MC_MPCORER &emc>; interconnect-names = "cpu-read"; + #cooling-cells = <2>; }; gpio: gpio@6000d000 { diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 44a6dbba7081..c577c191be4b 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi @@ -410,7 +410,7 @@ ahb: ahb@6000c000 { reg = <0x6000c000 0x150>; /* AHB Arbitration + Gizmo Controller */ }; - actmon@6000c800 { + actmon: actmon@6000c800 { compatible = "nvidia,tegra30-actmon"; reg = <0x6000c800 0x400>; interrupts = ; @@ -422,6 +422,7 @@ actmon@6000c800 { operating-points-v2 = <&emc_bw_dfs_opp_table>; interconnects = <&mc TEGRA30_MC_MPCORER &emc>; interconnect-names = "cpu-read"; + #cooling-cells = <2>; }; gpio: gpio@6000d000 { From patchwork Mon May 10 21:10:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 433249 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 A0526C43603 for ; Mon, 10 May 2021 21:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 814FB615FF for ; Mon, 10 May 2021 21:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbhEJVND (ORCPT ); Mon, 10 May 2021 17:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231847AbhEJVNB (ORCPT ); Mon, 10 May 2021 17:13:01 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C273BC061574; Mon, 10 May 2021 14:11:54 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id m11so9034338lfg.3; Mon, 10 May 2021 14:11:54 -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 :mime-version:content-transfer-encoding; bh=thtwmlgqNARf4WCHwpmDn7oHaSs7U9z7qQuHG3u0utA=; b=M4y6Osg7i8DxbN1ZMfjEgIPfzTiBNVW95HPs8QIbvS+5pPrdy+0b7tHKEy6FM1m+Wp Rh1hYv3yjbDbGvqj0gAblil3f/iMlU6lqd1MzRQt9VvGeOiGtkv7lvU5IWijp/pET+d7 UakshFo1NWuFurxWtxQAVsZCXaE5MCMyX0zU0h61gWxmjCiZVJm+wclrtP8DA3GqAFaD gJ4uVTqYMlYnMDdw108Yo8bbvYfWuunSgbThWaNg3ol9feXC5i6YIYw8760WfcDrivJK 5RT4mos/8VHfdiU/4jlUdDSoulpBdqyX/jtEkdLVD9pUIwcLV0TyE6dQ4zTMFzsEB4tt O4Ww== 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=thtwmlgqNARf4WCHwpmDn7oHaSs7U9z7qQuHG3u0utA=; b=sDJ3XRmHBik1rxbHkf1NY3QxEdpY+wuPEi3k9RMx0dElSH6pUwv6ubwX3t3dWz3jgq M0CosAUQza7IP5vC5wlUO6SYZcXgf0ROYyohYBErb9xlhM76HzFNu8n8NpwIP+4WGevz w6P+IOcWnxjWtDDvVNACqc6nK3YPjR02v8LwOHfzU0Zb2chxkePZauP6hG4+dhc5ve5t WUm7zF8ZYy4gvzKltbs5+yc4uKCqcXcms12o2e538f86JwsUCNufUbzCLcPwrYg8cnZA IloGCLrxPDJq3Ze+wvqbl76ASyKVO7uowlN+2bPBsBNRoCNJmw8oJoJTgUJRAligvVZt J6dg== X-Gm-Message-State: AOAM531U6T4QZ8fpvTMcNQFIg6NFx2xC/byDoMytd9RHbDMNOvqN0Ai1 7mt5aavDrK0N40UvfBQ+xBhru81e0Fg= X-Google-Smtp-Source: ABdhPJy2yYhjUwddgE90aXGaCgO3B8qDn2A/WihAOe1CxlXK4RwergQgTe8Hr9o11b26myxYzI11Xw== X-Received: by 2002:a05:6512:3f02:: with SMTP id y2mr18452813lfa.355.1620681113344; Mon, 10 May 2021 14:11:53 -0700 (PDT) Received: from localhost.localdomain (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.gmail.com with ESMTPSA id x4sm2365339lfa.173.2021.05.10.14.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 14:11:53 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Rob Herring , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Peter Geis , Matt Merhar Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 6/7] ARM: tegra: nexus7: Enable memory frequency thermal throttling using ACTMON Date: Tue, 11 May 2021 00:10:07 +0300 Message-Id: <20210510211008.30300-7-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510211008.30300-1-digetx@gmail.com> References: <20210510211008.30300-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The ACTMON module monitors activity of memory clients and then devfreq driver makes decisions about a required memory frequency based on info from ACTMON. Add ACTMON device to the thermal zone of Nexus 7 in order to use it as a cooling device which throttles memory freq on overheat. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi b/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi index c6264738f593..27adca7f4175 100644 --- a/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +++ b/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi @@ -1279,7 +1279,8 @@ map0 { 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>; + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&actmon THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };