Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2714304rda; Wed, 25 Oct 2023 10:09:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGysuYij1rwZLFcnFj8vvF6//9bB/beyhZiFssD9QC13j3BrzjIWbzcM0iuKUkrQJ/J5MF X-Received: by 2002:a25:7644:0:b0:d9a:54c2:1b92 with SMTP id r65-20020a257644000000b00d9a54c21b92mr15271781ybc.14.1698253771111; Wed, 25 Oct 2023 10:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253771; cv=none; d=google.com; s=arc-20160816; b=OHPsFQTDIHymH8qNTISA4AKlvV/DGI1/04unN7h81jmuP8LGcESEy7eYE2T/RtYwph vXUafZspXV4WyMm/wC7YZpPszxUuMED4SzpCPxaz9Ch5o5aeKjQ0IbYBiuAYsXTbzuOx DdYrCvuZsyIijqzfal0hb89dNu3gy/3hlPBfA92h9xmmOzQ7mbRPkaFwek08JRUVm2KD Vq3AFy5HAIj3stIhf2SFevJWHZcHZOcY+xLzuWqRPVQ+n+QTh5wVEYdR8P5UZHkbwVLx Z56zbu4u67V3SVaWGY1bW1XdVRO+eu/kMS0qn54I0M3YCDn7fkOBE/Xxlz6bBkVxnNe/ BvNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9fN/MQV6dwt8BvtYNvMR12qWNERnV7Wj49zgD8ObeVA=; fh=SwIf/Xmhr5VbSRApyCAu05w8wdG0RyLeMNW6QMUCmh0=; b=cYYw2nJ+FZthj6wDNp0ZfivZQgNz4WfXcbCMuKFJD/BEbFo1YXgM5YSrTeqn8i+oLS Sd+9BggPu+Cj3Rkau20zJL82dwqecOIFeVfKzAEFiRAlI/ch7ZAyvlKPrsExqp86lSgT PeX/SlQcGtWErPUhBlf+mBywmYgQL12/t1wXbNtzyIksmydhB5xq91mgFHirdPpVnPXT +MiiDWiDojJAixUUC12rY/z7UTKKhWlwbmnAx0u/oZD/8FeFlRyLuOk8H533Sd8qT8Ex inVKWtfE+NzWFPoxEXmyyFfZda/oYUYDU+wVEHAuOHpJ7bznS9WxOkTgV6RkYtn6prU2 hOvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=VtFrx0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i20-20020a25d114000000b00da035a9366bsi5886732ybg.308.2023.10.25.10.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=VtFrx0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A0F6D81121F4; Wed, 25 Oct 2023 10:09:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234537AbjJYRJL (ORCPT + 99 others); Wed, 25 Oct 2023 13:09:11 -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: 8bit X-Mail-ID: eafcfba0-3d01-49d2-bf58-32026e9a4c7d X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:20 -0700 (PDT) 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 BPI-R3 dts") Suggested-by: Daniel Golle Signed-off-by: Frank Wunderlich --- 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/arch/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 = <&cpu_trip_active_high>; }; - cpu-active-low { + cpu-active-med { /* active: set fan to cooling level 1 */ cooling-device = <&fan 1 1>; - trip = <&cpu_trip_active_low>; + trip = <&cpu_trip_active_med>; }; - cpu-passive { - /* passive: set fan to cooling level 0 */ + cpu-active-low { + /* active: set fan to cooling level 0 */ cooling-device = <&fan 0 0>; - trip = <&cpu_trip_passive>; + trip = <&cpu_trip_active_low>; }; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/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 = <&thermal 0>; trips { + cpu_trip_crit: crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + + cpu_trip_hot: hot { + temperature = <120000>; + hysteresis = <2000>; + type = "hot"; + }; + cpu_trip_active_high: active-high { temperature = <115000>; hysteresis = <2000>; type = "active"; }; - cpu_trip_active_low: active-low { + cpu_trip_active_med: active-med { temperature = <85000>; hysteresis = <2000>; type = "active"; }; - cpu_trip_passive: passive { - temperature = <40000>; + cpu_trip_active_low: active-low { + temperature = <60000>; hysteresis = <2000>; - type = "passive"; + type = "active"; }; }; }; -- 2.34.1