Skip to content

Commit 9c5482d

Browse files
committed
dts: cpu: add device tree bindings for Synopsys ARC-V RISC-V CPUs
Add device tree binding files for the Synopsys ARC-V RHX and RMX RISC-V CPU cores. These bindings enable proper device tree property parsing by the Enhanced Device Tree (EDT) system, allowing Kconfig device tree macros to access CPU properties like clock-frequency. The bindings include the standard RISC-V CPU properties by extending riscv,cpus.yaml, which provides access to properties defined in cpu.yaml such as clock-frequency. Signed-off-by: Afonso Oliveira <[email protected]>
1 parent 2578fb9 commit 9c5482d

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

boards/snps/nsim/arc_v/Kconfig.defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ if BOARD_NSIM_ARC_V_RMX100
66
config SYS_CLOCK_TICKS_PER_SEC
77
default 1000
88

9-
config SYS_CLOCK_HW_CYCLES_PER_SEC
10-
default 5000000
11-
129
endif # BOARD_NSIM_ARC_V_RMX100
1310

1411
if BOARD_NSIM_ARC_V_RHX100

dts/bindings/cpu/snps,av5rhx.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Synopsys, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Synopsys ARC-V RHX RISC-V CPU
5+
6+
compatible: "snps,av5rhx"
7+
8+
include: riscv,cpus.yaml

dts/bindings/cpu/snps,av5rmx.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Synopsys, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Synopsys ARC-V RMX RISC-V CPU
5+
6+
compatible: "snps,av5rmx"
7+
8+
include: riscv,cpus.yaml

soc/snps/nsim/arc_v/rmx/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
if SOC_SERIES_NSIM_ARC_V_RMX
55

6+
config SYS_CLOCK_HW_CYCLES_PER_SEC
7+
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
8+
69
config RISCV_SOC_INTERRUPT_INIT
710
default y
811

0 commit comments

Comments
 (0)