From patchwork Sat Feb 4 03:39:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 9555491 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 8D9F0604E2 for ; Sat, 4 Feb 2017 03:42:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7413627E33 for ; Sat, 4 Feb 2017 03:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66D7528135; Sat, 4 Feb 2017 03:42:30 +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=-0.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, HK_RANDOM_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD6B927E33 for ; Sat, 4 Feb 2017 03:42:29 +0000 (UTC) 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 1cZrF1-00084Y-3J; Sat, 04 Feb 2017 03:42:23 +0000 Received: from mail-pg0-f51.google.com ([74.125.83.51]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cZrEv-00083h-Lj for linux-arm-kernel@lists.infradead.org; Sat, 04 Feb 2017 03:42:20 +0000 Received: by mail-pg0-f51.google.com with SMTP id 14so11723342pgg.1 for ; Fri, 03 Feb 2017 19:41:55 -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=vAPvP798UWGBKvyZb9rJ5OpucsnE/sSvsGJSLIO0gDo=; b=Zaq8/rpB2qrMBois7kr2e+o6tMUKxZ85K/OPnhQvmcXMzYKEh1yZLaZj2RqhN5GHT0 v6ZWZR4Ve+wljkPqPv635DbGcfTRcIkdPjhkvh83aq2vdLOCnYtv4jgNdtjRnOylFDAS hEjBrxwh0+hj98Vk6Yk/kipwcKc7qarkA0RZ8= 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=vAPvP798UWGBKvyZb9rJ5OpucsnE/sSvsGJSLIO0gDo=; b=uC37guSwJxedN/xjpl2G1bYx2ilez3KH5BMf+e3RRYZPcMxg03D61/5BJ/MKbo46jn t/wBL7B2dYO5f7sN3AiO+MJVWuPAxHZaCC+N5G+JcL0V/Q55OB5Z9GYX8avRh1aF8JOP 8lmtoqn/pNzUrwLpIY2u0vAvKvqL4Gd99vRqgHxVmB24gcf+UV5BhrVmsmrPgrF7edM3 wKu6TxME3GNPO5W/qumB2QPvYZQ2Ad0IxnAA/X7DfSwzbJvi9rX4ayZs7BrI7EGoVEha 77ySBF15Q/s+nOjqN9MUhjW2x5RP4psWxN0BkOSdvKDqU3OKm+uVRRLtNTIIkdFHQ3gB Fi0g== X-Gm-Message-State: AIkVDXK/IT32/lIxctaicXaAagK77HyN6/8hHSr76qCgq/Irmni7I2+TDS1tebB7C/kXDGWJ X-Received: by 10.84.218.77 with SMTP id f13mr569480plm.141.1486179654922; Fri, 03 Feb 2017 19:40:54 -0800 (PST) Received: from localhost.localdomain ([104.237.91.15]) by smtp.gmail.com with ESMTPSA id e127sm70330673pfh.89.2017.02.03.19.40.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 19:40:54 -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 Subject: [PATCH v8 1/3] dt: bindings: add documentation for zx2967 family thermal sensor Date: Sat, 4 Feb 2017 11:39:55 +0800 Message-Id: <1486179597-30953-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-20170203_194217_746784_E5645127 X-CRM114-Status: GOOD ( 12.87 ) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: coefficients 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>; + }; + }; + }; + };