All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
@ 2022-06-08 11:27 Krzysztof Kozlowski
  2022-06-08 11:27 ` [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-08 11:27 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Rob Herring, Krzysztof Kozlowski,
	Ivan T. Ivanov, Kumar Gala, linux-arm-msm, linux-pm, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski

Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
 .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
 2 files changed, 85 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
 delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt

diff --git a/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
new file mode 100644
index 000000000000..5f08b6e59b8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/qcom,spmi-temp-alarm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QPNP PMIC Temperature Alarm
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description:
+  QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
+  that utilize the Qualcomm SPMI implementation. These peripherals provide an
+  interrupt signal and status register to identify high PMIC die temperature.
+
+allOf:
+  - $ref: thermal-sensor.yaml#
+
+properties:
+  compatible:
+    const: qcom,spmi-temp-alarm
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  io-channels:
+    items:
+      - description: ADC channel, which reports chip die temperature
+
+  io-channel-names:
+    items:
+      - const: thermal
+
+  '#thermal-sensor-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - '#thermal-sensor-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pm8350_temp_alarm: temperature-sensor@a00 {
+            compatible = "qcom,spmi-temp-alarm";
+            reg = <0xa00>;
+            interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+            #thermal-sensor-cells = <0>;
+        };
+    };
+
+    thermal-zones {
+        pm8350_thermal: pm8350c-thermal {
+            polling-delay-passive = <100>;
+            polling-delay = <0>;
+            thermal-sensors = <&pm8350_temp_alarm>;
+
+            trips {
+                pm8350_trip0: trip0 {
+                    temperature = <95000>;
+                    hysteresis = <0>;
+                    type = "passive";
+                };
+
+                pm8350_crit: pm8350c-crit {
+                    temperature = <115000>;
+                    hysteresis = <0>;
+                    type = "critical";
+                };
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
deleted file mode 100644
index 2d5b2ad03314..000000000000
--- a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Qualcomm QPNP PMIC Temperature Alarm
-
-QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
-that utilize the Qualcomm SPMI implementation. These peripherals provide an
-interrupt signal and status register to identify high PMIC die temperature.
-
-Required properties:
-- compatible:      Should contain "qcom,spmi-temp-alarm".
-- reg:             Specifies the SPMI address.
-- interrupts:      PMIC temperature alarm interrupt.
-- #thermal-sensor-cells: Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description.
-
-Optional properties:
-- io-channels:     Should contain IIO channel specifier for the ADC channel,
-                   which report chip die temperature.
-- io-channel-names: Should contain "thermal".
-
-Example:
-
-	pm8941_temp: thermal-alarm@2400 {
-		compatible = "qcom,spmi-temp-alarm";
-		reg = <0x2400>;
-		interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
-		#thermal-sensor-cells = <0>;
-
-		io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
-		io-channel-names = "thermal";
-	};
-
-	thermal-zones {
-		pm8941 {
-			polling-delay-passive = <250>;
-			polling-delay = <1000>;
-
-			thermal-sensors = <&pm8941_temp>;
-
-			trips {
-				stage1 {
-					temperature = <105000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-				stage2 {
-					temperature = <125000>;
-					hysteresis = <2000>;
-					type = "critical";
-				};
-			};
-		};
-	};
-
-- 
2.34.1


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

* [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells
  2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
@ 2022-06-08 11:27 ` Krzysztof Kozlowski
  2022-07-03  3:56   ` (subset) " Bjorn Andersson
  2022-06-08 13:45 ` [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Rob Herring
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-08 11:27 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Rob Herring, Krzysztof Kozlowski,
	Ivan T. Ivanov, Kumar Gala, linux-arm-msm, linux-pm, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski

The PM8841 temperature sensor has to define thermal-sensor-cells.

Fixes: dab8134ca072 ("ARM: dts: qcom: Add PM8841 functions device nodes")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8841.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-pm8841.dtsi b/arch/arm/boot/dts/qcom-pm8841.dtsi
index 2caf71eacb52..b5cdde034d18 100644
--- a/arch/arm/boot/dts/qcom-pm8841.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8841.dtsi
@@ -24,6 +24,7 @@ temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;
 			interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
+			#thermal-sensor-cells = <0>;
 		};
 	};
 
-- 
2.34.1


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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
  2022-06-08 11:27 ` [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells Krzysztof Kozlowski
@ 2022-06-08 13:45 ` Rob Herring
  2022-06-08 13:53   ` Krzysztof Kozlowski
  2022-06-09 21:07 ` Rob Herring
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2022-06-08 13:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rafael J. Wysocki, Rob Herring, Bjorn Andersson, Zhang Rui,
	linux-pm, devicetree, Daniel Lezcano, Ivan T. Ivanov,
	linux-kernel, Kumar Gala, Andy Gross, Amit Kucheria,
	Krzysztof Kozlowski, linux-arm-msm

On Wed, 08 Jun 2022 13:27:01 +0200, Krzysztof Kozlowski wrote:
> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>  .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>  2 files changed, 85 insertions(+), 51 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>  delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


temp-alarm@2400: '#thermal-sensor-cells' is a required property
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dtb
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dtb
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb
	arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb
	arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb
	arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dtb
	arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dtb
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-amami.dtb
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-amami.dtb
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-honami.dtb
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-honami.dtb


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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-08 13:45 ` [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Rob Herring
@ 2022-06-08 13:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-08 13:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rafael J. Wysocki, Rob Herring, Bjorn Andersson, Zhang Rui,
	linux-pm, devicetree, Daniel Lezcano, Ivan T. Ivanov,
	linux-kernel, Kumar Gala, Andy Gross, Amit Kucheria,
	Krzysztof Kozlowski, linux-arm-msm

On 08/06/2022 15:45, Rob Herring wrote:
> On Wed, 08 Jun 2022 13:27:01 +0200, Krzysztof Kozlowski wrote:
>> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>>  .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>>  2 files changed, 85 insertions(+), 51 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
>>
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
> 
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/patch/
> 
> 
> temp-alarm@2400: '#thermal-sensor-cells' is a required property

I should have ordered the patches differently. This is fixed in second
patch.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
  2022-06-08 11:27 ` [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells Krzysztof Kozlowski
  2022-06-08 13:45 ` [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Rob Herring
@ 2022-06-09 21:07 ` Rob Herring
  2022-06-14 19:01 ` Daniel Lezcano
  2022-07-28 15:41 ` [thermal: thermal/next] " thermal-bot for Krzysztof Kozlowski
  4 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-06-09 21:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-pm, linux-kernel, devicetree, Andy Gross, Ivan T. Ivanov,
	Krzysztof Kozlowski, Rafael J. Wysocki, Zhang Rui, Kumar Gala,
	Amit Kucheria, Bjorn Andersson, linux-arm-msm, Rob Herring,
	Daniel Lezcano

On Wed, 08 Jun 2022 13:27:01 +0200, Krzysztof Kozlowski wrote:
> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>  .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>  2 files changed, 85 insertions(+), 51 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>  delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-06-09 21:07 ` Rob Herring
@ 2022-06-14 19:01 ` Daniel Lezcano
  2022-06-14 19:17   ` Krzysztof Kozlowski
  2022-07-28 15:41 ` [thermal: thermal/next] " thermal-bot for Krzysztof Kozlowski
  4 siblings, 1 reply; 10+ messages in thread
From: Daniel Lezcano @ 2022-06-14 19:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Amit Kucheria, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Ivan T. Ivanov, Kumar Gala, linux-arm-msm,
	linux-pm, devicetree, linux-kernel

On 08/06/2022 13:27, Krzysztof Kozlowski wrote:
> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>   .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>   .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>   2 files changed, 85 insertions(+), 51 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>   delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt

Applied this patch.

I can pick patch 2/2 if needed, just let me know



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-14 19:01 ` Daniel Lezcano
@ 2022-06-14 19:17   ` Krzysztof Kozlowski
  2022-06-14 19:18     ` Daniel Lezcano
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-14 19:17 UTC (permalink / raw)
  To: Daniel Lezcano, Andy Gross, Bjorn Andersson, Rafael J. Wysocki,
	Amit Kucheria, Zhang Rui, Rob Herring, Krzysztof Kozlowski,
	Ivan T. Ivanov, Kumar Gala, linux-arm-msm, linux-pm, devicetree,
	linux-kernel

On 14/06/2022 12:01, Daniel Lezcano wrote:
> On 08/06/2022 13:27, Krzysztof Kozlowski wrote:
>> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>   .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>>   .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>>   2 files changed, 85 insertions(+), 51 deletions(-)
>>   create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>>   delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
> 
> Applied this patch.
> 
> I can pick patch 2/2 if needed, just let me know

Thanks Daniel. I guess Bjorn will pick up the DTS patch.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-14 19:17   ` Krzysztof Kozlowski
@ 2022-06-14 19:18     ` Daniel Lezcano
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Lezcano @ 2022-06-14 19:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Amit Kucheria, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Ivan T. Ivanov, Kumar Gala, linux-arm-msm,
	linux-pm, devicetree, linux-kernel

On 14/06/2022 21:17, Krzysztof Kozlowski wrote:
> On 14/06/2022 12:01, Daniel Lezcano wrote:
>> On 08/06/2022 13:27, Krzysztof Kozlowski wrote:
>>> Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>>    .../thermal/qcom,spmi-temp-alarm.yaml         | 85 +++++++++++++++++++
>>>    .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 -----------
>>>    2 files changed, 85 insertions(+), 51 deletions(-)
>>>    create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
>>>    delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
>>
>> Applied this patch.
>>
>> I can pick patch 2/2 if needed, just let me know
> 
> Thanks Daniel. I guess Bjorn will pick up the DTS patch.

Ok, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: (subset) [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells
  2022-06-08 11:27 ` [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells Krzysztof Kozlowski
@ 2022-07-03  3:56   ` Bjorn Andersson
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2022-07-03  3:56 UTC (permalink / raw)
  To: Daniel Lezcano, Rob Herring, Krzysztof Kozlowski, linux-kernel,
	linux-arm-msm, Andy Gross, devicetree, linux-pm, Zhang Rui,
	Krzysztof Kozlowski, Amit Kucheria, Rafael J. Wysocki,
	Ivan T. Ivanov, Kumar Gala

On Wed, 8 Jun 2022 13:27:02 +0200, Krzysztof Kozlowski wrote:
> The PM8841 temperature sensor has to define thermal-sensor-cells.
> 
> 

Applied, thanks!

[2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells
      commit: e2759fa0676c9a32bbddb9aff955b54bb35066ad

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

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

* [thermal: thermal/next] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema
  2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2022-06-14 19:01 ` Daniel Lezcano
@ 2022-07-28 15:41 ` thermal-bot for Krzysztof Kozlowski
  4 siblings, 0 replies; 10+ messages in thread
From: thermal-bot for Krzysztof Kozlowski @ 2022-07-28 15:41 UTC (permalink / raw)
  To: linux-pm
  Cc: Krzysztof Kozlowski, Rob Herring, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     f16d37056be2feeae0680b3675b95ae876ab8c5c
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//f16d37056be2feeae0680b3675b95ae876ab8c5c
Author:        Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
AuthorDate:    Wed, 08 Jun 2022 13:27:01 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 28 Jul 2022 17:29:44 +02:00

dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema

Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220608112702.80873-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt  | 51 +------------------------------------------
 2 files changed, 85 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
 delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt

diff --git a/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
new file mode 100644
index 0000000..5f08b6e
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/qcom,spmi-temp-alarm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QPNP PMIC Temperature Alarm
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description:
+  QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
+  that utilize the Qualcomm SPMI implementation. These peripherals provide an
+  interrupt signal and status register to identify high PMIC die temperature.
+
+allOf:
+  - $ref: thermal-sensor.yaml#
+
+properties:
+  compatible:
+    const: qcom,spmi-temp-alarm
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  io-channels:
+    items:
+      - description: ADC channel, which reports chip die temperature
+
+  io-channel-names:
+    items:
+      - const: thermal
+
+  '#thermal-sensor-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - '#thermal-sensor-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pm8350_temp_alarm: temperature-sensor@a00 {
+            compatible = "qcom,spmi-temp-alarm";
+            reg = <0xa00>;
+            interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+            #thermal-sensor-cells = <0>;
+        };
+    };
+
+    thermal-zones {
+        pm8350_thermal: pm8350c-thermal {
+            polling-delay-passive = <100>;
+            polling-delay = <0>;
+            thermal-sensors = <&pm8350_temp_alarm>;
+
+            trips {
+                pm8350_trip0: trip0 {
+                    temperature = <95000>;
+                    hysteresis = <0>;
+                    type = "passive";
+                };
+
+                pm8350_crit: pm8350c-crit {
+                    temperature = <115000>;
+                    hysteresis = <0>;
+                    type = "critical";
+                };
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
deleted file mode 100644
index 2d5b2ad..0000000
--- a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Qualcomm QPNP PMIC Temperature Alarm
-
-QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
-that utilize the Qualcomm SPMI implementation. These peripherals provide an
-interrupt signal and status register to identify high PMIC die temperature.
-
-Required properties:
-- compatible:      Should contain "qcom,spmi-temp-alarm".
-- reg:             Specifies the SPMI address.
-- interrupts:      PMIC temperature alarm interrupt.
-- #thermal-sensor-cells: Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description.
-
-Optional properties:
-- io-channels:     Should contain IIO channel specifier for the ADC channel,
-                   which report chip die temperature.
-- io-channel-names: Should contain "thermal".
-
-Example:
-
-	pm8941_temp: thermal-alarm@2400 {
-		compatible = "qcom,spmi-temp-alarm";
-		reg = <0x2400>;
-		interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
-		#thermal-sensor-cells = <0>;
-
-		io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
-		io-channel-names = "thermal";
-	};
-
-	thermal-zones {
-		pm8941 {
-			polling-delay-passive = <250>;
-			polling-delay = <1000>;
-
-			thermal-sensors = <&pm8941_temp>;
-
-			trips {
-				stage1 {
-					temperature = <105000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-				stage2 {
-					temperature = <125000>;
-					hysteresis = <2000>;
-					type = "critical";
-				};
-			};
-		};
-	};
-

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

end of thread, other threads:[~2022-07-28 15:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:27 [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Krzysztof Kozlowski
2022-06-08 11:27 ` [PATCH 2/2] ARM: dts: qcom: pm8841: add required thermal-sensor-cells Krzysztof Kozlowski
2022-07-03  3:56   ` (subset) " Bjorn Andersson
2022-06-08 13:45 ` [PATCH 1/2] dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Rob Herring
2022-06-08 13:53   ` Krzysztof Kozlowski
2022-06-09 21:07 ` Rob Herring
2022-06-14 19:01 ` Daniel Lezcano
2022-06-14 19:17   ` Krzysztof Kozlowski
2022-06-14 19:18     ` Daniel Lezcano
2022-07-28 15:41 ` [thermal: thermal/next] " thermal-bot for Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.