From patchwork Mon May 10 21:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 434593 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 2D07DC43470 for ; Mon, 10 May 2021 21:11:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0376261465 for ; Mon, 10 May 2021 21:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbhEJVM6 (ORCPT ); Mon, 10 May 2021 17:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbhEJVM4 (ORCPT ); Mon, 10 May 2021 17:12:56 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39E12C06175F; Mon, 10 May 2021 14:11:51 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2so25475060lft.4; 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=a9iK163fq+2JSJvqMOtwOLKwobF36F5yzS2cbjuGjYA=; b=cCU2cSOiIrhB+EKiDwvIRI8PvAMjNBVJBt2Eg6K8nOXI3q5Dz6clwdk5O1ldg082Cz goOLkpUquBMpsyfx4CMedsJPbQ1xbr06Q0Fi0qS/ByOkrMcSShfhe/iNsYn0jH7XaXDc W6jeo3+oo1O7QFysmS8DX+f8Now6cTWgQGshkG2KBBh8wfKTe3TKVht0ssVjuTJ2gs3R k4bSquhf3Yw29Lv0kvG1NX/Kal6109UEumTesmYYX0j3oPLar/3D8Iky75cSJRaDevu+ HL/1JUhKcGTbB0si+20GMUvIRPe9MN2f/ND4NSjTlzvHRYBNJe75R0bXd14mk3Tdf+6T 4fOw== 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=a9iK163fq+2JSJvqMOtwOLKwobF36F5yzS2cbjuGjYA=; b=q9EHSxP5jX48ucGbzTB+TA/pm/6Hll8s3D4PY/W5QBYhDgTb7NFr2iKrCHRoJP7z6e V+heokWddQN48vdjU1vozpaBDcGr132IfWlh+64PQsbZaNITYV9Dk5W59jKEvINs2Hca E7yHDF/pLGOT+XuPfDBAjXvvh0+nqMJ/WlYziX3i6s86tZvB3CtzJ9OfQTJcmDru+PST vgAalM2GGV2rUODYTZN6f9pdclxSDg6mLu9JA7pUWaE/cZBxIh+wg0pUHD466qrGB1Ry OKWaZRHjhmZYYeku05AfHU+U1vr0Uoe+x85N0+FSUZCVPy3vmvT8fVPdToaJhGX/Ut9C mv+w== X-Gm-Message-State: AOAM531BbjDAwf1QKfiGxGQD4Cmw1uQVT9JdztUz/B8SrroKkH4v/24s CKSTJRcI3UzaL6wz6AiPtqM= X-Google-Smtp-Source: ABdhPJwcZdEZN1IinsTRa0g1x6zV4KMCiakmHwskkRj4UYHBpU1c3Bsa5kVMold8xXPu7F9MZZxwIA== X-Received: by 2002:a19:ca11:: with SMTP id a17mr17634572lfg.271.1620681109820; Mon, 10 May 2021 14:11:49 -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:49 -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 1/7] PM / devfreq: tegra30: Support thermal cooling Date: Tue, 11 May 2021 00:10:02 +0300 Message-Id: <20210510211008.30300-2-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: linux-pm@vger.kernel.org Expose ACTMON devfreq device as a cooling device in order to throttle memory freq on overheat. Throttling of memory freq has a significant cooling effect on NVIDIA Tegra SoCs since higher memory freqs require higher SoC core voltage which is one of the main causes of the heating. Signed-off-by: Dmitry Osipenko --- drivers/devfreq/tegra30-devfreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c index ce83f883ca65..10661eb2aed8 100644 --- a/drivers/devfreq/tegra30-devfreq.c +++ b/drivers/devfreq/tegra30-devfreq.c @@ -688,6 +688,7 @@ static struct devfreq_dev_profile tegra_devfreq_profile = { .polling_ms = ACTMON_SAMPLING_PERIOD, .target = tegra_devfreq_target, .get_dev_status = tegra_devfreq_get_dev_status, + .is_cooling_device = true, }; static int tegra_governor_get_target(struct devfreq *devfreq, 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: 433387 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 789D4C4360C 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 48DFA6143C for ; Mon, 10 May 2021 21:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbhEJVM7 (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: linux-pm@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:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 434591 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 B17CEC43618 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 7AE98613DF for ; Mon, 10 May 2021 21:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231811AbhEJVNA (ORCPT ); Mon, 10 May 2021 17:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbhEJVM7 (ORCPT ); Mon, 10 May 2021 17:12:59 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0941C06175F; Mon, 10 May 2021 14:11:53 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x19so25497488lfa.2; 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=5E7wNWlOWphmuJH6nS2gu83oyovtKHqDz0VVt3zqGMw=; b=SeHA9v/YPp0WOO3IrKhuafOBQsS/P2X228FEY/aW0zZOOXLP6q5x6/1GGNOoG41OrO asCLdZ03Qx33Ypu6nSQpaILCvrQa5yNuNEqr8Aj8nqgMtgQvglMZLO9aIlMUkdWfom+T fcsB/g/ueWo1zHDPa3n33dshSBn33KSa1WZWHqlXYC3wgtiL6IaUeTlHSVmjk/dySHl8 s0w4j56HN+TUfBOuWwfhMgnfFsu/sWW/36EDIQ9vM+1Fzsc+ttNNw9EK8h3Pe8o/BKC5 wOiGkueUt1WoPiNXMXaoSCS/AFOi7GlhaSjWen5tiAjNNlyGjvSk8DdhQRb7TzVkgd46 VTtA== 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=5E7wNWlOWphmuJH6nS2gu83oyovtKHqDz0VVt3zqGMw=; b=Kln2UOt3I5SO7axLAmHl7NSE0K8ydQefDsZna3CDN31G6KL7caI3dX1PDGOjDjsUgp tDSLbHtgpAk/MXyH3+X03cSxBZqdgxNADjse4EaJi5HtU9UHuCtR86QvtBJ+CDXmFRrN 3J+PdzJQi6lA+6wzuQaobePPYmC3sGq1cDvgVpUN/wN61QNBOC2cdecR1oKuS/e4W3hz BV1mp3UnS0q7iqvbcun+4rlvegYdcK7VgyjDcuDrM/qiAW30MazmVNV3/fagP+GSnIKv 8t0F/zQKz9Mixiyjq92HZykWDOTMKdrtFWNbOBX/fj3fsHwexaLfpdQjXCP3aOk2SpcB N0LQ== X-Gm-Message-State: AOAM5335afJuJEiY0FsMTVc1aEFzbs3jkuHZPYJricAc0L/GSD5stJhV mFvMqjTUKqgw4s7hRuMAMrY= X-Google-Smtp-Source: ABdhPJyH26fu+tF4iwnXeUUKuISInvFnlzMHQehDL8eqjLzR0oOjrsO8rJGtH30qfjwUH+Dm7BvT1Q== X-Received: by 2002:a05:6512:3b94:: with SMTP id g20mr17715702lfv.574.1620681111199; Mon, 10 May 2021 14:11:51 -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.50 (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 3/7] dt-bindings: devfreq: tegra30-actmon: Convert to schema Date: Tue, 11 May 2021 00:10:04 +0300 Message-Id: <20210510211008.30300-4-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: linux-pm@vger.kernel.org Convert NVIDIA Tegra ACTMON binding to schema. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Acked-by: Chanwoo Choi --- .../arm/tegra/nvidia,tegra30-actmon.txt | 57 --------- .../devfreq/nvidia,tegra30-actmon.yaml | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 57 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-actmon.txt create mode 100644 Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-actmon.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-actmon.txt deleted file mode 100644 index 897eedfa2bc8..000000000000 --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-actmon.txt +++ /dev/null @@ -1,57 +0,0 @@ -NVIDIA Tegra Activity Monitor - -The activity monitor block collects statistics about the behaviour of other -components in the system. This information can be used to derive the rate at -which the external memory needs to be clocked in order to serve all requests -from the monitored clients. - -Required properties: -- compatible: should be "nvidia,tegra-actmon" -- reg: offset and length of the register set for the device -- interrupts: standard interrupt property -- clocks: Must contain a phandle and clock specifier pair for each entry in -clock-names. See ../../clock/clock-bindings.txt for details. -- clock-names: Must include the following entries: - - actmon - - emc -- resets: Must contain an entry for each entry in reset-names. See -../../reset/reset.txt for details. -- reset-names: Must include the following entries: - - actmon -- operating-points-v2: See ../bindings/opp/opp.txt for details. -- interconnects: Should contain entries for memory clients sitting on - MC->EMC memory interconnect path. -- interconnect-names: Should include name of the interconnect path for each - interconnect entry. Consult TRM documentation for - information about available memory clients, see MEMORY - CONTROLLER section. - -For each opp entry in 'operating-points-v2' table: -- opp-supported-hw: bitfield indicating SoC speedo ID mask -- opp-peak-kBps: peak bandwidth of the memory channel - -Example: - dfs_opp_table: opp-table { - compatible = "operating-points-v2"; - - opp@12750000 { - opp-hz = /bits/ 64 <12750000>; - opp-supported-hw = <0x000F>; - opp-peak-kBps = <51000>; - }; - ... - }; - - actmon@6000c800 { - compatible = "nvidia,tegra124-actmon"; - reg = <0x0 0x6000c800 0x0 0x400>; - interrupts = ; - clocks = <&tegra_car TEGRA124_CLK_ACTMON>, - <&tegra_car TEGRA124_CLK_EMC>; - clock-names = "actmon", "emc"; - resets = <&tegra_car 119>; - reset-names = "actmon"; - operating-points-v2 = <&dfs_opp_table>; - interconnects = <&mc TEGRA124_MC_MPCORER &emc>; - interconnect-names = "cpu"; - }; diff --git a/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml b/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml new file mode 100644 index 000000000000..2a940d5d7ab4 --- /dev/null +++ b/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/devfreq/nvidia,tegra30-actmon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra30 Activity Monitor + +maintainers: + - Dmitry Osipenko + - Jon Hunter + - Thierry Reding + +description: | + The activity monitor block collects statistics about the behaviour of other + components in the system. This information can be used to derive the rate at + which the external memory needs to be clocked in order to serve all requests + from the monitored clients. + +properties: + compatible: + enum: + - nvidia,tegra30-actmon + - nvidia,tegra114-actmon + - nvidia,tegra124-actmon + - nvidia,tegra210-actmon + + reg: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: actmon + - const: emc + + resets: + maxItems: 1 + + reset-names: + items: + - const: actmon + + interrupts: + maxItems: 1 + + interconnects: + minItems: 1 + maxItems: 12 + + interconnect-names: + minItems: 1 + maxItems: 12 + description: + Should include name of the interconnect path for each interconnect + entry. Consult TRM documentation for information about available + memory clients, see ACTIVITY MONITOR section. + + operating-points-v2: + description: + Should contain freqs and voltages and opp-supported-hw property, which + is a bitfield indicating SoC speedo ID mask. + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + - interrupts + - interconnects + - interconnect-names + - operating-points-v2 + +additionalProperties: false + +examples: + - | + #include + + mc: memory-controller@7000f000 { + compatible = "nvidia,tegra30-mc"; + reg = <0x7000f000 0x400>; + clocks = <&clk 32>; + clock-names = "mc"; + + interrupts = <0 77 4>; + + #iommu-cells = <1>; + #reset-cells = <1>; + #interconnect-cells = <1>; + }; + + emc: external-memory-controller@7000f400 { + compatible = "nvidia,tegra30-emc"; + reg = <0x7000f400 0x400>; + interrupts = <0 78 4>; + clocks = <&clk 57>; + + nvidia,memory-controller = <&mc>; + operating-points-v2 = <&dvfs_opp_table>; + power-domains = <&domain>; + + #interconnect-cells = <0>; + }; + + actmon@6000c800 { + compatible = "nvidia,tegra30-actmon"; + reg = <0x6000c800 0x400>; + interrupts = <0 45 4>; + clocks = <&clk 119>, <&clk 57>; + clock-names = "actmon", "emc"; + resets = <&rst 119>; + reset-names = "actmon"; + operating-points-v2 = <&dvfs_opp_table>; + interconnects = <&mc TEGRA30_MC_MPCORER &emc>; + interconnect-names = "cpu-read"; + }; From patchwork Mon May 10 21:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 434592 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 45CCEC43611 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 0BB0B613DF for ; Mon, 10 May 2021 21:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbhEJVNA (ORCPT ); Mon, 10 May 2021 17:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231640AbhEJVM7 (ORCPT ); Mon, 10 May 2021 17:12:59 -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 521F8C061574; Mon, 10 May 2021 14:11:53 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id z13so25504308lft.1; 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=LBAm2iOPFtBU1EQ3FoVf86OUQxRZHO3MtZ2jWbUEqLE=; b=hKEct6kjw8GRNg4ylFQMwPa5APMX/VlM2FvBfZPZLdb0r3wPdV7I1R4dA0nv0FV6Vr rDxMbGg3+8WpfW3b7cWJLtKMSjxJeuR51lQzc/GP4jJ5ykeyNE3Uapuns4NhSXWChNpD k8vrfxBQzadlvXL/7Y99zT5YJXSg8tSS3bDdT7/QJGcXSSUgwSkJbsbBNczKqXq3fACu LsWY6pixqUle394GeSTa0piyV8cJJAslmDrGR5+0rsEP2egunRStqv4EtEu+SOB0zNgr Pjf9boV9vvEnIcuZwZRjTUSwdpWHf8Oe7FX/FJ+HbZqySl2qPjiU8uTKuDevuDgdRp9y sy3g== 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=LBAm2iOPFtBU1EQ3FoVf86OUQxRZHO3MtZ2jWbUEqLE=; b=UKsYTfdTX5rsKeWunmQttqT8fezsaoM0CNgEqVPymtTayTVr4KpoETPhZ7dBhVFH9g aWMZTJcB4FejmgrrUWIWnGb5PWdmS0XqwAmoAsaMBAJZyl825QtNiq0juaHynKOOw4oz 1CYKunmGrjZifsQfxPDFFJHvY8Oi9kd2I65p8Ze5h3PHi9z6DaIpFh/pTcwGRsOqU6vb NcQHiB20YULwQfBMetjsejJRr00v59nfzlpisxmxxiSHGNcq2rHCzKZp/3bcmNno2k+6 KW/r+OorhdmdrFg9eVN93Bp3BkKNnLWaJVufSUpjqSbCfDQ7LUQe3f9kfP167RoW5oAM DCKQ== X-Gm-Message-State: AOAM532/0qdThYkBDzhPs/Hk2Ntfc4PcovOLJh7vtOS+4nup9Ahp0F+B TVqs3UmYzCeO9q3a9ELYY/vYInRAi7g= X-Google-Smtp-Source: ABdhPJyV7zP366mGr6WNyz63P58fRyLeCqVhcXnVCcluMkzItlsjx+2rHBimuqY/7/mKCM2Lgnk5/g== X-Received: by 2002:a19:e21d:: with SMTP id z29mr18343711lfg.175.1620681111900; Mon, 10 May 2021 14:11:51 -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:51 -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 4/7] dt-bindings: devfreq: tegra30-actmon: Add cooling-cells Date: Tue, 11 May 2021 00:10:05 +0300 Message-Id: <20210510211008.30300-5-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: linux-pm@vger.kernel.org The ACTMON watches activity of memory clients. Decisions about a minimum required frequency are made based on the info from ACTMON. We can use ACTMON as a thermal cooling device by limiting the required frequency. Document new cooling-cells property of NVIDIA Tegra ACTMON hardware unit. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Acked-by: Chanwoo Choi Acked-by: Thierry Reding --- .../devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml b/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml index 2a940d5d7ab4..0aa9459b7751 100644 --- a/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml +++ b/Documentation/devicetree/bindings/devfreq/nvidia,tegra30-actmon.yaml @@ -63,6 +63,9 @@ properties: Should contain freqs and voltages and opp-supported-hw property, which is a bitfield indicating SoC speedo ID mask. + "#cooling-cells": + const: 2 + required: - compatible - reg @@ -74,6 +77,7 @@ required: - interconnects - interconnect-names - operating-points-v2 + - "#cooling-cells" additionalProperties: false @@ -118,4 +122,5 @@ examples: operating-points-v2 = <&dvfs_opp_table>; interconnects = <&mc TEGRA30_MC_MPCORER &emc>; interconnect-names = "cpu-read"; + #cooling-cells = <2>; }; 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: 433386 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 8361BC4361B for ; Mon, 10 May 2021 21:11:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B6B96143C for ; Mon, 10 May 2021 21:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231901AbhEJVNB (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: linux-pm@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: 433385 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 778CAC4363E 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 5BE4A6143C for ; Mon, 10 May 2021 21:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231738AbhEJVND (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: linux-pm@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>; }; }; }; From patchwork Mon May 10 21:10:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 434590 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 67ACFC4363C 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 333CB613CF for ; Mon, 10 May 2021 21:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231923AbhEJVNC (ORCPT ); Mon, 10 May 2021 17:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231854AbhEJVNB (ORCPT ); Mon, 10 May 2021 17:13:01 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A8B8C061763; Mon, 10 May 2021 14:11:55 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id t11so25407116lfl.11; Mon, 10 May 2021 14:11:55 -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=Z0mhM5VOJlBFrF5T1QvpTzNjyhRksc+ReJ2SbVVWnBM=; b=uu/m7eQ/8JNpthgicesTvIUqFAGT/SESV51ET/Dy4Bj9UZB7Q2R/E0ZWR4NFEHvscm hkOYZcjD454dtkvZDk8lobuHaMkSk7TWFYeOJ4pYPo2OnP7i2K/AhBrs0BZEN09Y2bRY uV0V6MNzXWkhiecp1+7RGU4LiBSWZ9JfRt7qJmP7/GM+RLGOWo3IxaLibOd9Vr6jID9e Vl79CpL6Iw6qP+UU86TOD8kk0ksmgCzNv5x7Tr20Jkgr8OEBZvYq2pxYa0t/EqYBUcdM SKV3y58f8MFubjZPzXjM9zw/J3+/GXkNZjCWNFkeoBKtkm4Q+OB+Wr7GaGTya1XQZQaJ BKuQ== 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=Z0mhM5VOJlBFrF5T1QvpTzNjyhRksc+ReJ2SbVVWnBM=; b=nZ4fNVBzcNAEObceXdUFDhdKYKVOb7mLYO8L9NDaEmhz2qXXSPMJ+HCJe9Sjp/mIL2 VL5DlsNsm4c7mRpgJ8Tuy/oLleAJMX6WMrMthZVqeIhevUVtJxpubN8qxR5BbVtXUgQ9 PB5jTJV+vc9oWB0BZ0u6TTEG8aaM5kWeJ+ADJvNxw4UcACSm5A4h0rEVcqU/ilgm5jH8 WLeSUI4Uq9sGlM0XYQyVur2UUhlrqO/PrvxwdYwTcIKcxJ+Uogz9ZejJsH+SW1kE6I9y 25hrPzRIOhqQGiJqny+5lueT9ebu+HI0NJsnCaSPD5MVWi4XcT5+xRMCQP+EPkGPtOdV HY2Q== X-Gm-Message-State: AOAM532Tlr0ubhXiXuQDEevHzSsfRuEYg7URh8o7blvfmsA/QCrzu5zl NhACewXj5zY8DcasDvfkxYgU1fuHqEM= X-Google-Smtp-Source: ABdhPJzoFW9yJUJkLUcroWPTsUHs9lhnndXvIXHe0YPdHuXYh4O1M3Wv0dtyF+aPxMPpzomIY6z/EA== X-Received: by 2002:a05:6512:b26:: with SMTP id w38mr18220313lfu.152.1620681114021; Mon, 10 May 2021 14:11:54 -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.53 (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 7/7] ARM: tegra: ouya: Enable memory frequency thermal throttling using ACTMON Date: Tue, 11 May 2021 00:10:08 +0300 Message-Id: <20210510211008.30300-8-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: linux-pm@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 Ouya in order to use it as a cooling device which throttles memory freq on overheat. Tested-by: Peter Geis Tested-by: Matt Merhar Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra30-ouya.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra30-ouya.dts b/arch/arm/boot/dts/tegra30-ouya.dts index 9a10e0d69762..e767ac227a81 100644 --- a/arch/arm/boot/dts/tegra30-ouya.dts +++ b/arch/arm/boot/dts/tegra30-ouya.dts @@ -463,7 +463,8 @@ map1 { 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>; }; }; };