[PATCH 1/1] lib: utils/timer: mtimer: Add SiFive CLINT v2 support

Yong-Xuan Wang yongxuan.wang at sifive.com
Wed Sep 17 03:52:24 PDT 2025


The SiFive CLINT v2 is the HRT that supports the Zicntr extension. It
is incompatible with the SiFive CLINT v0 due to differences in their
control methods.

Signed-off-by: Vincent Chen <vincent.chen at sifive.com>
Signed-off-by: Yong-Xuan Wang <yongxuan.wang at sifive.com>
Co-developed-by: Yong-Xuan Wang <yongxuan.wang at sifive.com>
---
 lib/utils/timer/fdt_timer_mtimer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/utils/timer/fdt_timer_mtimer.c b/lib/utils/timer/fdt_timer_mtimer.c
index 224534d89c5d..e1fd051964bf 100644
--- a/lib/utils/timer/fdt_timer_mtimer.c
+++ b/lib/utils/timer/fdt_timer_mtimer.c
@@ -155,6 +155,7 @@ static const struct timer_mtimer_quirks thead_aclint_quirks = {
 static const struct fdt_match timer_mtimer_match[] = {
 	{ .compatible = "riscv,clint0", .data = &sifive_clint_quirks },
 	{ .compatible = "sifive,clint0", .data = &sifive_clint_quirks },
+	{ .compatible = "sifive,clint2", .data = &sifive_clint_quirks },
 	{ .compatible = "thead,c900-clint", .data = &thead_clint_quirks },
 	{ .compatible = "thead,c900-aclint-mtimer",
 	  .data = &thead_aclint_quirks },
-- 
2.43.0




More information about the opensbi mailing list