devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960
@ 2025-02-28  1:16 Rudraksha Gupta
  2025-02-28  1:16 ` [PATCH v4 1/2] dt-bindings: nvmem: Add compatible for MSM8960 Rudraksha Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rudraksha Gupta @ 2025-02-28  1:16 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Srinivas Kandagatla
  Cc: linux-arm-msm, devicetree, linux-kernel, wctrl, Rudraksha Gupta,
	Krzysztof Kozlowski, Dmitry Baryshkov

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
Changes in v4:
- Reword tsens commit message
- Add critical trip
- Link to v3: https://lore.kernel.org/r/20250226-expressatt-tsens-v3-0-bbf898dbec52@gmail.com

Changes in v3:
- Add signoff to dt-bindings commit
- Describe which values have been changed when copying over tsens from apq8064
- Drop wctrl as they want to remain anonymous. They have been CC'd as acknowledgement
- Link to v2: https://lore.kernel.org/r/20250226-expressatt-tsens-v2-0-7a4ce3a91f27@gmail.com

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/20250225-expressatt-tsens-v1-1-024bee5f2047@gmail.com

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

 .../devicetree/bindings/nvmem/qcom,qfprom.yaml     |  1 +
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi           | 71 +++++++++++++++++++++-
 2 files changed, 71 insertions(+), 1 deletion(-)
---
base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
change-id: 20250225-expressatt-tsens-06d46587a584

Best regards,
-- 
Rudraksha Gupta <guptarud@gmail.com>


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

* [PATCH v4 1/2] dt-bindings: nvmem: Add compatible for MSM8960
  2025-02-28  1:16 [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Rudraksha Gupta
@ 2025-02-28  1:16 ` Rudraksha Gupta
  2025-02-28  1:16 ` [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens) Rudraksha Gupta
  2025-03-14 20:00 ` (subset) [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Rudraksha Gupta @ 2025-02-28  1:16 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Srinivas Kandagatla
  Cc: linux-arm-msm, devicetree, linux-kernel, wctrl, Rudraksha Gupta,
	Krzysztof Kozlowski

Document the QFPROM on MSM8960.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 80845c722ae46611c722effeaaf014a0caf76e4a..37282e89c8ad78b088f0a447891cd9301c750db2 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -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

-- 
2.45.2


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

* [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens)
  2025-02-28  1:16 [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Rudraksha Gupta
  2025-02-28  1:16 ` [PATCH v4 1/2] dt-bindings: nvmem: Add compatible for MSM8960 Rudraksha Gupta
@ 2025-02-28  1:16 ` Rudraksha Gupta
  2025-03-08 17:48   ` Konrad Dybcio
  2025-03-14 20:00 ` (subset) [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Bjorn Andersson
  2 siblings, 1 reply; 5+ messages in thread
From: Rudraksha Gupta @ 2025-02-28  1:16 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Srinivas Kandagatla
  Cc: linux-arm-msm, devicetree, linux-kernel, wctrl, Rudraksha Gupta,
	Dmitry Baryshkov

Add support for the thermal sensor (tsens) on the MSM8960 by copying and
modifying the relevant nodes from the APQ8064 dtsi. These changes enable
thermal management.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 71 +++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
index 865fe7cc39511d7cb9ec5c4b12100404f77e2989..be4a60119e1d85e02080a7aaf18b1e9f1176e56e 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
@@ -52,6 +52,48 @@ 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";
+				};
+
+				cpu_crit0: trip1 {
+					temperature = <95000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsens 1>;
+
+			trips {
+				cpu_alert1: trip0 {
+					temperature = <60000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+
+				cpu_crit1: trip1 {
+					temperature = <95000>;
+					hysteresis = <10000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	cpu-pmu {
 		compatible = "qcom,krait-pmu";
 		interrupts = <GIC_PPI 10 0x304>;
@@ -115,6 +157,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 +184,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 +192,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 {

-- 
2.45.2


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

* Re: [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens)
  2025-02-28  1:16 ` [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens) Rudraksha Gupta
@ 2025-03-08 17:48   ` Konrad Dybcio
  0 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2025-03-08 17:48 UTC (permalink / raw)
  To: Rudraksha Gupta, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla
  Cc: linux-arm-msm, devicetree, linux-kernel, wctrl, Dmitry Baryshkov

On 28.02.2025 2:16 AM, Rudraksha Gupta wrote:
> Add support for the thermal sensor (tsens) on the MSM8960 by copying and
> modifying the relevant nodes from the APQ8064 dtsi. These changes enable
> thermal management.
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: (subset) [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960
  2025-02-28  1:16 [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Rudraksha Gupta
  2025-02-28  1:16 ` [PATCH v4 1/2] dt-bindings: nvmem: Add compatible for MSM8960 Rudraksha Gupta
  2025-02-28  1:16 ` [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens) Rudraksha Gupta
@ 2025-03-14 20:00 ` Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2025-03-14 20:00 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Srinivas Kandagatla, Rudraksha Gupta
  Cc: linux-arm-msm, devicetree, linux-kernel, wctrl,
	Krzysztof Kozlowski, Dmitry Baryshkov


On Thu, 27 Feb 2025 17:16:53 -0800, Rudraksha Gupta wrote:
> 


Applied, thanks!

[2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens)
      commit: 4712dbd5fabdd5909b8b3367dfafd61f502b3bb7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2025-03-14 20:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28  1:16 [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Rudraksha Gupta
2025-02-28  1:16 ` [PATCH v4 1/2] dt-bindings: nvmem: Add compatible for MSM8960 Rudraksha Gupta
2025-02-28  1:16 ` [PATCH v4 2/2] ARM: dts: qcom: msm8960: Add thermal sensor (tsens) Rudraksha Gupta
2025-03-08 17:48   ` Konrad Dybcio
2025-03-14 20:00 ` (subset) [PATCH v4 0/2] Copy tsens node from apq8064 and adjust values for msm8960 Bjorn Andersson

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