Skip to contentSkip to conversation

Copy tsens node from apq8064 and adjust some values

PATCH Superseded Rudraksha Gupta 3 participants 5 messages Feb 26, 2025

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Copy tsens node from apq8064 and adjust some values

---
Changes in v2:
- Remove coefficients as it's read from EEPROM
- Fix dtsi formatting
- Fix dtschema warnings introduced with v1
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Rudraksha Gupta (2):
dt-bindings: nvmem: Add compatible for MSM8960
ARM: dts: qcom: msm8960: Add tsens

 .../devicetree/bindings/nvmem/qcom,qfprom.yaml     |  1 +
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi           | 59 +++++++++++++++++++++-
 2 files changed, 59 insertions(+), 1 deletion(-)

---
base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
change-id: 20250225-expressatt-tsens-06d46587a584

Best regards,

Signature · 1 line
Rudraksha Gupta <[email protected]>
#1 lore raw

PATCH v2 1/2 dt-bindings: nvmem: Add compatible for MSM8960

Document the QFPROM on MSM8960.

---
 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +1 -0
index 80845c722ae46611c722effeaaf014a0caf76e4a..37282e89c8ad78b088f0a447891cd9301c750db2 100644
@@ -26,6 +26,7 @@ properties:
           - qcom,ipq9574-qfprom
           - qcom,msm8226-qfprom
           - qcom,msm8916-qfprom
+          - qcom,msm8960-qfprom
           - qcom,msm8974-qfprom
           - qcom,msm8976-qfprom
           - qcom,msm8996-qfprom
Signature · 1 line
2.45.2
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: nvmem: Add compatible for MSM8960

Quoted 1 line · Rudraksha Gupta

Document the QFPROM on MSM8960.

Missing SoB.

Please run scripts/checkpatch.pl and fix reported warnings.

Best regards,
Krzysztof

#3 lore raw

PATCH v2 2/2 ARM: dts: qcom: msm8960: Add tsens

In reply to Rudraksha Gupta

Copy tsens node from ap8064 and adjust some values

---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 59 +++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +58 -1
index 865fe7cc39511d7cb9ec5c4b12100404f77e2989..155d6aba61e390dabca6b72160543b5aa134b219 100644
@@ -52,6 +52,36 @@ memory@80000000 {
 		reg = <0x80000000 0>;
 	};
 
+	thermal-zones {
+		cpu0-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsens 0>;
+
+			trips {
+				cpu_alert0: trip0 {
+					temperature = <60000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsens 1>;
+
+			trips {
+				cpu_alert1: trip0 {
+					temperature = <60000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+			};
+		};
+	};
+
 	cpu-pmu {
 		compatible = "qcom,krait-pmu";
 		interrupts = <GIC_PPI 10 0x304>;
@@ -115,6 +145,21 @@ timer@200a000 {
 			cpu-offset = <0x80000>;
 		};
 
+		qfprom: efuse@700000 {
+			compatible = "qcom,msm8960-qfprom", "qcom,qfprom";
+			reg = <0x00700000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			tsens_calib: calib@404 {
+				reg = <0x404 0x10>;
+			};
+
+			tsens_backup: backup-calib@414 {
+				reg = <0x414 0x10>;
+			};
+		};
+
 		msmgpio: pinctrl@800000 {
 			compatible = "qcom,msm8960-pinctrl";
 			gpio-controller;
@@ -127,7 +172,7 @@ msmgpio: pinctrl@800000 {
 		};
 
 		gcc: clock-controller@900000 {
-			compatible = "qcom,gcc-msm8960";
+			compatible = "qcom,gcc-msm8960", "syscon";
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 			reg = <0x900000 0x4000>;
@@ -135,6 +180,18 @@ gcc: clock-controller@900000 {
 				 <&pxo_board>,
 				 <&lcc PLL4>;
 			clock-names = "cxo", "pxo", "pll4";
+
+			tsens: thermal-sensor {
+				compatible = "qcom,msm8960-tsens";
+
+				nvmem-cells = <&tsens_calib>, <&tsens_backup>;
+				nvmem-cell-names = "calib", "calib_backup";
+				interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "uplow";
+
+				#qcom,sensors = <5>;
+				#thermal-sensor-cells = <1>;
+			};
 		};
 
 		lcc: clock-controller@28000000 {
Signature · 1 line
2.45.2
#4 lore raw

Re: [PATCH v2 2/2] ARM: dts: qcom: msm8960: Add tsens

Quoted 1 line · Rudraksha Gupta

Copy tsens node from ap8064 and adjust some values

Which values?

Quoted 3 lines

This doesn't look like a name.

Quoted 5 lines
---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 59 +++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)
Signature · 2 lines
With best wishes
Dmitry