* [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name
[not found] <1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org>
@ 2018-09-25 9:03 ` Daniel Lezcano
2018-10-15 16:28 ` Rob Herring
2018-09-25 9:03 ` [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors Daniel Lezcano
2018-09-25 9:03 ` [PATCH 13/14] ARM64: dts: hisilicon: Add dual clusters thermal zones for hi3660 Daniel Lezcano
2 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2018-09-25 9:03 UTC (permalink / raw)
To: edubezval
Cc: linux-kernel, linux-pm, daniel.lezcano, leo.yan, Zhang Rui,
Rob Herring, Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
Add the interrupt names for the sensors, so the code can rely on them
instead of dealing with index which are prone to error.
The name comes from the Hisilicon documentation found on internet.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
.../bindings/thermal/hisilicon-thermal.txt | 3 ++
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 63 +++++++++++-----------
arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 +
3 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
index cef716a..3edfae3 100644
--- a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
@@ -7,6 +7,7 @@
region.
- interrupt: The interrupt number to the cpu. Defines the interrupt used
by /SOCTHERM/tsensor.
+- interrupt-names: The interrupt names for the different sensors
- clock-names: Input clock name, should be 'thermal_clk'.
- clocks: phandles for clock specified in "clock-names" property.
- #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.
@@ -18,6 +19,7 @@ for Hi6220:
compatible = "hisilicon,tsensor";
reg = <0x0 0xf7030700 0x0 0x1000>;
interrupts = <0 7 0x4>;
+ interrupt-names = "tsensor_intr";
clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
clock-names = "thermal_clk";
#thermal-sensor-cells = <1>;
@@ -28,5 +30,6 @@ for Hi3660:
compatible = "hisilicon,hi3660-tsensor";
reg = <0x0 0xfff30000 0x0 0x1000>;
interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tsensor_a73";
#thermal-sensor-cells = <1>;
};
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index f432b0a..bf8a479 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -1081,46 +1081,47 @@
compatible = "hisilicon,hi3660-tsensor";
reg = <0x0 0xfff30000 0x0 0x1000>;
interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tsensor_a73";
#thermal-sensor-cells = <1>;
};
- thermal-zones {
+ thermal-zones {
- cls0: cls0 {
- polling-delay = <1000>;
- polling-delay-passive = <100>;
- sustainable-power = <4500>;
+ cls0: cls0 {
+ polling-delay = <1000>;
+ polling-delay-passive = <100>;
+ sustainable-power = <4500>;
- /* sensor ID */
- thermal-sensors = <&tsensor 1>;
+ /* sensor ID */
+ thermal-sensors = <&tsensor 1>;
- trips {
- threshold: trip-point@0 {
- temperature = <65000>;
- hysteresis = <1000>;
- type = "passive";
- };
+ trips {
+ threshold: trip-point@0 {
+ temperature = <65000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
- target: trip-point@1 {
- temperature = <75000>;
- hysteresis = <1000>;
- type = "passive";
- };
- };
+ target: trip-point@1 {
+ temperature = <75000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
- cooling-maps {
+ cooling-maps {
map0 {
- trip = <&target>;
- contribution = <1024>;
- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
- };
+ trip = <&target>;
+ contribution = <1024>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
map1 {
- trip = <&target>;
- contribution = <512>;
- cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
- };
- };
- };
- };
+ trip = <&target>;
+ contribution = <512>;
+ cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
};
};
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 247024d..9eae986 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -841,6 +841,7 @@
compatible = "hisilicon,tsensor";
reg = <0x0 0xf7030700 0x0 0x1000>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tsensor_intr";
clocks = <&sys_ctrl 22>;
clock-names = "thermal_clk";
#thermal-sensor-cells = <1>;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name
2018-09-25 9:03 ` [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name Daniel Lezcano
@ 2018-10-15 16:28 ` Rob Herring
2018-10-15 18:01 ` Daniel Lezcano
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2018-10-15 16:28 UTC (permalink / raw)
To: Daniel Lezcano
Cc: edubezval, linux-kernel, linux-pm, leo.yan, Zhang Rui,
Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
On Tue, Sep 25, 2018 at 11:03:06AM +0200, Daniel Lezcano wrote:
> Add the interrupt names for the sensors, so the code can rely on them
> instead of dealing with index which are prone to error.
>
> The name comes from the Hisilicon documentation found on internet.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> .../bindings/thermal/hisilicon-thermal.txt | 3 ++
> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 63 +++++++++++-----------
> arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 +
> 3 files changed, 36 insertions(+), 31 deletions(-)
Lots of whitespace errors reported by checkpatch.pl.
>
> diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
> index cef716a..3edfae3 100644
> --- a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
> @@ -7,6 +7,7 @@
> region.
> - interrupt: The interrupt number to the cpu. Defines the interrupt used
> by /SOCTHERM/tsensor.
> +- interrupt-names: The interrupt names for the different sensors
Need to define what the names are.
> - clock-names: Input clock name, should be 'thermal_clk'.
> - clocks: phandles for clock specified in "clock-names" property.
> - #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.
> @@ -18,6 +19,7 @@ for Hi6220:
> compatible = "hisilicon,tsensor";
> reg = <0x0 0xf7030700 0x0 0x1000>;
> interrupts = <0 7 0x4>;
> + interrupt-names = "tsensor_intr";
That name seems pretty pointless.
> clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
> clock-names = "thermal_clk";
> #thermal-sensor-cells = <1>;
> @@ -28,5 +30,6 @@ for Hi3660:
> compatible = "hisilicon,hi3660-tsensor";
> reg = <0x0 0xfff30000 0x0 0x1000>;
> interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "tsensor_a73";
Just 'a73' is sufficient.
> #thermal-sensor-cells = <1>;
> };
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name
2018-10-15 16:28 ` Rob Herring
@ 2018-10-15 18:01 ` Daniel Lezcano
2018-10-16 14:44 ` Rob Herring
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2018-10-15 18:01 UTC (permalink / raw)
To: Rob Herring
Cc: edubezval, linux-kernel, linux-pm, leo.yan, Zhang Rui,
Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
Hi Rob,
thanks for the review.
On 15/10/2018 18:28, Rob Herring wrote:
> On Tue, Sep 25, 2018 at 11:03:06AM +0200, Daniel Lezcano wrote:
>> Add the interrupt names for the sensors, so the code can rely on them
>> instead of dealing with index which are prone to error.
>>
>> The name comes from the Hisilicon documentation found on internet.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>> .../bindings/thermal/hisilicon-thermal.txt | 3 ++
>> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 63 +++++++++++-----------
>> arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 +
>> 3 files changed, 36 insertions(+), 31 deletions(-)
>
> Lots of whitespace errors reported by checkpatch.pl.
Yeah, I don't know why but I have something bad with my emacs
configuration when changing DT files. Will look at this.
>> diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
>> index cef716a..3edfae3 100644
>> --- a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
>> +++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
>> @@ -7,6 +7,7 @@
>> region.
>> - interrupt: The interrupt number to the cpu. Defines the interrupt used
>> by /SOCTHERM/tsensor.
>> +- interrupt-names: The interrupt names for the different sensors
>
> Need to define what the names are.
>
>> - clock-names: Input clock name, should be 'thermal_clk'.
>> - clocks: phandles for clock specified in "clock-names" property.
>> - #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.
>> @@ -18,6 +19,7 @@ for Hi6220:
>> compatible = "hisilicon,tsensor";
>> reg = <0x0 0xf7030700 0x0 0x1000>;
>> interrupts = <0 7 0x4>;
>> + interrupt-names = "tsensor_intr";
>
> That name seems pretty pointless.
>
>> clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
>> clock-names = "thermal_clk";
>> #thermal-sensor-cells = <1>;
>> @@ -28,5 +30,6 @@ for Hi3660:
>> compatible = "hisilicon,hi3660-tsensor";
>> reg = <0x0 0xfff30000 0x0 0x1000>;
>> interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
>> + interrupt-names = "tsensor_a73";
>
> Just 'a73' is sufficient.
This is the name defined in the board documentation to give a name to
the interrupt when requesting it. This one appears in /proc/interrupts.
I can replace the 'tsensor_intr' by 'tsensor', but if 'tsensor_a73' is
replaced by 'a73' that may looks odd in /proc/interrupts to see an
interrupts line with the 'a73' name.
However this is the preparation for the multiple sensors support so we
will have more interrupt names.
Is it possible to keep these names ?
- tsensor
- tsensor_a73
- tsensor_a57
- tsensor_gpu
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name
2018-10-15 18:01 ` Daniel Lezcano
@ 2018-10-16 14:44 ` Rob Herring
2018-10-16 15:12 ` Daniel Lezcano
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2018-10-16 14:44 UTC (permalink / raw)
To: Daniel Lezcano
Cc: Eduardo Valentin, linux-kernel@vger.kernel.org, open list:THERMAL,
Leo Yan, Zhang Rui, Mark Rutland, Wei Xu, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
On Mon, Oct 15, 2018 at 1:01 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
>
> Hi Rob,
>
> thanks for the review.
>
> On 15/10/2018 18:28, Rob Herring wrote:
> > On Tue, Sep 25, 2018 at 11:03:06AM +0200, Daniel Lezcano wrote:
> >> Add the interrupt names for the sensors, so the code can rely on them
> >> instead of dealing with index which are prone to error.
[...]
> >> + interrupt-names = "tsensor_intr";
> >
> > That name seems pretty pointless.
> >
> >> clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
> >> clock-names = "thermal_clk";
> >> #thermal-sensor-cells = <1>;
> >> @@ -28,5 +30,6 @@ for Hi3660:
> >> compatible = "hisilicon,hi3660-tsensor";
> >> reg = <0x0 0xfff30000 0x0 0x1000>;
> >> interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> >> + interrupt-names = "tsensor_a73";
> >
> > Just 'a73' is sufficient.
>
> This is the name defined in the board documentation to give a name to
> the interrupt when requesting it. This one appears in /proc/interrupts.
>
> I can replace the 'tsensor_intr' by 'tsensor', but if 'tsensor_a73' is
> replaced by 'a73' that may looks odd in /proc/interrupts to see an
> interrupts line with the 'a73' name.
Sounds like a Linux problem, not DT...
The thing is that any *-names property is supposed to be a local to
block name. For example, a UART may have a TX irq. It's local name is
just "TX IRQ", but then upstream at the interrupt controller it may be
"UART1 TX IRQ". If you have multiple instances, the local names are
the same.
If we lose the node name from /proc/interrupts when interrupt-names is
used, then we should fix that.
>
> However this is the preparation for the multiple sensors support so we
> will have more interrupt names.
>
> Is it possible to keep these names ?
>
> - tsensor
> - tsensor_a73
> - tsensor_a57
> - tsensor_gpu
>
>
>
>
> --
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name
2018-10-16 14:44 ` Rob Herring
@ 2018-10-16 15:12 ` Daniel Lezcano
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2018-10-16 15:12 UTC (permalink / raw)
To: Rob Herring
Cc: Eduardo Valentin, linux-kernel@vger.kernel.org, open list:THERMAL,
Leo Yan, Zhang Rui, Mark Rutland, Wei Xu, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
On 16/10/2018 16:44, Rob Herring wrote:
> On Mon, Oct 15, 2018 at 1:01 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>>
>> Hi Rob,
>>
>> thanks for the review.
>>
>> On 15/10/2018 18:28, Rob Herring wrote:
>>> On Tue, Sep 25, 2018 at 11:03:06AM +0200, Daniel Lezcano wrote:
>>>> Add the interrupt names for the sensors, so the code can rely on them
>>>> instead of dealing with index which are prone to error.
>
> [...]
>
>>>> + interrupt-names = "tsensor_intr";
>>>
>>> That name seems pretty pointless.
>>>
>>>> clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
>>>> clock-names = "thermal_clk";
>>>> #thermal-sensor-cells = <1>;
>>>> @@ -28,5 +30,6 @@ for Hi3660:
>>>> compatible = "hisilicon,hi3660-tsensor";
>>>> reg = <0x0 0xfff30000 0x0 0x1000>;
>>>> interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
>>>> + interrupt-names = "tsensor_a73";
>>>
>>> Just 'a73' is sufficient.
>>
>> This is the name defined in the board documentation to give a name to
>> the interrupt when requesting it. This one appears in /proc/interrupts.
>>
>> I can replace the 'tsensor_intr' by 'tsensor', but if 'tsensor_a73' is
>> replaced by 'a73' that may looks odd in /proc/interrupts to see an
>> interrupts line with the 'a73' name.
>
> Sounds like a Linux problem, not DT...
>
> The thing is that any *-names property is supposed to be a local to
> block name. For example, a UART may have a TX irq. It's local name is
> just "TX IRQ", but then upstream at the interrupt controller it may be
> "UART1 TX IRQ". If you have multiple instances, the local names are
> the same.
>
> If we lose the node name from /proc/interrupts when interrupt-names is
> used, then we should fix that.
Ah, ok. It makes more sense for me now. Thanks for the explanation, .
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors
[not found] <1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org>
2018-09-25 9:03 ` [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name Daniel Lezcano
@ 2018-09-25 9:03 ` Daniel Lezcano
2018-10-15 16:31 ` Rob Herring
2018-09-25 9:03 ` [PATCH 13/14] ARM64: dts: hisilicon: Add dual clusters thermal zones for hi3660 Daniel Lezcano
2 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2018-09-25 9:03 UTC (permalink / raw)
To: edubezval
Cc: linux-kernel, linux-pm, daniel.lezcano, leo.yan, Zhang Rui,
Rob Herring, Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
Add the missing interrupts for the temperature sensors as well as
their names.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 8 ++++++--
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
index 3edfae3..4cb8add 100644
--- a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
@@ -29,7 +29,11 @@ for Hi3660:
tsensor: tsensor@fff30000 {
compatible = "hisilicon,hi3660-tsensor";
reg = <0x0 0xfff30000 0x0 0x1000>;
- interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "tsensor_a73";
+ interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tsensor_a73", "tsensor_a53",
+ "tsensor_g3d", "tsensor_modem";
#thermal-sensor-cells = <1>;
};
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index bf8a479..dd398cb 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -1080,8 +1080,12 @@
tsensor: tsensor@fff30000 {
compatible = "hisilicon,hi3660-tsensor";
reg = <0x0 0xfff30000 0x0 0x1000>;
- interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "tsensor_a73";
+ interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tsensor_a73", "tsensor_a53",
+ "tsensor_g3d", "tsensor_modem";
#thermal-sensor-cells = <1>;
};
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors
2018-09-25 9:03 ` [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors Daniel Lezcano
@ 2018-10-15 16:31 ` Rob Herring
2018-10-15 18:01 ` Daniel Lezcano
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2018-10-15 16:31 UTC (permalink / raw)
To: Daniel Lezcano
Cc: edubezval, linux-kernel, linux-pm, leo.yan, Zhang Rui,
Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
On Tue, Sep 25, 2018 at 11:03:08AM +0200, Daniel Lezcano wrote:
> Add the missing interrupts for the temperature sensors as well as
> their names.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 8 ++++++--
Combine this and the previous binding change to 1 patch.
> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++++--
> 2 files changed, 12 insertions(+), 4 deletions(-)
And more checkpatch whitespace errors in this.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors
2018-10-15 16:31 ` Rob Herring
@ 2018-10-15 18:01 ` Daniel Lezcano
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2018-10-15 18:01 UTC (permalink / raw)
To: Rob Herring
Cc: edubezval, linux-kernel, linux-pm, leo.yan, Zhang Rui,
Mark Rutland, Wei Xu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/HISILICON SOC SUPPORT
On 15/10/2018 18:31, Rob Herring wrote:
> On Tue, Sep 25, 2018 at 11:03:08AM +0200, Daniel Lezcano wrote:
>> Add the missing interrupts for the temperature sensors as well as
>> their names.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>> Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 8 ++++++--
>
> Combine this and the previous binding change to 1 patch.
Ok.
>> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++++--
>> 2 files changed, 12 insertions(+), 4 deletions(-)
>
> And more checkpatch whitespace errors in this.
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 13/14] ARM64: dts: hisilicon: Add dual clusters thermal zones for hi3660
[not found] <1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org>
2018-09-25 9:03 ` [PATCH 08/14] ARM64: dts: hisilicon: Add tsensor interrupt name Daniel Lezcano
2018-09-25 9:03 ` [PATCH 10/14] ARM64: dts: hisilicon: Add interrupt names for the tsensors Daniel Lezcano
@ 2018-09-25 9:03 ` Daniel Lezcano
2 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2018-09-25 9:03 UTC (permalink / raw)
To: edubezval
Cc: linux-kernel, linux-pm, daniel.lezcano, leo.yan, Wei Xu,
Rob Herring, Mark Rutland,
moderated list:ARM/HISILICON SOC SUPPORT,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Add a thermal zone for the little cluster, so we can handle two
sensors managing each a cluster on the SoC.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 97 ++++++++++++++++++++-----------
1 file changed, 63 insertions(+), 34 deletions(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index dd398cb..6df7d9f 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -1090,42 +1090,71 @@
};
thermal-zones {
+ tz_a53: tz_a53 {
+ polling-delay = <1000>;
+ polling-delay-passive = <100>;
+ sustainable-power = <4500>;
+
+ /* sensor ID */
+ thermal-sensors = <&tsensor 0>;
+
+ trips {
+ a53_temp_threshold: trip-point@0 {
+ temperature = <65000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ a53_temp_target: trip-point@1 {
+ temperature = <75000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
- cls0: cls0 {
- polling-delay = <1000>;
- polling-delay-passive = <100>;
- sustainable-power = <4500>;
-
- /* sensor ID */
- thermal-sensors = <&tsensor 1>;
-
- trips {
- threshold: trip-point@0 {
- temperature = <65000>;
- hysteresis = <1000>;
- type = "passive";
- };
-
- target: trip-point@1 {
- temperature = <75000>;
- hysteresis = <1000>;
- type = "passive";
- };
- };
-
- cooling-maps {
+ cooling-maps {
map0 {
- trip = <&target>;
- contribution = <1024>;
- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
- };
- map1 {
- trip = <&target>;
- contribution = <512>;
- cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
- };
- };
- };
+ trip = <&a53_temp_target>;
+ contribution = <512>;
+ cooling-device = <&cpu0
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ tz_a73: tz_a73 {
+ polling-delay = <1000>;
+ polling-delay-passive = <100>;
+ sustainable-power = <4500>;
+
+ /* sensor ID */
+ thermal-sensors = <&tsensor 1>;
+
+ trips {
+ a73_temp_threshold: trip-point@0 {
+ temperature = <65000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ a73_temp_target: trip-point@1 {
+ temperature = <75000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&a73_temp_target>;
+ contribution = <1024>;
+ cooling-device = <&cpu4
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>;
+ };
+ };
+ };
};
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread