All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329
@ 2021-07-26  3:51 ` Samuel Holland
  0 siblings, 0 replies; 18+ messages in thread
From: Samuel Holland @ 2021-07-26  3:51 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Maxime Ripard,
	Chen-Yu Tsai, Jernej Skrabec
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-watchdog,
	linux-kernel, Samuel Holland

On existing SoCs, the watchdog has a single clock input: HOSC (OSC24M)
divided by 750.  However, starting with R329, LOSC (OSC32k) is added as
an alternative clock source, with a bit to switch between them.

Since 24 MHz / 750 == 32 kHz, not 32.768 kHz, the hardware adjusts the
cycle counts to keep the timeouts independent of the clock source. This
keeps the programming interface backward-compatible.

R329 also adds two new registers, to allow software to immediately drive
the SoC reset signal.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../watchdog/allwinner,sun4i-a10-wdt.yaml     | 30 ++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
index 9aa3c313c49f..853ceb1b7c0f 100644
--- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -24,6 +24,7 @@ properties:
               - allwinner,sun50i-a100-wdt
               - allwinner,sun50i-h6-wdt
               - allwinner,sun50i-h616-wdt
+              - allwinner,sun50i-r329-wdt
           - const: allwinner,sun6i-a31-wdt
       - items:
           - const: allwinner,suniv-f1c100s-wdt
@@ -33,7 +34,16 @@ properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+    items:
+      enum:
+        - hosc
+        - losc
 
   interrupts:
     maxItems: 1
@@ -44,6 +54,24 @@ required:
   - clocks
   - interrupts
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - allwinner,sun50i-r329-wdt
+
+then:
+  properties:
+    clocks:
+      minItems: 2
+
+    clock-names:
+      minItems: 2
+
+  required:
+    - clock-names
+
 unevaluatedProperties: false
 
 examples:
-- 
2.31.1


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

end of thread, other threads:[~2021-07-30  1:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26  3:51 [PATCH 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 Samuel Holland
2021-07-26  3:51 ` Samuel Holland
2021-07-26  3:51 ` [PATCH 2/3] dt-bindings: watchdog: sunxi: Add compatible for D1 Samuel Holland
2021-07-26  3:51   ` Samuel Holland
2021-07-29  4:24   ` Guenter Roeck
2021-07-29  4:24     ` Guenter Roeck
2021-07-29 22:39     ` Rob Herring
2021-07-29 22:39       ` Rob Herring
2021-07-30  1:14       ` Guenter Roeck
2021-07-30  1:14         ` Guenter Roeck
2021-07-29 22:40   ` Rob Herring
2021-07-29 22:40     ` Rob Herring
2021-07-26  3:51 ` [PATCH 3/3] watchdog: sunxi_wdt: Add support " Samuel Holland
2021-07-26  3:51   ` Samuel Holland
2021-07-29  4:11   ` Guenter Roeck
2021-07-29  4:11     ` Guenter Roeck
2021-07-29 12:18 ` [PATCH 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 Maxime Ripard
2021-07-29 12:18   ` Maxime Ripard

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.