devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration
@ 2025-01-11  8:32 Pengyu Luo
  2025-01-11  8:32 ` [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices Pengyu Luo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pengyu Luo @ 2025-01-11  8:32 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Pengyu Luo, linux-arm-msm, devicetree, linux-kernel

According to the binding for qcom,spmi-pmic-arb, the cell 1 should be
slave id, the slave id of pmc8280_2 is 3.

Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 1e3babf2e..c19fb9c39 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -212,7 +212,7 @@ pmc8280_2: pmic@3 {
 		pm8280_2_temp_alarm: temp-alarm@a00 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0xa00>;
-			interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&spmi_bus 0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
 			io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(3)>;
 			io-channel-names = "thermal";
 			#thermal-sensor-cells = <0>;
-- 
2.47.1


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

* [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices
  2025-01-11  8:32 [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Pengyu Luo
@ 2025-01-11  8:32 ` Pengyu Luo
  2025-01-11 10:10 ` [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Konrad Dybcio
  2025-01-12  2:08 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Pengyu Luo @ 2025-01-11  8:32 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Pengyu Luo, linux-arm-msm, devicetree, linux-kernel

There are 4 Qualcomm PMIC Die Temp Alarm Sensor Devices under windows os,
in separate dt files, pm8350c and pmr735a have already support temp alarm,
add the rest 2 devices for sc8280xp-pmic.

Temperature trip points are from dsdt(Temp. in tenths of degrees Kelvin).

example:
    Name (TPSV, 0x0E60) // 0x0E60 - 2730 = 950
    Method (_PSV, 0, NotSerialized)  // _PSV: Passive Temperature
    {
        Return (\_SB.TZ15.TPSV)
    }

    Name (TCRT, 0x0F28) // 0X0F28 - 2730 = 1150
    Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
    {
        Return (\_SB.TZ15.TCRT)
    }

Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 56 ++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index c19fb9c39..307df1d3d 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -32,6 +32,26 @@ trip1 {
 			};
 		};
 
+		pmc8280c_thermal: pmc8280c-thermal {
+			polling-delay-passive = <100>;
+
+			thermal-sensors = <&pmc8280c_temp_alarm>;
+
+			trips {
+				trip0 {
+					temperature = <95000>;
+					hysteresis = <0>;
+					type = "passive";
+				};
+
+				trip1 {
+					temperature = <115000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+		};
+
 		pm8280_2_thermal: pm8280-2-thermal {
 			polling-delay-passive = <100>;
 
@@ -51,6 +71,26 @@ trip1 {
 				};
 			};
 		};
+
+		pmr735a_thermal: pmr735a-thermal {
+			polling-delay-passive = <100>;
+
+			thermal-sensors = <&pmr735a_temp_alarm>;
+
+			trips {
+				trip0 {
+					temperature = <95000>;
+					hysteresis = <0>;
+					type = "passive";
+				};
+
+				trip1 {
+					temperature = <115000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+		};
 	};
 };
 
@@ -181,6 +221,13 @@ pmc8280c: pmic@2 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pmc8280c_temp_alarm: temp-alarm@a00 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0xa00>;
+			interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		pmc8280c_gpios: gpio@8800 {
 			compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio";
 			reg = <0x8800>;
@@ -235,6 +282,15 @@ pmr735a: pmic@4 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pmr735a_temp_alarm: temp-alarm@a00 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0xa00>;
+			interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			io-channels = <&pmk8280_vadc PMR735A_ADC7_DIE_TEMP>;
+			io-channel-names = "thermal";
+			#thermal-sensor-cells = <0>;
+		};
+
 		pmr735a_gpios: gpio@8800 {
 			compatible = "qcom,pmr735a-gpio", "qcom,spmi-gpio";
 			reg = <0x8800>;
-- 
2.47.1


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

* Re: [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration
  2025-01-11  8:32 [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Pengyu Luo
  2025-01-11  8:32 ` [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices Pengyu Luo
@ 2025-01-11 10:10 ` Konrad Dybcio
  2025-01-12  2:08 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2025-01-11 10:10 UTC (permalink / raw)
  To: Pengyu Luo, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11.01.2025 9:32 AM, Pengyu Luo wrote:
> According to the binding for qcom,spmi-pmic-arb, the cell 1 should be
> slave id, the slave id of pmc8280_2 is 3.
> 
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---

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

Konrad

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

* Re: (subset) [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration
  2025-01-11  8:32 [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Pengyu Luo
  2025-01-11  8:32 ` [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices Pengyu Luo
  2025-01-11 10:10 ` [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Konrad Dybcio
@ 2025-01-12  2:08 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2025-01-12  2:08 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Pengyu Luo
  Cc: linux-arm-msm, devicetree, linux-kernel


On Sat, 11 Jan 2025 16:32:07 +0800, Pengyu Luo wrote:
> According to the binding for qcom,spmi-pmic-arb, the cell 1 should be
> slave id, the slave id of pmc8280_2 is 3.
> 
> 

Applied, thanks!

[2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices
      commit: efd5b51452c7e9fc60b51d09716fe163b67657b9

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

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

end of thread, other threads:[~2025-01-12  2:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11  8:32 [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Pengyu Luo
2025-01-11  8:32 ` [PATCH 2/2] arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices Pengyu Luo
2025-01-11 10:10 ` [PATCH 1/2] arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration Konrad Dybcio
2025-01-12  2:08 ` (subset) " 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).