From patchwork Wed Jan 18 04:42:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 91725 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp841099qgi; Tue, 17 Jan 2017 20:42:55 -0800 (PST) X-Received: by 10.84.170.67 with SMTP id i61mr2128876plb.88.1484714575687; Tue, 17 Jan 2017 20:42:55 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id v123si27134628pfb.245.2017.01.17.20.42.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 20:42:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cTi5F-0007KH-Um; Wed, 18 Jan 2017 04:42:53 +0000 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTi5B-0007H6-Dl for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2017 04:42:51 +0000 Received: by mail-pf0-x231.google.com with SMTP id 189so904389pfu.3 for ; Tue, 17 Jan 2017 20:42:27 -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=knyPW43/GKxt1rIQeXcZPjdzuwItJKIhXokEkTf4HwA=; b=WKuIX+jYQoZiR4XqtwgMGIyeij3UVVUdjXunFNx98kmwgXJSLSGIDvEvT6VIYI/1gV wjvy07IM6t1Z89x8bHj7RQg7XqdeXIR+4LBkBzPG83IU2vTyvGCJJsi540yOdgwxekoJ Pk+YG8XLulErDtluV+QwcoMZAR7Dqm1NXaqYM= 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=knyPW43/GKxt1rIQeXcZPjdzuwItJKIhXokEkTf4HwA=; b=tCCNcqOC9tTdreFDpKFUWXaQhkQ2OwgUWroeqdN2/7+roMhhYl1pWwZjrUEEi8gwte wz9Btn+kI1Z1Mv0S+aJaOaoX3kMbSpRPgXRNHKDjp6Yg7qq/UaL/PV5q6PpmCm2PxUw0 H7gw9iMHtHWjD1bxwMOdZhR68Vy+4NpAAKAH34zJSOlBv7QJDP482DjJaPzPQGA+C/8+ Tyv2pRx+6b6aglDP7PgdtaK5xPRQHAkHADjDP2/p9EldVRcLIydqYZ30AJROG2IZ08qZ d7x5cR1/720JQpWPsf9s81YxZvvcq3wj9WfQ5uL5Ja3L06P5qnuEIEOzoII5A/W5yJuH dIVw== X-Gm-Message-State: AIkVDXIk07QTi67VhkB7oLCu4vYaFsdI0d9wrDWMfOezxfptnsi4JgoA9+lLWEpTkNvv8quB X-Received: by 10.84.197.1 with SMTP id m1mr2137655pld.123.1484714546705; Tue, 17 Jan 2017 20:42:26 -0800 (PST) Received: from localhost.localdomain ([104.237.91.121]) by smtp.gmail.com with ESMTPSA id p26sm32559197pfj.23.2017.01.17.20.42.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 20:42:25 -0800 (PST) From: Baoyou Xie To: jun.nie@linaro.org, rui.zhang@intel.com, edubezval@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v5 1/3] dt: bindings: add documentation for zx2967 family thermal sensor Date: Wed, 18 Jan 2017 12:42:00 +0800 Message-Id: <1484714522-26651-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170117_204249_543535_7EA4A843 X-CRM114-Status: GOOD ( 13.27 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:231 listed in] [list.dnswl.org] 0.0 HK_RANDOM_ENVFROM Envelope sender username looks random -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, xie.baoyou@zte.com.cn, linux-kernel@vger.kernel.org, chen.chaokai@zte.com.cn, wang.qiang01@zte.com.cn, baoyou.xie@linaro.org, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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 | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/zx2967-thermal.txt -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt b/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt new file mode 100644 index 0000000..a96c8b3 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt @@ -0,0 +1,109 @@ +* 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: "gate" for the topcrm clock. + "pclk" for the apb clock. +- #thermal-sensor-cells: must be 0. + +Example for tempsensor: + + tempsensor: tempsensor@148a000 { + compatible = "zte,zx296718-thermal"; + reg = <0x0148a000 0x20>; + clocks = <&topcrm TEMPSENSOR_GATE>, <&audiocrm AUDIO_TS_PCLK>; + clock-names = "gate", "pclk"; + #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>; + + 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>; + }; + }; + }; + };