From patchwork Fri Feb 3 10:10:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 9553777 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 D4B1460405 for ; Fri, 3 Feb 2017 10:12:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4DC82839A for ; Fri, 3 Feb 2017 10:12:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B769128507; Fri, 3 Feb 2017 10:12:00 +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=-5.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, HK_RANDOM_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A82A52839A for ; Fri, 3 Feb 2017 10:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752977AbdBCKL6 (ORCPT ); Fri, 3 Feb 2017 05:11:58 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:36668 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbdBCKL5 (ORCPT ); Fri, 3 Feb 2017 05:11:57 -0500 Received: by mail-pf0-f172.google.com with SMTP id 189so5113375pfu.3 for ; Fri, 03 Feb 2017 02:11:56 -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=sIiE0eeZ76X1ci1njl11k4CMeFKlA6ZAuX77rn7AFoM=; b=NvbwT7BIt7V/eBr1pxAYhTJHUTHDil8RmdHJ5PJVlYL6lpmaQ36nPwwJEyOfHktnQx vATbwp2jfiXAk2SmEGWUX6H3xxqyFUXkJDIdt7/9k75lcW/gWCYmAM6/Z71xHe4Opjzr Myx6aP+uq9mj2R2APe6Ql7HU1r6Atsp1Ap/Q4= 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=sIiE0eeZ76X1ci1njl11k4CMeFKlA6ZAuX77rn7AFoM=; b=B1jPf55AhiC/hVvP6i84e5YxflA6fOdQTtbBJwWvEGai5/BIFSfNH8E0QAhwXA00S5 4fLM5k5KT6bnOVdt70LP/QzY1xBm1wMXknNsdCE5c9QsvMS01OMtQBWvklPw9nb2DdiA igPuLMNIEragZ9fGpwvmahvF0fakk/pR5R38rlZxXbRKfCygCTc/9tCAD/OfLP1gB2N3 TR6prUsRIe5NN37NySXfckCHT1SCIg4DQHCHYfku0jaic1V8oyqbE6cEFJRNbFMxzSfL UL4Fwt8EUZ08QCOX8IB03I9SVmwSTEgsUvdgh+2TTC1jztymwP65OIIRLSvs66+l4k+h /HzQ== X-Gm-Message-State: AIkVDXJ918GmltM/LbTUCv04Pg/k52vMT3IHeR1Cy50/kHADYVOvKlOyuH1zQiZ5NfDKtfFc X-Received: by 10.99.119.200 with SMTP id s191mr17077528pgc.172.1486116716341; Fri, 03 Feb 2017 02:11:56 -0800 (PST) Received: from localhost.localdomain ([104.237.91.48]) by smtp.gmail.com with ESMTPSA id m29sm65598967pfi.54.2017.02.03.02.11.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 02:11:55 -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 v7 1/3] dt: bindings: add documentation for zx2967 family thermal sensor Date: Fri, 3 Feb 2017 18:10:53 +0800 Message-Id: <1486116655-24111-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 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..169a699 --- /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: "gate" for the topcrm clock. + "pclk" 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 = "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>; + /* + * both slope and offset 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>; + }; + }; + }; + };