devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: rui.zhuang@intel.com, amit.kucheria@linaro.org,
	punit.agrawal@arm.com, Javi.Merino@arm.com,
	jorge.ramirez-ortiz@linaro.org, haojian.zhuang@linaro.org,
	linux-pm@vger.kernel.org, dan.zhao@hisilicon.com,
	devicetree@vger.kernel.org, gongyu@hisilicon.com,
	guodong.xu@linaro.org, robh@kernel.org, mark.rutland@arm.com,
	linuxarm@huawei.com, zhenwei.wang@hisilicon.com,
	leo.yan@linaro.org, mporter@konsulko.com,
	zhangfei.gao@linaro.org, liguozhu@hisilicon.com
Subject: Re: [PATCH v5 3/3] dts: hi6220: enable thermal sensor for hisilicon SoC
Date: Tue, 19 May 2015 21:51:01 -0700	[thread overview]
Message-ID: <20150520045100.GB4295@localhost.localdomain> (raw)
In-Reply-To: <1431933109-22764-4-git-send-email-kong.kongxinwei@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 4245 bytes --]

On Mon, May 18, 2015 at 03:11:49PM +0800, Xinwei Kong wrote:
> From: kongxinwei <kong.kongxinwei@hisilicon.com>
> 
> Dts includes two part: the first part is related with thermal sensor;
> the second part is related with thermal zones, in this part it will
> define the thermal zones and which sensor device should be bound to.
> it also need specify the polling interval for every thermal zone.
> 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: kongxinwei <kong.kongxinwei@hisilicon.com>
> ---
>  arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 127 ++++++++++++++++++++++++++++++
>  1 file changed, 127 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> new file mode 100644
> index 0000000..82f213d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> @@ -0,0 +1,127 @@
> +
> +#include <dt-bindings/thermal/thermal.h>
> +
> +/ {
> +
> +	tsensor: tsensor@0,f7030700 {
> +		compatible = "hisilicon,tsensor";
> +		reg = <0x0 0xf7030700 0x0 0x1000>;
> +		interrupts = <0 7 0x4>;
> +		clocks = <&clock_sys HI6220_TSENSOR_CLK>;
> +		clock-names = "thermal_clk";
> +		#thermal-sensor-cells = <1>;
> +
> +	thermal-zones {

The thermal-zones node is typically in the root node, not inside the
sensor node.

> +		local: local {
> +			/* milliseconds */
> +			polling-delay-passive = <1000>;
> +			/* milliseconds */
> +			polling-delay = <5000>;
> +
> +			/* sensor	ID */
> +			thermal-sensors = <&tsensor  0>;
> +
> +			trips {
> +				local_alert: local_alert {
> +					/* millicelsius */
> +					temperature = <70000>;
> +					/* millicelsius */
> +					hysteresis = <2000>;
> +					type = "passive";
> +				};
> +				local_crit: local_crit {
> +					temperature = <90000>;
> +					hysteresis = <2000>;
> +					type = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +				/* There are currently no cooling maps
> +				because there are no cooling devices */

Not even cpufreq? in your driver you mention about cpufreq cooling.

Do you have cpufreq-dt driver  properly setup in your board?

> +			};
> +		};
> +
> +		cluster1: cluster1 {
> +			polling-delay-passive = <1000>;
> +			polling-delay = <5000>;
> +
> +			/* sensor	ID */
> +			thermal-sensors = <&tsensor  1>;
> +
> +			trips {
> +				cluster1_alert: cluster1_alert {
> +					temperature = <70000>;
> +					hysteresis = <2000>;
> +					type = "passive";
> +				};
> +				cluster1_crit: cluster1_crit {
> +					temperature = <90000>;
> +					hysteresis = <2000>;
> +					type = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +				/* There are currently no cooling maps
> +				because there are no cooling devices */
> +			};
> +		};
> +
> +		cluster0: cluster0 {
> +			polling-delay-passive = <1000>;
> +			polling-delay = <5000>;
> +
> +			/* sensor	ID */
> +			thermal-sensors = <&tsensor  2>;
> +
> +			trips {
> +				cluster0_alert: cluster0_alert {
> +					temperature = <70000>;
> +					hysteresis = <2000>;
> +					type = "passive";
> +				};
> +				cluster0_crit: cluster0_crit {
> +					temperature = <90000>;
> +					hysteresis = <2000>;
> +					type = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +				map0 {
> +					trip = <&cluster0_alert>;
> +					cooling-device =
> +					    <&cpu0 THERMAL_NO_LIMIT
> +						THERMAL_NO_LIMIT>;
> +				};
> +			};
> +		};
> +
> +		gpu: gpu {
> +			polling-delay-passive = <1000>;
> +			polling-delay = <5000>;
> +
> +			/* sensor	ID */
> +			thermal-sensors = <&tsensor  3>;
> +
> +			trips {
> +				gpu_alert: gpu_alert {
> +					temperature = <70000>;
> +					hysteresis = <2000>;
> +					type = "passive";
> +				};
> +				gpu_crit: gpu_crit {
> +					temperature = <90000>;
> +					hysteresis = <2000>;
> +					type = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +				/* There are currently no cooling maps
> +				because there are no cooling devices */
> +			};
> +		};
> +	};
> +}

Are you sure this DT file works? I think it misses a closing \}.

> -- 
> 1.9.1
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2015-05-20  4:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18  7:11 [PATCH v5 0/3] 96boards: add thermal senor support to hikey board Xinwei Kong
2015-05-18  7:11 ` [PATCH v5 1/3] dt-bindings: Document the hi6220 thermal sensor bindings Xinwei Kong
2015-05-20  1:06   ` Leo Yan
2015-05-18  7:11 ` [PATCH v5 2/3] thermal: hisilicon: add new hisilicon thermal sensor driver Xinwei Kong
     [not found]   ` <1431933109-22764-3-git-send-email-kong.kongxinwei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2015-05-20  4:46     ` Eduardo Valentin
     [not found]       ` <20150520044638.GA4295-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-05-20  3:23         ` Xinwei Kong
2015-05-18  7:11 ` [PATCH v5 3/3] dts: hi6220: enable thermal sensor for hisilicon SoC Xinwei Kong
2015-05-20  4:51   ` Eduardo Valentin [this message]
2015-05-20  3:02     ` Xinwei Kong
2015-05-20  3:02     ` Leo Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150520045100.GB4295@localhost.localdomain \
    --to=edubezval@gmail.com \
    --cc=Javi.Merino@arm.com \
    --cc=amit.kucheria@linaro.org \
    --cc=dan.zhao@hisilicon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gongyu@hisilicon.com \
    --cc=guodong.xu@linaro.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=jorge.ramirez-ortiz@linaro.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=leo.yan@linaro.org \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mporter@konsulko.com \
    --cc=punit.agrawal@arm.com \
    --cc=robh@kernel.org \
    --cc=rui.zhuang@intel.com \
    --cc=zhangfei.gao@linaro.org \
    --cc=zhenwei.wang@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).