From patchwork Tue May 15 02:53:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 135818 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp414699lji; Mon, 14 May 2018 19:55:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpxux/53wbmxGvVLd+1cZtbzshNLnXaGggA6kDKi3Kf7NCvLzwBEkdRne3G4hB+9ZRWQdAd X-Received: by 2002:a65:484c:: with SMTP id i12-v6mr10017859pgs.162.1526352921644; Mon, 14 May 2018 19:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526352921; cv=none; d=google.com; s=arc-20160816; b=SUlTL9kuaS6hUzDAK1adamTSduuiwGeV1aopMJyMf2Q+soaRRwqIlqxPs8d0LAt8NU v2sW5JEQfoGqgAFBFdF1dZak1gnZJswSoS3VRoK6i9JMxsqd0+8qp1D2U03byjRdF/uq cH7Vw693z+cf45ePlmzEEl1FrdBxTT8lcvbHmtE8ZBcgHYhxGi1ssCLlJRzC0octKfpw PaX0AqURGs7LMd/f4GNvKEjUXTcrOb989fZ2N9iUYgHUWXTlmxQC3ZAHnbQ5MKE305XQ LCOKNWMyenIp9wFdUcM8ktRU7h4YXqr/oKmcAfZWU89vuX8pXRaAWXeyDDaQQQPxtMi7 2pPw== 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=BbKEv/F1IA/RquXd6etzxBYxjpa4UFfcanphchDgoxW6k2kAc2Y/BZ0JfXmETf/7Km cdeQLNCJJ98ZMIENH0IKRohrnx7SJLLuHNzbA2VzZ409r4LiUq3FXHPFUZESxtuiYCJH UB2OPyh8Kk5R4tiHYSc5rojVPUMA1qZK2a+xwBPAWnWff5l7RPwDINy3GtZGnYWMXbqP ZhcytHGwieWIZUM84Do2IABn0cbvT4f1xPAoA4OpOjal2eblaKOSDMT9tyiWa90us0Rw DqM3vn/xQ2stSjCT4H0px35oi0SbD4J1zufWUDvc+wrs912X/Eti7zeExZW0bv8lXtMi PZUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QF9Uyp6R; 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 n10-v6si9993067plk.112.2018.05.14.19.55.21; Mon, 14 May 2018 19:55:21 -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=QF9Uyp6R; 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 S1752513AbeEOCzS (ORCPT + 29 others); Mon, 14 May 2018 22:55:18 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33767 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbeEOCzO (ORCPT ); Mon, 14 May 2018 22:55:14 -0400 Received: by mail-pf0-f195.google.com with SMTP id a20-v6so3013038pfo.0 for ; Mon, 14 May 2018 19:55:14 -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=QF9Uyp6RJAYhvSmC5ygJXcJaQUd72pnTMk2ovr+7KYtbsjOyRyfjWtddDDrMFfKUV9 7vqyQeMYnrcqcnfpVG8Wu5/iq6JK9Kxbs/igfyS5ytfRlponSo/3MqWj2HCmI7voZ/T4 Nn5RlgZX32lPuq9eI/2Xbzj+u5mAQC9wUjb2o= 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=VbslgO1mCQASPuGMHKdgU+hhPddB3GnFbPogqTSXRLR5sK0hUJYVxgnvnuNp64ow5I +7ALwhMmXE5zu1+F5v9B9DuJVdW1c/CGnqxhD9DSAmAbj/lv81HT68fxLWA4Y1vz320q UzGaMZ2uMSidFHTozHv5G7uvpx3iTHMjw8mctecBDVcS7yqHGaE+Hz6eotxGtwXDjSuz ECPy0/adBnLGfmCd5GF+Nka8FhUyNB+xkyZi1o2xNVxqhfe521n2baeVymQ19Zj6z3Ki dpBzscZzPZu8GwGKgJ2jp5bJV9RjIoNsttUkvW26vTDuSKBu5L9jr8twl4PWG8LeCKrq +8PQ== X-Gm-Message-State: ALKqPwd6XqHCFTDhqLchcUHjjoZcI21dqZ8Fi6/cF40vF6YCzmCj262y 5ejHsOJperBfcrtFfUC4roxeZg== X-Received: by 2002:a63:8bca:: with SMTP id j193-v6mr9946644pge.300.1526352914196; Mon, 14 May 2018 19:55:14 -0700 (PDT) Received: from localhost.localdomain (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id z129-v6sm17482561pfb.108.2018.05.14.19.55.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 May 2018 19:55:13 -0700 (PDT) From: Leo Yan To: Wei Xu , Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd , Jassi Brar , Arnd Bergmann , Olof Johansson , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Tao Wang , Leo Yan Subject: [PATCH v2 4/5] arm64: dts: hi3660: Add thermal cooling management Date: Tue, 15 May 2018 10:53:14 +0800 Message-Id: <1526352795-6991-5-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526352795-6991-1-git-send-email-leo.yan@linaro.org> References: <1526352795-6991-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>; + }; + }; + }; + }; }; };