From patchwork Tue Feb 7 00:56:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 93496 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1970265qgi; Mon, 6 Feb 2017 16:58:11 -0800 (PST) X-Received: by 10.84.134.169 with SMTP id 38mr21562204plh.67.1486429091277; Mon, 06 Feb 2017 16:58:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k187si2296772pga.230.2017.02.06.16.58.11; Mon, 06 Feb 2017 16:58:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684AbdBGA6J (ORCPT + 7 others); Mon, 6 Feb 2017 19:58:09 -0500 Received: from mail-pg0-f53.google.com ([74.125.83.53]:36418 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618AbdBGA6I (ORCPT ); Mon, 6 Feb 2017 19:58:08 -0500 Received: by mail-pg0-f53.google.com with SMTP id v184so33022578pgv.3 for ; Mon, 06 Feb 2017 16:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Nr3g6Ob6yuAp+jdmPXgDKE1sALERrj4AaNGpLF9xOdQ=; b=f1YfUwhdVfWx2Hahf8MgJ1zHJk6omM5KUmDZCWlDqC59cO3zmGvFzZsLW7xhSwmH3n vEyIJ4fyQFxTR292t9mEeV+mZ8cUWt8h8r/FpSBsYlpxsQiNVZiiCU5K/uTF/3lp1qq9 zADBbB1L/t36X3zevEq6RYb85qJIVOkxN2LCw= 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; bh=Nr3g6Ob6yuAp+jdmPXgDKE1sALERrj4AaNGpLF9xOdQ=; b=hxOkcJSFWwfuYZxTLVl2s6fibbeI4kkhQMk8G8dt0pPXpx2MB2ycclzY73GrbO9eER 34ibF0wijeXg+jE+GIwXs9d5nyTLiElZ8BGmqOKRq+wx/VwMRJh5zJi4fiKHkMDj6tKP KrlH+OryWCaCqlhqkAHD5EGwnGvuqysEQmjaN+QU79/+hEAi3SMN+gnLbwBubwy4MXXl nTNOIzrzSJKI5V8+DkbQm1YOiyMMo6kp2xB6VDXlb2Iv80HKtl45FFt2HvF1xopY5NbN vbVtGYnYcx6bStvHEY65s5e8XIjPESM2H0QjXfheLQCGe4GDfqnm4TsRXqIrRid265uv 6PwA== X-Gm-Message-State: AIkVDXIlb4MVhgCEVggM+HxOUB9ueRKGgi7k9GPnS3hlqFJWNPduOY6F4r6O12w7RRltDPnW X-Received: by 10.84.232.78 with SMTP id f14mr21787397pln.27.1486429087832; Mon, 06 Feb 2017 16:58:07 -0800 (PST) Received: from localhost.localdomain ([104.237.91.105]) by smtp.gmail.com with ESMTPSA id z74sm5423255pfd.70.2017.02.06.16.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 16:58:06 -0800 (PST) From: Baoyou Xie To: mathieu.poirier@linaro.org, jun.nie@linaro.org, rui.zhang@intel.com, edubezval@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, shawnguo@kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, chen.chaokai@zte.com.cn, wang.qiang01@zte.com.cn Subject: [PATCH v9 1/3] dt: bindings: add documentation for zx2967 family thermal sensor Date: Tue, 7 Feb 2017 08:56:39 +0800 Message-Id: <1486429001-31940-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds dt-binding documentation for zx2967 family thermal sensor. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Reviewed-by: Shawn Guo --- .../devicetree/bindings/thermal/zx2967-thermal.txt | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/zx2967-thermal.txt -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Mathieu Poirier diff --git a/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt b/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt new file mode 100644 index 0000000..0810644 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt @@ -0,0 +1,116 @@ +* ZTE zx2967 family Thermal + +Required Properties: +- compatible: should be one of the following. + * zte,zx296718-thermal +- reg: physical base address of the controller and length of memory mapped + region. +- clocks : Pairs of phandle and specifier referencing the controller's clocks. +- clock-names: "topcrm" for the topcrm clock. + "apb" for the apb clock. +- #thermal-sensor-cells: must be 0. + +Please note: slope coefficient defined in thermal-zones section need to be +multiplied by 1000. + +Example for tempsensor: + + tempsensor: tempsensor@148a000 { + compatible = "zte,zx296718-thermal"; + reg = <0x0148a000 0x20>; + clocks = <&topcrm TEMPSENSOR_GATE>, <&audiocrm AUDIO_TS_PCLK>; + clock-names = "topcrm", "apb"; + #thermal-sensor-cells = <0>; + }; + +Example for cooling device: + + cooling_dev: cooling_dev { + cluster0_cooling_dev: cluster0-cooling-dev { + #cooling-cells = <2>; + cpumask = <0xf>; + capacitance = <1500>; + }; + + cluster1_cooling_dev: cluster1-cooling-dev { + #cooling-cells = <2>; + cpumask = <0x30>; + capacitance = <2000>; + }; + }; + +Example for thermal zones: + + thermal-zones { + zx296718_thermal: zx296718_thermal { + polling-delay-passive = <500>; + polling-delay = <1000>; + sustainable-power = <6500>; + + thermal-sensors = <&tempsensor 0>; + /* + * slope need to be multiplied by 1000. + */ + coefficients = <1951 (-922)>; + + trips { + trip0: switch_on_temperature { + temperature = <90000>; + hysteresis = <2000>; + type = "passive"; + }; + + trip1: desired_temperature { + temperature = <100000>; + hysteresis = <2000>; + type = "passive"; + }; + + crit: critical_temperature { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&gpu 2 5>; + }; + + map1 { + trip = <&trip0>; + cooling-device = <&cluster0_cooling_dev 1 2>; + }; + + map2 { + trip = <&trip1>; + cooling-device = <&cluster0_cooling_dev 1 2>; + }; + + map3 { + trip = <&crit>; + cooling-device = <&cluster0_cooling_dev 1 2>; + }; + + map4 { + trip = <&trip0>; + cooling-device = <&cluster1_cooling_dev 1 2>; + contribution = <9000>; + }; + + map5 { + trip = <&trip1>; + cooling-device = <&cluster1_cooling_dev 1 2>; + contribution = <4096>; + }; + + map6 { + trip = <&crit>; + cooling-device = <&cluster1_cooling_dev 1 2>; + contribution = <4096>; + }; + }; + }; + }; From patchwork Tue Feb 7 00:56:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 93497 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1970339qgi; Mon, 6 Feb 2017 16:58:24 -0800 (PST) X-Received: by 10.98.153.25 with SMTP id d25mr16677984pfe.15.1486429104381; Mon, 06 Feb 2017 16:58:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si2289876pli.308.2017.02.06.16.58.24; Mon, 06 Feb 2017 16:58:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752744AbdBGA6Q (ORCPT + 7 others); Mon, 6 Feb 2017 19:58:16 -0500 Received: from mail-pg0-f42.google.com ([74.125.83.42]:34567 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752671AbdBGA6P (ORCPT ); Mon, 6 Feb 2017 19:58:15 -0500 Received: by mail-pg0-f42.google.com with SMTP id 14so33062790pgg.1 for ; Mon, 06 Feb 2017 16:58:15 -0800 (PST) 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=WBOKqYTXmqi8+w3OdXZZ34+bP8LnnNwpPPCsczTdAd4=; b=OOs4f9G7+88OtKc27rmegz0K7evLI6w+ZK+Dt6dlZl/Tif0jcGr0V0oFJ1pOvQU/3g GNbL+qnzF4Tx0bsyn7yxlOp0BZGp2jQjTK9cs6QLxDH4+wYT7GMySpLunUUuw5WYkMSE Es0oLMFfMpHpkBi0zBRuIoWC7IET4OVOa8JvE= 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=WBOKqYTXmqi8+w3OdXZZ34+bP8LnnNwpPPCsczTdAd4=; b=qzrNYEmORwq/BxvqXQ68Rvp44IAO/jdGI7m/V0tYmLglLW65fa8z7t0o5VQzyqK8in +k3X5HYaAbKyz9RlQnux2shQraF8HjwfCbatntMNJ2mi891ElEYOxSZv4ICzkRp4FO9f 4nSDa7NyudLKhNExga7rjZrAhFMeTss/4Va01yBdZBSLXgKuT/8j7c2IbSRT5R6his0q y5Ha3hfb77hC8c9q5tClrSrA6PBIbC6EE2Ccc7kG0T41IVEZo8iVGhEgLOamJf7hCKQG 87C06Rt2xiqetkpr4H9ndkZkF6Jc4q1RiF9h0SkJRhhdWOYPu9mtbdo0aGrtD6scdm86 ZTZQ== X-Gm-Message-State: AIkVDXLsaNqoBoY9Myfg7Ww4D56ebcf1PxK5YuGCyoLOBBVn6rS5thYVqM6pM93Ct8AbMXoO X-Received: by 10.99.181.66 with SMTP id u2mr17059264pgo.164.1486429094569; Mon, 06 Feb 2017 16:58:14 -0800 (PST) Received: from localhost.localdomain ([104.237.91.105]) by smtp.gmail.com with ESMTPSA id z74sm5423255pfd.70.2017.02.06.16.58.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 16:58:14 -0800 (PST) From: Baoyou Xie To: mathieu.poirier@linaro.org, jun.nie@linaro.org, rui.zhang@intel.com, edubezval@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, shawnguo@kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, chen.chaokai@zte.com.cn, wang.qiang01@zte.com.cn Subject: [PATCH v9 2/3] MAINTAINERS: add zx2967 thermal drivers to ARM ZTE architecture Date: Tue, 7 Feb 2017 08:56:40 +0800 Message-Id: <1486429001-31940-2-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486429001-31940-1-git-send-email-baoyou.xie@linaro.org> References: <1486429001-31940-1-git-send-email-baoyou.xie@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the zx2967 thermal drivers as maintained by ARM ZTE architecture maintainers, as they're parts of the core IP. Signed-off-by: Baoyou Xie --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/MAINTAINERS b/MAINTAINERS index 4e81e2b..2a84440 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1990,11 +1990,13 @@ F: drivers/clk/zte/ F: drivers/i2c/busses/i2c-zx2967.c F: drivers/reset/reset-zx2967.c F: drivers/soc/zte/ +F: drivers/thermal/zx* F: Documentation/devicetree/bindings/arm/zte.txt F: Documentation/devicetree/bindings/clock/zx296702-clk.txt F: Documentation/devicetree/bindings/i2c/i2c-zx2967.txt F: Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt F: Documentation/devicetree/bindings/soc/zte/ +F: Documentation/devicetree/bindings/thermal/zx* F: include/dt-bindings/soc/zx*.h ARM/ZYNQ ARCHITECTURE