* [PATCH 01/11] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
@ 2022-10-27 6:29 ` Manivannan Sadhasivam
2022-10-27 13:46 ` Krzysztof Kozlowski
2022-10-27 6:29 ` [PATCH 02/11] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs Manivannan Sadhasivam
` (9 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:29 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
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 <manivannan.sadhasivam@linaro.org>
---
.../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..50de5adfe6ac 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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 01/11] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels
2022-10-27 6:29 ` [PATCH 01/11] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels Manivannan Sadhasivam
@ 2022-10-27 13:46 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 13:46 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:29, 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 <manivannan.sadhasivam@linaro.org>
> ---
> .../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..50de5adfe6ac 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)
As it is macro, I think it argument should be in parens: (sid)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 02/11] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
2022-10-27 6:29 ` [PATCH 01/11] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels Manivannan Sadhasivam
@ 2022-10-27 6:29 ` Manivannan Sadhasivam
2022-10-27 13:47 ` Krzysztof Kozlowski
2022-10-27 6:29 ` [PATCH 03/11] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones " Manivannan Sadhasivam
` (8 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:29 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add support for temperature alarm feature in the PM8280_{1/2} PMICs.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 02/11] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs
2022-10-27 6:29 ` [PATCH 02/11] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs Manivannan Sadhasivam
@ 2022-10-27 13:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 13:47 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:29, Manivannan Sadhasivam wrote:
> Add support for temperature alarm feature in the PM8280_{1/2} PMICs.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 03/11] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2} PMICs
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
2022-10-27 6:29 ` [PATCH 01/11] dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels Manivannan Sadhasivam
2022-10-27 6:29 ` [PATCH 02/11] arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs Manivannan Sadhasivam
@ 2022-10-27 6:29 ` Manivannan Sadhasivam
2022-10-27 13:50 ` Krzysztof Kozlowski
2022-10-27 6:29 ` [PATCH 04/11] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input Manivannan Sadhasivam
` (7 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:29 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add thermal zones for the PM8280_{1/2} PMICs by using the temperature
alarm blocks as the thermal sensors. Temperature trip points are
inheried from PM8350 PMIC.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 03/11] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2} PMICs
2022-10-27 6:29 ` [PATCH 03/11] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones " Manivannan Sadhasivam
@ 2022-10-27 13:50 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 13:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:29, 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
> inheried from PM8350 PMIC.
inherited
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
With above:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 04/11] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (2 preceding siblings ...)
2022-10-27 6:29 ` [PATCH 03/11] arm64: dts: qcom: sc8280xp-pmics: Add thermal zones " Manivannan Sadhasivam
@ 2022-10-27 6:29 ` Manivannan Sadhasivam
2022-10-27 13:50 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 05/11] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block Manivannan Sadhasivam
` (6 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:29 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
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.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 04/11] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input
2022-10-27 6:29 ` [PATCH 04/11] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input Manivannan Sadhasivam
@ 2022-10-27 13:50 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 13:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:29, 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.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 05/11] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (3 preceding siblings ...)
2022-10-27 6:29 ` [PATCH 04/11] arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 13:54 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 06/11] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280 Manivannan Sadhasivam
` (5 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add support for ADC7 block available in PMK8280 for reading the
temperature via the AMUX pins.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index 4a3464f5e6e9..32086d5edd0d 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -75,6 +75,17 @@ 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>;
+ interrupt-names = "eoc-int-en-set";
+ #io-channel-cells = <1>;
+ io-channel-ranges;
+ };
};
pmc8280_1: pmic@1 {
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 05/11] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block
2022-10-27 6:30 ` [PATCH 05/11] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block Manivannan Sadhasivam
@ 2022-10-27 13:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 13:54 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> Add support for ADC7 block available in PMK8280 for reading the
> temperature via the AMUX pins.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> index 4a3464f5e6e9..32086d5edd0d 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
> @@ -75,6 +75,17 @@ 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>;
> + interrupt-names = "eoc-int-en-set";
Schema does not accept this. Be sure `make dtbs_check` passes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 06/11] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (4 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 05/11] arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 14:01 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 07/11] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input Manivannan Sadhasivam
` (4 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the
temperature from slave PMICs like PM8280.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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 32086d5edd0d..d55f0a9cea61 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -86,6 +86,16 @@ pmk8280_vadc: adc@3100 {
#io-channel-cells = <1>;
io-channel-ranges;
};
+
+ 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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 06/11] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280
2022-10-27 6:30 ` [PATCH 06/11] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280 Manivannan Sadhasivam
@ 2022-10-27 14:01 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:01 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the
> temperature from slave PMICs like PM8280.
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 07/11] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (5 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 06/11] arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280 Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 14:01 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels Manivannan Sadhasivam
` (3 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Enable resetting the PMK8280 through RESIN block in SC8280XP X13s.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 07/11] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input
2022-10-27 6:30 ` [PATCH 07/11] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input Manivannan Sadhasivam
@ 2022-10-27 14:01 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:01 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> Enable resetting the PMK8280 through RESIN block in SC8280XP X13s.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (6 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 07/11] arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 14:03 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} " Manivannan Sadhasivam
` (2 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add VADC channels for measuring the on-chip die temperature and external
crystal osciallator temperature of PMK8280.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../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..9ac5d5c22832 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";
+
+ pmk8280-die-temp@3 {
+ reg = <PMK8350_ADC7_DIE_TEMP>;
+ label = "pmk8280_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ pmk8280-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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
2022-10-27 6:30 ` [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels Manivannan Sadhasivam
@ 2022-10-27 14:03 ` Krzysztof Kozlowski
2022-10-27 14:04 ` Krzysztof Kozlowski
0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:03 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, 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 <manivannan.sadhasivam@linaro.org>
> ---
> .../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..9ac5d5c22832 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";
> +
> + pmk8280-die-temp@3 {
die-temp@
> + reg = <PMK8350_ADC7_DIE_TEMP>;
> + label = "pmk8280_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> +
> + pmk8280-xo-therm@44 {
xo-therm@
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
2022-10-27 14:03 ` Krzysztof Kozlowski
@ 2022-10-27 14:04 ` Krzysztof Kozlowski
2022-10-29 4:45 ` Manivannan Sadhasivam
0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:04 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 10:03, Krzysztof Kozlowski wrote:
> On 27/10/2022 02:30, 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 <manivannan.sadhasivam@linaro.org>
>> ---
>> .../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..9ac5d5c22832 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";
>> +
>> + pmk8280-die-temp@3 {
>
> die-temp@
Hm, wait, unless this is the die temperature of pmk8280? But then how
about pmic-die-temp?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels
2022-10-27 14:04 ` Krzysztof Kozlowski
@ 2022-10-29 4:45 ` Manivannan Sadhasivam
0 siblings, 0 replies; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-29 4:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
johan+linaro, quic_jprakash, linux-arm-msm, devicetree,
linux-kernel
On Thu, Oct 27, 2022 at 10:04:24AM -0400, Krzysztof Kozlowski wrote:
> On 27/10/2022 10:03, Krzysztof Kozlowski wrote:
> > On 27/10/2022 02:30, 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 <manivannan.sadhasivam@linaro.org>
> >> ---
> >> .../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..9ac5d5c22832 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";
> >> +
> >> + pmk8280-die-temp@3 {
> >
> > die-temp@
>
> Hm, wait, unless this is the die temperature of pmk8280? But then how
> about pmic-die-temp?
Yes, this is the die temperature of PMK8280, so "pmic-die-temp" makes sense.
Thanks,
Mani
>
>
> Best regards,
> Krzysztof
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (7 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 14:09 ` Krzysztof Kozlowski
2022-10-27 6:30 ` [PATCH 10/11] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel Manivannan Sadhasivam
2022-10-27 6:30 ` [PATCH 11/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels Manivannan Sadhasivam
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
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
slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC
channels.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../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 9ac5d5c22832..d300d217fdc6 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 @@ pmk8280-xo-therm@44 {
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
+
+ pm8280-1-die-temp@103 {
+ reg = <PM8350_ADC7_DIE_TEMP(1)>;
+ label = "pm8280_1_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ sys-therm1@144 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm2@145 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm3@146 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm4@147 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ pm8280-2-die-temp@303 {
+ reg = <PM8350_ADC7_DIE_TEMP(3)>;
+ label = "pm8250_2_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ sys-therm5@344 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm6@345 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm7@346 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ sys-therm8@347 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
};
&qup0 {
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
2022-10-27 6:30 ` [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} " Manivannan Sadhasivam
@ 2022-10-27 14:09 ` Krzysztof Kozlowski
2022-10-29 4:48 ` Manivannan Sadhasivam
0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:09 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, 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
> slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC
secondary PMICs
Drop "them"
> channels.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> .../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 9ac5d5c22832..d300d217fdc6 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 @@ pmk8280-xo-therm@44 {
> qcom,ratiometric;
> qcom,hw-settle-time = <200>;
> };
> +
> + pm8280-1-die-temp@103 {
pmic-die-temp? What pm8280 stands here?
> + reg = <PM8350_ADC7_DIE_TEMP(1)>;
> + label = "pm8280_1_die_temp";
> + qcom,pre-scaling = <1 1>;
> + };
> +
> + sys-therm1@144 {
I would say sys-therm@... why do we need the "1" suffix in node name?
> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> + qcom,ratiometric;
> + qcom,hw-settle-time = <200>;
> + };
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
2022-10-27 14:09 ` Krzysztof Kozlowski
@ 2022-10-29 4:48 ` Manivannan Sadhasivam
2022-10-30 7:16 ` Manivannan Sadhasivam
0 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-29 4:48 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
johan+linaro, quic_jprakash, linux-arm-msm, devicetree,
linux-kernel
On Thu, Oct 27, 2022 at 10:09:21AM -0400, Krzysztof Kozlowski wrote:
> On 27/10/2022 02:30, 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
> > slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC
>
> secondary PMICs
>
> Drop "them"
>
>
> > channels.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> > .../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 9ac5d5c22832..d300d217fdc6 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 @@ pmk8280-xo-therm@44 {
> > qcom,ratiometric;
> > qcom,hw-settle-time = <200>;
> > };
> > +
> > + pm8280-1-die-temp@103 {
>
> pmic-die-temp? What pm8280 stands here?
>
As agreed, will use "pmic-die-temp"
>
> > + reg = <PM8350_ADC7_DIE_TEMP(1)>;
> > + label = "pm8280_1_die_temp";
> > + qcom,pre-scaling = <1 1>;
> > + };
> > +
> > + sys-therm1@144 {
>
> I would say sys-therm@... why do we need the "1" suffix in node name?
>
Suffix represents the index of the thermistor as per the schematics but I guess
it can be dropped.
Thanks,
Mani
> > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> > + qcom,ratiometric;
> > + qcom,hw-settle-time = <200>;
> > + };
>
> Best regards,
> Krzysztof
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
2022-10-29 4:48 ` Manivannan Sadhasivam
@ 2022-10-30 7:16 ` Manivannan Sadhasivam
2022-11-02 16:21 ` Krzysztof Kozlowski
0 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-30 7:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
johan+linaro, quic_jprakash, linux-arm-msm, devicetree,
linux-kernel
On Sat, Oct 29, 2022 at 10:18:37AM +0530, Manivannan Sadhasivam wrote:
> On Thu, Oct 27, 2022 at 10:09:21AM -0400, Krzysztof Kozlowski wrote:
> > On 27/10/2022 02:30, 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
> > > slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC
> >
> > secondary PMICs
> >
> > Drop "them"
> >
> >
> > > channels.
> > >
> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > ---
> > > .../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 9ac5d5c22832..d300d217fdc6 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 @@ pmk8280-xo-therm@44 {
> > > qcom,ratiometric;
> > > qcom,hw-settle-time = <200>;
> > > };
> > > +
> > > + pm8280-1-die-temp@103 {
> >
> > pmic-die-temp? What pm8280 stands here?
> >
>
> As agreed, will use "pmic-die-temp"
>
> >
> > > + reg = <PM8350_ADC7_DIE_TEMP(1)>;
> > > + label = "pm8280_1_die_temp";
> > > + qcom,pre-scaling = <1 1>;
> > > + };
> > > +
> > > + sys-therm1@144 {
> >
> > I would say sys-therm@... why do we need the "1" suffix in node name?
> >
>
> Suffix represents the index of the thermistor as per the schematics but I guess
> it can be dropped.
>
I was wrong. Suffix is necessary since IIO core registers the channel based on
the node name, so it has to be unique.
Thanks,
Mani
> Thanks,
> Mani
>
> > > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> > > + qcom,ratiometric;
> > > + qcom,hw-settle-time = <200>;
> > > + };
> >
> > Best regards,
> > Krzysztof
> >
>
> --
> மணிவண்ணன் சதாசிவம்
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels
2022-10-30 7:16 ` Manivannan Sadhasivam
@ 2022-11-02 16:21 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-02 16:21 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
johan+linaro, quic_jprakash, linux-arm-msm, devicetree,
linux-kernel
On 30/10/2022 03:16, Manivannan Sadhasivam wrote:
>>>
>>>> + reg = <PM8350_ADC7_DIE_TEMP(1)>;
>>>> + label = "pm8280_1_die_temp";
>>>> + qcom,pre-scaling = <1 1>;
>>>> + };
>>>> +
>>>> + sys-therm1@144 {
>>>
>>> I would say sys-therm@... why do we need the "1" suffix in node name?
>>>
>>
>> Suffix represents the index of the thermistor as per the schematics but I guess
>> it can be dropped.
>>
>
> I was wrong. Suffix is necessary since IIO core registers the channel based on
> the node name, so it has to be unique.
>
Makes sense then.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 10/11] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (8 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 09/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} " Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 6:30 ` [PATCH 11/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels Manivannan Sadhasivam
10 siblings, 0 replies; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add VADC channel of PMR735A for measuring the on-chip die temperature.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
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 d300d217fdc6..babf594384f2 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-therm8@347 {
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
+
+ pmr735a-die-temp@403 {
+ reg = <PMR735A_ADC7_DIE_TEMP>;
+ label = "pmr735a_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
};
&qup0 {
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 11/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels
2022-10-27 6:29 [PATCH 00/11] Updates to sc8280xp-pmic Manivannan Sadhasivam
` (9 preceding siblings ...)
2022-10-27 6:30 ` [PATCH 10/11] arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel Manivannan Sadhasivam
@ 2022-10-27 6:30 ` Manivannan Sadhasivam
2022-10-27 14:11 ` Krzysztof Kozlowski
10 siblings, 1 reply; 27+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-27 6:30 UTC (permalink / raw)
To: andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel,
Manivannan Sadhasivam
Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperatures from
external thermistors connected to AMUX pins. The temperture measurements
are collected from the PMK8280's VADC channels that expose the
mesasurements from slave PMICs PM8280_{1/2}.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../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 babf594384f2..fe6b75551ab9 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 @@ pmr735a-die-temp@403 {
};
};
+&pmk8280_adc_tm {
+ status = "okay";
+
+ sys-therm1@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-therm2@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-therm3@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-therm4@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-therm5@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-therm6@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-therm7@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-therm8@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
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 11/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels
2022-10-27 6:30 ` [PATCH 11/11] arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels Manivannan Sadhasivam
@ 2022-10-27 14:11 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 14:11 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, johan+linaro,
quic_jprakash, linux-arm-msm, devicetree, linux-kernel
On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperatures from
> external thermistors connected to AMUX pins. The temperture measurements
temperature
> are collected from the PMK8280's VADC channels that expose the
> mesasurements from slave PMICs PM8280_{1/2}.
measurements
slave->secondary
Other comments about node names stay as well, but it depends on the
previous discussion.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> .../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 babf594384f2..fe6b75551ab9 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 @@ pmr735a-die-temp@403 {
> };
> };
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread