2022-10-29 05:17:38

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 00/12] sc8280xp-pmic updates and X13s thermal zone support

Hello,

This series adds below updates to sc8280xp-pmics:

PM8280_{1/2}:
- Temp alarm
- Thermal zones
- VADC channels
- ADC_TM5 channels

PMK8280:
- ADC7 block
- VADC channels
- TM5 block

PMR735A:
- VADC channels

Also adds the thermal zone support to Lenovo X13s based on the thermistor
SYS_THERM6 that provides the laptop skin temperature.

The sc8280xp-pmics is based on the new PMIC7 architecture. In this, all the
ADC/TM5 measurements are collected by the primary PMIC PMK8280 from other
slave PMICs PM8280_{1/2}, PMR735A using the Programmable Boot Sequence (PBS)
and exposed them over the individual channels.

PMK8280 uses the Slave ID (SID) for identifying each slave PMICs in a system.
This ID is not static for each PMIC but rather set for each platform by the
hardware designers. So this series allows the configurable SID by modifying the
binding to accept SID values instead of hardcoding them.

This series is tested on Lenovo X13s laptop by monitoring the temperature of
the 8 on-board thermistors through IIO interface. The thermal zone support is
validated by adding loads to the CPUs and making sure the skin temperature stays
below the threshold provided in DT.

Thanks,
Mani

Changes in v2:

* Fixed issues reported by Krzysztof and "make dtbs_check"
* Collected reviews from Krzysztof
* Added the Lenovo X13s thermal zone patch

Manivannan Sadhasivam (12):
dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels
arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2}
PMICs
arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2}
PMICs
arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input
arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block
arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280
arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input
arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel
arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels
arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support

.../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +-
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 204 ++++++++++++++++++
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 83 +++++++
.../dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 ++++----
4 files changed, 333 insertions(+), 50 deletions(-)

--
2.25.1



2022-10-29 05:17:41

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 01/12] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels

As per the new ADC7 architecture used by the Qualcomm PMICs, each PMIC
has the static Slave ID (SID) assigned by default. The primary PMIC
PMK8350 is responsible for collecting the temperature/voltage data from
the slave PMICs and exposing them via it's registers.

For getting the measurements from the slave PMICs, PMK8350 uses the
channel ID encoded with the SID of the relevant PMIC. So far, the
dt-binding for the slave PMIC PM8350 assumed that there will be only
one PM8350 in a system. So it harcoded SID 1 with channel IDs.

But this got changed in platforms such as Lenovo X13s where there are a
couple of PM8350 PMICs available. So to address multiple PM8350s, change
the binding to accept the SID specified by the user and use it for
encoding the channel ID.

It should be noted that, even though the SID is static it is not
globally unique. Only the primary PMIC has the unique SID id 0.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +-
.../dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 +++++++++----------
2 files changed, 46 insertions(+), 50 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml
index feb390d50696..d20569b9b763 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml
@@ -222,8 +222,8 @@ examples:
qcom,hw-settle-time = <200>;
};

- conn-therm@47 {
- reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
+ conn-therm@147 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
@@ -247,7 +247,7 @@ examples:

conn-therm@1 {
reg = <1>;
- io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,avg-samples = <2>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h b/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
index 9426f27a1946..09fd169ad18e 100644
--- a/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
+++ b/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
@@ -6,62 +6,58 @@
#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H

-#ifndef PM8350_SID
-#define PM8350_SID 1
-#endif
-
/* ADC channels for PM8350_ADC for PMIC7 */
-#define PM8350_ADC7_REF_GND (PM8350_SID << 8 | 0x0)
-#define PM8350_ADC7_1P25VREF (PM8350_SID << 8 | 0x01)
-#define PM8350_ADC7_VREF_VADC (PM8350_SID << 8 | 0x02)
-#define PM8350_ADC7_DIE_TEMP (PM8350_SID << 8 | 0x03)
-
-#define PM8350_ADC7_AMUX_THM1 (PM8350_SID << 8 | 0x04)
-#define PM8350_ADC7_AMUX_THM2 (PM8350_SID << 8 | 0x05)
-#define PM8350_ADC7_AMUX_THM3 (PM8350_SID << 8 | 0x06)
-#define PM8350_ADC7_AMUX_THM4 (PM8350_SID << 8 | 0x07)
-#define PM8350_ADC7_AMUX_THM5 (PM8350_SID << 8 | 0x08)
-#define PM8350_ADC7_GPIO1 (PM8350_SID << 8 | 0x0a)
-#define PM8350_ADC7_GPIO2 (PM8350_SID << 8 | 0x0b)
-#define PM8350_ADC7_GPIO3 (PM8350_SID << 8 | 0x0c)
-#define PM8350_ADC7_GPIO4 (PM8350_SID << 8 | 0x0d)
+#define PM8350_ADC7_REF_GND(sid) ((sid) << 8 | 0x0)
+#define PM8350_ADC7_1P25VREF(sid) ((sid) << 8 | 0x01)
+#define PM8350_ADC7_VREF_VADC(sid) ((sid) << 8 | 0x02)
+#define PM8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | 0x03)
+
+#define PM8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | 0x04)
+#define PM8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | 0x05)
+#define PM8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | 0x06)
+#define PM8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | 0x07)
+#define PM8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | 0x08)
+#define PM8350_ADC7_GPIO1(sid) ((sid) << 8 | 0x0a)
+#define PM8350_ADC7_GPIO2(sid) ((sid) << 8 | 0x0b)
+#define PM8350_ADC7_GPIO3(sid) ((sid) << 8 | 0x0c)
+#define PM8350_ADC7_GPIO4(sid) ((sid) << 8 | 0x0d)

/* 30k pull-up1 */
-#define PM8350_ADC7_AMUX_THM1_30K_PU (PM8350_SID << 8 | 0x24)
-#define PM8350_ADC7_AMUX_THM2_30K_PU (PM8350_SID << 8 | 0x25)
-#define PM8350_ADC7_AMUX_THM3_30K_PU (PM8350_SID << 8 | 0x26)
-#define PM8350_ADC7_AMUX_THM4_30K_PU (PM8350_SID << 8 | 0x27)
-#define PM8350_ADC7_AMUX_THM5_30K_PU (PM8350_SID << 8 | 0x28)
-#define PM8350_ADC7_GPIO1_30K_PU (PM8350_SID << 8 | 0x2a)
-#define PM8350_ADC7_GPIO2_30K_PU (PM8350_SID << 8 | 0x2b)
-#define PM8350_ADC7_GPIO3_30K_PU (PM8350_SID << 8 | 0x2c)
-#define PM8350_ADC7_GPIO4_30K_PU (PM8350_SID << 8 | 0x2d)
+#define PM8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | 0x24)
+#define PM8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | 0x25)
+#define PM8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | 0x26)
+#define PM8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | 0x27)
+#define PM8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | 0x28)
+#define PM8350_ADC7_GPIO1_30K_PU(sid) ((sid) << 8 | 0x2a)
+#define PM8350_ADC7_GPIO2_30K_PU(sid) ((sid) << 8 | 0x2b)
+#define PM8350_ADC7_GPIO3_30K_PU(sid) ((sid) << 8 | 0x2c)
+#define PM8350_ADC7_GPIO4_30K_PU(sid) ((sid) << 8 | 0x2d)

/* 100k pull-up2 */
-#define PM8350_ADC7_AMUX_THM1_100K_PU (PM8350_SID << 8 | 0x44)
-#define PM8350_ADC7_AMUX_THM2_100K_PU (PM8350_SID << 8 | 0x45)
-#define PM8350_ADC7_AMUX_THM3_100K_PU (PM8350_SID << 8 | 0x46)
-#define PM8350_ADC7_AMUX_THM4_100K_PU (PM8350_SID << 8 | 0x47)
-#define PM8350_ADC7_AMUX_THM5_100K_PU (PM8350_SID << 8 | 0x48)
-#define PM8350_ADC7_GPIO1_100K_PU (PM8350_SID << 8 | 0x4a)
-#define PM8350_ADC7_GPIO2_100K_PU (PM8350_SID << 8 | 0x4b)
-#define PM8350_ADC7_GPIO3_100K_PU (PM8350_SID << 8 | 0x4c)
-#define PM8350_ADC7_GPIO4_100K_PU (PM8350_SID << 8 | 0x4d)
+#define PM8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | 0x44)
+#define PM8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | 0x45)
+#define PM8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | 0x46)
+#define PM8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | 0x47)
+#define PM8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | 0x48)
+#define PM8350_ADC7_GPIO1_100K_PU(sid) ((sid) << 8 | 0x4a)
+#define PM8350_ADC7_GPIO2_100K_PU(sid) ((sid) << 8 | 0x4b)
+#define PM8350_ADC7_GPIO3_100K_PU(sid) ((sid) << 8 | 0x4c)
+#define PM8350_ADC7_GPIO4_100K_PU(sid) ((sid) << 8 | 0x4d)

/* 400k pull-up3 */
-#define PM8350_ADC7_AMUX_THM1_400K_PU (PM8350_SID << 8 | 0x64)
-#define PM8350_ADC7_AMUX_THM2_400K_PU (PM8350_SID << 8 | 0x65)
-#define PM8350_ADC7_AMUX_THM3_400K_PU (PM8350_SID << 8 | 0x66)
-#define PM8350_ADC7_AMUX_THM4_400K_PU (PM8350_SID << 8 | 0x67)
-#define PM8350_ADC7_AMUX_THM5_400K_PU (PM8350_SID << 8 | 0x68)
-#define PM8350_ADC7_GPIO1_400K_PU (PM8350_SID << 8 | 0x6a)
-#define PM8350_ADC7_GPIO2_400K_PU (PM8350_SID << 8 | 0x6b)
-#define PM8350_ADC7_GPIO3_400K_PU (PM8350_SID << 8 | 0x6c)
-#define PM8350_ADC7_GPIO4_400K_PU (PM8350_SID << 8 | 0x6d)
+#define PM8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | 0x64)
+#define PM8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | 0x65)
+#define PM8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | 0x66)
+#define PM8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | 0x67)
+#define PM8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | 0x68)
+#define PM8350_ADC7_GPIO1_400K_PU(sid) ((sid) << 8 | 0x6a)
+#define PM8350_ADC7_GPIO2_400K_PU(sid) ((sid) << 8 | 0x6b)
+#define PM8350_ADC7_GPIO3_400K_PU(sid) ((sid) << 8 | 0x6c)
+#define PM8350_ADC7_GPIO4_400K_PU(sid) ((sid) << 8 | 0x6d)

/* 1/3 Divider */
-#define PM8350_ADC7_GPIO4_DIV3 (PM8350_SID << 8 | 0x8d)
+#define PM8350_ADC7_GPIO4_DIV3(sid) ((sid) << 8 | 0x8d)

-#define PM8350_ADC7_VPH_PWR (PM8350_SID << 8 | 0x8e)
+#define PM8350_ADC7_VPH_PWR(sid) ((sid) << 8 | 0x8e)

#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H */
--
2.25.1


2022-10-29 05:17:49

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 03/12] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2} PMICs

Add thermal zones for the PM8280_{1/2} PMICs by using the temperature
alarm blocks as the thermal sensors. Temperature trip points are
inherited from PM8350 PMIC.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 44 ++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 5de47b1434a4..397ff4995003 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -7,6 +7,50 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>

+/ {
+ thermal-zones {
+ pm8280_1_thermal: pm8280-1-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8280_1_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>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8280_2_temp_alarm>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
&spmi_bus {
pmk8280: pmic@0 {
compatible = "qcom,pmk8350", "qcom,spmi-pmic";
--
2.25.1


2022-10-29 05:17:55

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 04/12] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input

The RESIN input can be used to reset the PMK8280 PMIC. Enabling the
RESIN block allows the PMK8280 to detect reset input via RESIN_N pin.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 397ff4995003..4a3464f5e6e9 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -68,6 +68,12 @@ pmk8280_pon_pwrkey: pwrkey {
linux,code = <KEY_POWER>;
status = "disabled";
};
+
+ pmk8280_pon_resin: resin {
+ compatible = "qcom,pmk8350-resin";
+ interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
+ status = "disabled";
+ };
};
};

--
2.25.1


2022-10-29 05:18:01

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 05/12] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block

Add support for ADC7 block available in PMK8280 for reading the
temperature via the AMUX pins.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 4a3464f5e6e9..3c56e4cb5b5b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -75,6 +75,15 @@ pmk8280_pon_resin: resin {
status = "disabled";
};
};
+
+ pmk8280_vadc: adc@3100 {
+ compatible = "qcom,spmi-adc7";
+ reg = <0x3100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+ };
};

pmc8280_1: pmic@1 {
--
2.25.1


2022-10-29 05:18:10

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 02/12] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs

Add support for temperature alarm feature in the PM8280_{1/2} PMICs.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 24836b6b9bbc..5de47b1434a4 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -33,6 +33,13 @@ pmc8280_1: pmic@1 {
#address-cells = <1>;
#size-cells = <0>;

+ pm8280_1_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
pmc8280_1_gpios: gpio@8800 {
compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
@@ -78,6 +85,13 @@ pmc8280_2: pmic@3 {
#address-cells = <1>;
#size-cells = <0>;

+ pm8280_2_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
pmc8280_2_gpios: gpio@8800 {
compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
--
2.25.1


2022-10-29 05:18:20

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 07/12] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input

Enable resetting the PMK8280 through RESIN block in SC8280XP X13s.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index b2b744bb8a53..6aa8cf6d9776 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -169,6 +169,10 @@ &pmk8280_pon_pwrkey {
status = "okay";
};

+&pmk8280_pon_resin {
+ status = "okay";
+};
+
&qup0 {
status = "okay";
};
--
2.25.1


2022-10-29 05:18:24

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 08/12] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels

Add VADC channels for measuring the on-chip die temperature and external
crystal osciallator temperature of PMK8280.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 6aa8cf6d9776..18315743313b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -7,6 +7,7 @@
/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>

#include "sc8280xp.dtsi"
@@ -173,6 +174,23 @@ &pmk8280_pon_resin {
status = "okay";
};

+&pmk8280_vadc {
+ status = "okay";
+
+ pmic-die-temp@3 {
+ reg = <PMK8350_ADC7_DIE_TEMP>;
+ label = "pmk8280_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ xo-therm@44 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ label = "pmk8280_xo_therm";
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+};
+
&qup0 {
status = "okay";
};
--
2.25.1


2022-10-29 05:18:42

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 09/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels

Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die
temperature and external thermistors connected to the AMUX pins.

The measurements are collected by the primary PMIC PMK8280 from the
secondary PMICs PM8280_{1/2} and exposed over the PMK8280's VADC channels.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 18315743313b..250e1489f029 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -7,6 +7,7 @@
/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>

@@ -189,6 +190,66 @@ xo-therm@44 {
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
+
+ pmic-die-temp@103 {
+ reg = <PM8350_ADC7_DIE_TEMP(1)>;
+ label = "pm8280_1_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ sys-therm@144 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@145 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@146 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@147 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ pmic-die-temp@303 {
+ reg = <PM8350_ADC7_DIE_TEMP(3)>;
+ label = "pm8250_2_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ sys-therm@344 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@345 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@346 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm@347 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
};

&qup0 {
--
2.25.1


2022-10-29 05:18:42

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 10/12] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel

Add VADC channel of PMR735A for measuring the on-chip die temperature.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 250e1489f029..9545b471c2fa 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -9,6 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>

#include "sc8280xp.dtsi"
@@ -250,6 +251,12 @@ sys-therm@347 {
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
+
+ pmic-die-temp@403 {
+ reg = <PMR735A_ADC7_DIE_TEMP>;
+ label = "pmr735a_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
};

&qup0 {
--
2.25.1


2022-10-29 05:19:20

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 11/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels

Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperature from
external thermistors connected to AMUX pins. The temperture measurements
are collected from the PMK8280's VADC channels that expose the
measurements from secondary PMICs PM8280_{1/2}.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 68 +++++++++++++++++++
1 file changed, 68 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 9545b471c2fa..ca77c19c6d0d 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -259,6 +259,74 @@ pmic-die-temp@403 {
};
};

+&pmk8280_adc_tm {
+ status = "okay";
+
+ sys-therm@0 {
+ reg = <0>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@1 {
+ reg = <1>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@2 {
+ reg = <2>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@3 {
+ reg = <3>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@4 {
+ reg = <4>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@5 {
+ reg = <5>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@6 {
+ reg = <6>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sys-therm@7 {
+ reg = <7>;
+ io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+ qcom,avg-samples = <2>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
&qup0 {
status = "okay";
};
--
2.25.1


2022-10-29 06:24:20

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support

Add thermal zone support by making use of the thermistor SYS_THERM6.
Based on experiments, this thermistor seems to reflect the actual
surface temperature of the laptop.

For the cooling device, all BIG CPU cores are throttle down to keep the
temperature at a sane level.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index ca77c19c6d0d..96e2fa72f782 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -29,6 +29,52 @@ backlight {
pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
};

+ thermal-zones {
+ skin-temp-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8280_adc_tm 5>;
+
+ trips {
+ skin_temp_alert0: trip-point0 {
+ temperature = <55000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ skin_temp_alert1: trip-point1 {
+ temperature = <58000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ skin-temp-crit {
+ temperature = <73000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&skin_temp_alert0>;
+ cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+
+ map1 {
+ trip = <&skin_temp_alert1>;
+ cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
vreg_edp_bl: regulator-edp-bl {
compatible = "regulator-fixed";

--
2.25.1


2022-10-29 06:24:29

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v2 06/12] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280

Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the
temperature from secondary PMICs like PM8280.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 3c56e4cb5b5b..6f95743bf87d 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -84,6 +84,16 @@ pmk8280_vadc: adc@3100 {
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
#io-channel-cells = <1>;
};
+
+ pmk8280_adc_tm: adc-tm@3400 {
+ compatible = "qcom,spmi-adc-tm5-gen2";
+ reg = <0x3400>;
+ interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #thermal-sensor-cells = <1>;
+ status = "disabled";
+ };
};

pmc8280_1: pmic@1 {
--
2.25.1


2022-10-29 14:17:16

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 05/12] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add support for ADC7 block available in PMK8280 for reading the
> temperature via the AMUX pins.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 4a3464f5e6e9..3c56e4cb5b5b 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -75,6 +75,15 @@ pmk8280_pon_resin: resin {
> status = "disabled";
> };
> };
> +
> + pmk8280_vadc: adc@3100 {
> + compatible = "qcom,spmi-adc7";
> + reg = <0x3100>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
> + #io-channel-cells = <1>;
Maybe having interrupts after reg and all the -cells below that would look better.

For the contents though:

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> + };
> };
>
> pmc8280_1: pmic@1 {

2022-10-29 14:17:26

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 04/12] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> The RESIN input can be used to reset the PMK8280 PMIC. Enabling the
> RESIN block allows the PMK8280 to detect reset input via RESIN_N pin.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 397ff4995003..4a3464f5e6e9 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -68,6 +68,12 @@ pmk8280_pon_pwrkey: pwrkey {
> linux,code = <KEY_POWER>;
> status = "disabled";
> };
> +
> + pmk8280_pon_resin: resin {
> + compatible = "qcom,pmk8350-resin";
> + interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
> + status = "disabled";
> + };
> };
> };
>

2022-10-29 14:24:18

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 03/12] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2} PMICs



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add thermal zones for the PM8280_{1/2} PMICs by using the temperature
> alarm blocks as the thermal sensors. Temperature trip points are
> inherited from PM8350 PMIC.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 44 ++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 5de47b1434a4..397ff4995003 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -7,6 +7,50 @@
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/spmi/spmi.h>
>
> +/ {
> + thermal-zones {
> + pm8280_1_thermal: pm8280-1-thermal {
> + polling-delay-passive = <100>;
> + polling-delay = <0>;
> + thermal-sensors = <&pm8280_1_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>;
> + polling-delay = <0>;
> + thermal-sensors = <&pm8280_2_temp_alarm>;
> +
> + trips {
> + trip0 {
> + temperature = <95000>;
> + hysteresis = <0>;
> + type = "passive";
> + };
> +
> + trip1 {
> + temperature = <115000>;
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> + };
> + };
> +};
> +
> &spmi_bus {
> pmk8280: pmic@0 {
> compatible = "qcom,pmk8350", "qcom,spmi-pmic";

2022-10-29 14:41:22

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 08/12] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add VADC channels for measuring the on-chip die temperature and external
> crystal osciallator temperature of PMK8280.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 6aa8cf6d9776..18315743313b 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -7,6 +7,7 @@
> /dts-v1/;
>
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>
> #include "sc8280xp.dtsi"
> @@ -173,6 +174,23 @@ &pmk8280_pon_resin {
> status = "okay";
> };
>
> +&pmk8280_vadc {
> + status = "okay";
As I mentioned in the patch adding this to the PMIC DTSI, it's enabled by default (perhaps by mistake).
> +
> + pmic-die-temp@3 {
> + reg = <PMK8350_ADC7_DIE_TEMP>;
> + label = "pmk8280_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> +
> + xo-therm@44 {
> + reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
> + label = "pmk8280_xo_therm";
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
having qcom,hw-settle-time above qcom,ratiometric would make this more reverse-Christmas-tree-y, but
maybe I'm just picky..

For the contents though:

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> + };
> +};
> +
> &qup0 {
> status = "okay";
> };

2022-10-29 14:44:33

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 10/12] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add VADC channel of PMR735A for measuring the on-chip die temperature.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 250e1489f029..9545b471c2fa 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -9,6 +9,7 @@
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
> #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>
> #include "sc8280xp.dtsi"
> @@ -250,6 +251,12 @@ sys-therm@347 {
> qcom,ratiometric;
> qcom,hw-settle-time = <200>;
> };
> +
> + pmic-die-temp@403 {
> + reg = <PMR735A_ADC7_DIE_TEMP>;
> + label = "pmr735a_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> };
>
> &qup0 {

2022-10-29 14:54:57

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 06/12] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the
> temperature from secondary PMICs like PM8280.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 3c56e4cb5b5b..6f95743bf87d 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -84,6 +84,16 @@ pmk8280_vadc: adc@3100 {
> interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
> #io-channel-cells = <1>;
> };
> +
> + pmk8280_adc_tm: adc-tm@3400 {
> + compatible = "qcom,spmi-adc-tm5-gen2";
> + reg = <0x3400>;
> + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #thermal-sensor-cells = <1>;
> + status = "disabled";
> + };
> };
>
> pmc8280_1: pmic@1 {

2022-10-29 14:57:19

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 05/12] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block



On 29.10.2022 16:15, Konrad Dybcio wrote:
>
>
> On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
>> Add support for ADC7 block available in PMK8280 for reading the
>> temperature via the AMUX pins.
>>
>> Signed-off-by: Manivannan Sadhasivam <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
>> index 4a3464f5e6e9..3c56e4cb5b5b 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
>> @@ -75,6 +75,15 @@ pmk8280_pon_resin: resin {
>> status = "disabled";
>> };
>> };
>> +
>> + pmk8280_vadc: adc@3100 {
>> + compatible = "qcom,spmi-adc7";
>> + reg = <0x3100>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
>> + #io-channel-cells = <1>;
> Maybe having interrupts after reg and all the -cells below that would look better.
>
> For the contents though:
>
> Reviewed-by: Konrad Dybcio <[email protected]>
>
> Konrad
Sorry for double noise, I just noticed you didn't disable this by default. Was that intended?

Konrad
>> + };
>> };
>>
>> pmc8280_1: pmic@1 {

2022-10-29 15:02:46

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 11/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperature from
> external thermistors connected to AMUX pins. The temperture measurements
> are collected from the PMK8280's VADC channels that expose the
> measurements from secondary PMICs PM8280_{1/2}.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 68 +++++++++++++++++++
> 1 file changed, 68 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 9545b471c2fa..ca77c19c6d0d 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -259,6 +259,74 @@ pmic-die-temp@403 {
> };
> };
>
> +&pmk8280_adc_tm {
> + status = "okay";
> +
> + sys-therm@0 {
> + reg = <0>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
If you decide to change the order in the prev patches, it applies here too.

Otherwise:

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> + };
> +
> + sys-therm@1 {
> + reg = <1>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@2 {
> + reg = <2>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@3 {
> + reg = <3>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@4 {
> + reg = <4>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@5 {
> + reg = <5>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@6 {
> + reg = <6>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +
> + sys-therm@7 {
> + reg = <7>;
> + io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
> + qcom,avg-samples = <2>;
> + qcom,ratiometric;
> + qcom,hw-settle-time-us = <200>;
> + };
> +};
> +
> &qup0 {
> status = "okay";
> };

2022-10-29 15:07:03

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add thermal zone support by making use of the thermistor SYS_THERM6.
> Based on experiments, this thermistor seems to reflect the actual
> surface temperature of the laptop.
>
> For the cooling device, all BIG CPU cores are throttle down to keep the
s/throttle/throttled

Is it okay to let the 4xA78C run at full throttle in thermal emergencies though?
> temperature at a sane level.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index ca77c19c6d0d..96e2fa72f782 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -29,6 +29,52 @@ backlight {
> pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> };
>
> + thermal-zones {
> + skin-temp-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <0>;
> + thermal-sensors = <&pmk8280_adc_tm 5>;
> +
> + trips {
> + skin_temp_alert0: trip-point0 {
> + temperature = <55000>;
> + hysteresis = <1000>;
> + type = "passive";
> + };
> +
> + skin_temp_alert1: trip-point1 {
> + temperature = <58000>;
> + hysteresis = <1000>;
> + type = "passive";
> + };
> +
> + skin-temp-crit {
> + temperature = <73000>;
Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D

Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant
burns?

Konrad
> + hysteresis = <1000>;
> + type = "critical";
> + };
> + };
> +
> + cooling-maps {
> + map0 {
> + trip = <&skin_temp_alert0>;
> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> + };
> +
> + map1 {
> + trip = <&skin_temp_alert1>;
> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> + };
> + };
> + };
> + };
> +
> vreg_edp_bl: regulator-edp-bl {
> compatible = "regulator-fixed";
>

2022-10-29 15:13:19

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 07/12] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Enable resetting the PMK8280 through RESIN block in SC8280XP X13s.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index b2b744bb8a53..6aa8cf6d9776 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -169,6 +169,10 @@ &pmk8280_pon_pwrkey {
> status = "okay";
> };
>
> +&pmk8280_pon_resin {
> + status = "okay";
> +};
> +
> &qup0 {
> status = "okay";
> };

2022-10-29 15:14:28

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 02/12] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add support for temperature alarm feature in the PM8280_{1/2} PMICs.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 24836b6b9bbc..5de47b1434a4 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -33,6 +33,13 @@ pmc8280_1: pmic@1 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> + pm8280_1_temp_alarm: temp-alarm@a00 {
> + compatible = "qcom,spmi-temp-alarm";
> + reg = <0xa00>;
> + interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
> + #thermal-sensor-cells = <0>;
> + };
> +
> pmc8280_1_gpios: gpio@8800 {
> compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
> reg = <0x8800>;
> @@ -78,6 +85,13 @@ pmc8280_2: pmic@3 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> + pm8280_2_temp_alarm: temp-alarm@a00 {
> + compatible = "qcom,spmi-temp-alarm";
> + reg = <0xa00>;
> + interrupts = <0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
> + #thermal-sensor-cells = <0>;
> + };
> +
> pmc8280_2_gpios: gpio@8800 {
> compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
> reg = <0x8800>;

2022-10-29 15:16:53

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 09/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels



On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die
> temperature and external thermistors connected to the AMUX pins.
>
> The measurements are collected by the primary PMIC PMK8280 from the
> secondary PMICs PM8280_{1/2} and exposed over the PMK8280's VADC channels.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 61 +++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 18315743313b..250e1489f029 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -7,6 +7,7 @@
> /dts-v1/;
>
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
> #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>
> @@ -189,6 +190,66 @@ xo-therm@44 {
> qcom,ratiometric;
> qcom,hw-settle-time = <200>;
> };
> +
> + pmic-die-temp@103 {
> + reg = <PM8350_ADC7_DIE_TEMP(1)>;
> + label = "pm8280_1_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> +
> + sys-therm@144 {
> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
As I mentioned in the previous patch, maybe swapping the order of these two properties
would make it look better, but of course that doesn't affect functionality.

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> + };
> +
> + sys-therm@145 {
> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + sys-therm@146 {
> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + sys-therm@147 {
> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + pmic-die-temp@303 {
> + reg = <PM8350_ADC7_DIE_TEMP(3)>;
> + label = "pm8250_2_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> +
> + sys-therm@344 {
> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + sys-therm@345 {
> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + sys-therm@346 {
> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> +
> + sys-therm@347 {
> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
> };
>
> &qup0 {

2022-10-29 19:43:22

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support

On Sat, Oct 29, 2022 at 9:29 AM Konrad Dybcio
<[email protected]> wrote:
>
>
>
> On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> > Add thermal zone support by making use of the thermistor SYS_THERM6.
> > Based on experiments, this thermistor seems to reflect the actual
> > surface temperature of the laptop.
> >
> > For the cooling device, all BIG CPU cores are throttle down to keep the
> s/throttle/throttled
>
> Is it okay to let the 4xA78C run at full throttle in thermal emergencies though?
> > temperature at a sane level.
> >
> > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> > ---
> > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
> > 1 file changed, 46 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > index ca77c19c6d0d..96e2fa72f782 100644
> > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > @@ -29,6 +29,52 @@ backlight {
> > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> > };
> >
> > + thermal-zones {
> > + skin-temp-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <0>;
> > + thermal-sensors = <&pmk8280_adc_tm 5>;
> > +
> > + trips {
> > + skin_temp_alert0: trip-point0 {
> > + temperature = <55000>;
> > + hysteresis = <1000>;
> > + type = "passive";
> > + };
> > +
> > + skin_temp_alert1: trip-point1 {
> > + temperature = <58000>;
> > + hysteresis = <1000>;
> > + type = "passive";
> > + };
> > +
> > + skin-temp-crit {
> > + temperature = <73000>;
> Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D
>
> Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant
> burns?
>

Disclaimer: I'm an end user that likes to cosplay as a kernel
developer sometimes...

IMO, it just looks scary. the skin-temp, afaik, is the temperature of
the shell of the laptop, so once it reaches 73C, it would be crit. In
practice (I've been testing this patch set for a while), I've never
been able to hit 73C, even with the ambient temperature in my
apartment being 77F and multiple compilations running. I've also
tested a hack to increase the trips to a little bit higher (65/68/73)
and still not been able to do so.

On the flip side, without this patchset, we do not have any thermal
trips at all, and the machine will quite happily run up to 90C (and
I've not seen it shut down, but I wouldn't use it on my lap when this
is occurring...)

> Konrad
> > + hysteresis = <1000>;
> > + type = "critical";
> > + };
> > + };
> > +
> > + cooling-maps {
> > + map0 {
> > + trip = <&skin_temp_alert0>;
> > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > + };
> > +
> > + map1 {
> > + trip = <&skin_temp_alert1>;
> > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > + };
> > + };
> > + };
> > + };
> > +
> > vreg_edp_bl: regulator-edp-bl {
> > compatible = "regulator-fixed";
> >

2022-10-29 20:02:16

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 00/12] sc8280xp-pmic updates and X13s thermal zone support

On Sat, Oct 29, 2022 at 12:15 AM Manivannan Sadhasivam
<[email protected]> wrote:
>
> Hello,
>
> This series adds below updates to sc8280xp-pmics:
>
> PM8280_{1/2}:
> - Temp alarm
> - Thermal zones
> - VADC channels
> - ADC_TM5 channels
>
> PMK8280:
> - ADC7 block
> - VADC channels
> - TM5 block
>
> PMR735A:
> - VADC channels
>
> Also adds the thermal zone support to Lenovo X13s based on the thermistor
> SYS_THERM6 that provides the laptop skin temperature.
>
> The sc8280xp-pmics is based on the new PMIC7 architecture. In this, all the
> ADC/TM5 measurements are collected by the primary PMIC PMK8280 from other
> slave PMICs PM8280_{1/2}, PMR735A using the Programmable Boot Sequence (PBS)
> and exposed them over the individual channels.
>
> PMK8280 uses the Slave ID (SID) for identifying each slave PMICs in a system.
> This ID is not static for each PMIC but rather set for each platform by the
> hardware designers. So this series allows the configurable SID by modifying the
> binding to accept SID values instead of hardcoding them.
>
> This series is tested on Lenovo X13s laptop by monitoring the temperature of
> the 8 on-board thermistors through IIO interface. The thermal zone support is
> validated by adding loads to the CPUs and making sure the skin temperature stays
> below the threshold provided in DT.
>
> Thanks,
> Mani
>
> Changes in v2:
>
> * Fixed issues reported by Krzysztof and "make dtbs_check"
> * Collected reviews from Krzysztof
> * Added the Lenovo X13s thermal zone patch
>
> Manivannan Sadhasivam (12):
> dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels
> arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2}
> PMICs
> arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2}
> PMICs
> arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input
> arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block
> arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280
> arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input
> arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
> arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
> arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel
> arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels
> arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support
>
> .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +-
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 204 ++++++++++++++++++
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 83 +++++++
> .../dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 ++++----
> 4 files changed, 333 insertions(+), 50 deletions(-)
>
> --
> 2.25.1
>
Tested-by: Steev Klimaszewski <[email protected]>

2022-10-29 22:09:07

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 01/12] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels

On 29/10/2022 08:14, Manivannan Sadhasivam wrote:
> As per the new ADC7 architecture used by the Qualcomm PMICs, each PMIC
> has the static Slave ID (SID) assigned by default. The primary PMIC
> PMK8350 is responsible for collecting the temperature/voltage data from
> the slave PMICs and exposing them via it's registers.
>
> For getting the measurements from the slave PMICs, PMK8350 uses the
> channel ID encoded with the SID of the relevant PMIC. So far, the
> dt-binding for the slave PMIC PM8350 assumed that there will be only
> one PM8350 in a system. So it harcoded SID 1 with channel IDs.
>
> But this got changed in platforms such as Lenovo X13s where there are a
> couple of PM8350 PMICs available. So to address multiple PM8350s, change
> the binding to accept the SID specified by the user and use it for
> encoding the channel ID.
>
> It should be noted that, even though the SID is static it is not
> globally unique. Only the primary PMIC has the unique SID id 0.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +-
> .../dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 +++++++++----------
> 2 files changed, 46 insertions(+), 50 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <[email protected]>

--
With best wishes
Dmitry


2022-10-31 21:50:36

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 01/12] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels


On Sat, 29 Oct 2022 10:44:38 +0530, Manivannan Sadhasivam wrote:
> As per the new ADC7 architecture used by the Qualcomm PMICs, each PMIC
> has the static Slave ID (SID) assigned by default. The primary PMIC
> PMK8350 is responsible for collecting the temperature/voltage data from
> the slave PMICs and exposing them via it's registers.
>
> For getting the measurements from the slave PMICs, PMK8350 uses the
> channel ID encoded with the SID of the relevant PMIC. So far, the
> dt-binding for the slave PMIC PM8350 assumed that there will be only
> one PM8350 in a system. So it harcoded SID 1 with channel IDs.
>
> But this got changed in platforms such as Lenovo X13s where there are a
> couple of PM8350 PMICs available. So to address multiple PM8350s, change
> the binding to accept the SID specified by the user and use it for
> encoding the channel ID.
>
> It should be noted that, even though the SID is static it is not
> globally unique. Only the primary PMIC has the unique SID id 0.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +-
> .../dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 +++++++++----------
> 2 files changed, 46 insertions(+), 50 deletions(-)
>

Acked-by: Rob Herring <[email protected]>

2022-11-02 20:15:33

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 08/12] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> Add VADC channels for measuring the on-chip die temperature and external
> crystal osciallator temperature of PMK8280.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-02 20:18:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 05/12] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> Add support for ADC7 block available in PMK8280 for reading the
> temperature via the AMUX pins.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 9 +++++++++

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-02 20:20:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 01/12] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> As per the new ADC7 architecture used by the Qualcomm PMICs, each PMIC
> has the static Slave ID (SID) assigned by default. The primary PMIC
> PMK8350 is responsible for collecting the temperature/voltage data from
> the slave PMICs and exposing them via it's registers.
>
> For getting the measurements from the slave PMICs, PMK8350 uses the
> channel ID encoded with the SID of the relevant PMIC. So far, the
> dt-binding for the slave PMIC PM8350 assumed that there will be only
> one PM8350 in a system. So it harcoded SID 1 with channel IDs.
>
> But this got changed in platforms such as Lenovo X13s where there are a
> couple of PM8350 PMICs available. So to address multiple PM8350s, change
> the binding to accept the SID specified by the user and use it for
> encoding the channel ID.
>
> It should be noted that, even though the SID is static it is not
> globally unique. Only the primary PMIC has the unique SID id 0.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-02 20:23:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 09/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die
> temperature and external thermistors connected to the AMUX pins.
>
> The measurements are collected by the primary PMIC PMK8280 from the
> secondary PMICs PM8280_{1/2} and exposed over the PMK8280's VADC channels.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-02 20:31:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 11/12] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperature from
> external thermistors connected to AMUX pins. The temperture measurements
> are collected from the PMK8280's VADC channels that expose the
> measurements from secondary PMICs PM8280_{1/2}.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-02 20:47:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 10/12] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel

On 29/10/2022 01:14, Manivannan Sadhasivam wrote:
> Add VADC channel of PMR735A for measuring the on-chip die temperature.
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-03 06:41:44

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support

On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote:
>
>
> On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> > Add thermal zone support by making use of the thermistor SYS_THERM6.
> > Based on experiments, this thermistor seems to reflect the actual
> > surface temperature of the laptop.
> >
> > For the cooling device, all BIG CPU cores are throttle down to keep the
> s/throttle/throttled
>
> Is it okay to let the 4xA78C run at full throttle in thermal emergencies though?

I don't get it. Can you elaborate?

> > temperature at a sane level.
> >
> > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> > ---
> > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
> > 1 file changed, 46 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > index ca77c19c6d0d..96e2fa72f782 100644
> > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > @@ -29,6 +29,52 @@ backlight {
> > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> > };
> >
> > + thermal-zones {
> > + skin-temp-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <0>;
> > + thermal-sensors = <&pmk8280_adc_tm 5>;
> > +
> > + trips {
> > + skin_temp_alert0: trip-point0 {
> > + temperature = <55000>;
> > + hysteresis = <1000>;
> > + type = "passive";
> > + };
> > +
> > + skin_temp_alert1: trip-point1 {
> > + temperature = <58000>;
> > + hysteresis = <1000>;
> > + type = "passive";
> > + };
> > +
> > + skin-temp-crit {
> > + temperature = <73000>;
> Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D
>
> Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant
> burns?
>

73c is what the reasonable number I came up with after some experiments. At
this point the temperature won't burn your finger but crossing this surely
would (that's what happening without this series).

Thanks,
Mani

> Konrad
> > + hysteresis = <1000>;
> > + type = "critical";
> > + };
> > + };
> > +
> > + cooling-maps {
> > + map0 {
> > + trip = <&skin_temp_alert0>;
> > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > + };
> > +
> > + map1 {
> > + trip = <&skin_temp_alert1>;
> > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > + };
> > + };
> > + };
> > + };
> > +
> > vreg_edp_bl: regulator-edp-bl {
> > compatible = "regulator-fixed";
> >

--
மணிவண்ணன் சதாசிவம்

2022-11-03 11:04:35

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support


On 03/11/2022 06:50, Manivannan Sadhasivam wrote:
> On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote:
>>
>> On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
>>> Add thermal zone support by making use of the thermistor SYS_THERM6.
>>> Based on experiments, this thermistor seems to reflect the actual
>>> surface temperature of the laptop.
>>>
>>> For the cooling device, all BIG CPU cores are throttle down to keep the
>> s/throttle/throttled
>>
>> Is it okay to let the 4xA78C run at full throttle in thermal emergencies though?
> I don't get it. Can you elaborate?

8280xp has 4xA78C and 4xX1C. You only added the latter ones to the
cooling map.


>
>>> temperature at a sane level.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <[email protected]>
>>> ---
>>> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
>>> 1 file changed, 46 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>>> index ca77c19c6d0d..96e2fa72f782 100644
>>> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>>> @@ -29,6 +29,52 @@ backlight {
>>> pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
>>> };
>>>
>>> + thermal-zones {
>>> + skin-temp-thermal {
>>> + polling-delay-passive = <250>;
>>> + polling-delay = <0>;
>>> + thermal-sensors = <&pmk8280_adc_tm 5>;
>>> +
>>> + trips {
>>> + skin_temp_alert0: trip-point0 {
>>> + temperature = <55000>;
>>> + hysteresis = <1000>;
>>> + type = "passive";
>>> + };
>>> +
>>> + skin_temp_alert1: trip-point1 {
>>> + temperature = <58000>;
>>> + hysteresis = <1000>;
>>> + type = "passive";
>>> + };
>>> +
>>> + skin-temp-crit {
>>> + temperature = <73000>;
>> Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D
>>
>> Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant
>> burns?
>>
> 73c is what the reasonable number I came up with after some experiments. At
> this point the temperature won't burn your finger but crossing this surely
> would (that's what happening without this series).

Ok, then I suppose it's fine. Thanks!


Konrad

>
> Thanks,
> Mani
>
>> Konrad
>>> + hysteresis = <1000>;
>>> + type = "critical";
>>> + };
>>> + };
>>> +
>>> + cooling-maps {
>>> + map0 {
>>> + trip = <&skin_temp_alert0>;
>>> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>> + };
>>> +
>>> + map1 {
>>> + trip = <&skin_temp_alert1>;
>>> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>> + };
>>> + };
>>> + };
>>> + };
>>> +
>>> vreg_edp_bl: regulator-edp-bl {
>>> compatible = "regulator-fixed";
>>>

2022-11-03 12:39:40

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support

On Thu, Nov 03, 2022 at 11:02:30AM +0100, Konrad Dybcio wrote:
>
> On 03/11/2022 06:50, Manivannan Sadhasivam wrote:
> > On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote:
> > >
> > > On 29.10.2022 07:14, Manivannan Sadhasivam wrote:
> > > > Add thermal zone support by making use of the thermistor SYS_THERM6.
> > > > Based on experiments, this thermistor seems to reflect the actual
> > > > surface temperature of the laptop.
> > > >
> > > > For the cooling device, all BIG CPU cores are throttle down to keep the
> > > s/throttle/throttled
> > >
> > > Is it okay to let the 4xA78C run at full throttle in thermal emergencies though?
> > I don't get it. Can you elaborate?
>
> 8280xp has 4xA78C and 4xX1C. You only added the latter ones to the cooling
> map.
>

Right, that's because the first 4 cores doesn't contribute to thermal much and
thottling them doesn't yield any thermal gain.

Thanks,
Mani

>
> >
> > > > temperature at a sane level.
> > > >
> > > > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> > > > ---
> > > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
> > > > 1 file changed, 46 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > > > index ca77c19c6d0d..96e2fa72f782 100644
> > > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > > > @@ -29,6 +29,52 @@ backlight {
> > > > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> > > > };
> > > > + thermal-zones {
> > > > + skin-temp-thermal {
> > > > + polling-delay-passive = <250>;
> > > > + polling-delay = <0>;
> > > > + thermal-sensors = <&pmk8280_adc_tm 5>;
> > > > +
> > > > + trips {
> > > > + skin_temp_alert0: trip-point0 {
> > > > + temperature = <55000>;
> > > > + hysteresis = <1000>;
> > > > + type = "passive";
> > > > + };
> > > > +
> > > > + skin_temp_alert1: trip-point1 {
> > > > + temperature = <58000>;
> > > > + hysteresis = <1000>;
> > > > + type = "passive";
> > > > + };
> > > > +
> > > > + skin-temp-crit {
> > > > + temperature = <73000>;
> > > Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D
> > >
> > > Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant
> > > burns?
> > >
> > 73c is what the reasonable number I came up with after some experiments. At
> > this point the temperature won't burn your finger but crossing this surely
> > would (that's what happening without this series).
>
> Ok, then I suppose it's fine. Thanks!
>
>
> Konrad
>
> >
> > Thanks,
> > Mani
> >
> > > Konrad
> > > > + hysteresis = <1000>;
> > > > + type = "critical";
> > > > + };
> > > > + };
> > > > +
> > > > + cooling-maps {
> > > > + map0 {
> > > > + trip = <&skin_temp_alert0>;
> > > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > > > + };
> > > > +
> > > > + map1 {
> > > > + trip = <&skin_temp_alert1>;
> > > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > > > + };
> > > > + };
> > > > + };
> > > > + };
> > > > +
> > > > vreg_edp_bl: regulator-edp-bl {
> > > > compatible = "regulator-fixed";

--
மணிவண்ணன் சதாசிவம்