bcm4908: add watchdog support
[openwrt/staging/thess.git] / target / linux / bcm4908 / patches-5.10 / 301-arm64-dts-broadcom-bcm4908-add-TWD-block.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Tue, 9 Nov 2021 11:39:42 +0100
3 Subject: [PATCH] arm64: dts: broadcom: bcm4908: add TWD block
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 BCM4908 contains TWD block that provides few functions:
9 1. Timers
10 2. Wathchdog
11 3. Software reset
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 ---
15 .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 17 +++++++++++++----
16 1 file changed, 13 insertions(+), 4 deletions(-)
17
18 --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
19 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
20 @@ -273,9 +273,18 @@
21 #size-cells = <1>;
22 ranges = <0x00 0x00 0xff800000 0x3000>;
23
24 - timer: timer@400 {
25 - compatible = "brcm,bcm6328-timer", "syscon";
26 - reg = <0x400 0x3c>;
27 + twd: timer-mfd@400 {
28 + compatible = "brcm,bcm4908-twd", "brcm,twd", "simple-mfd", "syscon";
29 + reg = <0x400 0x4c>;
30 + ranges = <0x0 0x400 0x4c>;
31 +
32 + #address-cells = <1>;
33 + #size-cells = <1>;
34 +
35 + watchdog@28 {
36 + compatible = "brcm,bcm7038-wdt";
37 + reg = <0x28 0x8>;
38 + };
39 };
40
41 gpio0: gpio-controller@500 {
42 @@ -329,7 +338,7 @@
43
44 reboot {
45 compatible = "syscon-reboot";
46 - regmap = <&timer>;
47 + regmap = <&twd>;
48 offset = <0x34>;
49 mask = <1>;
50 };