Commit 55f36df9 authored by Samuel Holland's avatar Samuel Holland Committed by Wim Van Sebroeck

dt-bindings: watchdog: sunxi: Add compatibles for R329

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.

Furthermore, the R329 has two watchdogs: one for use by the ARM CPUs
at 0x20000a0, and a second one for use by the DSPs at 0x7020400. The
first of these adds two more new registers, to allow software to
immediately assert the SoC reset signal. Add an additional "-reset"
suffix to signify the presence of this feature.
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Acked-by: default avatarMaxime Ripard <maxime@cerno.tech>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210902225750.29313-2-samuel@sholland.orgSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent f01f0717
...@@ -24,6 +24,8 @@ properties: ...@@ -24,6 +24,8 @@ properties:
- allwinner,sun50i-a100-wdt - allwinner,sun50i-a100-wdt
- allwinner,sun50i-h6-wdt - allwinner,sun50i-h6-wdt
- allwinner,sun50i-h616-wdt - allwinner,sun50i-h616-wdt
- allwinner,sun50i-r329-wdt
- allwinner,sun50i-r329-wdt-reset
- const: allwinner,sun6i-a31-wdt - const: allwinner,sun6i-a31-wdt
- items: - items:
- const: allwinner,suniv-f1c100s-wdt - const: allwinner,suniv-f1c100s-wdt
...@@ -33,7 +35,18 @@ properties: ...@@ -33,7 +35,18 @@ properties:
maxItems: 1 maxItems: 1
clocks: clocks:
maxItems: 1 minItems: 1
maxItems: 2
items:
- description: High-frequency oscillator input, divided internally
- description: Low-frequency oscillator input, only found on some variants
clock-names:
minItems: 1
maxItems: 2
items:
- const: hosc
- const: losc
interrupts: interrupts:
maxItems: 1 maxItems: 1
...@@ -44,6 +57,33 @@ required: ...@@ -44,6 +57,33 @@ required:
- clocks - clocks
- interrupts - interrupts
if:
properties:
compatible:
contains:
enum:
- allwinner,sun50i-r329-wdt
- allwinner,sun50i-r329-wdt-reset
then:
properties:
clocks:
minItems: 2
clock-names:
minItems: 2
required:
- clock-names
else:
properties:
clocks:
maxItems: 1
clock-names:
maxItems: 1
unevaluatedProperties: false unevaluatedProperties: false
examples: examples:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment