Enable TSENS and thermal zone for QCS615 SoC
Subsystems (5)
cover Enable TSENS and thermal zone for QCS615 SoC
Adding compatible string in TSENS dt-bindings, device node for TSENS controller and Thermal zone support.
Gaurav Kohli (2):
dt-bindings: thermal: tsens: Add QCS615 compatible
arm64: dts: qcom: Enable tsens and thermal for QCS615 SoC
.../bindings/thermal/qcom-tsens.yaml | 1 + arch/arm64/boot/dts/qcom/qcs615.dtsi | 281 ++++++++++++++++++ 2 files changed, 282 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/2 dt-bindings: thermal: tsens: Add QCS615 compatible
Add compatibility string for the thermal sensors on QCS615 platform.
--- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +1 -0
@@ -52,6 +52,7 @@ properties: - qcom,msm8996-tsens - qcom,msm8998-tsens - qcom,qcm2290-tsens + - qcom,qcs615-tsens - qcom,sa8255p-tsens - qcom,sa8775p-tsens - qcom,sar2130p-tsens
Signature · 1 line
2.34.1
PATCH 2/2 arm64: dts: qcom: Enable TSENS support for QCS615 SoC
In reply to Gaurav KohliAdd TSENS and thermal devicetree node for QCS615 SoC.
--- arch/arm64/boot/dts/qcom/qcs615.dtsi | 281 +++++++++++++++++++++++++++ 1 file changed, 281 insertions(+)
arch/arm64/boot/dts/qcom/qcs615.dtsi +281 -0
@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0xc263000 0x0 0x1ff>, + <0x0 0xc222000 0x0 0x8>; + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>; + #qcom,sensors = <16>; + interrupt-names = "uplow", "critical"; + #thermal-sensor-cells = <1>; + }; }; arch_timer: timer {
@@ -3677,4 +3688,274 @@ arch_timer: timer { <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 0 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; }; + + thermal-zones { + aoss-thermal { + thermal-sensors = <&tsens0 0>; + + trips { + + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + }; + + cpuss-1-thermal { + thermal-sensors = <&tsens0 2>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + }; + + cpuss-2-thermal { + thermal-sensors = <&tsens0 3>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-3-thermal { + thermal-sensors = <&tsens0 4>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpu-1-0-thermal { + thermal-sensors = <&tsens0 5>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpu-1-1-thermal { + thermal-sensors = <&tsens0 6>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + }; + + cpu-1-2-thermal { + thermal-sensors = <&tsens0 7>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpu-1-3-thermal { + thermal-sensors = <&tsens0 8>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + }; + + gpu-thermal { + thermal-sensors = <&tsens0 9>; + + trips { + + trip-point0 { + temperature = <105000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + }; + + q6-hvx-thermal { + thermal-sensors = <&tsens0 10>; + + trips { + + trip-point0 { + temperature = <105000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + mdm-core-thermal { + thermal-sensors = <&tsens0 11>; + + trips { + trip-point0 { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + }; + }; + + camera-thermal { + thermal-sensors = <&tsens0 12>; + + trips { + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + wlan-thermal { + thermal-sensors = <&tsens0 13>; + + trips { + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + display-thermal { + thermal-sensors = <&tsens0 14>; + + trips { + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + video-thermal { + thermal-sensors = <&tsens0 15>; + + trips { + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + }; };
Signature · 1 line
2.34.1
Re: [PATCH v1 1/2] dt-bindings: thermal: tsens: Add QCS615 compatible
In reply to Gaurav KohliQuoted 7 lines · Gaurav Kohli
Add compatibility string for the thermal sensors on QCS615 platform.
Signed-off-by Gaurav Kohli <[email protected]>--- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH v1 2/2] arm64: dts: qcom: Enable TSENS support for QCS615 SoC
In reply to Gaurav KohliQuoted 4 lines · Gaurav Kohli
Add TSENS and thermal devicetree node for QCS615 SoC.
Signed-off-by Gaurav Kohli <[email protected]>---
subject: "arm64: dts: qcom: qcs615: .."> arch/arm64/boot/dts/qcom/qcs615.dtsi | 281 +++++++++++++++++++++++++++
Quoted 7 lines
1 file changed, 281 insertions(+)arch/arm64/boot/dts/qcom/qcs615.dtsi +0
-0
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3675
Quoted 8 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +5
-0@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0xc263000 0x0 0x1ff>, + <0x0 0xc222000 0x0 0x8>;
Pad the address part to 8 hex digits with leading zeroes> + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
&pdc 26
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3677
Quoted 1 line
arch/arm64/boot/dts/qcom/qcs615.dtsi +1
-0+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
&pdc 28
Please align the <s
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3679
Quoted 2 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +2
-0+ #qcom,sensors = <16>; + interrupt-names = "uplow", "critical";
it would make sense for interrupt-names to come right under interrupts
Quoted 30 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +23
-0+ #thermal-sensor-cells = <1>; + }; }; arch_timer: timer {@@ -3677,4 +3688,274 @@ arch_timer: timer { <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 0 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; }; + + thermal-zones { + aoss-thermal { + thermal-sensors = <&tsens0 0>; + + trips { + + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 {
arch/arm64/boot/dts/qcom/qcs615.dtsi arch_timer: timer { · line 3721
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +10
-0+ temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + };
Please drop the passive trip point for the *CPU* tzones, see
commit 06eadce936971dd11279e53b6dfb151804137836
("arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU")
and add a single critical point instead, see
commit 03f2b8eed73418269a158ccebad5d8d8f2f6daa1
("arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown")
Konrad
Re: [PATCH v1 2/2] arm64: dts: qcom: Enable TSENS support for QCS615 SoC
thanks for review!
Quoted 9 lines · Konrad Dybcio
Quoted 4 lines · Gaurav Kohli
Add TSENS and thermal devicetree node for QCS615 SoC.
Signed-off-by Gaurav Kohli <[email protected]>---
subject: "arm64: dts: qcom: qcs615: ..">
arch/arm64/boot/dts/qcom/qcs615.dtsi| 281 +++++++++++++++++++++++++++Quoted 2 lines
1 file changed, 281 insertions(+)
will fix this.
Quoted 15 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3675
Quoted 13 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +5
-0@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0xc263000 0x0 0x1ff>, + <0x0 0xc222000 0x0 0x8>;Pad the address part to 8 hex digits with leading zeroes> + interrupts = <
GIC_SPI506IRQ_TYPE_LEVEL_HIGH>,
Quoted 5 lines
&pdc 26
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3677
Quoted 1 line
arch/arm64/boot/dts/qcom/qcs615.dtsi +1
-0+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;&pdc 28
we don't want to mark this as wake up capable, so using this approach.
Quoted 7 lines
Please align the <s
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3679
Quoted 2 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +2
-0+ #qcom,sensors = <16>; + interrupt-names = "uplow", "critical";it would make sense for interrupt-names to come right under interrupts
yes, will update in next patch set.
Quoted 34 lines
Quoted 34 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +27
-0+ #thermal-sensor-cells = <1>; + }; }; arch_timer: timer {@@ -3677,4 +3688,274 @@ arch_timer: timer { <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 0 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; }; + + thermal-zones { + aoss-thermal { + thermal-sensors = <&tsens0 0>; + + trips { + + trip-point0 { + temperature = <110000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + };
Quoted 9 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi arch_timer: timer { · line 3721
Quoted 6 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +6
-0+ + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + };Please drop the passive trip point for the *CPU* tzones, see
we are using trip-point 0 for cpu idle injection mitigation which i will add in subsequent patches, if you are fine i will add cpu idle injection cooling map in this series only ?
Quoted 5 lines
commit
06eadce936971dd11279e53b6dfb151804137836
("arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU")and add a single critical point instead, see
As critical shutdown is already supported by hardware, so we are not defining here.
Quoted 4 lines
commit
03f2b8eed73418269a158ccebad5d8d8f2f6daa1
("arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown")Konrad
Re: [PATCH v1 2/2] arm64: dts: qcom: Enable TSENS support for QCS615 SoC
Quoted 28 lines · Gaurav Kohli
thanks for review!
Quoted 9 lines · Konrad Dybcio
Quoted 4 lines · Gaurav Kohli
Add TSENS and thermal devicetree node for QCS615 SoC.
Signed-off-by Gaurav Kohli <[email protected]>---
subject: "arm64: dts: qcom: qcs615: ..">
arch/arm64/boot/dts/qcom/qcs615.dtsi| 281 +++++++++++++++++++++++++++Quoted 2 lines
1 file changed, 281 insertions(+)will fix this.
Quoted 15 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3675
Quoted 13 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +5
-0@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0xc263000 0x0 0x1ff>, + <0x0 0xc222000 0x0 0x8>;Pad the address part to 8 hex digits with leading zeroes> + interrupts = <
GIC_SPI506IRQ_TYPE_LEVEL_HIGH>,
Quoted 6 lines
Quoted 5 lines
&pdc 26
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3677
Quoted 1 line
arch/arm64/boot/dts/qcom/qcs615.dtsi +1
-0+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;&pdc 28
we don't want to mark this as wake up capable, so using this approach.
Why not?
Quoted 21 lines
Quoted 11 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +11
-0+ + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + };Quoted 9 lines
Quoted 6 lines
+
+ trip-point1 {
+ temperature = <118000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };Please drop the passive trip point for the *CPU* tzones, see
Quoted 1 line
we are using trip-point 0 for cpu idle injection mitigation which i will add in subsequent patches, if you are fine i will add cpu idle injection cooling map in this series only ?
The folks working on qcs9xxx have made this point too, but I'm lukewarm on duplicating meaningless dt description everywhere. I've asked them to conduct some measurements on whether random default settings (that would be preset in the driver and require no additional dt fluff) show any significant difference - if not, we can save up on boilerplate.
So let's wait to hear back from them on this.
Quoted 6 lines
Quoted 5 lines
commit
06eadce936971dd11279e53b6dfb151804137836
("arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU")and add a single critical point instead, see
As critical shutdown is already supported by hardware, so we are not defining here.
The hardware critical shutdown will literally pull the plug out with the OS having no chance to sync the filesystem etc.
Please define one that's like 5 degC below the hardware limit, so that the operating system can try to take some steps to avoid data loss
Konrad
Re: [PATCH v1 2/2] arm64: dts: qcom: Enable TSENS support for QCS615 SoC
In reply to Gaurav KohliQuoted 29 lines · Gaurav Kohli
thanks for review!
Quoted 16 lines · Konrad Dybcio
Quoted 15 lines · Gaurav Kohli
Add TSENS and thermal devicetree node for QCS615 SoC.
Signed-off-by Gaurav Kohli <[email protected]>---
arch/arm64/boot/dts/qcom/qcs615.dtsi +10
-0+ cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + };Quoted 9 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi arch_timer: timer { · line 3721
Quoted 6 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +6
-0+ + trip-point1 { + temperature = <118000>; + hysteresis = <5000>; + type = "passive"; + };Please drop the passive trip point for the *CPU* tzones, see
Quoted 3 lines
we are using trip-point 0 for cpu idle injection mitigation which i will add in subsequent patches, if you are fine i will add cpu idle injection cooling map in this series only ?
I'd second Konrad here. Please drop them now and add them in the patch adding CPUidle injection cooling. Otherwise they are a perfect target for anybody to clean them away.
Quoted 7 lines
Quoted 5 lines
commit
06eadce936971dd11279e53b6dfb151804137836
("arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU")and add a single critical point instead, see
As critical shutdown is already supported by hardware, so we are not defining here.
What about letting Linux to know about it and perform a slightly graceful shutdown?
Quoted 5 lines
Quoted 4 lines
commit
03f2b8eed73418269a158ccebad5d8d8f2f6daa1
("arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown")Konrad
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v1 2/2] arm64: dts: qcom: Enable TSENS support for QCS615 SoC
In reply to Konrad DybcioQuoted 29 lines · Konrad Dybcio
Quoted 28 lines · Gaurav Kohli
thanks for review!
Quoted 9 lines · Konrad Dybcio
Quoted 4 lines · Gaurav Kohli
Add TSENS and thermal devicetree node for QCS615 SoC.
Signed-off-by Gaurav Kohli <[email protected]>---
subject: "arm64: dts: qcom: qcs615: ..">
arch/arm64/boot/dts/qcom/qcs615.dtsi| 281 +++++++++++++++++++++++++++Quoted 2 lines
1 file changed, 281 insertions(+)will fix this.
Quoted 15 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3675
Quoted 13 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +5
-0@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0xc263000 0x0 0x1ff>, + <0x0 0xc222000 0x0 0x8>;Pad the address part to 8 hex digits with leading zeroes> + interrupts = <
GIC_SPI506IRQ_TYPE_LEVEL_HIGH>,
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
&pdc 26
arch/arm64/boot/dts/qcom/qcs615.dtsi usb_2_dwc3: usb@a800000 { · line 3677
Quoted 1 line
arch/arm64/boot/dts/qcom/qcs615.dtsi +1
-0+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;&pdc 28
we don't want to mark this as wake up capable, so using this approach.
Why not?
Intention was to avoid wake up, as system is already in lowest state, please let me know if you see any concern here.
Quoted 23 lines
Quoted 21 lines
Quoted 11 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/qcs615.dtsi +11
-0+ + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + + trip-point0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + };Quoted 9 lines
Quoted 6 lines
+
+ trip-point1 {
+ temperature = <118000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };Please drop the passive trip point for the *CPU* tzones, see
Quoted 1 line
we are using trip-point 0 for cpu idle injection mitigation which i will add in subsequent patches, if you are fine i will add cpu idle injection cooling map in this series only ?
Quoted 8 lines
The folks working on qcs9xxx have made this point too, but I'm lukewarm on duplicating meaningless dt description everywhere. I've asked them to conduct some measurements on whether random default settings (that would be preset in the driver and require no additional dt fluff) show any significant difference - if not, we can save up on boilerplate.
So let's wait to hear back from them on this.
Sure will wait for latest update.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
commit
06eadce936971dd11279e53b6dfb151804137836
("arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU")and add a single critical point instead, see
Quoted 8 lines
Quoted 1 line
As critical shutdown is already supported by hardware, so we are not defining here.
The hardware critical shutdown will literally pull the plug out with the OS having no chance to sync the filesystem etc.
Please define one that's like 5 degC below the hardware limit, so that the operating system can try to take some steps to avoid data loss
Sure will post critical in next patch.
Quoted 1 line
Konrad