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: 93341 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp874481qgi; Fri, 3 Feb 2017 19:40:57 -0800 (PST) X-Received: by 10.99.209.85 with SMTP id c21mr433947pgj.147.1486179657617; Fri, 03 Feb 2017 19:40:57 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23si27273550plk.205.2017.02.03.19.40.57; Fri, 03 Feb 2017 19:40:57 -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 S1753514AbdBDDk4 (ORCPT + 7 others); Fri, 3 Feb 2017 22:40:56 -0500 Received: from mail-pg0-f50.google.com ([74.125.83.50]:33948 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753413AbdBDDkz (ORCPT ); Fri, 3 Feb 2017 22:40:55 -0500 Received: by mail-pg0-f50.google.com with SMTP id 14so11723344pgg.1 for ; Fri, 03 Feb 2017 19:40: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=cleP/d3RmvcsNPt3pem5hKfOP8LBIqvYKOL2GM74OVDJVIADfzVlvGwt78YTEc9z+6 7jQkmMc9Xx3Zzse6T92NXJhWGbAMDx9aAI5MH5EwbSO7dz3VFnJ6UtgUjF7mM17y9aS9 NKyvR0wmFji2L56OSa9cxQS2JS4lrsxoTm5jCD1pAJ6JhctaQFjDe5pRYoOWl7+muVmW 5K38oepwRQIE4h0sNNW/wTEsR88WvewqF3g8wbBFwa6FAawvaduO5JntHnss7wFk4GrF aPhRgWvT2Jlwa8qoRlANCm8KWgDK496cozJXLzaK3/vEal4D9xHHdEOZG1FMFtHwd+9C 1CSQ== X-Gm-Message-State: AIkVDXJWfKVlDYsFs7PCnJRcWg3DnwJkm+A6RVsoy8LbJjM1SrcLNoRlwR8O5fN60aV7thxQ 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 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 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 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 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>; + }; + }; + }; + };