boards: riscv: opentitan_earlgrey: Add the OpenTitan AON Timer

Adds the AON Timer device in the OpenTitan Earlgrey device tree.
Adds overlay files to enable the watchdog and set the alias to
`watchdog0`.

Adds the AON timer (watchdog part) to the supported features section
of the OpenTitan documentation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
This commit is contained in:
Tyler Ng 2023-04-25 13:46:06 -07:00 committed by Anas Nashif
parent 06ef4f6f66
commit ae350a9c77
5 changed files with 50 additions and 5 deletions

View file

@ -43,6 +43,8 @@ the Earl Grey chip simulated in Verilator, a cycle-accurate HDL simulation tool.
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| SPI | on-chip | SPI host | | SPI | on-chip | SPI host |
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| WDT | on-chip | Always-On Timer (Watchdog) |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on Zephyr porting. Other hardware features are not yet supported on Zephyr porting.
@ -89,8 +91,8 @@ References
.. target-notes:: .. target-notes::
.. _OpenTitan Earl Grey Chip Datasheet: https://docs.opentitan.org/hw/top_earlgrey/doc/ .. _OpenTitan Earl Grey Chip Datasheet: https://opentitan.org/book/hw/top_earlgrey/doc/specification.html
.. _OpenTitan GitHub: https://github.com/lowRISC/opentitan .. _OpenTitan GitHub: https://github.com/lowRISC/opentitan
.. _OpenTitan Verilator Setup: https://docs.opentitan.org/doc/getting_started/setup_verilator/ .. _OpenTitan Verilator Setup: https://opentitan.org/guides/getting_started/setup_verilator.html

View file

@ -9,3 +9,5 @@ testing:
ignore_tags: ignore_tags:
- net - net
- bluetooth - bluetooth
supported:
- watchdog

View file

@ -53,18 +53,29 @@
status = "disabled"; status = "disabled";
}; };
aontimer: aontimer@40470000 {
compatible = "lowrisc,opentitan-aontimer";
reg = <0x40470000 0x1000>;
interrupts = <156 1>;
interrupt-names = "wdog_bark";
interrupt-parent = <&plic>;
clock-frequency = <200000>;
status = "disabled";
};
plic: interrupt-controller@48000000 { plic: interrupt-controller@48000000 {
compatible = "sifive,plic-1.0.0"; compatible = "sifive,plic-1.0.0";
#address-cells = <0>; #address-cells = <0>;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupt-controller; interrupt-controller;
interrupts-extended = <&hlic 11>; interrupts-extended = <&hlic 11>;
reg = <0x48000000 0x00002000 reg = <0x48000000 0x00001000
0x48002000 0x001fe000 0x48002000 0x00001000
0x48000000 0x03e00000>; 0x48200000 0x00000008>;
reg-names = "prio", "irq_en", "reg"; reg-names = "prio", "irq_en", "reg";
riscv,max-priority = <7>; riscv,max-priority = <7>;
riscv,ndev = <184>; riscv,ndev = <184>;
status = "okay";
}; };
uart0: serial@40000000{ uart0: serial@40000000{

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2023 Rivos Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
watchdog0 = &aontimer;
};
};
&aontimer {
status = "okay";
};

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2023 Rivos Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
watchdog0 = &aontimer;
};
};
&aontimer {
status = "okay";
};