8000 opentitan: add watchdog/aon_timer by twilfredo · Pull Request #3208 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

opentitan: add watchdog/aon_timer #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 30, 2022
Merged

Conversation

twilfredo
Copy link
Contributor
@twilfredo twilfredo commented Sep 12, 2022

Pull Request Overview

Uses the Always on timer (AON_TIMER) for Opentitan hw_ip, to implement watchdog for OpenTitan.

This AON_TIMER has both a watchdog timer and a wakeup timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now (unused code tagged with #[cfg(aon_wkup_timer)], that should be (?) compiled out and is left for reference/use later.

The following patch for qemu adds support to the watchdog, so we can use this in the future with qemu also.

Testing Strategy

Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056.

TODO

  • Tested on Verilator, would be good to test on CW130 (since the AON_TIMER runs on different clock rates on both devices)
  • Implement a WakeUp timer interface (?) and connect it to this driver.

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added the WG-OpenTitan In the purview of the OpenTitan working group. label Sep 12, 2022
bradjc
bradjc previously approved these changes Sep 12, 2022
hudson-ayers
hudson-ayers previously approved these changes Sep 12, 2022
@bradjc bradjc added the blocked Waiting on something, like a different PR or a dependency. label Sep 19, 2022
@bradjc bradjc removed the blocked Waiting on something, like a different PR or a dependency. label Sep 28, 2022
@twilfredo
Copy link
Contributor Author

Ping! @alistair23

alistair23
alistair23 previously approved these changes Sep 29, 2022
@bradjc
Copy link
Contributor
bradjc commented Sep 29, 2022

bors r+

bors bot added a commit that referenced this pull request Sep 29, 2022
3208: opentitan: add watchdog/aon_timer r=bradjc a=twilfredo

### Pull Request Overview

Uses the `Always on timer` (AON_TIMER) for Opentitan [hw_ip](https://docs.opentitan.org/hw/ip/aon_timer/doc/), to implement watchdog for OpenTitan. 

This AON_TIMER has both a `watchdog` timer and a `wakeup` timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now  (unused code tagged with `#[cfg(aon_wkup_timer)]`, that should be (?) compiled out and is left for reference/use later.

The following patch for [qemu](https://www.mail-archive.com/qemu-devel@nongnu.org/msg907656.html) adds support to the watchdog, so we can use this in the future with qemu also. 

### Testing Strategy

Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056. 


### TODO

- Tested on Verilator, would be good to test on CW130  (since the AON_TIMER runs on different clock rates on both devices)
- Implement a WakeUp timer interface (?) and connect it to this driver.

### Documentation Updated

- [x] No updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
@bors
Copy link
Contributor
bors bot commented Sep 29, 2022

Build failed:

Add aon_timer hwip driver support, hardware
specification as per [1].

[1] https://docs.opentitan.org/hw/ip/aon_timer/doc/

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
@twilfredo
Copy link
Contributor Author

Rebased, interrupt line names had changed in the recent OT bump.

@alistair23
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Sep 30, 2022
3208: opentitan: add watchdog/aon_timer r=alistair23 a=twilfredo

### Pull Request Overview

Uses the `Always on timer` (AON_TIMER) for Opentitan [hw_ip](https://docs.opentitan.org/hw/ip/aon_timer/doc/), to implement watchdog for OpenTitan. 

This AON_TIMER has both a `watchdog` timer and a `wakeup` timer. The driver implemented has support for both hw functionality but only runs the watch dog timer for now  (unused code tagged with `#[cfg(aon_wkup_timer)]`, that should be (?) compiled out and is left for reference/use later.

The following patch for [qemu](https://www.mail-archive.com/qemu-devel@nongnu.org/msg907656.html) adds support to the watchdog, so we can use this in the future with qemu also. 

### Testing Strategy

Driver has been written to support to latest version of OpenTitan supported by TockOS, testing was done on Verilator on this #3056. 


### TODO

- Tested on Verilator, would be good to test on CW130  (since the AON_TIMER runs on different clock rates on both devices)
- Implement a WakeUp timer interface (?) and connect it to this driver.

### Documentation Updated

- [x] No updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
@bors
Copy link
Contributor
bors bot commented Sep 30, 2022

This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried.

Additional information:

{"message":"At least 1 approving review is required by reviewers with write access.","documentation_url":"https://docs.github.com/articles/about-protected-branches"}

@bradjc
Copy link
Contributor
bradjc commented Sep 30, 2022

bors r+

@bors
Copy link
Contributor
bors bot commented Sep 30, 2022

@bors bors bot merged commit b205e10 into tock:master Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0