Skip to contentSkip to conversation

Convert QCOM watchdog timer bindings to YAML

PATCH Superseded Sai Prakash Ranjan 3 participants 12 messages Feb 1, 2020 – Feb 11, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Convert QCOM watchdog timer bindings to YAML

This series converts QCOM watchdog timer bindings to YAML. Also it adds the missing SoC-specific compatible for QCS404, SC7180, SDM845 and SM8150 SoCs.

v1: https://lore.kernel.org/lkml/[email protected]/

Changes since v1:
As per Rob's suggestion:
* Replaced oneOf+const with enum.
* Removed timeout-sec and included watchdog.yaml.
* Removed repeated use of const:qcom,kpss-wdt and made use of enum.

Sai Prakash Ranjan (2):
dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML
dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845,

    SM8150
 .../devicetree/bindings/watchdog/qcom-wdt.txt | 28 -----------
 .../bindings/watchdog/qcom-wdt.yaml           | 49 +++++++++++++++++++
 2 files changed, 49 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw

PATCH v2 1/2 dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML

Convert QCOM watchdog timer bindings to DT schema format using json-schema.

---
 .../devicetree/bindings/watchdog/qcom-wdt.txt | 28 ------------
 .../bindings/watchdog/qcom-wdt.yaml           | 44 +++++++++++++++++++
 2 files changed, 44 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
Documentation/devicetree/bindings/watchdog/qcom-wdt.txt deleted +0 -28
deleted file mode 100644
index 41aeaa2ff0f8..000000000000
@@ -1,28 +0,0 @@
-Qualcomm Krait Processor Sub-system (KPSS) Watchdog
----------------------------------------------------
-
-Required properties :
-- compatible : shall contain only one of the following:
-
-			"qcom,kpss-wdt-msm8960"
-			"qcom,kpss-wdt-apq8064"
-			"qcom,kpss-wdt-ipq8064"
-			"qcom,kpss-wdt-ipq4019"
-			"qcom,kpss-timer"
-			"qcom,scss-timer"
-			"qcom,kpss-wdt"
-
-- reg : shall contain base register location and length
-- clocks : shall contain the input clock
-
-Optional properties :
-- timeout-sec : shall contain the default watchdog timeout in seconds,
-                if unset, the default timeout is 30 seconds
-
-Example:
-	watchdog@208a038 {
-		compatible = "qcom,kpss-wdt-ipq8064";
-		reg = <0x0208a038 0x40>;
-		clocks = <&sleep_clk>;
-		timeout-sec = <10>;
-	};
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +44 -0

44 lines not on this page · raw message

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#3 lore raw

Re: [PATCHv2 1/2] dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML

In reply to Sai Prakash Ranjan

Quoting Sai Prakash Ranjan (2020-02-01 07:29:48)

Quoted 26 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +20 -0
new file mode 100644
index 000000000000..5448cc537a03
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/qcom-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Krait Processor Sub-system (KPSS) Watchdog timer
+
+maintainers:
+  - Sai Prakash Ranjan <[email protected]>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,kpss-timer
+      - qcom,kpss-wdt
+      - qcom,kpss-wdt-apq8064

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml line 30

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +10 -0
+      - qcom,kpss-wdt-ipq4019
+      - qcom,kpss-wdt-ipq8064
+      - qcom,kpss-wdt-msm8960
+      - qcom,scss-timer
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1

By the way, I would expect the watchdog to have an interrupt property. Not sure why it isn't described in the existing binding.

Quoted 6 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +6 -0
+
+required:
+  - compatible
+  - reg
+  - clocks
+
#4 lore raw

Re: [PATCHv2 1/2] dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML

Quoted 32 lines · Stephen Boyd

Quoting Sai Prakash Ranjan (2020-02-01 07:29:48)

Quoted 31 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +25 -0
new file mode 100644
index 000000000000..5448cc537a03
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/qcom-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Krait Processor Sub-system (KPSS) Watchdog timer
+
+maintainers:
+  - Sai Prakash Ranjan <[email protected]>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,kpss-timer
+      - qcom,kpss-wdt
+      - qcom,kpss-wdt-apq8064
+      - qcom,kpss-wdt-ipq4019
+      - qcom,kpss-wdt-ipq8064
+      - qcom,kpss-wdt-msm8960
+      - qcom,scss-timer
+
Quoted 9 lines

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml line 30

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml new file +5 -0
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1

By the way, I would expect the watchdog to have an interrupt property. Not sure why it isn't described in the existing binding.

Yes it should be an optional property now that bark interrupt support has been added. I will add that in a separate patch.

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
maintainer Reviewed-by on v2 1/2
#5 lore raw

Re: [PATCHv2 1/2] dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML

In reply to Sai Prakash Ranjan
Quoted 11 lines · Sai Prakash Ranjan

Convert QCOM watchdog timer bindings to DT schema format using json-schema.

---
 .../devicetree/bindings/watchdog/qcom-wdt.txt | 28 ------------
 .../bindings/watchdog/qcom-wdt.yaml           | 44 +++++++++++++++++++
 2 files changed, 44 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
#6 lore raw

PATCH v2 2/2 dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

In reply to Sai Prakash Ranjan

Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs.

---
 .../bindings/watchdog/qcom-wdt.yaml           | 21 ++++++++++++-------
 1 file changed, 13 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml +13 -8
index 5448cc537a03..7180c64f54fb 100644
@@ -14,14 +14,19 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,kpss-timer
-      - qcom,kpss-wdt
-      - qcom,kpss-wdt-apq8064
-      - qcom,kpss-wdt-ipq4019
-      - qcom,kpss-wdt-ipq8064
-      - qcom,kpss-wdt-msm8960
-      - qcom,scss-timer
+    items:
+      - enum:
+          - qcom,apss-wdt-qcs404
+          - qcom,apss-wdt-sc7180
+          - qcom,apss-wdt-sdm845
+          - qcom,apss-wdt-sm8150
+          - qcom,kpss-timer
+          - qcom,kpss-wdt-apq8064
+          - qcom,kpss-wdt-ipq4019
+          - qcom,kpss-wdt-ipq8064
+          - qcom,kpss-wdt-msm8960
+          - qcom,scss-timer
+      - const: qcom,kpss-wdt
 
   reg:
     maxItems: 1
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
maintainer
#8 lore raw

Re: [PATCHv2 2/2] dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

In reply to Sai Prakash Ranjan
Quoted 2 lines · Sai Prakash Ranjan

Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs.

That's not what the commit does. You are changing what's valid.

One string was valid, now 2 are required.

Quoted 42 lines
---
 .../bindings/watchdog/qcom-wdt.yaml           | 21 ++++++++++++-------
 1 file changed, 13 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml +13 -8
index 5448cc537a03..7180c64f54fb 100644
@@ -14,14 +14,19 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,kpss-timer
-      - qcom,kpss-wdt
-      - qcom,kpss-wdt-apq8064
-      - qcom,kpss-wdt-ipq4019
-      - qcom,kpss-wdt-ipq8064
-      - qcom,kpss-wdt-msm8960
-      - qcom,scss-timer
+    items:
+      - enum:
+          - qcom,apss-wdt-qcs404
+          - qcom,apss-wdt-sc7180
+          - qcom,apss-wdt-sdm845
+          - qcom,apss-wdt-sm8150
+          - qcom,kpss-timer
+          - qcom,kpss-wdt-apq8064
+          - qcom,kpss-wdt-ipq4019
+          - qcom,kpss-wdt-ipq8064
+          - qcom,kpss-wdt-msm8960
+          - qcom,scss-timer
+      - const: qcom,kpss-wdt
 
   reg:
     maxItems: 1
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#9 lore raw

Re: [PATCHv2 2/2] dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

Hi Rob,

Quoted 8 lines · Rob Herring
Quoted 2 lines · Sai Prakash Ranjan

Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs.

That's not what the commit does. You are changing what's valid.

One string was valid, now 2 are required.

Does this look good?

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml +6 -3
index 46d6aad5786a..3378244b67cd 100644
@@ -14,19 +14,22 @@ allOf:
 
 properties:
   compatible:
-    items:
+    oneOf:
       - enum:
           - qcom,apss-wdt-qcs404
           - qcom,apss-wdt-sc7180
           - qcom,apss-wdt-sdm845
           - qcom,apss-wdt-sm8150
-          - qcom,kpss-timer
-          - qcom,kpss-wdt
           - qcom,kpss-wdt-apq8064
           - qcom,kpss-wdt-ipq4019
           - qcom,kpss-wdt-ipq8064
           - qcom,kpss-wdt-msm8960
+          - qcom,kpss-timer
+          - qcom,kpss-wdt
           - qcom,scss-timer
+      - const: qcom,kpss-timer
+      - const: qcom,kpss-wdt
+      - const: qcom,scss-timer
 
   reg:
     maxItems: 1

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
maintainer
#10 lore raw

Re: [PATCHv2 2/2] dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

Quoted 8 lines · Sai Prakash Ranjan

Hi Rob,

Quoted 4 lines · Rob Herring
Quoted 2 lines · Sai Prakash Ranjan

Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs.

Quoted 6 lines
Quoted 4 lines

That's not what the commit does. You are changing what's valid.

One string was valid, now 2 are required.

Does this look good?

No. First of all, what's the base for the diff? It's not what you originally had nor incremental on top of this patch.

Second, a value of 'qcom,kpss-timer' or 'qcom,kpss-wdt' or 'qcom,scss-timer' will fail validation because 2 clauses of 'oneOf' will be true.

Quoted 40 lines
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml +6 -3
index 46d6aad5786a..3378244b67cd 100644
@@ -14,19 +14,22 @@ allOf:
 
  properties:
    compatible:
-    items:
+    oneOf:
        - enum:
            - qcom,apss-wdt-qcs404
            - qcom,apss-wdt-sc7180
            - qcom,apss-wdt-sdm845
            - qcom,apss-wdt-sm8150
-          - qcom,kpss-timer
-          - qcom,kpss-wdt
            - qcom,kpss-wdt-apq8064
            - qcom,kpss-wdt-ipq4019
            - qcom,kpss-wdt-ipq8064
            - qcom,kpss-wdt-msm8960
+          - qcom,kpss-timer
+          - qcom,kpss-wdt
            - qcom,scss-timer
+      - const: qcom,kpss-timer
+      - const: qcom,kpss-wdt
+      - const: qcom,scss-timer
 
    reg:
      maxItems: 1

Thanks,
Sai

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

#11 lore raw

Re: [PATCHv2 2/2] dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

Quoted 12 lines · Rob Herring
Quoted 10 lines · Sai Prakash Ranjan

Hi Rob,

Quoted 6 lines · Rob Herring
Quoted 2 lines · Sai Prakash Ranjan

Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs.

That's not what the commit does. You are changing what's valid.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

One string was valid, now 2 are required.

Does this look good?

No. First of all, what's the base for the diff? It's not what you originally had nor incremental on top of this patch.

It was an incremental on top of this patch.

Quoted 4 lines

Second, a value of 'qcom,kpss-timer' or 'qcom,kpss-wdt' or 'qcom,scss-timer' will fail validation because 2 clauses of 'oneOf' will be true.

I will just remove oneOf and add the missing compatibles to the enum.

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation