devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Enable IPQ9574 TSENS support
@ 2023-05-03  4:45 Varadarajan Narayanan
  2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  4:45 UTC (permalink / raw)
  To: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel
  Cc: Varadarajan Narayanan

This patch set enables tsens in IPQ9574

Depends on
	https://lore.kernel.org/linux-arm-msm/20230406061314.10916-1-quic_devipriy@quicinc.com/
[v1]:
	Fix DT node names

[v0]:
	Initial patch introducing TSENS support

Praveenkumar I (2):
  dt-bindings: thermal: tsens: Add ipq9574 compatible
  thermal/drivers/tsens: Add IPQ9574 support

Varadarajan Narayanan (2):
  arm64: dts: qcom: ipq9574: add tsens node
  arm64: dts: qcom: ipq9574: add thermal zone nodes

 .../devicetree/bindings/thermal/qcom-tsens.yaml    |   3 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi              | 217 +++++++++++++++++++++
 drivers/thermal/qcom/tsens.c                       |   3 +
 3 files changed, 223 insertions(+)

-- 
2.7.4


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

* [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible
  2023-05-03  4:45 [PATCH v1 0/4] Enable IPQ9574 TSENS support Varadarajan Narayanan
@ 2023-05-03  4:45 ` Varadarajan Narayanan
  2023-05-03  6:34   ` Krzysztof Kozlowski
  2023-05-05 21:58   ` Rob Herring
  2023-05-03  4:46 ` [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support Varadarajan Narayanan
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  4:45 UTC (permalink / raw)
  To: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel
  Cc: Praveenkumar I, Varadarajan Narayanan

From: Praveenkumar I <quic_ipkumar@quicinc.com>

Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.

Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index d1ec963..8e2208c 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -66,6 +66,7 @@ properties:
       - description: v2 of TSENS with combined interrupt
         enum:
           - qcom,ipq8074-tsens
+          - qcom,ipq9574-tsens
 
   reg:
     items:
@@ -277,6 +278,7 @@ allOf:
           contains:
             enum:
               - qcom,ipq8074-tsens
+              - qcom,ipq9574-tsens
     then:
       properties:
         interrupts:
@@ -292,6 +294,7 @@ allOf:
           contains:
             enum:
               - qcom,ipq8074-tsens
+              - qcom,ipq9574-tsens
               - qcom,tsens-v0_1
               - qcom,tsens-v1
               - qcom,tsens-v2
-- 
2.7.4


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

* [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support
  2023-05-03  4:45 [PATCH v1 0/4] Enable IPQ9574 TSENS support Varadarajan Narayanan
  2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
@ 2023-05-03  4:46 ` Varadarajan Narayanan
  2023-05-03  6:34   ` Krzysztof Kozlowski
  2023-05-03  4:46 ` [PATCH v1 3/4] arm64: dts: qcom: ipq9574: add tsens node Varadarajan Narayanan
  2023-05-03  4:46 ` [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes Varadarajan Narayanan
  3 siblings, 1 reply; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  4:46 UTC (permalink / raw)
  To: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel
  Cc: Praveenkumar I, Varadarajan Narayanan

From: Praveenkumar I <quic_ipkumar@quicinc.com>

Qualcomm IPQ9574 uses tsens v2.3.1 IP, which is similar to IPQ8074 tsens.
Hence reusing the data_ipq8074 for IPQ9574.

Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 drivers/thermal/qcom/tsens.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index d321812..e752b7d 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1093,6 +1093,9 @@ static const struct of_device_id tsens_table[] = {
 		.compatible = "qcom,ipq8074-tsens",
 		.data = &data_ipq8074,
 	}, {
+		.compatible = "qcom,ipq9574-tsens",
+		.data = &data_ipq8074,
+	}, {
 		.compatible = "qcom,mdm9607-tsens",
 		.data = &data_9607,
 	}, {
-- 
2.7.4


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

* [PATCH v1 3/4] arm64: dts: qcom: ipq9574: add tsens node
  2023-05-03  4:45 [PATCH v1 0/4] Enable IPQ9574 TSENS support Varadarajan Narayanan
  2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
  2023-05-03  4:46 ` [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support Varadarajan Narayanan
@ 2023-05-03  4:46 ` Varadarajan Narayanan
  2023-05-03  4:46 ` [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes Varadarajan Narayanan
  3 siblings, 0 replies; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  4:46 UTC (permalink / raw)
  To: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel
  Cc: Varadarajan Narayanan, Praveenkumar I

IPQ9574 has a tsens v2.3.1 peripheral which monitors temperatures
around the various subsystems on the die.

Co-developed-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 93e3026..b22b999 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -1056,6 +1056,15 @@
 			status = "disabled";
 		};
 
+		tsens: thermal-sensor@4a9000 {
+			compatible = "qcom,ipq9574-tsens";
+			reg = <0x4a9000 0x1000>, /* TM */
+			      <0x4a8000 0x1000>; /* SROT */
+			interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "combined";
+			#qcom,sensors = <16>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 
 	timer {
-- 
2.7.4


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

* [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes
  2023-05-03  4:45 [PATCH v1 0/4] Enable IPQ9574 TSENS support Varadarajan Narayanan
                   ` (2 preceding siblings ...)
  2023-05-03  4:46 ` [PATCH v1 3/4] arm64: dts: qcom: ipq9574: add tsens node Varadarajan Narayanan
@ 2023-05-03  4:46 ` Varadarajan Narayanan
  2023-05-03  7:44   ` Dmitry Baryshkov
  3 siblings, 1 reply; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  4:46 UTC (permalink / raw)
  To: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel
  Cc: Varadarajan Narayanan, Praveenkumar I

This patch adds thermal zone nodes for the various
sensors present in IPQ9574

Co-developed-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
[v1]:
	Fix node names
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 208 ++++++++++++++++++++++++++++++++++
 1 file changed, 208 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index b22b999..bc4d061 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -1067,6 +1067,214 @@
 		};
 	};
 
+	thermal-zones {
+		nss-top-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 3>;
+
+			trips {
+				nss-top-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		ubi-0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 4>;
+
+			trips {
+				ubi_0-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		ubi-1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 5>;
+
+			trips {
+				ubi_1-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		ubi-2-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 6>;
+
+			trips {
+				ubi_2-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		ubi-3-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 7>;
+
+			trips {
+				ubi_3-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cluster0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 8>;
+
+			trips {
+				cpu-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cluster1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 9>;
+
+			trips {
+				cpu-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 10>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 11>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu2-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 12>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu3-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 13>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+			};
+		};
+
+		wcss-phyb-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 14>;
+
+			trips {
+				wcss_phyb-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		top-glue-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 15>;
+
+			trips {
+				top_glue-critical {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-- 
2.7.4


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

* Re: [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible
  2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
@ 2023-05-03  6:34   ` Krzysztof Kozlowski
  2023-05-03  7:00     ` Varadarajan Narayanan
  2023-05-05 21:58   ` Rob Herring
  1 sibling, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-03  6:34 UTC (permalink / raw)
  To: Varadarajan Narayanan, amitk, thara.gopinath, agross, andersson,
	konrad.dybcio, rafael, daniel.lezcano, rui.zhang, robh+dt,
	krzysztof.kozlowski+dt, linux-pm, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Praveenkumar I

On 03/05/2023 06:45, Varadarajan Narayanan wrote:
> From: Praveenkumar I <quic_ipkumar@quicinc.com>
> 
> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
> 
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 

I saw already v1, so this looks like v2, not v1. Please add changelog
describing what you changed here.

> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> index d1ec963..8e2208c 100644
> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> @@ -66,6 +66,7 @@ properties:
>        - description: v2 of TSENS with combined interrupt
>          enum:
>            - qcom,ipq8074-tsens
> +          - qcom,ipq9574-tsens

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.

Thank you.


Best regards,
Krzysztof


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

* Re: [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support
  2023-05-03  4:46 ` [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support Varadarajan Narayanan
@ 2023-05-03  6:34   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-03  6:34 UTC (permalink / raw)
  To: Varadarajan Narayanan, amitk, thara.gopinath, agross, andersson,
	konrad.dybcio, rafael, daniel.lezcano, rui.zhang, robh+dt,
	krzysztof.kozlowski+dt, linux-pm, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Praveenkumar I

On 03/05/2023 06:46, Varadarajan Narayanan wrote:
> From: Praveenkumar I <quic_ipkumar@quicinc.com>
> 
> Qualcomm IPQ9574 uses tsens v2.3.1 IP, which is similar to IPQ8074 tsens.
> Hence reusing the data_ipq8074 for IPQ9574.
> 
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  drivers/thermal/qcom/tsens.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index d321812..e752b7d 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -1093,6 +1093,9 @@ static const struct of_device_id tsens_table[] = {
>  		.compatible = "qcom,ipq8074-tsens",
>  		.data = &data_ipq8074,
>  	}, {
> +		.compatible = "qcom,ipq9574-tsens",
> +		.data = &data_ipq8074,

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.

Thank you.

Best regards,
Krzysztof


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

* Re: [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible
  2023-05-03  6:34   ` Krzysztof Kozlowski
@ 2023-05-03  7:00     ` Varadarajan Narayanan
  0 siblings, 0 replies; 10+ messages in thread
From: Varadarajan Narayanan @ 2023-05-03  7:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: amitk, thara.gopinath, agross, andersson, konrad.dybcio, rafael,
	daniel.lezcano, rui.zhang, robh+dt, krzysztof.kozlowski+dt,
	linux-pm, linux-arm-msm, devicetree, linux-kernel, Praveenkumar I

On Wed, May 03, 2023 at 08:34:45AM +0200, Krzysztof Kozlowski wrote:
> On 03/05/2023 06:45, Varadarajan Narayanan wrote:
> > From: Praveenkumar I <quic_ipkumar@quicinc.com>
> >
> > Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
> >
> > Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> >  Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++
> >  1 file changed, 3 insertions(+)
> >
>
> I saw already v1, so this looks like v2, not v1. Please add changelog
> describing what you changed here.

No code change between v1 and v2 w.r.t this patch. The 4th patch
alone in this series has code changes between v1 and v2.

> > diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > index d1ec963..8e2208c 100644
> > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > @@ -66,6 +66,7 @@ properties:
> >        - description: v2 of TSENS with combined interrupt
> >          enum:
> >            - qcom,ipq8074-tsens
> > +          - qcom,ipq9574-tsens
>
> This is a friendly reminder during the review process.
>
> It seems my previous comments were not fully addressed. Maybe my
> feedback got lost between the quotes, maybe you just forgot to apply it.
> Please go back to the previous discussion and either implement all
> requested changes or keep discussing them.
>
> Thank you.

Sorry. Looks like I missed https://lore.kernel.org/lkml/20230502080611.GB26126@varda-linux.qualcomm.com/T/#m42a9b77be2ceddf1adc90c07f487929fcf2dbc0f
Will take that input and post a new version.

Thanks
Varada

> Best regards,
> Krzysztof
>

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

* Re: [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes
  2023-05-03  4:46 ` [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes Varadarajan Narayanan
@ 2023-05-03  7:44   ` Dmitry Baryshkov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2023-05-03  7:44 UTC (permalink / raw)
  To: Varadarajan Narayanan, amitk, thara.gopinath, agross, andersson,
	konrad.dybcio, rafael, daniel.lezcano, rui.zhang, robh+dt,
	krzysztof.kozlowski+dt, linux-pm, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Praveenkumar I

On 03/05/2023 07:46, Varadarajan Narayanan wrote:
> This patch adds thermal zone nodes for the various
> sensors present in IPQ9574
> 
> Co-developed-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>


Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

one nit below.


> ---
> [v1]:
> 	Fix node names
> ---
>   arch/arm64/boot/dts/qcom/ipq9574.dtsi | 208 ++++++++++++++++++++++++++++++++++
>   1 file changed, 208 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> index b22b999..bc4d061 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> @@ -1067,6 +1067,214 @@
>   		};
>   	};
>   
> +	thermal-zones {
> +		nss-top-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 3>;
> +
> +			trips {
> +				nss-top-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		ubi-0-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 4>;
> +
> +			trips {
> +				ubi_0-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		ubi-1-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 5>;
> +
> +			trips {
> +				ubi_1-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		ubi-2-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 6>;
> +
> +			trips {
> +				ubi_2-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		ubi-3-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 7>;
> +
> +			trips {
> +				ubi_3-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		cluster0-thermal {

I think we were usually using cpussN instead of clusterN, but this is 
really a minor issue, we don't have that standardized.

> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 8>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		cluster1-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 9>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		cpu0-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 10>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <120000>;
> +					hysteresis = <10000>;
> +					type = "critical";
> +				};
> +
> +				cpu-passive {
> +					temperature = <110000>;
> +					hysteresis = <1000>;
> +					type = "passive";
> +				};
> +			};
> +		};
> +
> +		cpu1-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 11>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <120000>;
> +					hysteresis = <10000>;
> +					type = "critical";
> +				};
> +
> +				cpu-passive {
> +					temperature = <110000>;
> +					hysteresis = <1000>;
> +					type = "passive";
> +				};
> +			};
> +		};
> +
> +		cpu2-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 12>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <120000>;
> +					hysteresis = <10000>;
> +					type = "critical";
> +				};
> +
> +				cpu-passive {
> +					temperature = <110000>;
> +					hysteresis = <1000>;
> +					type = "passive";
> +				};
> +			};
> +		};
> +
> +		cpu3-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 13>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <120000>;
> +					hysteresis = <10000>;
> +					type = "critical";
> +				};
> +
> +				cpu-passive {
> +					temperature = <110000>;
> +					hysteresis = <1000>;
> +					type = "passive";
> +				};
> +			};
> +		};
> +
> +		wcss-phyb-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 14>;
> +
> +			trips {
> +				wcss_phyb-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		top-glue-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 15>;
> +
> +			trips {
> +				top_glue-critical {
> +					temperature = <125000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +	};
> +
>   	timer {
>   		compatible = "arm,armv8-timer";
>   		interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,

-- 
With best wishes
Dmitry


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

* Re: [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible
  2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
  2023-05-03  6:34   ` Krzysztof Kozlowski
@ 2023-05-05 21:58   ` Rob Herring
  1 sibling, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-05-05 21:58 UTC (permalink / raw)
  To: Varadarajan Narayanan
  Cc: Praveenkumar I, konrad.dybcio, linux-kernel, thara.gopinath,
	devicetree, amitk, andersson, daniel.lezcano, agross, rui.zhang,
	robh+dt, linux-arm-msm, linux-pm, rafael, krzysztof.kozlowski+dt


On Wed, 03 May 2023 10:15:59 +0530, Varadarajan Narayanan wrote:
> From: Praveenkumar I <quic_ipkumar@quicinc.com>
> 
> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
> 
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

end of thread, other threads:[~2023-05-05 21:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03  4:45 [PATCH v1 0/4] Enable IPQ9574 TSENS support Varadarajan Narayanan
2023-05-03  4:45 ` [PATCH v1 1/4] dt-bindings: thermal: tsens: Add ipq9574 compatible Varadarajan Narayanan
2023-05-03  6:34   ` Krzysztof Kozlowski
2023-05-03  7:00     ` Varadarajan Narayanan
2023-05-05 21:58   ` Rob Herring
2023-05-03  4:46 ` [PATCH v1 2/4] thermal/drivers/tsens: Add IPQ9574 support Varadarajan Narayanan
2023-05-03  6:34   ` Krzysztof Kozlowski
2023-05-03  4:46 ` [PATCH v1 3/4] arm64: dts: qcom: ipq9574: add tsens node Varadarajan Narayanan
2023-05-03  4:46 ` [PATCH v1 4/4] arm64: dts: qcom: ipq9574: add thermal zone nodes Varadarajan Narayanan
2023-05-03  7:44   ` Dmitry Baryshkov

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