Message ID | 20250613112402.2203617-3-quic_gkohli@quicinc.com |
---|---|
State | New |
Headers | show |
Series | Enable TSENS and thermal zone for QCS615 SoC | expand |
On Fri, Jun 13, 2025 at 04:54:02PM +0530, Gaurav Kohli wrote: > Add TSENS and thermal devicetree node for QCS615 SoC. > > Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com> > Please don't edit the patches when sending. You seem to have removed the diffstat. That doesn't help the reviewers. Nevertheless: Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi > index bb8b6c3ebd03..fda8b8638718 100644 > --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi > +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi > @@ -3692,6 +3692,17 @@ usb_2_dwc3: usb@a800000 { > maximum-speed = "high-speed"; > }; > }; > + > + tsens0: tsens@c222000 { > + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; > + reg = <0x0 0x0c263000 0x0 0x1ff>, > + <0x0 0x0c222000 0x0 0x8>; > + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "uplow", "critical"; > + #qcom,sensors = <16>; > + #thermal-sensor-cells = <1>; > + }; > }; > > arch_timer: timer { > @@ -3701,4 +3712,198 @@ 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 { > + aoss-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpuss-0-thermal { > + thermal-sensors = <&tsens0 1>; > + > + trips { > + cpuss0-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpuss-1-thermal { > + thermal-sensors = <&tsens0 2>; > + > + trips { > + cpuss1-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpuss-2-thermal { > + thermal-sensors = <&tsens0 3>; > + > + trips { > + cpuss2-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpuss-3-thermal { > + thermal-sensors = <&tsens0 4>; > + > + trips { > + cpuss3-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpu-1-0-thermal { > + thermal-sensors = <&tsens0 5>; > + > + trips { > + cpu-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpu-1-1-thermal { > + thermal-sensors = <&tsens0 6>; > + > + trips { > + cpu-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpu-1-2-thermal { > + thermal-sensors = <&tsens0 7>; > + > + trips { > + cpu-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + cpu-1-3-thermal { > + thermal-sensors = <&tsens0 8>; > + > + trips { > + cpu-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + gpu-thermal { > + thermal-sensors = <&tsens0 9>; > + > + trips { > + gpu-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + q6-hvx-thermal { > + thermal-sensors = <&tsens0 10>; > + > + trips { > + q6-hvx-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + mdm-core-thermal { > + thermal-sensors = <&tsens0 11>; > + > + trips { > + mdm-core-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + camera-thermal { > + thermal-sensors = <&tsens0 12>; > + > + trips { > + camera-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + wlan-thermal { > + thermal-sensors = <&tsens0 13>; > + > + trips { > + wlan-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + display-thermal { > + thermal-sensors = <&tsens0 14>; > + > + trips { > + display-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + > + video-thermal { > + thermal-sensors = <&tsens0 15>; > + > + trips { > + video-critical { > + temperature = <115000>; > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + }; > + }; > }; > -- > 2.34.1 >
On 13/06/2025 13:24, Gaurav Kohli wrote: > Add TSENS and thermal devicetree node for QCS615 SoC. > > Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com> > > diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi > index bb8b6c3ebd03..fda8b8638718 100644 > --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi > +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi > @@ -3692,6 +3692,17 @@ usb_2_dwc3: usb@a800000 { > maximum-speed = "high-speed"; > }; > }; > + > + tsens0: tsens@c222000 { Don't send us downstream. Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Best regards, Krzysztof
On 6/13/2025 6:12 PM, Krzysztof Kozlowski wrote: > On 13/06/2025 13:24, Gaurav Kohli wrote: >> Add TSENS and thermal devicetree node for QCS615 SoC. >> >> Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com> >> >> diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi >> index bb8b6c3ebd03..fda8b8638718 100644 >> --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi >> +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi >> @@ -3692,6 +3692,17 @@ usb_2_dwc3: usb@a800000 { >> maximum-speed = "high-speed"; >> }; >> }; >> + >> + tsens0: tsens@c222000 { > > Don't send us downstream. Node names should be generic. See also an > explanation and list of examples (not exhaustive) in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > thanks for review & comment, will fix the naming. > Best regards, > Krzysztof >
diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi index bb8b6c3ebd03..fda8b8638718 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -3692,6 +3692,17 @@ usb_2_dwc3: usb@a800000 { maximum-speed = "high-speed"; }; }; + + tsens0: tsens@c222000 { + compatible = "qcom,qcs615-tsens", "qcom,tsens-v2"; + reg = <0x0 0x0c263000 0x0 0x1ff>, + <0x0 0x0c222000 0x0 0x8>; + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "uplow", "critical"; + #qcom,sensors = <16>; + #thermal-sensor-cells = <1>; + }; }; arch_timer: timer { @@ -3701,4 +3712,198 @@ 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 { + aoss-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpuss-0-thermal { + thermal-sensors = <&tsens0 1>; + + trips { + cpuss0-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpuss-1-thermal { + thermal-sensors = <&tsens0 2>; + + trips { + cpuss1-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpuss-2-thermal { + thermal-sensors = <&tsens0 3>; + + trips { + cpuss2-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpuss-3-thermal { + thermal-sensors = <&tsens0 4>; + + trips { + cpuss3-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu-1-0-thermal { + thermal-sensors = <&tsens0 5>; + + trips { + cpu-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu-1-1-thermal { + thermal-sensors = <&tsens0 6>; + + trips { + cpu-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu-1-2-thermal { + thermal-sensors = <&tsens0 7>; + + trips { + cpu-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu-1-3-thermal { + thermal-sensors = <&tsens0 8>; + + trips { + cpu-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + thermal-sensors = <&tsens0 9>; + + trips { + gpu-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + q6-hvx-thermal { + thermal-sensors = <&tsens0 10>; + + trips { + q6-hvx-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + mdm-core-thermal { + thermal-sensors = <&tsens0 11>; + + trips { + mdm-core-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + camera-thermal { + thermal-sensors = <&tsens0 12>; + + trips { + camera-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + wlan-thermal { + thermal-sensors = <&tsens0 13>; + + trips { + wlan-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + display-thermal { + thermal-sensors = <&tsens0 14>; + + trips { + display-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + video-thermal { + thermal-sensors = <&tsens0 15>; + + trips { + video-critical { + temperature = <115000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + }; };
Add TSENS and thermal devicetree node for QCS615 SoC. Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>