sunxi: add a64 watchdog support
[openwrt/staging/dedeckeh.git] / target / linux / sunxi / patches-4.14 / 040-arm64-dts-allwinner-a64-Add-watchdog.patch
1 From d41850437c364ef7aba9bc25c1c701699d0240e0 Mon Sep 17 00:00:00 2001
2 From: Harald Geyer <harald@ccbib.org>
3 Date: Thu, 15 Mar 2018 16:25:07 +0000
4 Subject: [PATCH] arm64: dts: allwinner: a64: Add watchdog
5
6 Add a watchdog node for the A64, automatically enabled on all boards.
7 Since the device is compatible with an existing driver, we only reserve
8 a new compatible string to be used together with the fall back.
9 Tested on Olimex Teres-I.
10
11 Signed-off-by: Harald Geyer <harald@ccbib.org>
12 Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
13 ---
14 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 6 ++++--
15 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 7 +++++++
16 2 files changed, 11 insertions(+), 2 deletions(-)
17
18 diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
19 index 62dd5baad70e..04fc368d828f 100644
20 --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
21 +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
22 @@ -2,8 +2,10 @@ Allwinner SoCs Watchdog timer
23
24 Required properties:
25
26 -- compatible : should be either "allwinner,sun4i-a10-wdt" or
27 - "allwinner,sun6i-a31-wdt"
28 +- compatible : should be one of
29 + "allwinner,sun4i-a10-wdt"
30 + "allwinner,sun6i-a31-wdt"
31 + "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
32 - reg : Specifies base physical address and size of the registers.
33
34 Example:
35 diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
36 index 64e452a758fa..8401e7f887ff 100644
37 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
38 +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
39 @@ -665,5 +665,12 @@
40 #address-cells = <1>;
41 #size-cells = <0>;
42 };
43 +
44 + wdt0: watchdog@1c20ca0 {
45 + compatible = "allwinner,sun50i-a64-wdt",
46 + "allwinner,sun6i-a31-wdt";
47 + reg = <0x01c20ca0 0x20>;
48 + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
49 + };
50 };
51 };
52 --
53 2.17.1
54