Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2088115ybh; Fri, 17 Jul 2020 09:01:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztO/60rPvuo7VKYGYAF+EGt9jxIwtF/UfPJMbfteAPL/PsYYftCxUDuC6/EOcn8vHXSWun X-Received: by 2002:a05:6402:1544:: with SMTP id p4mr10082016edx.334.1595001700036; Fri, 17 Jul 2020 09:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595001700; cv=none; d=google.com; s=arc-20160816; b=HacVYUjvDNWRwiqRO65KZrhBgfM/VxoE5CCjUOCboMx1oa+TFRttgl3NzyInQq9SaI s+g9epIXnNFi3QWVSizuimWNtJC22wDLGdfexB0mnbVSrpZK9ZGmalHQbFq3nIAH9VaB H6BSTlQIe/Aag9yqfrbhdSExQKlbgoXYn9TOYYQi/k+d+6ncoFxVit0aP/cQ/gcSlZ4A N4CgsXCNlBssnigmtsx/FD8yZInTaIq47sYi7XfMcszWq3JsjFbWVjeoiv5lBTV4Qapy QctP22Qm+kkld2wp0nghogsJc7ZIylgCv6Dfx489o71J4qJk7u0lWkkGd7FkuF6Qeczi rC1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8CQ4+AimwIDLbp9CE7Md6IUWskilBtHiAe5rdXhEfic=; b=jrJn6G/QIhFEFDuhnJcfR04pVeGzqH32vJVRF8ydsM9m63aU1gmgXOn3jgeAA9FqkY anCN100qRavXdWMKdA4yRDPrS0NUPEibYYrn+rvQnd7nx4Fl/1Hnc02SmnrrZpBQ4Ir+ FTqf4tH5XvR5dk9hJ2g0lcF4JQwjp6GbEM/GWAcYsYOv+rRLcoFjSj2v0FP8pSi/R0gB omqnGhSlMlms9HzIs2/P2lxkeR22+WUvwkjnozMIkDaScVVHm0PPa8zBVGtYuaUDFxfS 75fhKnuhGYGYeeQgxnibpKWxF0MdNIAMxtaT4Spss5fs6G52CgkspTIz8i3HrznnDzH0 tgLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZG2Ki6oB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz3si5444426ejb.142.2020.07.17.09.01.15; Fri, 17 Jul 2020 09:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZG2Ki6oB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgGQQBD (ORCPT + 99 others); Fri, 17 Jul 2020 12:01:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:40810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgGQQBB (ORCPT ); Fri, 17 Jul 2020 12:01:01 -0400 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.194.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A0772083B; Fri, 17 Jul 2020 16:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595001660; bh=fsR2V9nMIGiFHgCWlU7kwwTgW3J9FqqBZRna6Su3DBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZG2Ki6oBuZkZFWpVRuw/FgN0huucmjfwGn0ka0zUewV80jHFJ7v8SPNJdafLGUMXm 7vLIbOJ9ED5wYqUBGvHFMQbzutmOVK0h+G1BRcS4xGDyrnK+KIFtN1BMDURTvc7mk+ X6J3rQUcAWf8aNOtE5ll2mAJy+dPHux8gwQQdDJ8= Received: by wens.tw (Postfix, from userid 1000) id 3FABF5FD07; Sat, 18 Jul 2020 00:00:55 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Cc: Chen-Yu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/8] arm64: dts: allwinner: h5: Add trip and cooling maps to CPU thermal zones Date: Sat, 18 Jul 2020 00:00:50 +0800 Message-Id: <20200717160053.31191-6-wens@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200717160053.31191-1-wens@kernel.org> References: <20200717160053.31191-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai This enables passive cooling by down-regulating CPU voltage and frequency. The trip points were copied from the H3. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi index 09523f6011c5..6735e316a39c 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -3,6 +3,8 @@ #include +#include + / { cpus { #address-cells = <1>; @@ -15,6 +17,7 @@ cpu0: cpu@0 { enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + #cooling-cells = <2>; }; cpu1: cpu@1 { @@ -24,6 +27,7 @@ cpu1: cpu@1 { enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + #cooling-cells = <2>; }; cpu2: cpu@2 { @@ -33,6 +37,7 @@ cpu2: cpu@2 { enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + #cooling-cells = <2>; }; cpu3: cpu@3 { @@ -42,6 +47,7 @@ cpu3: cpu@3 { enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + #cooling-cells = <2>; }; }; @@ -173,6 +179,30 @@ cpu_thermal: cpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 0>; + + trips { + cpu_hot_trip: cpu-hot { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_very_hot_trip: cpu-very-hot { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + cpu-hot-limit { + trip = <&cpu_hot_trip>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; gpu_thermal { -- 2.27.0