linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Add device node support for TSENS in SC7180
@ 2019-11-28  9:54 Rajeshwari
  2019-11-28  9:54 ` [PATCH v2 1/1] arm64: dts: qcom: sc7180: " Rajeshwari
  0 siblings, 1 reply; 11+ messages in thread
From: Rajeshwari @ 2019-11-28  9:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland
  Cc: linux-arm-msm, devicetree, linux-kernel, sivaa, sanm, Rajeshwari

Add TSENS node and user thermal zone configurations for TSENS sensors 
in SC7180.

The change has dependency on adding device tree support for sc7180 [1] 
to merge first.

Dependencies:

[1] https://lkml.org/lkml/2019/11/8/149

changes in v2:
* Added polling delay.
* Removed unwanted properties.
* Updated sensor names under thermal-zones.
* Updated trip points.
* Added interrupt support.

Rajeshwari (1):
  arm64: dts: qcom: sc7180:  Add device node support for TSENS in SC7180

 arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
 1 file changed, 527 insertions(+)

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/1] arm64: dts: qcom: sc7180:  Add device node support for TSENS in SC7180
  2019-11-28  9:54 [PATCH v2 0/1] Add device node support for TSENS in SC7180 Rajeshwari
@ 2019-11-28  9:54 ` Rajeshwari
  2019-12-11 19:01   ` Doug Anderson
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Rajeshwari @ 2019-11-28  9:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland
  Cc: linux-arm-msm, devicetree, linux-kernel, sivaa, sanm, Rajeshwari

Add TSENS node and user thermal zone for TSENS sensors in SC7180.

Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
 1 file changed, 527 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 666e9b9..6656ffc 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -911,6 +911,26 @@
 			status = "disabled";
 		};
 
+		tsens0: thermal-sensor@c263000 {
+			compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
+			reg = <0 0x0c263000 0 0x1ff>, /* TM */
+				<0 0x0c222000 0 0x1ff>; /* SROT */
+			#qcom,sensors = <15>;
+			interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow";
+			#thermal-sensor-cells = <1>;
+		};
+
+		tsens1: thermal-sensor@c265000 {
+			compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
+			reg = <0 0x0c265000 0 0x1ff>, /* TM */
+				<0 0x0c223000 0 0x1ff>; /* SROT */
+			#qcom,sensors = <10>;
+			interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow";
+			#thermal-sensor-cells = <1>;
+		};
+
 		spmi_bus: spmi@c440000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0 0x0c440000 0 0x1100>,
@@ -1121,6 +1141,513 @@
 		};
 	};
 
+	thermal-zones {
+		cpu0-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 1>;
+
+			trips {
+				cpu0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu0_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 2>;
+
+			trips {
+				cpu1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu1_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu2-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 3>;
+
+			trips {
+				cpu2_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu2_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu2_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu3-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 4>;
+
+			trips {
+				cpu3_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu3_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu3_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu4-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 5>;
+
+			trips {
+				cpu4_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu4_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu4_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu5-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 6>;
+
+			trips {
+				cpu5_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu5_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu5_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu6-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 9>;
+
+			trips {
+				cpu6_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu6_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu6_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu7-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 10>;
+
+			trips {
+				cpu7_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu7_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu7_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu8-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 11>;
+
+			trips {
+				cpu8_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu8_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu8_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu9-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 12>;
+
+			trips {
+				cpu9_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu9_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu9_crit: cpu_crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		aoss0-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 0>;
+
+			trips {
+				aoss0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		cpuss0-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 7>;
+
+			trips {
+				cpuss0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+				cpuss0_crit: cluster0_crit {
+					temperature = <110000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpuss1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 8>;
+
+			trips {
+				cpuss1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+				cpuss1_crit: cluster0_crit {
+					temperature = <110000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+
+		gpuss0-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 13>;
+
+			trips {
+				gpuss0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		gpuss1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens0 14>;
+
+			trips {
+				gpuss1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		aoss1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 0>;
+
+			trips {
+				aoss1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		cwlan-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 1>;
+
+			trips {
+				cwlan_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		audio-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 2>;
+
+			trips {
+				audio_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		ddr-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 3>;
+
+			trips {
+				ddr_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		q6-hvx-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 4>;
+
+			trips {
+				q6_hvx_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		camera-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 5>;
+
+			trips {
+				camera_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		mdm-core-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 6>;
+
+			trips {
+				mdm_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		mdm-dsp-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 7>;
+
+			trips {
+				mdm_dsp_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		npu-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 8>;
+
+			trips {
+				npu_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		video-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&tsens1 9>;
+
+			trips {
+				video_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 1 IRQ_TYPE_LEVEL_LOW>,
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-11-28  9:54 ` [PATCH v2 1/1] arm64: dts: qcom: sc7180: " Rajeshwari
@ 2019-12-11 19:01   ` Doug Anderson
  2019-12-12  7:12     ` rkambl
  2019-12-11 19:33   ` Doug Anderson
  2019-12-12 11:00   ` Amit Kucheria
  2 siblings, 1 reply; 11+ messages in thread
From: Doug Anderson @ 2019-12-11 19:01 UTC (permalink / raw)
  To: Rajeshwari
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland,
	linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm, Matthias Kaehlcke

Hi,

On Thu, Nov 28, 2019 at 1:55 AM Rajeshwari <rkambl@codeaurora.org> wrote:
>
> Add TSENS node and user thermal zone for TSENS sensors in SC7180.
>
> Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
>  1 file changed, 527 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 666e9b9..6656ffc 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -911,6 +911,26 @@
>                         status = "disabled";
>                 };
>
> +               tsens0: thermal-sensor@c263000 {
> +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";

Can you please send a patch listing this configuration in
"Documentation/devicetree/bindings/thermal/qcom-tsens.yaml"?  You
shouldn't need to re-send the dts since it looks like it's already
landed, but it's good to get the bindings happy.

Thanks!

-Doug

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-11-28  9:54 ` [PATCH v2 1/1] arm64: dts: qcom: sc7180: " Rajeshwari
  2019-12-11 19:01   ` Doug Anderson
@ 2019-12-11 19:33   ` Doug Anderson
  2019-12-12  7:17     ` rkambl
  2019-12-12 11:00   ` Amit Kucheria
  2 siblings, 1 reply; 11+ messages in thread
From: Doug Anderson @ 2019-12-11 19:33 UTC (permalink / raw)
  To: Rajeshwari
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland,
	linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm, Amit Kucheria, Matthias Kaehlcke

Hi,

On Thu, Nov 28, 2019 at 1:55 AM Rajeshwari <rkambl@codeaurora.org> wrote:
>
> Add TSENS node and user thermal zone for TSENS sensors in SC7180.
>
> Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
>  1 file changed, 527 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 666e9b9..6656ffc 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -911,6 +911,26 @@
>                         status = "disabled";
>                 };
>
> +               tsens0: thermal-sensor@c263000 {
> +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> +                       #qcom,sensors = <15>;
> +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> +                       interrupt-names = "uplow";

Can you also send a patch to match Amit's ("arm64: dts: sdm845:
thermal: Add critical interrupt support") [1].  If I'm reading things
correctly it should be 508 for tsens0 and 509 for tsens1 just like on
sdm845.

[1] https://lore.kernel.org/r/c536e9cdb448bbad3441f6580fa57f1f921fb580.1573499020.git.amit.kucheria@linaro.org

-Doug

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-11 19:01   ` Doug Anderson
@ 2019-12-12  7:12     ` rkambl
  0 siblings, 0 replies; 11+ messages in thread
From: rkambl @ 2019-12-12  7:12 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland,
	linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm, Matthias Kaehlcke

On 2019-12-12 00:31, Doug Anderson wrote:
> Hi,
> 
> On Thu, Nov 28, 2019 at 1:55 AM Rajeshwari <rkambl@codeaurora.org> 
> wrote:
>> 
>> Add TSENS node and user thermal zone for TSENS sensors in SC7180.
>> 
>> Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 
>> +++++++++++++++++++++++++++++++++++
>>  1 file changed, 527 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> index 666e9b9..6656ffc 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> @@ -911,6 +911,26 @@
>>                         status = "disabled";
>>                 };
>> 
>> +               tsens0: thermal-sensor@c263000 {
>> +                       compatible = 
>> "qcom,sc7180-tsens","qcom,tsens-v2";
> 
> Can you please send a patch listing this configuration in
> "Documentation/devicetree/bindings/thermal/qcom-tsens.yaml"?  You
> shouldn't need to re-send the dts since it looks like it's already
> landed, but it's good to get the bindings happy.

Sure, i will send the patch, adding this configuration in 
qcom-tsens.yaml.
> 
> Thanks!
> 
> -Rajeshwari

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-11 19:33   ` Doug Anderson
@ 2019-12-12  7:17     ` rkambl
  0 siblings, 0 replies; 11+ messages in thread
From: rkambl @ 2019-12-12  7:17 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland,
	linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm, Amit Kucheria, Matthias Kaehlcke

On 2019-12-12 01:03, Doug Anderson wrote:
> Hi,
> 
> On Thu, Nov 28, 2019 at 1:55 AM Rajeshwari <rkambl@codeaurora.org> 
> wrote:
>> 
>> Add TSENS node and user thermal zone for TSENS sensors in SC7180.
>> 
>> Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 
>> +++++++++++++++++++++++++++++++++++
>>  1 file changed, 527 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> index 666e9b9..6656ffc 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> @@ -911,6 +911,26 @@
>>                         status = "disabled";
>>                 };
>> 
>> +               tsens0: thermal-sensor@c263000 {
>> +                       compatible = 
>> "qcom,sc7180-tsens","qcom,tsens-v2";
>> +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
>> +                               <0 0x0c222000 0 0x1ff>; /* SROT */
>> +                       #qcom,sensors = <15>;
>> +                       interrupts = <GIC_SPI 506 
>> IRQ_TYPE_LEVEL_HIGH>;
>> +                       interrupt-names = "uplow";
> 
> Can you also send a patch to match Amit's ("arm64: dts: sdm845:
> thermal: Add critical interrupt support") [1].  If I'm reading things
> correctly it should be 508 for tsens0 and 509 for tsens1 just like on
> sdm845.
> 
> [1]
> https://lore.kernel.org/r/c536e9cdb448bbad3441f6580fa57f1f921fb580.1573499020.git.amit.kucheria@linaro.org

yes, i will send the patch for critical interrupt support.
> 
> 
> Thanks!
> 
> -Rajeshwari

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-11-28  9:54 ` [PATCH v2 1/1] arm64: dts: qcom: sc7180: " Rajeshwari
  2019-12-11 19:01   ` Doug Anderson
  2019-12-11 19:33   ` Doug Anderson
@ 2019-12-12 11:00   ` Amit Kucheria
  2019-12-12 16:09     ` Doug Anderson
  2 siblings, 1 reply; 11+ messages in thread
From: Amit Kucheria @ 2019-12-12 11:00 UTC (permalink / raw)
  To: Rajeshwari
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Mark Rutland,
	linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm

Hi Rajeshwari,

On Thu, Nov 28, 2019 at 3:25 PM Rajeshwari <rkambl@codeaurora.org> wrote:
>
> Add TSENS node and user thermal zone for TSENS sensors in SC7180.
>
> Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
>  1 file changed, 527 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 666e9b9..6656ffc 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -911,6 +911,26 @@
>                         status = "disabled";
>                 };
>
> +               tsens0: thermal-sensor@c263000 {
> +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> +                       #qcom,sensors = <15>;
> +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> +                       interrupt-names = "uplow";
> +                       #thermal-sensor-cells = <1>;
> +               };
> +
> +               tsens1: thermal-sensor@c265000 {
> +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> +                       reg = <0 0x0c265000 0 0x1ff>, /* TM */
> +                               <0 0x0c223000 0 0x1ff>; /* SROT */
> +                       #qcom,sensors = <10>;
> +                       interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
> +                       interrupt-names = "uplow";
> +                       #thermal-sensor-cells = <1>;
> +               };
> +
>                 spmi_bus: spmi@c440000 {
>                         compatible = "qcom,spmi-pmic-arb";
>                         reg = <0 0x0c440000 0 0x1100>,
> @@ -1121,6 +1141,513 @@
>                 };
>         };
>
> +       thermal-zones {
> +               cpu0-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 1>;
> +
> +                       trips {
> +                               cpu0_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu0_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu0_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };

Where are the cooling maps for all the cpu thermal zones? A passive
trip point w/o a cooling map is not of much use. If you are waiting
for cpufreq support to land before adding them, then remove the
passive trip points for now and add them along with the cooling maps
when you have cooling devices.

> +                       };
> +               };
> +
> +               cpu1-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 2>;
> +
> +                       trips {
> +                               cpu1_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu1_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu1_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu2-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 3>;
> +
> +                       trips {
> +                               cpu2_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu2_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu2_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu3-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 4>;
> +
> +                       trips {
> +                               cpu3_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu3_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu3_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu4-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 5>;
> +
> +                       trips {
> +                               cpu4_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu4_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu4_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu5-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 6>;
> +
> +                       trips {
> +                               cpu5_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu5_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu5_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu6-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 9>;
> +
> +                       trips {
> +                               cpu6_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu6_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu6_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu7-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 10>;
> +
> +                       trips {
> +                               cpu7_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu7_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu7_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu8-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 11>;
> +
> +                       trips {
> +                               cpu8_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu8_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu8_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               cpu9-thermal {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +
> +                       thermal-sensors = <&tsens0 12>;
> +
> +                       trips {
> +                               cpu9_alert0: trip-point0 {
> +                                       temperature = <90000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu9_alert1: trip-point1 {
> +                                       temperature = <95000>;
> +                                       hysteresis = <2000>;
> +                                       type = "passive";
> +                               };
> +
> +                               cpu9_crit: cpu_crit {
> +                                       temperature = <110000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-12 11:00   ` Amit Kucheria
@ 2019-12-12 16:09     ` Doug Anderson
  2019-12-12 16:56       ` Amit Kucheria
  0 siblings, 1 reply; 11+ messages in thread
From: Doug Anderson @ 2019-12-12 16:09 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: Rajeshwari, Andy Gross, Bjorn Andersson, Rob Herring,
	Mark Rutland, linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm

Hi,

On Thu, Dec 12, 2019 at 3:00 AM Amit Kucheria
<amit.kucheria@verdurent.com> wrote:
>
> Hi Rajeshwari,
>
> On Thu, Nov 28, 2019 at 3:25 PM Rajeshwari <rkambl@codeaurora.org> wrote:
> >
> > Add TSENS node and user thermal zone for TSENS sensors in SC7180.
> >
> > Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
> >  1 file changed, 527 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > index 666e9b9..6656ffc 100644
> > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > @@ -911,6 +911,26 @@
> >                         status = "disabled";
> >                 };
> >
> > +               tsens0: thermal-sensor@c263000 {
> > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> > +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> > +                       #qcom,sensors = <15>;
> > +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> > +                       interrupt-names = "uplow";
> > +                       #thermal-sensor-cells = <1>;
> > +               };
> > +
> > +               tsens1: thermal-sensor@c265000 {
> > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > +                       reg = <0 0x0c265000 0 0x1ff>, /* TM */
> > +                               <0 0x0c223000 0 0x1ff>; /* SROT */
> > +                       #qcom,sensors = <10>;
> > +                       interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
> > +                       interrupt-names = "uplow";
> > +                       #thermal-sensor-cells = <1>;
> > +               };
> > +
> >                 spmi_bus: spmi@c440000 {
> >                         compatible = "qcom,spmi-pmic-arb";
> >                         reg = <0 0x0c440000 0 0x1100>,
> > @@ -1121,6 +1141,513 @@
> >                 };
> >         };
> >
> > +       thermal-zones {
> > +               cpu0-thermal {
> > +                       polling-delay-passive = <250>;
> > +                       polling-delay = <1000>;
> > +
> > +                       thermal-sensors = <&tsens0 1>;
> > +
> > +                       trips {
> > +                               cpu0_alert0: trip-point0 {
> > +                                       temperature = <90000>;
> > +                                       hysteresis = <2000>;
> > +                                       type = "passive";
> > +                               };
> > +
> > +                               cpu0_alert1: trip-point1 {
> > +                                       temperature = <95000>;
> > +                                       hysteresis = <2000>;
> > +                                       type = "passive";
> > +                               };
> > +
> > +                               cpu0_crit: cpu_crit {
> > +                                       temperature = <110000>;
> > +                                       hysteresis = <1000>;
> > +                                       type = "critical";
> > +                               };
>
> Where are the cooling maps for all the cpu thermal zones? A passive
> trip point w/o a cooling map is not of much use. If you are waiting
> for cpufreq support to land before adding them, then remove the
> passive trip points for now and add them along with the cooling maps
> when you have cooling devices.

I will note that cpufreq support has landed in the qcom tree::

https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=86899d8235ea0d3d7c293404fb43a6fabff866e6

...so I guess the right thing is to send a patch adding the cooling
maps for the cpu thermal zones?

-Doug

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-12 16:09     ` Doug Anderson
@ 2019-12-12 16:56       ` Amit Kucheria
  2019-12-12 16:59         ` Doug Anderson
  0 siblings, 1 reply; 11+ messages in thread
From: Amit Kucheria @ 2019-12-12 16:56 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rajeshwari, Andy Gross, Bjorn Andersson, Rob Herring,
	Mark Rutland, linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm

On Thu, Dec 12, 2019 at 9:39 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Thu, Dec 12, 2019 at 3:00 AM Amit Kucheria
> <amit.kucheria@verdurent.com> wrote:
> >
> > Hi Rajeshwari,
> >
> > On Thu, Nov 28, 2019 at 3:25 PM Rajeshwari <rkambl@codeaurora.org> wrote:
> > >
> > > Add TSENS node and user thermal zone for TSENS sensors in SC7180.
> > >
> > > Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
> > >  1 file changed, 527 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > index 666e9b9..6656ffc 100644
> > > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > @@ -911,6 +911,26 @@
> > >                         status = "disabled";
> > >                 };
> > >
> > > +               tsens0: thermal-sensor@c263000 {
> > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> > > +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> > > +                       #qcom,sensors = <15>;
> > > +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> > > +                       interrupt-names = "uplow";
> > > +                       #thermal-sensor-cells = <1>;
> > > +               };
> > > +
> > > +               tsens1: thermal-sensor@c265000 {
> > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > +                       reg = <0 0x0c265000 0 0x1ff>, /* TM */
> > > +                               <0 0x0c223000 0 0x1ff>; /* SROT */
> > > +                       #qcom,sensors = <10>;
> > > +                       interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
> > > +                       interrupt-names = "uplow";
> > > +                       #thermal-sensor-cells = <1>;
> > > +               };
> > > +
> > >                 spmi_bus: spmi@c440000 {
> > >                         compatible = "qcom,spmi-pmic-arb";
> > >                         reg = <0 0x0c440000 0 0x1100>,
> > > @@ -1121,6 +1141,513 @@
> > >                 };
> > >         };
> > >
> > > +       thermal-zones {
> > > +               cpu0-thermal {
> > > +                       polling-delay-passive = <250>;
> > > +                       polling-delay = <1000>;
> > > +
> > > +                       thermal-sensors = <&tsens0 1>;
> > > +
> > > +                       trips {
> > > +                               cpu0_alert0: trip-point0 {
> > > +                                       temperature = <90000>;
> > > +                                       hysteresis = <2000>;
> > > +                                       type = "passive";
> > > +                               };
> > > +
> > > +                               cpu0_alert1: trip-point1 {
> > > +                                       temperature = <95000>;
> > > +                                       hysteresis = <2000>;
> > > +                                       type = "passive";
> > > +                               };
> > > +
> > > +                               cpu0_crit: cpu_crit {
> > > +                                       temperature = <110000>;
> > > +                                       hysteresis = <1000>;
> > > +                                       type = "critical";
> > > +                               };
> >
> > Where are the cooling maps for all the cpu thermal zones? A passive
> > trip point w/o a cooling map is not of much use. If you are waiting
> > for cpufreq support to land before adding them, then remove the
> > passive trip points for now and add them along with the cooling maps
> > when you have cooling devices.
>
> I will note that cpufreq support has landed in the qcom tree::
>
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=86899d8235ea0d3d7c293404fb43a6fabff866e6
>
> ...so I guess the right thing is to send a patch adding the cooling
> maps for the cpu thermal zones?

Great, then the cooling maps should be added to this patch itself.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-12 16:56       ` Amit Kucheria
@ 2019-12-12 16:59         ` Doug Anderson
  2019-12-12 17:07           ` Amit Kucheria
  0 siblings, 1 reply; 11+ messages in thread
From: Doug Anderson @ 2019-12-12 16:59 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: Rajeshwari, Andy Gross, Bjorn Andersson, Rob Herring,
	Mark Rutland, linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm

Hi,

On Thu, Dec 12, 2019 at 8:56 AM Amit Kucheria
<amit.kucheria@verdurent.com> wrote:
>
> On Thu, Dec 12, 2019 at 9:39 PM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Thu, Dec 12, 2019 at 3:00 AM Amit Kucheria
> > <amit.kucheria@verdurent.com> wrote:
> > >
> > > Hi Rajeshwari,
> > >
> > > On Thu, Nov 28, 2019 at 3:25 PM Rajeshwari <rkambl@codeaurora.org> wrote:
> > > >
> > > > Add TSENS node and user thermal zone for TSENS sensors in SC7180.
> > > >
> > > > Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> > > > ---
> > > >  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
> > > >  1 file changed, 527 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > index 666e9b9..6656ffc 100644
> > > > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > @@ -911,6 +911,26 @@
> > > >                         status = "disabled";
> > > >                 };
> > > >
> > > > +               tsens0: thermal-sensor@c263000 {
> > > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > > +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> > > > +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> > > > +                       #qcom,sensors = <15>;
> > > > +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                       interrupt-names = "uplow";
> > > > +                       #thermal-sensor-cells = <1>;
> > > > +               };
> > > > +
> > > > +               tsens1: thermal-sensor@c265000 {
> > > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > > +                       reg = <0 0x0c265000 0 0x1ff>, /* TM */
> > > > +                               <0 0x0c223000 0 0x1ff>; /* SROT */
> > > > +                       #qcom,sensors = <10>;
> > > > +                       interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                       interrupt-names = "uplow";
> > > > +                       #thermal-sensor-cells = <1>;
> > > > +               };
> > > > +
> > > >                 spmi_bus: spmi@c440000 {
> > > >                         compatible = "qcom,spmi-pmic-arb";
> > > >                         reg = <0 0x0c440000 0 0x1100>,
> > > > @@ -1121,6 +1141,513 @@
> > > >                 };
> > > >         };
> > > >
> > > > +       thermal-zones {
> > > > +               cpu0-thermal {
> > > > +                       polling-delay-passive = <250>;
> > > > +                       polling-delay = <1000>;
> > > > +
> > > > +                       thermal-sensors = <&tsens0 1>;
> > > > +
> > > > +                       trips {
> > > > +                               cpu0_alert0: trip-point0 {
> > > > +                                       temperature = <90000>;
> > > > +                                       hysteresis = <2000>;
> > > > +                                       type = "passive";
> > > > +                               };
> > > > +
> > > > +                               cpu0_alert1: trip-point1 {
> > > > +                                       temperature = <95000>;
> > > > +                                       hysteresis = <2000>;
> > > > +                                       type = "passive";
> > > > +                               };
> > > > +
> > > > +                               cpu0_crit: cpu_crit {
> > > > +                                       temperature = <110000>;
> > > > +                                       hysteresis = <1000>;
> > > > +                                       type = "critical";
> > > > +                               };
> > >
> > > Where are the cooling maps for all the cpu thermal zones? A passive
> > > trip point w/o a cooling map is not of much use. If you are waiting
> > > for cpufreq support to land before adding them, then remove the
> > > passive trip points for now and add them along with the cooling maps
> > > when you have cooling devices.
> >
> > I will note that cpufreq support has landed in the qcom tree::
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=86899d8235ea0d3d7c293404fb43a6fabff866e6
> >
> > ...so I guess the right thing is to send a patch adding the cooling
> > maps for the cpu thermal zones?
>
> Great, then the cooling maps should be added to this patch itself.

Well, except that this patch itself has also landed:

https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=82bdc93972bf293c3407cb7fdac163aadfbb2c12

...so I think my advice is still correct: the right thing is to send a
patch adding the cooling maps for the cpu thermal zones

-Doug

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/1] arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180
  2019-12-12 16:59         ` Doug Anderson
@ 2019-12-12 17:07           ` Amit Kucheria
  0 siblings, 0 replies; 11+ messages in thread
From: Amit Kucheria @ 2019-12-12 17:07 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rajeshwari, Andy Gross, Bjorn Andersson, Rob Herring,
	Mark Rutland, linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML,
	sivaa, sanm

On Thu, Dec 12, 2019 at 10:30 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Thu, Dec 12, 2019 at 8:56 AM Amit Kucheria
> <amit.kucheria@verdurent.com> wrote:
> >
> > On Thu, Dec 12, 2019 at 9:39 PM Doug Anderson <dianders@chromium.org> wrote:
> > >
> > > Hi,
> > >
> > > On Thu, Dec 12, 2019 at 3:00 AM Amit Kucheria
> > > <amit.kucheria@verdurent.com> wrote:
> > > >
> > > > Hi Rajeshwari,
> > > >
> > > > On Thu, Nov 28, 2019 at 3:25 PM Rajeshwari <rkambl@codeaurora.org> wrote:
> > > > >
> > > > > Add TSENS node and user thermal zone for TSENS sensors in SC7180.
> > > > >
> > > > > Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
> > > > > ---
> > > > >  arch/arm64/boot/dts/qcom/sc7180.dtsi | 527 +++++++++++++++++++++++++++++++++++
> > > > >  1 file changed, 527 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > > index 666e9b9..6656ffc 100644
> > > > > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > > > @@ -911,6 +911,26 @@
> > > > >                         status = "disabled";
> > > > >                 };
> > > > >
> > > > > +               tsens0: thermal-sensor@c263000 {
> > > > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > > > +                       reg = <0 0x0c263000 0 0x1ff>, /* TM */
> > > > > +                               <0 0x0c222000 0 0x1ff>; /* SROT */
> > > > > +                       #qcom,sensors = <15>;
> > > > > +                       interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> > > > > +                       interrupt-names = "uplow";
> > > > > +                       #thermal-sensor-cells = <1>;
> > > > > +               };
> > > > > +
> > > > > +               tsens1: thermal-sensor@c265000 {
> > > > > +                       compatible = "qcom,sc7180-tsens","qcom,tsens-v2";
> > > > > +                       reg = <0 0x0c265000 0 0x1ff>, /* TM */
> > > > > +                               <0 0x0c223000 0 0x1ff>; /* SROT */
> > > > > +                       #qcom,sensors = <10>;
> > > > > +                       interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
> > > > > +                       interrupt-names = "uplow";
> > > > > +                       #thermal-sensor-cells = <1>;
> > > > > +               };
> > > > > +
> > > > >                 spmi_bus: spmi@c440000 {
> > > > >                         compatible = "qcom,spmi-pmic-arb";
> > > > >                         reg = <0 0x0c440000 0 0x1100>,
> > > > > @@ -1121,6 +1141,513 @@
> > > > >                 };
> > > > >         };
> > > > >
> > > > > +       thermal-zones {
> > > > > +               cpu0-thermal {
> > > > > +                       polling-delay-passive = <250>;
> > > > > +                       polling-delay = <1000>;
> > > > > +
> > > > > +                       thermal-sensors = <&tsens0 1>;
> > > > > +
> > > > > +                       trips {
> > > > > +                               cpu0_alert0: trip-point0 {
> > > > > +                                       temperature = <90000>;
> > > > > +                                       hysteresis = <2000>;
> > > > > +                                       type = "passive";
> > > > > +                               };
> > > > > +
> > > > > +                               cpu0_alert1: trip-point1 {
> > > > > +                                       temperature = <95000>;
> > > > > +                                       hysteresis = <2000>;
> > > > > +                                       type = "passive";
> > > > > +                               };
> > > > > +
> > > > > +                               cpu0_crit: cpu_crit {
> > > > > +                                       temperature = <110000>;
> > > > > +                                       hysteresis = <1000>;
> > > > > +                                       type = "critical";
> > > > > +                               };
> > > >
> > > > Where are the cooling maps for all the cpu thermal zones? A passive
> > > > trip point w/o a cooling map is not of much use. If you are waiting
> > > > for cpufreq support to land before adding them, then remove the
> > > > passive trip points for now and add them along with the cooling maps
> > > > when you have cooling devices.
> > >
> > > I will note that cpufreq support has landed in the qcom tree::
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=86899d8235ea0d3d7c293404fb43a6fabff866e6
> > >
> > > ...so I guess the right thing is to send a patch adding the cooling
> > > maps for the cpu thermal zones?
> >
> > Great, then the cooling maps should be added to this patch itself.
>
> Well, except that this patch itself has also landed:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=82bdc93972bf293c3407cb7fdac163aadfbb2c12
>
> ...so I think my advice is still correct: the right thing is to send a
> patch adding the cooling maps for the cpu thermal zones

In that case, yes.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-12 17:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28  9:54 [PATCH v2 0/1] Add device node support for TSENS in SC7180 Rajeshwari
2019-11-28  9:54 ` [PATCH v2 1/1] arm64: dts: qcom: sc7180: " Rajeshwari
2019-12-11 19:01   ` Doug Anderson
2019-12-12  7:12     ` rkambl
2019-12-11 19:33   ` Doug Anderson
2019-12-12  7:17     ` rkambl
2019-12-12 11:00   ` Amit Kucheria
2019-12-12 16:09     ` Doug Anderson
2019-12-12 16:56       ` Amit Kucheria
2019-12-12 16:59         ` Doug Anderson
2019-12-12 17:07           ` Amit Kucheria

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).