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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 41B6FC48BC2 for ; Fri, 25 Jun 2021 08:17:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E8D961425 for ; Fri, 25 Jun 2021 08:17:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbhFYITT (ORCPT ); Fri, 25 Jun 2021 04:19:19 -0400 Received: from mout.gmx.net ([212.227.15.19]:45153 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbhFYITS (ORCPT ); Fri, 25 Jun 2021 04:19:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624609003; bh=KPSrVHtFgQjR0DccR13l5IWzueT0aS5xNt0lrvk59Oc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YGWHfdTXSfOQ4LmR7/hDAc2DAh1Io6AaVX9/oWX9+KScNU7XqxZizggmy1oxsBEi5 i0V2DWKGr5pqMHEFw09+PS6575nydXNOacuvqfwLzjwUJSDZr/keEYBOecdcTrfYg+ dj94cM6JWV0aR84xBjqzNU0zP5s9GsxJDY8KBgbI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [217.61.157.219] ([217.61.157.219]) by web-mail.gmx.net (3c-app-gmx-bs66.server.lan [172.19.170.210]) (via HTTP); Fri, 25 Jun 2021 10:16:43 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: Eric Woudstra Cc: Daniel Lezcano , Rob Herring , Matthias Brugger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Wang , Ryder Lee , Daniel Golle Subject: Aw: Re: [PATCH] Fix mt7622.dtsi thermal cpu Content-Type: text/plain; charset=UTF-8 Date: Fri, 25 Jun 2021 10:16:43 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <3dd22cf2-1186-4870-aa49-e5cddc18c6e9@gmail.com> References: <20210619121927.32699-1-ericwouds@gmail.com> <56fb5540-fb86-4e6a-a596-1276026b37e5@gmail.com> <47261865-00e3-41eb-bb36-2b939f81f1e8@gmail.com> <189b52d5-b103-43e1-a64f-1e627fbc75af@gmail.com> <173e6bab-9d21-eb28-9b91-a5f80c01fd03@linaro.org> <3dd22cf2-1186-4870-aa49-e5cddc18c6e9@gmail.com> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:4154xVDgSfyG4t08O7Ht9tPl5ySlXuRPX9mO546NB9MEsmBGYGbuNdW1daSYpnkev6AqM q8ii1ZC6PODAWiCN6EDefPVGOxPhdR0BJT5+s5s6oh948EnixcAJNO6fbZgJzfgqU9SSzOpHBIFq mKMSWO0QdldOBlNGJjdVNIJtH0hCWu0/QBIwHjtLpbKcYOcbR9eBDnGhWNdv/TsQDo8VbGwpkPbW OXEei+hhi5DnplcNorFsuqzv47Q4ykmYafc6huTcnSz8ClT4MrqhPY/zod4vn2bzjB6aRHw16Vxv FU= X-UI-Out-Filterresults: notjunk:1;V03:K0:UkCnIuOiaLQ=:1EtElga8OjLd/1aVJ8OeWg GOB7UgKTLZ3X1+WANSd7qmaG+M9DdejmOHur5CPAb/FfDE2y+MOtZOye6qDv6kbbnXLGAbzVs lOyLusA2Pr1veBOj27hwlgMSKWVusSzxghFTLDaA3m6bG26zPbUFo1FKmDYTkmd/Dk9vzVT6K dAM62vO7h2IOdjJfmZEn4cA0bBIRY8MgaAZxCAbh3exjN/DRfSahsn0jV2OCraQBUK7tLVrk5 9odlS2gY4bvAyls5QvFgXmA8hvyuJoJUtMPTe5ORA3jm7xh+bBo5S7WoXxrObwJtGnECQbtVD rxhjLWdWDTmOA6ZOlNZh0xUH44q91Nx7vC5ae3gwTfYhL/TiayOJZmPdpvUdgU1sdQE+k/qaI D9Iy/3O5B3XUUk6df7M4EgtIf0+twphoK4Ex4wVIT8f65p06qXxLcHM+066t9RffQFCATXHRW sbl6GHa+MUqbmljLzWWebn/M2g9AEfMeOVQq8pDLVcZu0AahDmnjMrLYWzx7CmKfgtyp3HGq5 60AWujl+lokqm9j7J4ovmR+MPIypcYbi3CDvtE7uugnCc/OHEy46Xc8nRMVNckBUWFNHvB1QQ PFcsFfqmREYMOksGDz7O2y2zpws5SBpnUCAhJtaS6duN620UlOg5KblzepmMqKemlsx+O8WUP j/ASMap2nID/kgU6/S7aa1Gy85V+ZN+wNFDr+j+ZGYl8UT3HSqHrgjIq+QdjgKEWDVYNRR7fe i3EyIRCqtQlw8Y9vYduNJjzu5wuk2ixqeAZtB95itD8gR+0yCEKjrCCKWo6+0iAOyhtIFI93O Yvh95Otll1gfCxYyI6v5PAHHNPl5pau2IBepPDbfinPHH1OUf4= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Gesendet: Donnerstag, 24=2E Juni 2021 um 15:29 Uhr > Von: "Eric Woudstra" > The SOC runs unthrotlled slowly to 80 degrees=2E This takes minutes=2E P= olling interval 1 second or less does not matter much when looking at these= temperature rise times=20 >=20 > After that in more then an hour it slowly creeps up to 85=2E I believe t= he design is so that the SOC, under normal circumstances, can run at 1=2E35= GHz without throttling frequency, without heatsink=2E It just needs a safe= guard for different circumstances=2E >=20 > Most of these SOCs can also run in industrial grade circumstances, which= means up to 85 degrees ambient temperature already =2E If not industrial t= hen this would be 60 degrees ambient already=20 >=20 > But only someone at Mediatek can confirm this=20 maybe Matthias knows anybody? get_maintainers-script shows no mtk employee for mtk_thermal driver, added= Sean and Ryder as common Linux-Contacts=2E=2E=2E Daniel from openwrt have some other mt7622 Boards maybe he can test the Fa= n approach below > On Jun 24, 2021, 12:21 PM, at 12:21 PM, Daniel Lezcano wrote: > >Found that: > > > >https://download=2Ekamami=2Epl/p579344-MT7622A_Datasheet_for_BananaPi_O= nly%281%29=2Epdf > > > >Chapter 3=2E3 - Thermal Characteristics > > > >Given the values I suggest: > > > > - Passive - 80=C2=B0C > > > > - Hot - 90=C2=B0C > > > > - Critical - 100=C2=B0C maybe adding FAN (r64, don't know for other mt7622 boards) for lower 2 tri= ps (with adjusted temperature points) and cpu-throtteling for upper 2 trips something like this (used the 70/80 trip points discussed before): --- a/arch/arm64/boot/dts/mediatek/mt7622=2Edtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622=2Edtsi @@ -134,6 +134,13 @@ }; }; =20 + fan0: pwm-fan { + compatible =3D "pwm-fan"; + #cooling-cells =3D <2>; + pwms =3D <&pwm 2 10000 0>; + cooling-levels =3D <0 102 170 230>; + }; + thermal-zones { cpu_thermal: cpu-thermal { polling-delay-passive =3D <1000>; @@ -143,13 +150,13 @@ =20 trips { cpu_passive: cpu-passive { - temperature =3D <47000>; + temperature =3D <70000>; hysteresis =3D <2000>; type =3D "passive"; }; =20 cpu_active: cpu-active { - temperature =3D <67000>; + temperature =3D <80000>; hysteresis =3D <2000>; type =3D "active"; }; @@ -170,14 +177,12 @@ cooling-maps { map0 { trip =3D <&cpu_passive>; - cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device =3D <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; =20 map1 { trip =3D <&cpu_active>; - cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device =3D <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; =20 map2 { @@ -428,6 +433,7 @@ pwm: pwm@11006000 { compatible =3D "mediatek,mt7622-pwm"; reg =3D <0 0x11006000 0 0x1000>; + #pwm-cells =3D <3>; interrupts =3D ; clocks =3D <&topckgen CLK_TOP_PWM_SEL>, <&pericfg CLK_PERI_PWM_PD>, regards Frank