Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp686017rwi; Wed, 26 Oct 2022 06:08:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6sGPMfk6axrEHesNeTJycxghCvOAPRrP+LNW84UNgwH6V4p9s8Rpc8i0MjWuuT1meaWMdD X-Received: by 2002:a17:90b:1b07:b0:20d:571c:1d3d with SMTP id nu7-20020a17090b1b0700b0020d571c1d3dmr4195094pjb.192.1666789688259; Wed, 26 Oct 2022 06:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666789688; cv=none; d=google.com; s=arc-20160816; b=FquYvClGuTFzedJNuFgcF21WPy1tjALbixp9fX+EE1D9fSxb5wg4pB8ldy+/k8+G9/ +91T3itfj6If7sZQDWFTf3/6jPtRytyAXTw3h/GZgPLLo4ghvuqpqU0XvGZYkclxfbWn eY6HGnNgMl7kUyrvDmMbmKHdqPXL4eRlKYP7u0pYi017EvrfJhDVdiHvr4uWJri6Gd+Q NpsmIimI/oZ7vbnm5AqXNmBRZi1BfVJskD3sgiUgSR7/yKs4XepFxazYMQTESh6S2IoI qoUc4CCl12AzLjhlt9zz/vYaQJCBSEhgWMVTHJlKOs3pgLD+yzPUcnpT4ZTmOhnNftrB +djQ== 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=eXkMqEUfsxYicX/DTi9Vq7wh1X6lr4GSU9nx1sQsTiE=; b=pt4XrRTmjnFkEoXkQyK64UsOJ/YqTvWoSZuj3SZCpJ+9Sw3Q6unRLMpkJs3OVQiFMM eJcK2S1RSCJO/pNZqDDRo7Or46fNdP4UwJCVt9uBc/e0uzedyl/fmujUs4OzVchCsumR fCQ+GdXQUCK/CtzGQmQZVcWeWE5d2GTXFYMqXjRxdf/tKV7zjP8cSNZChITyivgcF8rL yDrAXzPfIODdzz58olpj501LGMe1JaZJG8uuAk4VTUlz4n1BlOyw7LFS1ota1uBa00SS qcwYf18IJDeiLKc0653RqNWRv3Ez6x/YwMua8GxYrOKa5fGKwvOfHkRzf+gQGMmKHQIu L4dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=LuXoipBD; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob11-20020a17090b390b00b00205b268cd58si2840293pjb.181.2022.10.26.06.07.49; Wed, 26 Oct 2022 06:08:08 -0700 (PDT) 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; dkim=pass header.i=@microchip.com header.s=mchp header.b=LuXoipBD; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233586AbiJZMju (ORCPT + 99 others); Wed, 26 Oct 2022 08:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233816AbiJZMj3 (ORCPT ); Wed, 26 Oct 2022 08:39:29 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B093EC1EA; Wed, 26 Oct 2022 05:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666787962; x=1698323962; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2wFwP5DO/Q0M+PToFWR6iInwUsotX6p9IkR/irjoawA=; b=LuXoipBD/7Qrz7TLGl76RgbE+INWKTlemQOVdsHkqCDZebM/bNfY5FTA M7J3kjRetHlKz3vfkwNvePNxA+CuFc1+u0pJpXLytwbORU/SkZ1WioqMC 0uSK7ueIpt64ItKeT8vYpFmJa/Ey8juQvIyBLQOH/lMSrXLtQW/GsjxVB USHlOAG6brpp2ZAi3MiCVWKESt0/2i8O+qBFWi0Td96vDWC2jWlUk2gly 02s5sSgz6d8hbdjRWpMmdvcyItmTsbq40GG4YyxWDuH7qFTJytNCaalu4 Y5leLVFn7HqZeMNKbLeoOc5gCjOU3IKK4HFme1fK6UdeMNwqPiC+yBmFQ Q==; X-IronPort-AV: E=Sophos;i="5.95,214,1661842800"; d="scan'208";a="180590465" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Oct 2022 05:39:21 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 26 Oct 2022 05:39:18 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 26 Oct 2022 05:39:16 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 06/11] ARM: dts: at91: sama7g5: add thermal zones node Date: Wed, 26 Oct 2022 15:41:09 +0300 Message-ID: <20221026124114.985876-7-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20221026124114.985876-1-claudiu.beznea@microchip.com> References: <20221026124114.985876-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 Add thermal zones node with its associated trips and cooling-maps. It uses CPUFreq as cooling device for temperatures in the interval [90, 100) degrees Celsius and describe the temperature of 100 degrees Celsius as critical temperature. System will be is shutting down when reaching critical temperature. Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/sama7g5.dtsi | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi index 52829be04427..fb517f9aff30 100644 --- a/arch/arm/boot/dts/sama7g5.dtsi +++ b/arch/arm/boot/dts/sama7g5.dtsi @@ -17,6 +17,7 @@ #include #include #include +#include / { model = "Microchip SAMA7G5 family SoC"; @@ -36,6 +37,7 @@ cpu0: cpu@0 { clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>; clock-names = "cpu"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; }; @@ -74,6 +76,46 @@ opp-1000000002 { }; }; + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&thermal_sensor>; + + trips { + cpu_normal: cpu-alert0 { + temperature = <90000>; + hysteresis = <0>; + type = "passive"; + }; + + cpu_hot: cpu-alert1 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + cpu_critical: cpu-critical { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_normal>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&cpu_hot>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + clocks { slow_xtal: slow_xtal { compatible = "fixed-clock"; -- 2.34.1