From patchwork Mon May 29 20:42:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13258975 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 8B6E8C77B7E for ; Mon, 29 May 2023 20:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjE2Uwn (ORCPT ); Mon, 29 May 2023 16:52:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjE2Uwm (ORCPT ); Mon, 29 May 2023 16:52:42 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC97C7; Mon, 29 May 2023 13:52:41 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 54B9C5FBD8; Mon, 29 May 2023 20:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685393014; 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=cDhjjWLFoezZAi/uvwan8VYbJJegbs/FI4UlVYsQEcA=; b=WzpP0SHn+OnZOkihcA/BoupceBtWe7QqKIQ1D4yILwJwnZxeZcAmBZO9N0brpsAL1vaMCo VNekBSXfHtErz5nvHTaLb9pym86CweVfQgVfiqCV7LQ3knRalaBMX45ijUVX9qdAiUOQ4d qYLV5hTKoPjFYsGqnTTBJAUHQM38Z2w= Received: from frank-G5.. (fttx-pool-217.61.156.2.bambit.de [217.61.156.2]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 6A3D6100AD7; Mon, 29 May 2023 20:43:33 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Srinivas Kandagatla , "Hui.Liu" , Zhiyong Tao , Andrew-CT Chen , Lala Lin , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Golle Subject: [PATCH v2 3/4] arm64: dts: mt7986: add thermal-zones Date: Mon, 29 May 2023 22:42:57 +0200 Message-Id: <20230529204258.65238-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529204258.65238-1-linux@fw-web.de> References: <20230529204258.65238-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 1e0afbdd-08cb-4eec-9e6e-32b2db403961 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Daniel Golle Add thermal-zones to mt7986 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- changes in v2: - drop top 2 thermal trips as suggested by matthias --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index a409d5e845c2..a059fcdaa8b7 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -603,4 +603,32 @@ wifi: wifi@18000000 { memory-region = <&wmcpu_emi>; }; }; + + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <1000>; + thermal-sensors = <&thermal 0>; + + trips { + cpu_trip_active_high: active-high { + temperature = <115000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_low: active-low { + temperature = <85000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_passive: passive { + temperature = <40000>; + hysteresis = <2000>; + type = "passive"; + }; + }; + }; + }; };