linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "thermal-bot for Robert Marko" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Robert Marko <robimarko@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] dt-bindings: thermal: tsens: Add ipq8074 compatible
Date: Fri, 09 Dec 2022 15:26:30 -0000	[thread overview]
Message-ID: <167059959022.4906.13418067500479390505.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220818220245.338396-1-robimarko@gmail.com>

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

Commit-ID:     c87c4fcab0b66485190f7afe14cc5147f9e9b79d
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//c87c4fcab0b66485190f7afe14cc5147f9e9b79d
Author:        Robert Marko <robimarko@gmail.com>
AuthorDate:    Fri, 19 Aug 2022 00:02:41 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:43 +01:00

dt-bindings: thermal: tsens: Add ipq8074 compatible

Qualcomm IPQ8074 has tsens v2.3.0 block, though unlike existing v2 IP it
only uses one IRQ, so tsens v2 compatible cannot be used as the fallback.

We also have to make sure that correct interrupts are set according to
compatibles, so populate interrupt information per compatibles.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220818220245.338396-1-robimarko@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 76 +++++--
 1 file changed, 65 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index 7db905c..f0bd4b9 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -60,6 +60,10 @@ properties:
               - qcom,sm8450-tsens
           - const: qcom,tsens-v2
 
+      - description: v2 of TSENS with combined interrupt
+        enum:
+          - qcom,ipq8074-tsens
+
   reg:
     items:
       - description: TM registers
@@ -67,15 +71,11 @@ properties:
 
   interrupts:
     minItems: 1
-    items:
-      - description: Combined interrupt if upper or lower threshold crossed
-      - description: Interrupt if critical threshold crossed
+    maxItems: 2
 
   interrupt-names:
     minItems: 1
-    items:
-      - const: uplow
-      - const: critical
+    maxItems: 2
 
   nvmem-cells:
     minItems: 1
@@ -129,22 +129,61 @@ allOf:
     then:
       properties:
         interrupts:
-          maxItems: 1
+          items:
+            - description: Combined interrupt if upper or lower threshold crossed
         interrupt-names:
-          maxItems: 1
+          items:
+            - const: uplow
 
-    else:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8953-tsens
+              - qcom,msm8996-tsens
+              - qcom,msm8998-tsens
+              - qcom,sc7180-tsens
+              - qcom,sc7280-tsens
+              - qcom,sc8180x-tsens
+              - qcom,sdm630-tsens
+              - qcom,sdm845-tsens
+              - qcom,sm8150-tsens
+              - qcom,sm8250-tsens
+              - qcom,sm8350-tsens
+              - qcom,tsens-v2
+    then:
+      properties:
+        interrupts:
+          items:
+            - description: Combined interrupt if upper or lower threshold crossed
+            - description: Interrupt if critical threshold crossed
+        interrupt-names:
+          items:
+            - const: uplow
+            - const: critical
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq8074-tsens
+    then:
       properties:
         interrupts:
-          minItems: 2
+          items:
+            - description: Combined interrupt if upper, lower or critical thresholds crossed
         interrupt-names:
-          minItems: 2
+          items:
+            - const: combined
 
   - if:
       properties:
         compatible:
           contains:
             enum:
+              - qcom,ipq8074-tsens
               - qcom,tsens-v0_1
               - qcom,tsens-v1
               - qcom,tsens-v2
@@ -227,4 +266,19 @@ examples:
            #qcom,sensors = <13>;
            #thermal-sensor-cells = <1>;
     };
+
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    // Example 4 (for any IPQ8074 based SoC-s):
+    tsens4: thermal-sensor@4a9000 {
+           compatible = "qcom,ipq8074-tsens";
+           reg = <0x4a9000 0x1000>,
+                 <0x4a8000 0x1000>;
+
+           interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+           interrupt-names = "combined";
+
+           #qcom,sensors = <16>;
+           #thermal-sensor-cells = <1>;
+    };
 ...

      parent reply	other threads:[~2022-12-09 15:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 22:02 [PATCH v7 1/5] dt-bindings: thermal: tsens: Add ipq8074 compatible Robert Marko
2022-08-18 22:02 ` [PATCH v7 2/5] drivers: thermal: tsens: Add support for combined interrupt Robert Marko
2022-08-18 22:49   ` Daniel Lezcano
2022-09-27  7:34     ` Robert Marko
2022-09-27  8:23     ` Robert Marko
2022-10-17 19:01   ` Bjorn Andersson
2022-10-21 16:52     ` Daniel Lezcano
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/tsens: " thermal-bot for Robert Marko
2022-08-18 22:02 ` [PATCH v7 3/5] drivers: thermal: tsens: allow configuring min and max trips Robert Marko
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/tsens: Allow " thermal-bot for Robert Marko
2022-08-18 22:02 ` [PATCH v7 4/5] drivers: thermal: tsens: add IPQ8074 support Robert Marko
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/tsens: Add " thermal-bot for Robert Marko
2022-08-18 22:02 ` [PATCH v7 5/5] arm64: dts: ipq8074: add thermal nodes Robert Marko
2022-10-18  3:14 ` (subset) [PATCH v7 1/5] dt-bindings: thermal: tsens: Add ipq8074 compatible Bjorn Andersson
2022-12-09 15:26 ` thermal-bot for Robert Marko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167059959022.4906.13418067500479390505.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robimarko@gmail.com \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).