From patchwork Tue Jan 3 01:31:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Feng X-Patchwork-Id: 38232 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4387228wrt; Mon, 2 Jan 2023 17:32:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXujAvD/4RIMXiAE7MwLtLTNre2weI0kqXXZ0GsBpxkctRwWIwwGzjdkXedls4Rv2zbr3VXj X-Received: by 2002:a05:6a20:4904:b0:9d:efbf:8156 with SMTP id ft4-20020a056a20490400b0009defbf8156mr60656596pzb.31.1672709561921; Mon, 02 Jan 2023 17:32:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672709561; cv=none; d=google.com; s=arc-20160816; b=AQeFUVyU0wTk42MuFUmWJwNcBpE7zgu8Z/PjoaFH8GGLhxPso21dCrSVap1qMdO2q9 VGcZj/XgGZe8ut//Q6O1Ry04g0UZ8dbcoRWAUI9iCrlhFU7K3K2HYnjVwXl3B0WBAo5P SuPAF7NpubS20ozEQ9zZbjjzGECq8TsmAXBPpIrqW1GEKkD/x2NL3r0QyDhm8BaX2CoD E2tjnYUOq3dO+HQvsrN5PUwZ/A6jyXmjXj3V6nbDZCUT1uhIBWkERAzauFO5DPbUZAEJ PcyHE70bPSB95c5exAlpcAyjI8r3PqIiJ+S16dPybY2RTmBmHHp/2cPUy4wJGujY55c0 Gueg== 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; bh=fNbwRVdKaA+XI4w7/ga6Qk9jS2SWAnISnIM1FPcgqTg=; b=nx9linMkZ1eWuy3JeM7W9tMEnpVqMjNzXIzHfGRvDQttMPQLztmWgurVxICSQa/5Q/ Qlm/w4LRL3dWLHHafDvDx0McSYHAald/u1hfGZWboYwBkanxo2Yp4Akt6M2x6bmCJ2/z lvAxTkE1m72iYJXknSV3vBJSe1B4PZy2fkzIFiB8vB0YyRyAQh3qpRa6sjmlz5r21ogz fo4MC2I3UsMg21xljwx1+j4v8ExVkPMPjmI37ipOonxAH3gZhFeY/VgG1aROOfyvOJm/ g4VAIqoRg5G8f26iwrc6ZFWDjOxNU4AMZ5rNCo4RQOrZSFh2qzf/p8xWkpA0LGpFl8VS kcNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k69-20020a638448000000b00479433ac8aasi30323575pgd.260.2023.01.02.17.32.29; Mon, 02 Jan 2023 17:32:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236534AbjACBcH convert rfc822-to-8bit (ORCPT + 99 others); Mon, 2 Jan 2023 20:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233178AbjACBb4 (ORCPT ); Mon, 2 Jan 2023 20:31:56 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 222ABDA7; Mon, 2 Jan 2023 17:31:55 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id A7F8824E137; Tue, 3 Jan 2023 09:31:52 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 3 Jan 2023 09:31:52 +0800 Received: from ubuntu.localdomain (113.72.146.202) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 3 Jan 2023 09:31:52 +0800 From: Hal Feng To: , , , CC: Jean Delvare , Guenter Roeck , Jonathan Corbet , Conor Dooley , "Paul Walmsley" , Palmer Dabbelt , Albert Ou , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Hal Feng , Subject: [PATCH v1 4/4] riscv: dts: starfive: visionfive-2: Add thermal-zones Date: Tue, 3 Jan 2023 09:31:45 +0800 Message-ID: <20230103013145.9570-5-hal.feng@starfivetech.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230103013145.9570-1-hal.feng@starfivetech.com> References: <20230103013145.9570-1-hal.feng@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.146.202] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753963101568937687?= X-GMAIL-MSGID: =?utf-8?q?1753963101568937687?= From: Emil Renner Berthing Add thermal-zones for StarFive VisionFive 2 board. Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng --- .../jh7110-starfive-visionfive-2.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index c60280b89c73..c7c7735f021d 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -27,6 +27,34 @@ memory@40000000 { reg = <0x0 0x40000000 0x1 0x0>; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <15000>; + + thermal-sensors = <&sfctemp>; + + cooling-maps { + }; + + trips { + cpu_alert0: cpu_alert0 { + /* milliCelsius */ + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit: cpu_crit { + /* milliCelsius */ + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + gpio-restart { compatible = "gpio-restart"; gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;