Enable IPQ9574 TSENS support
Subsystems (5)
v4 cover Enable IPQ9574 TSENS support
This patch set enables tsens in IPQ9574
Depends on
https://lore.kernel.org/linux-arm-msm/[email protected]/
[v4]:
Drop the sm6375-tsens and qcm2290-tsens related bindings fix as it is already posted
Remove unnecessary changes from previous version
[v3]:
Fix make DT_CHECKER_FLAGS=-m dt_binding_check and make dtbs_check errors
[v2]:
Drop the driver change (https://lore.kernel.org/lkml/b45d33d38a334aabbd52c83b0d6028af1f4c74c8.1682682753.git.quic_varada@quicinc.com/)
since the tsens device is compatible with 8074's tsens
and use 8074's compatible itself
Rename clusterX nodes as cpussX
[v1]:
Fix DT node names
[v0]:
Initial patch introducing TSENS support
Praveenkumar I (1):
dt-bindings: thermal: tsens: Add ipq9574 compatible
Varadarajan Narayanan (2):
arm64: dts: qcom: ipq9574: add tsens node
arm64: dts: qcom: ipq9574: add thermal zone nodes
.../devicetree/bindings/thermal/qcom-tsens.yaml | 11 +- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 217 +++++++++++++++++++++ 2 files changed, 226 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
PATCH v4 1/3 dt-bindings: thermal: tsens: Add ipq9574 compatible
From: Praveenkumar I <[email protected]>
Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
---
[v4]:
Add description about IPQ9574 and remove unnecessary additions to the file
[v3]:
Fix dt_binding_check & dtbs_check errors (Used Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml as reference/example)
Drop 'Acked-by: Rob Herring' as suggested in review
[v2]:
Thanks to Krzysztof Kozlowski <[email protected]> for the tip to make qcom,ipq8074-tsens as fallback.
--- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +9 -2
@@ -16,9 +16,14 @@ description: | The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures everything before v1 when there was no versioning information. + Since IPQ9574 is similar to IPQ8074, mapping it to IPQ8074 without + introducing a new compatible. + properties: compatible: oneOf: + - const: qcom,ipq8074-tsens + - description: msm8960 TSENS based items: - enum:
@@ -64,8 +69,10 @@ properties: - const: qcom,tsens-v2 - description: v2 of TSENS with combined interrupt - enum: - - qcom,ipq8074-tsens + items: + - enum: + - qcom,ipq9574-tsens + - const: qcom,ipq8074-tsens reg: items:
Signature · 1 line
2.7.4
Re: [PATCH v4 1/3] dt-bindings: thermal: tsens: Add ipq9574 compatible
Quoted 15 lines · Varadarajan Narayanan
From: Praveenkumar I <[email protected]>
Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
Signed-off-by Praveenkumar I <[email protected]>Signed-off-by Varadarajan Narayanan <[email protected]>---
[v4]:
Add description about IPQ9574 and remove unnecessary additions to the file
[v3]:
Fixdt_binding_check&dtbs_checkerrors (UsedDocumentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yamlas reference/example)
Quoted 5 lines
Drop 'Acked-by: Rob Herring' as suggested in review
[v2]:
Thanks to Krzysztof Kozlowski <[email protected]> for the tip to make qcom,ipq8074-tsens as fallback.
Thanks for re-sending. I'm going to "ignore" this patch & Krzysztof can take a look at it next week.
Cheers,
Conor.
Quoted 39 lines
--- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +9
-2@@ -16,9 +16,14 @@ description: | The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures everything before v1 when there was no versioning information. + Since IPQ9574 is similar to IPQ8074, mapping it to IPQ8074 without + introducing a new compatible. + properties: compatible: oneOf: + - const: qcom,ipq8074-tsens + - description: msm8960 TSENS based items: - enum:@@ -64,8 +69,10 @@ properties: - const: qcom,tsens-v2 - description: v2 of TSENS with combined interrupt - enum: - - qcom,ipq8074-tsens + items: + - enum: + - qcom,ipq9574-tsens + - const: qcom,ipq8074-tsens reg: items:Signature · 1 line
2.7.4
Re: [PATCH v4 1/3] dt-bindings: thermal: tsens: Add ipq9574 compatible
In reply to Varadarajan NarayananQuoted 29 lines · Varadarajan Narayanan
From: Praveenkumar I <[email protected]>
Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens.
Signed-off-by Praveenkumar I <[email protected]>Signed-off-by Varadarajan Narayanan <[email protected]>---
[v4]:
Add description about IPQ9574 and remove unnecessary additions to the file
[v3]:
Fixdt_binding_check&dtbs_checkerrors (UsedDocumentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yamlas reference/example)Drop 'Acked-by: Rob Herring' as suggested in review
[v2]:
Thanks to Krzysztof Kozlowski <[email protected]> for the tip to make qcom,ipq8074-tsens as fallback.--- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +0
-0
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml description: | · line 25
Quoted 10 lines
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +4
-0@@ -16,9 +16,14 @@ description: | The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures everything before v1 when there was no versioning information. + Since IPQ9574 is similar to IPQ8074, mapping it to IPQ8074 without + introducing a new compatible. + properties: compatible: oneOf: + - const: qcom,ipq8074-tsens
No, no need to move it to const. Was correct before.
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml properties: · line 68
Quoted 10 lines
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +1
-2+ - description: msm8960 TSENS based items: - enum:@@ -64,8 +69,10 @@ properties: - const: qcom,tsens-v2 - description: v2 of TSENS with combined interrupt - enum: - - qcom,ipq8074-tsens
Again, "-" means you remove a diff hunk. man diff and man patch (or Wikipedia, dunno).
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml properties: · line 75
Quoted 4 lines
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +4
-0+ items: + - enum: + - qcom,ipq9574-tsens + - const: qcom,ipq8074-tsens
No, do not touch existing entry.
You need new item on entire list with two compatibles:
+ items:
+ - enum:
+ - qcom,ipq9574-tsens
+ - const: qcom,ipq8074-tsens
That's it. There should be no removal hunks in your diff (so one with "-").
Best regards,
Krzysztof
PATCH v4 2/3 arm64: dts: qcom: ipq9574: add tsens node
In reply to Varadarajan NarayananIPQ9574 has a tsens v2.3.1 peripheral which monitors temperatures around the various subsystems on the die.
---
[v2]:
Add "qcom,ipq8074-tsens" as fallback compatible
--- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +9 -0
@@ -958,6 +958,15 @@ status = "disabled"; }; + tsens: thermal-sensor@4a9000 { + compatible = "qcom,ipq9574-tsens", "qcom,ipq8074-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 {
Signature · 1 line
2.7.4
Bjorn Andersson
maintainerRe: [PATCH v4 2/3] arm64: dts: qcom: ipq9574: add tsens node
Quoted 18 lines · Varadarajan Narayanan
IPQ9574 has a tsens v2.3.1 peripheral which monitors temperatures around the various subsystems on the die.
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by Varadarajan Narayanan <[email protected]>---
[v2]:
Add "qcom,ipq8074-tsens" as fallback compatible--- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/boot/dts/qcom/ipq9574.dtsi +0
-0
arch/arm64/boot/dts/qcom/ipq9574.dtsi line 963
Quoted 6 lines
arch/arm64/boot/dts/qcom/ipq9574.dtsi +3
-0@@ -958,6 +958,15 @@ status = "disabled"; }; + tsens: thermal-sensor@4a9000 { + compatible = "qcom,ipq9574-tsens", "qcom,ipq8074-tsens"; + reg = <0x4a9000 0x1000>, /* TM */
Please pad addresses to 8 digits, and sort nodes by address.
Regards,
Bjorn
Quoted 12 lines
arch/arm64/boot/dts/qcom/ipq9574.dtsi +6
-0+ <0x4a8000 0x1000>; /* SROT */ + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "combined"; + #qcom,sensors = <16>; + #thermal-sensor-cells = <1>; + }; }; timer {Signature · 1 line
2.7.4
PATCH v4 3/3 arm64: dts: qcom: ipq9574: add thermal zone nodes
In reply to Varadarajan NarayananThis patch adds thermal zone nodes for the various sensors present in IPQ9574
--- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 208 ++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +208 -0
@@ -969,6 +969,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"; + }; + }; + }; + + cpuss0-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens 8>; + + trips { + cpu-critical { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpuss1-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)>,
Signature · 1 line
2.7.4
Re: (subset) [PATCH v4 0/3] Enable IPQ9574 TSENS support
In reply to Varadarajan NarayananQuoted 9 lines · Varadarajan Narayanan
This patch set enables tsens in IPQ9574
Depends on
https://lore.kernel.org/linux-arm-msm/[email protected]/[v4]:
Drop the sm6375-tsens and qcm2290-tsens related bindings fix as it is already posted[...]
Applied, thanks!
[2/3] arm64: dts: qcom: ipq9574: add tsens node
commit: 2e0580e10e919b544d7be1b2b8fc48fc7dff1322
[3/3] arm64: dts: qcom: ipq9574: add thermal zone nodes
commit: 581dcbe60b6390c633f318a29db41d1df642e6d8Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>