From patchwork Wed Apr 4 03:14:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 132793 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4549613ljb; Tue, 3 Apr 2018 20:15:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HppAcIt4SNTszi/8msHgcWQb/kok8YmCbBbi7Z7MuFD6LOZt5PzdinBu71ZtG5lJPkhmI X-Received: by 10.98.65.220 with SMTP id g89mr12398648pfd.97.1522811726449; Tue, 03 Apr 2018 20:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522811726; cv=none; d=google.com; s=arc-20160816; b=PS8jvnm4Jqlj7oLaCSNVBnNUQDFLvHK8DUYiDbN6niJ7c8wV6BbC4qRlIw9OakcooI 2NcKT83gYc3H7Npt4vLr6O+3MJNQoT1cFkR2pcimjtAddr3MxSjmXATM8/YQzrI483Q0 mX1SYxWyb0tlkFgrFIq/2j79wHZeWfwYzCA5dJeLOU/fhfdo12CftHNiqt2/XP9nLKla ROEstOL1bwMabvLhRd4T6O5R675DPGErlvsGEIf6gatwmO46Nj1e9yTjNE6PZ+BxgceY Qv8YS2dYmjoaROGgyC2TPOOGvEVagkIpZiloLFO5i28J0bTMgZpNOrHzuKMvNTnHOWrJ OHTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Yeln164XoonrBWydQX579pDIC/fchn5dOg8JEzg6Gdc=; b=l7L2/zf88dZuzSAAyvvmfT1s6MqACq99nUXTpUU8/3lw36X7RpcVl6Z5SJs2ENH/aO IVUCijz/dJeIMUjlY5y4fRTN1ib6SJws8Kkii23C890Y48hRLofO9ehjnW0UEBmTc66V 6024RopcCdp4g4MVl6P40pFNYgZxeyZ9aIVqTknifWKwcOox3IFmhpjarjrg/f7uqtsY u2reNZrG74CD83LpyQ0mf6R7O6GMLS3ABmUSMSCs+7iuOv1qZswqu7woMNv1e/RHKEZC VlVNPx1I8JNJGi53Pd9sm8ueqhSiVrCuib8vG4EmxOldXhvHxBGUc1rHOrZjv1VXc8m3 0LtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cya0/Ksg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si382957pgv.493.2018.04.03.20.15.26; Tue, 03 Apr 2018 20:15:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cya0/Ksg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927AbeDDDPW (ORCPT + 29 others); Tue, 3 Apr 2018 23:15:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:53336 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835AbeDDDPS (ORCPT ); Tue, 3 Apr 2018 23:15:18 -0400 Received: by mail-wm0-f66.google.com with SMTP id p9so37184350wmc.3 for ; Tue, 03 Apr 2018 20:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Yeln164XoonrBWydQX579pDIC/fchn5dOg8JEzg6Gdc=; b=Cya0/KsgWeQ7LItbbiSNcR3ELrqvynGe1sD606q/FQ+aAovPY8c1WnezIt40e/jJyo Rj/sKdsSiVTVI6yRfFbzp6DVKuv3XlB44ThsEMsJkhwDHzQ8OzwBZI0wwepR+laGofWs 8x2uIsjIr2Z9EAMZLib+Vvsb1DC63ugJJvGf8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Yeln164XoonrBWydQX579pDIC/fchn5dOg8JEzg6Gdc=; b=eGVS1Lznu/rTD4NlMPDvrM41D6i8cLJzAcma+5U4xLgUgZCJakfIc+U16Vy5+CETrP CLLS37HaG+MKkFGZwuT9EWgKfWA1oBEP5IpiMIwuroMzchgdcvuYLXEz4UfzKm/wVVcX amhoaVKxN2vgBTmroGRHPTr8fe23W62Eg9iL/IWD8tBF8TuMkJJ1FWuyEsvEetfTANmJ dnC8Ajb7XzKx1jsSqaAXlP62FV7z2HnUGSLo7ZDl0u8o85zqifVAN77freF4vcoKZYi2 Rj10SBrUa29rwVNhl/pPWfIS2D5w5rqOfzGD3xNLWUAyRgmcaT8z7uGZKxDsBi809JCq z6CQ== X-Gm-Message-State: ALQs6tDASg/nO9YtgjPmutHdx3rMT5dxaoBNS8ruu6La7t2hg3d+HdBa xpC7x73eN1ox/MiJvg95l0YpPQ== X-Received: by 10.28.64.11 with SMTP id n11mr5229629wma.62.1522811717770; Tue, 03 Apr 2018 20:15:17 -0700 (PDT) Received: from localhost.localdomain (li622-172.members.linode.com. [212.71.249.172]) by smtp.gmail.com with ESMTPSA id r8sm2868611wmg.44.2018.04.03.20.15.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Apr 2018 20:15:16 -0700 (PDT) From: Leo Yan To: Wei Xu , Arnd Bergmann , Stephen Boyd , Jassi Brar , Leo Yan , Kaihua Zhong , Tao Wang , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guodong Xu , Haojian Zhuang Cc: Tao Wang Subject: [PATCH 4/5] dts: arm64: hi3660: Add thermal cooling management Date: Wed, 4 Apr 2018 11:14:34 +0800 Message-Id: <1522811675-12741-5-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522811675-12741-1-git-send-email-leo.yan@linaro.org> References: <1522811675-12741-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tao Wang Add nodes and properties for thermal cooling management support. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) -- 1.9.1 diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index a39da09..e20edd9 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "hisilicon,hi3660"; @@ -64,6 +65,8 @@ capacity-dmips-mhz = <592>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; operating-points-v2 = <&cluster0_opp>; + #cooling-cells = <2>; + dynamic-power-coefficient = <110>; }; cpu1: cpu@1 { @@ -112,6 +115,8 @@ capacity-dmips-mhz = <1024>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; operating-points-v2 = <&cluster1_opp>; + #cooling-cells = <2>; + dynamic-power-coefficient = <550>; }; cpu5: cpu@101 { @@ -1073,5 +1078,44 @@ interrupts = ; #thermal-sensor-cells = <1>; }; + + thermal-zones { + + cls0: cls0 { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <4500>; + + /* sensor ID */ + thermal-sensors = <&tsensor 1>; + + trips { + threshold: trip-point@0 { + temperature = <65000>; + hysteresis = <1000>; + type = "passive"; + }; + + target: trip-point@1 { + temperature = <75000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + contribution = <1024>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + map1 { + trip = <&target>; + contribution = <512>; + cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; }; };