From mboxrd@z Thu Jan 1 00:00:00 1970 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 CF72EC49361 for ; Sat, 19 Jun 2021 12:19:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8CB76128E for ; Sat, 19 Jun 2021 12:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234090AbhFSMVx (ORCPT ); Sat, 19 Jun 2021 08:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234077AbhFSMVw (ORCPT ); Sat, 19 Jun 2021 08:21:52 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45C1C061574; Sat, 19 Jun 2021 05:19:40 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id ho18so20379863ejc.8; Sat, 19 Jun 2021 05:19:40 -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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=p6DFUjdh9W+9ZOuXEgrAJzqvw4HlQfCSoE5KjuaOhEiqgIKfbquadYu91Z6lYGSwsU Pg1uV2sBaAzDDIIYwmXosaQwqRYvFEhmhH6av1PPy4NMijcSJVT+a9s+bt+yUweK79mH cuYjufd64+ARD7R08LaxvW0SIUNBUj2EqslfXO5XLDWyzYYCCulefa1lxGL3VGsURur9 w+tmDFSmTXjs666V6TARTvMCSxAlWKSlpYq9l/qdJNq7OQfXqCX5mcjSZ1g/f2GtFAbP uK+9jnidGTeFmYoJYKVV6hwKPwm1Ju8j2LXsWaDLY5TfFQTMMvqAnvcmscC0S39Bim/B OH6g== 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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=ANr4B7xh15EYErid08aJPdnze0IwuC6Ptzi+amQR5YXD9VJ7P7VtQKaR7ZUzLLH2xB dlcl3F87Fae2kPcHiPrCDRwulzXOpyKhzH2Zp0xsEbs3+dHpd/I1oJcJiS0tsHwgkB3S 4dafFiqAHU1LGm8CgJzIr0bOSkyREYpBftmUKX7bNR2jduo6BArIkBJnQSB0S0EncKfp HlpsiVcJLqBaGuOiP/u3JaPgTlfHLgdUmgnW7jlE5L9DEhcHIQG8CQ7krFxcoyQvQrQJ RQ/6UfSxLfLsRrPI502sqYT9/MsqhbZMjfcPGqAbEtEgKvhFnNmbyprFeJhqEXkcw96y WNmQ== X-Gm-Message-State: AOAM5321x3PtbYWkuaQhM4/ng0wBt3sDDjxm0q/nmXjHH4fgUeGtW7NE +bKQ7aU7DvGI1bsrl6pLBtI= X-Google-Smtp-Source: ABdhPJwsOi2XYm8L1rzaXqA1OPOhf+cK6DVMTj8QYRFL3OnvtqeS5oJ1CV+q+F0i+1jUniYnzLzcyA== X-Received: by 2002:a17:907:10d8:: with SMTP id rv24mr15243159ejb.542.1624105179476; Sat, 19 Jun 2021 05:19:39 -0700 (PDT) Received: from BLUE.mydomain.example (83-87-52-217.cable.dynamic.v4.ziggo.nl. [83.87.52.217]) by smtp.googlemail.com with ESMTPSA id w17sm2299405ejk.112.2021.06.19.05.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 05:19:39 -0700 (PDT) From: ericwouds@gmail.com To: Rob Herring , Matthias Brugger Cc: Eric Woudstra , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Fix mt7622.dtsi thermal cpu Date: Sat, 19 Jun 2021 14:19:26 +0200 Message-Id: <20210619121927.32699-1-ericwouds@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Woudstra Cpu-thermal is set to use all frequencies already at 47 degrees. Using the CPU at 50 for a minute, the CPU has reached 48 degrees, is throttled back to lowest setting, making the mt7622 terrribly slow. Even at this low speed, the CPU does not cool down lower then 47 so the CPU is stuck at lowest possible frequency until it shut down and stays off for 15 minutes. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; This should not be set al every cooling map. It should only be set at the highest cooling map. Same as in the example: https://www.kernel.org/doc/Documentation/devicetree/bindings/ thermal/thermal.txt line 272 But then without the fan and added a third map. Now temperature will be regulated at 87 degrees celcius. At temperatures lower then 87, all frequencies can be used. Also see the post: http://forum.banana-pi.org/t/bpi-r64-only-10-cpu-speed-at-already-48- degrees-celcius-speed-not-increasing-anymore/12262 Signed-off-by: Eric Woudstra --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index 890a942ec..b779c7aa6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -170,14 +170,14 @@ cpu-crit { cooling-maps { map0 { trip = <&cpu_passive>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map1 { trip = <&cpu_active>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map2 { -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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,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 9B19EC2B9F4 for ; Sat, 19 Jun 2021 12:20:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 61C136120A for ; Sat, 19 Jun 2021 12:20:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61C136120A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UnEU/cgKeRhVhnDAencvwwgIBmpXRNPi9P8+eF9yItE=; b=guaGFPJvKmplOI 6E1IupBsXDDbOShRYI+OlqD7vsGBMzExE63ffHP6Fc6oE51fJstcNAntqpg3SBAhPYPPlUCRlC72v NRyfKkBXZhhjpPhQbJG2dvKgHsoIHNqrH4wniGhtisivFUDrKxIabSTZZ+Yy3yXC/QvdtS0hQjnAv f+i7DXSXz7S1oz6+ifWbsbZXjKJag0Jl0ZtwYaUMpaeh+QQRbzy5Q4mjW14tqkG/OT5CIFOkS1ihr fGbOvr/IACERP0WUb7En61u6GQGTT96JiFhS8mXTH/QWKOGkUukPv8o+wQ9F1QoWB2ILt7LRMt520 j7rr/q/DUmEHncHPL+PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luZx5-00Gwq7-BF; Sat, 19 Jun 2021 12:19:55 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luZwr-00Gwn8-KZ; Sat, 19 Jun 2021 12:19:43 +0000 Received: by mail-ej1-x629.google.com with SMTP id he7so20324534ejc.13; Sat, 19 Jun 2021 05:19:40 -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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=p6DFUjdh9W+9ZOuXEgrAJzqvw4HlQfCSoE5KjuaOhEiqgIKfbquadYu91Z6lYGSwsU Pg1uV2sBaAzDDIIYwmXosaQwqRYvFEhmhH6av1PPy4NMijcSJVT+a9s+bt+yUweK79mH cuYjufd64+ARD7R08LaxvW0SIUNBUj2EqslfXO5XLDWyzYYCCulefa1lxGL3VGsURur9 w+tmDFSmTXjs666V6TARTvMCSxAlWKSlpYq9l/qdJNq7OQfXqCX5mcjSZ1g/f2GtFAbP uK+9jnidGTeFmYoJYKVV6hwKPwm1Ju8j2LXsWaDLY5TfFQTMMvqAnvcmscC0S39Bim/B OH6g== 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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=MNCfFCrI4ndQQyrWDl/JvnOkuFiCFjL1nWyoz3BuNgG7Ngs81ehgBHt5Fvm50s4VWv nTjfE4ACEnfbqyO1qX0Cu+63K+5O5mcme+vP+1A3ak2PmlGL4A5a9O6VsHr5yJUZnC2l DdP49pnrcWKrBrDVF/fIZLFCgLvI+TPD5Ss5MVjEXAI7V9HU4xlAX6oTEYgMnM1uNc/H yRi6clchUVMsZbUTaivNXeSG+c3KfdUT3dBryn39HP0UOhP7iaL25YLrHARlY21/Sx2D GfKzNCknctp/kdP+/sYiJgd5VYjWGQeAKclnd/XLAyJj+br0Vb17J04Iu7MdvFPev7Ri EPyQ== X-Gm-Message-State: AOAM53149CEr+nTfpCNkDZ9Wm7TKs+PcaCDJ4o+RXlzLZ9L0KbqWxCfm OkMmOuHV33QHKzU3ZwnDLw0= X-Google-Smtp-Source: ABdhPJwsOi2XYm8L1rzaXqA1OPOhf+cK6DVMTj8QYRFL3OnvtqeS5oJ1CV+q+F0i+1jUniYnzLzcyA== X-Received: by 2002:a17:907:10d8:: with SMTP id rv24mr15243159ejb.542.1624105179476; Sat, 19 Jun 2021 05:19:39 -0700 (PDT) Received: from BLUE.mydomain.example (83-87-52-217.cable.dynamic.v4.ziggo.nl. [83.87.52.217]) by smtp.googlemail.com with ESMTPSA id w17sm2299405ejk.112.2021.06.19.05.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 05:19:39 -0700 (PDT) From: ericwouds@gmail.com To: Rob Herring , Matthias Brugger Cc: Eric Woudstra , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Fix mt7622.dtsi thermal cpu Date: Sat, 19 Jun 2021 14:19:26 +0200 Message-Id: <20210619121927.32699-1-ericwouds@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210619_051941_752946_A4BCB1BE X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Eric Woudstra Cpu-thermal is set to use all frequencies already at 47 degrees. Using the CPU at 50 for a minute, the CPU has reached 48 degrees, is throttled back to lowest setting, making the mt7622 terrribly slow. Even at this low speed, the CPU does not cool down lower then 47 so the CPU is stuck at lowest possible frequency until it shut down and stays off for 15 minutes. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; This should not be set al every cooling map. It should only be set at the highest cooling map. Same as in the example: https://www.kernel.org/doc/Documentation/devicetree/bindings/ thermal/thermal.txt line 272 But then without the fan and added a third map. Now temperature will be regulated at 87 degrees celcius. At temperatures lower then 87, all frequencies can be used. Also see the post: http://forum.banana-pi.org/t/bpi-r64-only-10-cpu-speed-at-already-48- degrees-celcius-speed-not-increasing-anymore/12262 Signed-off-by: Eric Woudstra --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index 890a942ec..b779c7aa6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -170,14 +170,14 @@ cpu-crit { cooling-maps { map0 { trip = <&cpu_passive>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map1 { trip = <&cpu_active>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map2 { -- 2.25.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 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,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 3A29BC2B9F4 for ; Sat, 19 Jun 2021 12:21:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 007F8611ED for ; Sat, 19 Jun 2021 12:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 007F8611ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=savDRYkjQpty07NQud8bUswXdcPUT+W3cZKeGC7RA9w=; b=egIbw/c3vmFAbn ZMnDyuhmweuDiI1Wl7Qam5SuEWuF32r9YSpZea5Z0PwR2RoPp/g1Upw8nrKI6KhAVLGpozH36fWWR e6iCIKFWLzuX7sYcb3gG8XdCIYw9uSqKH/YY7uW488F/VzQBOFMtYGwCsCAO7hic6IKTm3KZO10O+ igVM5mHimXMtaD9XQI690vjaxLbMiZezNrou/zb/o1327HLSlOVbFqpB/SNo4hZWGq20PiJa+MIMF GLt8xB3shA93IBkZ1RvKpdQEHQWJsPtRJtaLsog5WKlaGnITBhJoKJpIG/pJLSFH0oR24DepjH9Vr 9wujBwAJ3Q49eaoyMP3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luZwv-00GwoI-Ur; Sat, 19 Jun 2021 12:19:46 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luZwr-00Gwn8-KZ; Sat, 19 Jun 2021 12:19:43 +0000 Received: by mail-ej1-x629.google.com with SMTP id he7so20324534ejc.13; Sat, 19 Jun 2021 05:19:40 -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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=p6DFUjdh9W+9ZOuXEgrAJzqvw4HlQfCSoE5KjuaOhEiqgIKfbquadYu91Z6lYGSwsU Pg1uV2sBaAzDDIIYwmXosaQwqRYvFEhmhH6av1PPy4NMijcSJVT+a9s+bt+yUweK79mH cuYjufd64+ARD7R08LaxvW0SIUNBUj2EqslfXO5XLDWyzYYCCulefa1lxGL3VGsURur9 w+tmDFSmTXjs666V6TARTvMCSxAlWKSlpYq9l/qdJNq7OQfXqCX5mcjSZ1g/f2GtFAbP uK+9jnidGTeFmYoJYKVV6hwKPwm1Ju8j2LXsWaDLY5TfFQTMMvqAnvcmscC0S39Bim/B OH6g== 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:mime-version :content-transfer-encoding; bh=iqaKCJ/vNidDzmWvE8Ei4HGIsfolJuD4g50roz5brLo=; b=MNCfFCrI4ndQQyrWDl/JvnOkuFiCFjL1nWyoz3BuNgG7Ngs81ehgBHt5Fvm50s4VWv nTjfE4ACEnfbqyO1qX0Cu+63K+5O5mcme+vP+1A3ak2PmlGL4A5a9O6VsHr5yJUZnC2l DdP49pnrcWKrBrDVF/fIZLFCgLvI+TPD5Ss5MVjEXAI7V9HU4xlAX6oTEYgMnM1uNc/H yRi6clchUVMsZbUTaivNXeSG+c3KfdUT3dBryn39HP0UOhP7iaL25YLrHARlY21/Sx2D GfKzNCknctp/kdP+/sYiJgd5VYjWGQeAKclnd/XLAyJj+br0Vb17J04Iu7MdvFPev7Ri EPyQ== X-Gm-Message-State: AOAM53149CEr+nTfpCNkDZ9Wm7TKs+PcaCDJ4o+RXlzLZ9L0KbqWxCfm OkMmOuHV33QHKzU3ZwnDLw0= X-Google-Smtp-Source: ABdhPJwsOi2XYm8L1rzaXqA1OPOhf+cK6DVMTj8QYRFL3OnvtqeS5oJ1CV+q+F0i+1jUniYnzLzcyA== X-Received: by 2002:a17:907:10d8:: with SMTP id rv24mr15243159ejb.542.1624105179476; Sat, 19 Jun 2021 05:19:39 -0700 (PDT) Received: from BLUE.mydomain.example (83-87-52-217.cable.dynamic.v4.ziggo.nl. [83.87.52.217]) by smtp.googlemail.com with ESMTPSA id w17sm2299405ejk.112.2021.06.19.05.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 05:19:39 -0700 (PDT) From: ericwouds@gmail.com To: Rob Herring , Matthias Brugger Cc: Eric Woudstra , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Fix mt7622.dtsi thermal cpu Date: Sat, 19 Jun 2021 14:19:26 +0200 Message-Id: <20210619121927.32699-1-ericwouds@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210619_051941_752946_A4BCB1BE X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Eric Woudstra Cpu-thermal is set to use all frequencies already at 47 degrees. Using the CPU at 50 for a minute, the CPU has reached 48 degrees, is throttled back to lowest setting, making the mt7622 terrribly slow. Even at this low speed, the CPU does not cool down lower then 47 so the CPU is stuck at lowest possible frequency until it shut down and stays off for 15 minutes. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; This should not be set al every cooling map. It should only be set at the highest cooling map. Same as in the example: https://www.kernel.org/doc/Documentation/devicetree/bindings/ thermal/thermal.txt line 272 But then without the fan and added a third map. Now temperature will be regulated at 87 degrees celcius. At temperatures lower then 87, all frequencies can be used. Also see the post: http://forum.banana-pi.org/t/bpi-r64-only-10-cpu-speed-at-already-48- degrees-celcius-speed-not-increasing-anymore/12262 Signed-off-by: Eric Woudstra --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index 890a942ec..b779c7aa6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -170,14 +170,14 @@ cpu-crit { cooling-maps { map0 { trip = <&cpu_passive>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map1 { trip = <&cpu_active>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; }; map2 { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel