All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt
@ 2023-01-13 10:33 Krzysztof Kozlowski
  2023-01-13 10:33 ` [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 Krzysztof Kozlowski
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski

Hi,

Dependency:
1. DT bindings are rebased on top of: https://lore.kernel.org/r/20221117105845.13644-2-konrad.dybcio@linaro.org

Chanegs since v1:
1. Add tags
2. Correct clock-frequency description

Best regards,
Krzysztof

Krzysztof Kozlowski (7):
  dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
  dt-bindings: watchdog: qcom-wdt: do not allow fallback alone
  dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles
  dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615
  dt-bindings: watchdog: qcom-wdt: allow interrupts
  dt-bindings: watchdog: qcom-wdt: merge MSM timer
  dt-bindings: watchdog: allow "timer" as node name

 .../bindings/timer/qcom,msm-timer.txt         | 47 ----------
 .../bindings/watchdog/qcom-wdt.yaml           | 94 +++++++++++++++++--
 .../bindings/watchdog/watchdog.yaml           |  7 +-
 3 files changed, 90 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/qcom,msm-timer.txt

-- 
2.34.1


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

* [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:02   ` Guenter Roeck
  2023-01-13 10:33 ` [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

The device specific compatibles ("qcom,kpss-wdt-ipq4019") should be
follwed by fallback "qcom,kpss-wdt", which is actually used by Linux
driver for binding.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.
---
 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index a1f17c9e02db..e76364c52fc7 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -17,6 +17,7 @@ properties:
     oneOf:
       - items:
           - enum:
+              - qcom,kpss-wdt-ipq4019
               - qcom,apss-wdt-msm8994
               - qcom,apss-wdt-qcs404
               - qcom,apss-wdt-sc7180
@@ -35,7 +36,6 @@ properties:
               - qcom,kpss-wdt
               - qcom,kpss-timer
               - qcom,kpss-wdt-apq8064
-              - qcom,kpss-wdt-ipq4019
               - qcom,kpss-wdt-ipq8064
               - qcom,kpss-wdt-msm8960
               - qcom,scss-timer
-- 
2.34.1


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

* [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
  2023-01-13 10:33 ` [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:02   ` Guenter Roeck
  2023-01-13 10:33 ` [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

The compatible "qcom,kpss-wdt" is too generic and should not be used
alone.  Mark it as deprecated when not prepended by specific compatible.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.
---
 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index e76364c52fc7..3e0b30a817d6 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -31,9 +31,10 @@ properties:
               - qcom,apss-wdt-sm8150
               - qcom,apss-wdt-sm8250
           - const: qcom,kpss-wdt
+      - const: qcom,kpss-wdt
+        deprecated: true
       - items:
           - enum:
-              - qcom,kpss-wdt
               - qcom,kpss-timer
               - qcom,kpss-wdt-apq8064
               - qcom,kpss-wdt-ipq8064
-- 
2.34.1


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

* [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
  2023-01-13 10:33 ` [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 Krzysztof Kozlowski
  2023-01-13 10:33 ` [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:02   ` Guenter Roeck
  2023-01-13 10:33 ` [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

The MSM timer ("qcom,msm-timer") is a bit different timer and watchdog
device than KPSS watchdog.  It has its own generic and specific
compatibles, so fix the list to reflect this.  Adjust the example to
show the newer KPSS watchdog.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.
---
 .../devicetree/bindings/watchdog/qcom-wdt.yaml    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index 3e0b30a817d6..93e4381067dd 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -33,13 +33,16 @@ properties:
           - const: qcom,kpss-wdt
       - const: qcom,kpss-wdt
         deprecated: true
+      - items:
+          - const: qcom,scss-timer
+          - const: qcom,msm-timer
       - items:
           - enum:
-              - qcom,kpss-timer
               - qcom,kpss-wdt-apq8064
               - qcom,kpss-wdt-ipq8064
               - qcom,kpss-wdt-msm8960
-              - qcom,scss-timer
+          - const: qcom,kpss-timer
+          - const: qcom,msm-timer
 
   reg:
     maxItems: 1
@@ -56,9 +59,11 @@ unevaluatedProperties: false
 
 examples:
   - |
-    watchdog@208a038 {
-      compatible = "qcom,kpss-wdt-ipq8064";
-      reg = <0x0208a038 0x40>;
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    watchdog@17c10000 {
+      compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
+      reg = <0x17c10000 0x1000>;
       clocks = <&sleep_clk>;
       timeout-sec = <10>;
     };
-- 
2.34.1


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

* [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-01-13 10:33 ` [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:03   ` Guenter Roeck
  2023-01-13 10:33 ` [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

Document new MDM9615 qcom,kpss-wdt-mdm9615 watchdog/timer compatible.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.
---
 Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index 93e4381067dd..1828eaf70b3b 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -40,6 +40,7 @@ properties:
           - enum:
               - qcom,kpss-wdt-apq8064
               - qcom,kpss-wdt-ipq8064
+              - qcom,kpss-wdt-mdm9615
               - qcom,kpss-wdt-msm8960
           - const: qcom,kpss-timer
           - const: qcom,msm-timer
-- 
2.34.1


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

* [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-01-13 10:33 ` [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:03   ` Guenter Roeck
  2023-01-13 10:33 ` [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Krzysztof Kozlowski
  2023-01-13 10:33 ` [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name Krzysztof Kozlowski
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

Both of type of watchdogs described in the binding (the KPSS watchdog
and APSS WDT timer) have interrupts.  Allow interrupts and describe them
for KPSS watchdog to fix warnings like:

  watchdog@17c10000: Unevaluated properties are not allowed ('interrupts' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.
---
 .../bindings/watchdog/qcom-wdt.yaml           | 24 ++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index 1828eaf70b3b..b7fc57f4800e 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Krait Processor Sub-system (KPSS) Watchdog timer
 maintainers:
   - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
 
-allOf:
-  - $ref: watchdog.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -51,11 +48,31 @@ properties:
   clocks:
     maxItems: 1
 
+  interrupts:
+    minItems: 1
+    maxItems: 5
+
 required:
   - compatible
   - reg
   - clocks
 
+allOf:
+  - $ref: watchdog.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,kpss-wdt
+    then:
+      properties:
+        interrupts:
+          minItems: 1
+          items:
+            - description: Bark
+            - description: Bite
+
 unevaluatedProperties: false
 
 examples:
@@ -66,5 +83,6 @@ examples:
       compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
       reg = <0x17c10000 0x1000>;
       clocks = <&sleep_clk>;
+      interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
       timeout-sec = <10>;
     };
-- 
2.34.1


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

* [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2023-01-13 10:33 ` [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:03   ` Guenter Roeck
  2023-01-17 18:13   ` Rob Herring
  2023-01-13 10:33 ` [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name Krzysztof Kozlowski
  6 siblings, 2 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski

Merge Qualcomm MSM timer bindings into watchdog, because the timer
compatibles are already included here and the hardware is quite similar.

While converting the MSM timer bindings, adjust clock-frequency
property to take only one frequency, instead of two, because:
1. DT schema does not allow to frequencies,
2. The Linux timer driver reads only first frequency.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

---

Changes since v1:
1. Add tag.
2. Correct clock-frequency description (Rob).
---
 .../bindings/timer/qcom,msm-timer.txt         | 47 ------------------
 .../bindings/watchdog/qcom-wdt.yaml           | 49 +++++++++++++++++++
 2 files changed, 49 insertions(+), 47 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/qcom,msm-timer.txt

diff --git a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt b/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
deleted file mode 100644
index 5e10c345548f..000000000000
--- a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-* MSM Timer
-
-Properties:
-
-- compatible : Should at least contain "qcom,msm-timer". More specific
-               properties specify which subsystem the timers are paired with.
-
-               "qcom,kpss-timer" - krait subsystem
-               "qcom,scss-timer" - scorpion subsystem
-
-- interrupts : Interrupts for the debug timer, the first general purpose
-               timer, and optionally a second general purpose timer, and
-               optionally as well, 2 watchdog interrupts, in that order.
-
-- reg : Specifies the base address of the timer registers.
-
-- clocks: Reference to the parent clocks, one per output clock. The parents
-          must appear in the same order as the clock names.
-
-- clock-names: The name of the clocks as free-form strings. They should be in
-               the same order as the clocks.
-
-- clock-frequency : The frequency of the debug timer and the general purpose
-                    timer(s) in Hz in that order.
-
-Optional:
-
-- cpu-offset : per-cpu offset used when the timer is accessed without the
-               CPU remapping facilities. The offset is
-               cpu-offset + (0x10000 * cpu-nr).
-
-Example:
-
-       timer@200a000 {
-               compatible = "qcom,scss-timer", "qcom,msm-timer";
-               interrupts = <1 1 0x301>,
-                            <1 2 0x301>,
-                            <1 3 0x301>,
-                            <1 4 0x301>,
-                            <1 5 0x301>;
-               reg = <0x0200a000 0x100>;
-               clock-frequency = <19200000>,
-                                 <32768>;
-               clocks = <&sleep_clk>;
-               clock-names = "sleep";
-               cpu-offset = <0x40000>;
-       };
diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index b7fc57f4800e..837ce9112071 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -10,6 +10,9 @@ maintainers:
   - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
 
 properties:
+  $nodename:
+    pattern: "^(watchdog|timer)@[0-9a-f]+$"
+
   compatible:
     oneOf:
       - items:
@@ -48,6 +51,20 @@ properties:
   clocks:
     maxItems: 1
 
+  clock-names:
+    items:
+      - const: sleep
+
+  clock-frequency:
+    description:
+      The frequency of the general purpose timer in Hz.
+
+  cpu-offset:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Per-CPU offset used when the timer is accessed without the CPU remapping
+      facilities. The offset is cpu-offset + (0x10000 * cpu-nr).
+
   interrupts:
     minItems: 1
     maxItems: 5
@@ -67,12 +84,27 @@ allOf:
             const: qcom,kpss-wdt
     then:
       properties:
+        clock-frequency: false
+        cpu-offset: false
         interrupts:
           minItems: 1
           items:
             - description: Bark
             - description: Bite
 
+    else:
+      properties:
+        interrupts:
+          minItems: 3
+          items:
+            - description: Debug
+            - description: First general purpose timer
+            - description: Second general purpose timer
+            - description: First watchdog
+            - description: Second watchdog
+      required:
+        - clock-frequency
+
 unevaluatedProperties: false
 
 examples:
@@ -86,3 +118,20 @@ examples:
       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
       timeout-sec = <10>;
     };
+
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    watchdog@200a000 {
+      compatible = "qcom,kpss-wdt-ipq8064", "qcom,kpss-timer", "qcom,msm-timer";
+      interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
+                   <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
+                   <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
+                   <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
+                   <GIC_PPI 5 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
+      reg = <0x0200a000 0x100>;
+      clock-frequency = <25000000>;
+      clocks = <&sleep_clk>;
+      clock-names = "sleep";
+      cpu-offset = <0x80000>;
+    };
-- 
2.34.1


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

* [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name
  2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2023-01-13 10:33 ` [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Krzysztof Kozlowski
@ 2023-01-13 10:33 ` Krzysztof Kozlowski
  2023-01-13 14:03   ` Guenter Roeck
  6 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 10:33 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Guenter Roeck, Prakash Ranjan, linux-arm-msm,
	linux-kernel, devicetree, linux-watchdog
  Cc: Krzysztof Kozlowski, Rob Herring

On some SoCs the watchdog device is actually mixed with timer, e.g.
the qcom,msm-timer on older Qualcomm SoCs where this is actually one
hardware block responsible for both system timer and watchdog.

Allow calling such device nodes as "timer".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.

See also:
https://lore.kernel.org/linux-arm-msm/20221212163532.142533-1-krzysztof.kozlowski@linaro.org/T/#t

which causes warnings:

qcom-msm8960-cdp.dtb: timer@200a000: $nodename:0: 'timer@200a000' does not match '^watchdog(@.*|-[0-9a-f])?$'
  From schema: Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
---
 Documentation/devicetree/bindings/watchdog/watchdog.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/watchdog.yaml b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
index fccae0d00110..519b48889eb1 100644
--- a/Documentation/devicetree/bindings/watchdog/watchdog.yaml
+++ b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
@@ -14,9 +14,14 @@ description: |
   This document describes generic bindings which can be used to
   describe watchdog devices in a device tree.
 
+select:
+  properties:
+    $nodename:
+      pattern: "^watchdog(@.*|-[0-9a-f])?$"
+
 properties:
   $nodename:
-    pattern: "^watchdog(@.*|-[0-9a-f])?$"
+    pattern: "^(timer|watchdog)(@.*|-[0-9a-f])?$"
 
   timeout-sec:
     description:
-- 
2.34.1


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

* Re: [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
  2023-01-13 10:33 ` [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 Krzysztof Kozlowski
@ 2023-01-13 14:02   ` Guenter Roeck
  2023-02-07  9:17     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:40AM +0100, Krzysztof Kozlowski wrote:
> The device specific compatibles ("qcom,kpss-wdt-ipq4019") should be
> follwed by fallback "qcom,kpss-wdt", which is actually used by Linux
> driver for binding.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Rob Herring <robh@kernel.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> 
> ---
> 
> Changes since v1:
> 1. Add tag.
> ---
>  Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index a1f17c9e02db..e76364c52fc7 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -17,6 +17,7 @@ properties:
>      oneOf:
>        - items:
>            - enum:
> +              - qcom,kpss-wdt-ipq4019
>                - qcom,apss-wdt-msm8994
>                - qcom,apss-wdt-qcs404
>                - qcom,apss-wdt-sc7180
> @@ -35,7 +36,6 @@ properties:
>                - qcom,kpss-wdt
>                - qcom,kpss-timer
>                - qcom,kpss-wdt-apq8064
> -              - qcom,kpss-wdt-ipq4019
>                - qcom,kpss-wdt-ipq8064
>                - qcom,kpss-wdt-msm8960
>                - qcom,scss-timer
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone
  2023-01-13 10:33 ` [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone Krzysztof Kozlowski
@ 2023-01-13 14:02   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:41AM +0100, Krzysztof Kozlowski wrote:
> The compatible "qcom,kpss-wdt" is too generic and should not be used
> alone.  Mark it as deprecated when not prepended by specific compatible.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Rob Herring <robh@kernel.org>
> 

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> 
> Changes since v1:
> 1. Add tag.
> ---
>  Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index e76364c52fc7..3e0b30a817d6 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -31,9 +31,10 @@ properties:
>                - qcom,apss-wdt-sm8150
>                - qcom,apss-wdt-sm8250
>            - const: qcom,kpss-wdt
> +      - const: qcom,kpss-wdt
> +        deprecated: true
>        - items:
>            - enum:
> -              - qcom,kpss-wdt
>                - qcom,kpss-timer
>                - qcom,kpss-wdt-apq8064
>                - qcom,kpss-wdt-ipq8064
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles
  2023-01-13 10:33 ` [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles Krzysztof Kozlowski
@ 2023-01-13 14:02   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:42AM +0100, Krzysztof Kozlowski wrote:
> The MSM timer ("qcom,msm-timer") is a bit different timer and watchdog
> device than KPSS watchdog.  It has its own generic and specific
> compatibles, so fix the list to reflect this.  Adjust the example to
> show the newer KPSS watchdog.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Rob Herring <robh@kernel.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> 
> ---
> 
> Changes since v1:
> 1. Add tag.
> ---
>  .../devicetree/bindings/watchdog/qcom-wdt.yaml    | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index 3e0b30a817d6..93e4381067dd 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -33,13 +33,16 @@ properties:
>            - const: qcom,kpss-wdt
>        - const: qcom,kpss-wdt
>          deprecated: true
> +      - items:
> +          - const: qcom,scss-timer
> +          - const: qcom,msm-timer
>        - items:
>            - enum:
> -              - qcom,kpss-timer
>                - qcom,kpss-wdt-apq8064
>                - qcom,kpss-wdt-ipq8064
>                - qcom,kpss-wdt-msm8960
> -              - qcom,scss-timer
> +          - const: qcom,kpss-timer
> +          - const: qcom,msm-timer
>  
>    reg:
>      maxItems: 1
> @@ -56,9 +59,11 @@ unevaluatedProperties: false
>  
>  examples:
>    - |
> -    watchdog@208a038 {
> -      compatible = "qcom,kpss-wdt-ipq8064";
> -      reg = <0x0208a038 0x40>;
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    watchdog@17c10000 {
> +      compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
> +      reg = <0x17c10000 0x1000>;
>        clocks = <&sleep_clk>;
>        timeout-sec = <10>;
>      };
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615
  2023-01-13 10:33 ` [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 Krzysztof Kozlowski
@ 2023-01-13 14:03   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:43AM +0100, Krzysztof Kozlowski wrote:
> Document new MDM9615 qcom,kpss-wdt-mdm9615 watchdog/timer compatible.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Rob Herring <robh@kernel.org>
> 

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> 
> Changes since v1:
> 1. Add tag.
> ---
>  Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index 93e4381067dd..1828eaf70b3b 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -40,6 +40,7 @@ properties:
>            - enum:
>                - qcom,kpss-wdt-apq8064
>                - qcom,kpss-wdt-ipq8064
> +              - qcom,kpss-wdt-mdm9615
>                - qcom,kpss-wdt-msm8960
>            - const: qcom,kpss-timer
>            - const: qcom,msm-timer
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts
  2023-01-13 10:33 ` [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts Krzysztof Kozlowski
@ 2023-01-13 14:03   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:44AM +0100, Krzysztof Kozlowski wrote:
> Both of type of watchdogs described in the binding (the KPSS watchdog
> and APSS WDT timer) have interrupts.  Allow interrupts and describe them
> for KPSS watchdog to fix warnings like:
> 
>   watchdog@17c10000: Unevaluated properties are not allowed ('interrupts' was unexpected)
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> 
> ---
> 
> Changes since v1:
> 1. Add tag.
> ---
>  .../bindings/watchdog/qcom-wdt.yaml           | 24 ++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index 1828eaf70b3b..b7fc57f4800e 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -9,9 +9,6 @@ title: Qualcomm Krait Processor Sub-system (KPSS) Watchdog timer
>  maintainers:
>    - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>  
> -allOf:
> -  - $ref: watchdog.yaml#
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -51,11 +48,31 @@ properties:
>    clocks:
>      maxItems: 1
>  
> +  interrupts:
> +    minItems: 1
> +    maxItems: 5
> +
>  required:
>    - compatible
>    - reg
>    - clocks
>  
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: qcom,kpss-wdt
> +    then:
> +      properties:
> +        interrupts:
> +          minItems: 1
> +          items:
> +            - description: Bark
> +            - description: Bite
> +
>  unevaluatedProperties: false
>  
>  examples:
> @@ -66,5 +83,6 @@ examples:
>        compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
>        reg = <0x17c10000 0x1000>;
>        clocks = <&sleep_clk>;
> +      interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
>        timeout-sec = <10>;
>      };
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer
  2023-01-13 10:33 ` [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Krzysztof Kozlowski
@ 2023-01-13 14:03   ` Guenter Roeck
  2023-01-17 18:13   ` Rob Herring
  1 sibling, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog

On Fri, Jan 13, 2023 at 11:33:45AM +0100, Krzysztof Kozlowski wrote:
> Merge Qualcomm MSM timer bindings into watchdog, because the timer
> compatibles are already included here and the hardware is quite similar.
> 
> While converting the MSM timer bindings, adjust clock-frequency
> property to take only one frequency, instead of two, because:
> 1. DT schema does not allow to frequencies,
> 2. The Linux timer driver reads only first frequency.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> 
> Changes since v1:
> 1. Add tag.
> 2. Correct clock-frequency description (Rob).
> ---
>  .../bindings/timer/qcom,msm-timer.txt         | 47 ------------------
>  .../bindings/watchdog/qcom-wdt.yaml           | 49 +++++++++++++++++++
>  2 files changed, 49 insertions(+), 47 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
> 
> diff --git a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt b/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
> deleted file mode 100644
> index 5e10c345548f..000000000000
> --- a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -* MSM Timer
> -
> -Properties:
> -
> -- compatible : Should at least contain "qcom,msm-timer". More specific
> -               properties specify which subsystem the timers are paired with.
> -
> -               "qcom,kpss-timer" - krait subsystem
> -               "qcom,scss-timer" - scorpion subsystem
> -
> -- interrupts : Interrupts for the debug timer, the first general purpose
> -               timer, and optionally a second general purpose timer, and
> -               optionally as well, 2 watchdog interrupts, in that order.
> -
> -- reg : Specifies the base address of the timer registers.
> -
> -- clocks: Reference to the parent clocks, one per output clock. The parents
> -          must appear in the same order as the clock names.
> -
> -- clock-names: The name of the clocks as free-form strings. They should be in
> -               the same order as the clocks.
> -
> -- clock-frequency : The frequency of the debug timer and the general purpose
> -                    timer(s) in Hz in that order.
> -
> -Optional:
> -
> -- cpu-offset : per-cpu offset used when the timer is accessed without the
> -               CPU remapping facilities. The offset is
> -               cpu-offset + (0x10000 * cpu-nr).
> -
> -Example:
> -
> -       timer@200a000 {
> -               compatible = "qcom,scss-timer", "qcom,msm-timer";
> -               interrupts = <1 1 0x301>,
> -                            <1 2 0x301>,
> -                            <1 3 0x301>,
> -                            <1 4 0x301>,
> -                            <1 5 0x301>;
> -               reg = <0x0200a000 0x100>;
> -               clock-frequency = <19200000>,
> -                                 <32768>;
> -               clocks = <&sleep_clk>;
> -               clock-names = "sleep";
> -               cpu-offset = <0x40000>;
> -       };
> diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> index b7fc57f4800e..837ce9112071 100644
> --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> @@ -10,6 +10,9 @@ maintainers:
>    - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>  
>  properties:
> +  $nodename:
> +    pattern: "^(watchdog|timer)@[0-9a-f]+$"
> +
>    compatible:
>      oneOf:
>        - items:
> @@ -48,6 +51,20 @@ properties:
>    clocks:
>      maxItems: 1
>  
> +  clock-names:
> +    items:
> +      - const: sleep
> +
> +  clock-frequency:
> +    description:
> +      The frequency of the general purpose timer in Hz.
> +
> +  cpu-offset:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Per-CPU offset used when the timer is accessed without the CPU remapping
> +      facilities. The offset is cpu-offset + (0x10000 * cpu-nr).
> +
>    interrupts:
>      minItems: 1
>      maxItems: 5
> @@ -67,12 +84,27 @@ allOf:
>              const: qcom,kpss-wdt
>      then:
>        properties:
> +        clock-frequency: false
> +        cpu-offset: false
>          interrupts:
>            minItems: 1
>            items:
>              - description: Bark
>              - description: Bite
>  
> +    else:
> +      properties:
> +        interrupts:
> +          minItems: 3
> +          items:
> +            - description: Debug
> +            - description: First general purpose timer
> +            - description: Second general purpose timer
> +            - description: First watchdog
> +            - description: Second watchdog
> +      required:
> +        - clock-frequency
> +
>  unevaluatedProperties: false
>  
>  examples:
> @@ -86,3 +118,20 @@ examples:
>        interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
>        timeout-sec = <10>;
>      };
> +
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    watchdog@200a000 {
> +      compatible = "qcom,kpss-wdt-ipq8064", "qcom,kpss-timer", "qcom,msm-timer";
> +      interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
> +                   <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
> +                   <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
> +                   <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
> +                   <GIC_PPI 5 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
> +      reg = <0x0200a000 0x100>;
> +      clock-frequency = <25000000>;
> +      clocks = <&sleep_clk>;
> +      clock-names = "sleep";
> +      cpu-offset = <0x80000>;
> +    };
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name
  2023-01-13 10:33 ` [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name Krzysztof Kozlowski
@ 2023-01-13 14:03   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-01-13 14:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Wim Van Sebroeck, Prakash Ranjan, linux-arm-msm, linux-kernel,
	devicetree, linux-watchdog, Rob Herring

On Fri, Jan 13, 2023 at 11:33:46AM +0100, Krzysztof Kozlowski wrote:
> On some SoCs the watchdog device is actually mixed with timer, e.g.
> the qcom,msm-timer on older Qualcomm SoCs where this is actually one
> hardware block responsible for both system timer and watchdog.
> 
> Allow calling such device nodes as "timer".
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
> 

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> 
> Changes since v1:
> 1. Add tag.
> 
> See also:
> https://lore.kernel.org/linux-arm-msm/20221212163532.142533-1-krzysztof.kozlowski@linaro.org/T/#t
> 
> which causes warnings:
> 
> qcom-msm8960-cdp.dtb: timer@200a000: $nodename:0: 'timer@200a000' does not match '^watchdog(@.*|-[0-9a-f])?$'
>   From schema: Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> ---
>  Documentation/devicetree/bindings/watchdog/watchdog.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/watchdog.yaml b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> index fccae0d00110..519b48889eb1 100644
> --- a/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> @@ -14,9 +14,14 @@ description: |
>    This document describes generic bindings which can be used to
>    describe watchdog devices in a device tree.
>  
> +select:
> +  properties:
> +    $nodename:
> +      pattern: "^watchdog(@.*|-[0-9a-f])?$"
> +
>  properties:
>    $nodename:
> -    pattern: "^watchdog(@.*|-[0-9a-f])?$"
> +    pattern: "^(timer|watchdog)(@.*|-[0-9a-f])?$"
>  
>    timeout-sec:
>      description:
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer
  2023-01-13 10:33 ` [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Krzysztof Kozlowski
  2023-01-13 14:03   ` Guenter Roeck
@ 2023-01-17 18:13   ` Rob Herring
  1 sibling, 0 replies; 18+ messages in thread
From: Rob Herring @ 2023-01-17 18:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, linux-arm-msm, Prakash Ranjan, Daniel Lezcano,
	Guenter Roeck, devicetree, Krzysztof Kozlowski, linux-kernel,
	linux-watchdog, Andy Gross, Bjorn Andersson, Wim Van Sebroeck,
	Thomas Gleixner, Konrad Dybcio


On Fri, 13 Jan 2023 11:33:45 +0100, Krzysztof Kozlowski wrote:
> Merge Qualcomm MSM timer bindings into watchdog, because the timer
> compatibles are already included here and the hardware is quite similar.
> 
> While converting the MSM timer bindings, adjust clock-frequency
> property to take only one frequency, instead of two, because:
> 1. DT schema does not allow to frequencies,
> 2. The Linux timer driver reads only first frequency.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> ---
> 
> Changes since v1:
> 1. Add tag.
> 2. Correct clock-frequency description (Rob).
> ---
>  .../bindings/timer/qcom,msm-timer.txt         | 47 ------------------
>  .../bindings/watchdog/qcom-wdt.yaml           | 49 +++++++++++++++++++
>  2 files changed, 49 insertions(+), 47 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/qcom,msm-timer.txt
> 

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

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

* Re: [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
  2023-01-13 14:02   ` Guenter Roeck
@ 2023-02-07  9:17     ` Krzysztof Kozlowski
  2023-02-07 15:51       ` Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-07  9:17 UTC (permalink / raw)
  To: Guenter Roeck, Wim Van Sebroeck
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Prakash Ranjan, linux-arm-msm, linux-kernel, devicetree,
	linux-watchdog, Rob Herring

On 13/01/2023 15:02, Guenter Roeck wrote:
> On Fri, Jan 13, 2023 at 11:33:40AM +0100, Krzysztof Kozlowski wrote:
>> The device specific compatibles ("qcom,kpss-wdt-ipq4019") should be
>> follwed by fallback "qcom,kpss-wdt", which is actually used by Linux
>> driver for binding.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Acked-by: Rob Herring <robh@kernel.org>
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

The patchset was acked and reviewed, so are there any other comments?
Guenter/Will - are you planning to pick it up?

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
  2023-02-07  9:17     ` Krzysztof Kozlowski
@ 2023-02-07 15:51       ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2023-02-07 15:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Wim Van Sebroeck
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Prakash Ranjan, linux-arm-msm, linux-kernel, devicetree,
	linux-watchdog, Rob Herring

On 2/7/23 01:17, Krzysztof Kozlowski wrote:
> On 13/01/2023 15:02, Guenter Roeck wrote:
>> On Fri, Jan 13, 2023 at 11:33:40AM +0100, Krzysztof Kozlowski wrote:
>>> The device specific compatibles ("qcom,kpss-wdt-ipq4019") should be
>>> follwed by fallback "qcom,kpss-wdt", which is actually used by Linux
>>> driver for binding.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> Acked-by: Rob Herring <robh@kernel.org>
>>
>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> 
> The patchset was acked and reviewed, so are there any other comments?
> Guenter/Will - are you planning to pick it up?
> 

The series is in my watchdog-next branch. Wim usually picks patches
up from there.

Guenter


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

end of thread, other threads:[~2023-02-07 15:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 10:33 [PATCH v2 0/7] watchdog: dt-bindings: rework/fix qcom-wdt Krzysztof Kozlowski
2023-01-13 10:33 ` [PATCH v2 1/7] dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 Krzysztof Kozlowski
2023-01-13 14:02   ` Guenter Roeck
2023-02-07  9:17     ` Krzysztof Kozlowski
2023-02-07 15:51       ` Guenter Roeck
2023-01-13 10:33 ` [PATCH v2 2/7] dt-bindings: watchdog: qcom-wdt: do not allow fallback alone Krzysztof Kozlowski
2023-01-13 14:02   ` Guenter Roeck
2023-01-13 10:33 ` [PATCH v2 3/7] dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles Krzysztof Kozlowski
2023-01-13 14:02   ` Guenter Roeck
2023-01-13 10:33 ` [PATCH v2 4/7] dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 Krzysztof Kozlowski
2023-01-13 14:03   ` Guenter Roeck
2023-01-13 10:33 ` [PATCH v2 5/7] dt-bindings: watchdog: qcom-wdt: allow interrupts Krzysztof Kozlowski
2023-01-13 14:03   ` Guenter Roeck
2023-01-13 10:33 ` [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Krzysztof Kozlowski
2023-01-13 14:03   ` Guenter Roeck
2023-01-17 18:13   ` Rob Herring
2023-01-13 10:33 ` [PATCH v2 7/7] dt-bindings: watchdog: allow "timer" as node name Krzysztof Kozlowski
2023-01-13 14:03   ` Guenter Roeck

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.