From nobody Fri Sep 20 11:59:03 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBEE4C07545 for ; Wed, 25 Oct 2023 17:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234665AbjJYRJM (ORCPT ); Wed, 25 Oct 2023 13:09:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E461184 for ; Wed, 25 Oct 2023 10:08:46 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id D58D61025C5; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9fN/MQV6dwt8BvtYNvMR12qWNERnV7Wj49zgD8ObeVA=; b=VtFrx0zcDRKK20SYDAD7XyFziUjVNDiy8fI2lqOyiXFo2zn/v/Lb4HySL4Nm7AzyvioUHH Qp6MFraRa39+17LVkKPqEraI6BEs5NNdcq3KuxV73pdSZS0R3BqtJ7WWG9QlOUXmE6pZ4a LkWnawYUAcSUKkekMCnOaROufBtkM3Q= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 2AB493608ED; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra Subject: [PATCH v2 3/5] arm64: dts: mt7986: change cooling trips Date: Wed, 25 Oct 2023 19:08:30 +0200 Message-Id: <20231025170832.78727-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: eafcfba0-3d01-49d2-bf58-32026e9a4c7d Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add Critical and hot trips for emergency system shutdown and limiting system load. Change passive trip to active to make sure fan is activated on the lowest trip. Fixes: 1f5be05132f3 ("arm64: dts: mt7986: add thermal-zones") Fixes: c26f779a2295 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to B= PI-R3 dts") Suggested-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v2: - squash patch for bpi-r3 as suggested by angelo --- .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 10 +++++----- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 +++++++++++++++---- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arc= h/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts index f9702284607a..b876e501216b 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -152,16 +152,16 @@ cpu-active-high { trip =3D <&cpu_trip_active_high>; }; =20 - cpu-active-low { + cpu-active-med { /* active: set fan to cooling level 1 */ cooling-device =3D <&fan 1 1>; - trip =3D <&cpu_trip_active_low>; + trip =3D <&cpu_trip_active_med>; }; =20 - cpu-passive { - /* passive: set fan to cooling level 0 */ + cpu-active-low { + /* active: set fan to cooling level 0 */ cooling-device =3D <&fan 0 0>; - trip =3D <&cpu_trip_passive>; + trip =3D <&cpu_trip_active_low>; }; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 77ddd9e44ed2..fc751e049953 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -614,22 +614,34 @@ cpu_thermal: cpu-thermal { thermal-sensors =3D <&thermal 0>; =20 trips { + cpu_trip_crit: crit { + temperature =3D <125000>; + hysteresis =3D <2000>; + type =3D "critical"; + }; + + cpu_trip_hot: hot { + temperature =3D <120000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + cpu_trip_active_high: active-high { temperature =3D <115000>; hysteresis =3D <2000>; type =3D "active"; }; =20 - cpu_trip_active_low: active-low { + cpu_trip_active_med: active-med { temperature =3D <85000>; hysteresis =3D <2000>; type =3D "active"; }; =20 - cpu_trip_passive: passive { - temperature =3D <40000>; + cpu_trip_active_low: active-low { + temperature =3D <60000>; hysteresis =3D <2000>; - type =3D "passive"; + type =3D "active"; }; }; }; --=20 2.34.1