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: 10399817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8138E601C8 for ; Tue, 15 May 2018 02:55:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2152C200DF for ; Tue, 15 May 2018 02:55:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13F3F2842E; Tue, 15 May 2018 02:55:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F245200DF for ; Tue, 15 May 2018 02:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752500AbeEOCzR (ORCPT ); Mon, 14 May 2018 22:55:17 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35377 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752382AbeEOCzO (ORCPT ); Mon, 14 May 2018 22:55:14 -0400 Received: by mail-pf0-f195.google.com with SMTP id x9-v6so6956903pfm.2 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=tbwdydHFcGlwbIeUrVO0uoLIzykTGy1mEOcsWkGeeshNCAy6l0BGs4pVgCg9uPoqb0 4Ea1vwIJe4YXCratwvadFS/5QOQ0PqjxDPkcPIKwJTs8j3X/kZcsBRxBpbHFP7QTip8b fBVzikHAhoSNaFjzbFZ5mhekzfXBaQt0+D74MdI2DwkCg376j6YjsEASvL641f7LcuU4 fNd//0qcUtRxr1juC3qYsLNFTgJ7jnqzvU5BSXHcmzu/SAdtWkOv2W5V+mNUPcx0/Ea/ 4S+a8gQlU21d6jQE9LetPf57lyGkGBMtz5hYx9zFribLsI1BQZQ7o/7z8GmBR8EJr1gH jFSQ== X-Gm-Message-State: ALKqPwcDPvBTqFO6OZCnrRQeU4O/UOTjJiYCNZmxi3+61CqYoECkttB8 Tcd5oAe/6oBqe5+EY2CVzxKoMA== X-Google-Smtp-Source: AB8JxZp4l5pdo4DtraZK9Kv/JvMLgJp0ZslMZ7lEGztxLVEGzKaL0eGE8J5gwEdtMz8gIulY0tYKOg== 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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>; + }; + }; + }; + }; }; };