devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Xinwei Kong <kong.kongxinwei@hisilicon.com>,
	Wei Xu <xuwei5@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,
	mark.rutland@arm.com, linux-pm@vger.kernel.org,
	dan.zhao@hisilicon.com, devicetree@vger.kernel.org,
	gongyu@hisilicon.com, guodong.xu@linaro.org, robh@kernel.org,
	linuxarm@huawei.com, zhenwei.wang@hisilicon.com,
	leo.yan@linaro.org, mporter@konsulko.com, liguozhu@hisilicon.com
Subject: Re: [PATCH v6 3/3] dts: hi6220: enable thermal sensor for hisilicon SoC
Date: Wed, 3 Jun 2015 16:06:50 -0700	[thread overview]
Message-ID: <20150603230648.GB7640@localhost.localdomain> (raw)
In-Reply-To: <1432120598-18268-4-git-send-email-kong.kongxinwei@hisilicon.com>

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

On Wed, May 20, 2015 at 07:16:38PM +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>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

I have taken the patches containing the driver changes and the
Documentation entry. But this patch needs to go via your your
machine code tree (Wei Xu).

BR,

Eduardo Valentin

> ---
>  arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 124 ++++++++++++++++++++++++++++++
>  1 file changed, 124 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> index 8ade3d9..eb465a6 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> @@ -6,6 +6,7 @@
>  
>  #include <dt-bindings/clock/hi6220-clock.h>
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/thermal/thermal.h>
>  
>  / {
>  	compatible = "hisilicon,hi6220";
> @@ -173,4 +174,127 @@
>  			clock-names = "uartclk", "apb_pclk";
>  		};
>  	};
> +
> +	tsensor: tsensor@0,f7030700 {
> +		compatible = "hisilicon,tsensor";
> +		reg = <0x0 0xf7030700 0x0 0x1000>;
> +		interrupts = <0 7 0x4>;
> +		clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
> +		clock-names = "thermal_clk";
> +		#thermal-sensor-cells = <1>;
> +	};
> +
> +	thermal-zones {
> +		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 */
> +			};
> +		};
> +
> +		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 */
> +			};
> +		};
> +	};
>  };
> -- 
> 1.9.1
> 
> 

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

      reply	other threads:[~2015-06-03 23:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 11:16 [PATCH v6 0/3] 96boards: add thermal senor support to hikey board Xinwei Kong
     [not found] ` <1432120598-18268-1-git-send-email-kong.kongxinwei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2015-05-20 11:16   ` [PATCH v6 1/3] dt-bindings: Document the hi6220 thermal sensor bindings Xinwei Kong
2015-05-20 11:16   ` [PATCH v6 2/3] thermal: hisilicon: add new hisilicon thermal sensor driver Xinwei Kong
     [not found]     ` <1432120598-18268-3-git-send-email-kong.kongxinwei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2015-06-03 23:01       ` Eduardo Valentin
2015-05-20 11:16   ` [PATCH v6 3/3] dts: hi6220: enable thermal sensor for hisilicon SoC Xinwei Kong
2015-06-03 23:06     ` Eduardo Valentin [this message]

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=20150603230648.GB7640@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=xuwei5@hisilicon.com \
    --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).