From patchwork Thu Feb 2 15:08:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 93110 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp142881qgi; Thu, 2 Feb 2017 07:09:14 -0800 (PST) X-Received: by 10.84.168.131 with SMTP id f3mr13251793plb.163.1486048154473; Thu, 02 Feb 2017 07:09:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si17740127pgi.295.2017.02.02.07.09.14; Thu, 02 Feb 2017 07:09:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751873AbdBBPJN (ORCPT + 13 others); Thu, 2 Feb 2017 10:09:13 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:36056 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbdBBPJM (ORCPT ); Thu, 2 Feb 2017 10:09:12 -0500 Received: by mail-pf0-f180.google.com with SMTP id 189so5946975pfu.3 for ; Thu, 02 Feb 2017 07:09:12 -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=bz9sjzDZyUIBjNwYJgZgMs5cG7k/TF35dDzVNkxEnsI=; b=XqwL/Tvr30I7WFZX1dwpO8+W2LRxh29qzhDZxDToFAO3lmsW0QYZMlqL7M0tF5alXs 9KWMEh5TOxlZoX2YRlneVod89SB3d9iWT9HVoEAn4bnri9FovrsH94S3WuK7DC7ZOvL/ O7hZVPH0Ncfrx+LOMbawwxbMZPb0Wh9rVBmeA= 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=bz9sjzDZyUIBjNwYJgZgMs5cG7k/TF35dDzVNkxEnsI=; b=EYcEbAJXvLZgheU8+c6V4A9aHou/QHEbzK9avT9wRqpleb50Vjhq622cKoj3jJFrfY t7xNPa7yfLJo557GWkep6iKsUFHtmEKvYOLQwVE3Bxh3H7Njt9bsIO2ihgW4s0LhQ8rX HudUfUtGRL/AUlJnK/tQd0QTkN41zYzcb30IK6BGg3HrBigVd12S0gRsCRwsQLwNVKyT 2khbhgmdwK+ET7GadolaRrN3FLCuv5ppz8FAyZeV65Ey0LjecHRNRmZHP9kkh5fz8ytC krWQTvGaPWa2kAyEyuVYRu0hlIODV/cxbnHKkJHFbdisXhymyTyZXCkp5syMX2fCLKCW iBLw== X-Gm-Message-State: AIkVDXK1dOa742a3r28jNksowEqbD52SBDjJCaFDVHE9DiT2dGzcpV7qQzhuS88QdYJkm5vY X-Received: by 10.84.131.161 with SMTP id d30mr13211050pld.41.1486048151667; Thu, 02 Feb 2017 07:09:11 -0800 (PST) Received: from localhost.localdomain ([45.56.152.28]) by smtp.gmail.com with ESMTPSA id y6sm59878236pgc.1.2017.02.02.07.08.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Feb 2017 07:09:11 -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 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 v6 1/3] dt: bindings: add documentation for zx2967 family thermal sensor Date: Thu, 2 Feb 2017 23:08:04 +0800 Message-Id: <1486048086-3431-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/zx2967-thermal.txt -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" 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..00c4900 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/zx2967-thermal.txt @@ -0,0 +1,114 @@ +* 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. +- coefficients: Coefficients of thermal sensor, note that those values need to + be multiplied by 1000, consists of: + slope of calibration cure. + offset of calibration cure. +- #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"; + coefficients = <1951 (-922)>; + #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>; + }; + }; + }; + };