Skip to content

Commit bbc563f

Browse files
katsustergalak
authored andcommitted
boards/dts: riscv: add SiFive FE310 watchdog driver bindings
This patch adds watchdog driver bindings and enable it for SiFive HiFive1 rev.B board. Signed-off-by: Katsuhiro Suzuki <[email protected]>
1 parent 02703e6 commit bbc563f

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

boards/riscv/hifive1_revb/hifive1_revb.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
/ {
1010
model = "SiFive HiFive 1 Rev B";
1111
compatible = "sifive,hifive1-revb";
12+
1213
aliases {
1314
led0 = &led0;
1415
led1 = &led1;
1516
led2 = &led2;
17+
watchdog0 = &wdog0;
1618
};
1719

1820
chosen {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2021 Katsuhiro Suzuki
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: SiFive FE310 Watchdog driver
5+
6+
compatible: "sifive,wdt"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true
13+
14+
label:
15+
required: true
16+
17+
interrupts:
18+
required: true

dts/riscv/riscv32-fe310.dtsi

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,19 @@
3737
compatible = "SiFive,FE310G-0002-Z0-soc", "fe310-soc",
3838
"sifive-soc", "simple-bus";
3939
ranges;
40-
aon: aon@10000000 {
40+
wdog0: wdog@10000000 {
41+
compatible = "sifive,wdt";
42+
interrupt-parent = <&plic>;
43+
interrupts = <1 1>;
44+
reg = <0x10000000 0x40>;
45+
reg-names = "control";
46+
label = "WDOG0";
47+
};
48+
aon: aon@10000040 {
4149
compatible = "sifive,aon0";
4250
interrupt-parent = <&plic>;
43-
interrupts = <1 1>, <2 1>;
44-
reg = <0x10000000 0x1000>;
51+
interrupts = <2 1>;
52+
reg = <0x10000040 0x9c0>;
4553
reg-names = "control";
4654
};
4755
clint: clint@2000000 {

0 commit comments

Comments
 (0)