From e367e1d607960efec2a3608b469cb7af4f1637a3 Mon Sep 17 00:00:00 2001 From: Eric Ackermann Date: Fri, 11 Apr 2025 18:11:24 +0200 Subject: [PATCH] soc: cva6: Add device tree node for RISC-V mtimer The device tree entry for cva6 is currently missing a device tree node for the mtime and mtimecmp registers in the core-local interrupt controllers. This causes the RISC-V machine timer driver not to be built, causing build failures as the system clock is missing. This commit rectifies this by adding the corresponding device tree entry. Signed-off-by: Eric Ackermann --- boards/openhwgroup/cv32a6_genesys_2/cv32a6_genesys_2.dts | 4 ++++ boards/openhwgroup/cv64a6_genesys_2/cv64a6_genesys_2.dts | 6 +++++- dts/riscv/openhwgroup/cva6.dtsi | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/boards/openhwgroup/cv32a6_genesys_2/cv32a6_genesys_2.dts b/boards/openhwgroup/cv32a6_genesys_2/cv32a6_genesys_2.dts index 5b900ae7c5a..a6588c2aa4c 100644 --- a/boards/openhwgroup/cv32a6_genesys_2/cv32a6_genesys_2.dts +++ b/boards/openhwgroup/cv32a6_genesys_2/cv32a6_genesys_2.dts @@ -30,6 +30,10 @@ status = "okay"; }; +&mtimer { + status = "okay"; +}; + ð { local-mac-address = [00 18 3e 02 e3 7f]; status = "okay"; diff --git a/boards/openhwgroup/cv64a6_genesys_2/cv64a6_genesys_2.dts b/boards/openhwgroup/cv64a6_genesys_2/cv64a6_genesys_2.dts index 02fdad48d2c..eab1183221a 100644 --- a/boards/openhwgroup/cv64a6_genesys_2/cv64a6_genesys_2.dts +++ b/boards/openhwgroup/cv64a6_genesys_2/cv64a6_genesys_2.dts @@ -26,7 +26,11 @@ status = "okay"; }; -&clint{ +&clint { + status = "okay"; +}; + +&mtimer { status = "okay"; }; diff --git a/dts/riscv/openhwgroup/cva6.dtsi b/dts/riscv/openhwgroup/cva6.dtsi index 228c26301f1..22dd17e6d86 100644 --- a/dts/riscv/openhwgroup/cva6.dtsi +++ b/dts/riscv/openhwgroup/cva6.dtsi @@ -93,6 +93,14 @@ status = "disabled"; }; + mtimer: timer@200bff8 { + compatible = "riscv,machine-timer"; + interrupts-extended = <&hlic 7>; + reg = <0x200bff8 0x8 0x2004000 0x8>; + reg-names = "mtime", "mtimecmp"; + status = "disabled"; + }; + /* * Xilinx AXI DMA. * Part of the Xilinx AXI Ethernet Subsystem.