From 95a1f963993f85b46f3fd755f0fe67a6ca8e890c Mon Sep 17 00:00:00 2001 From: Filip Kokosinski Date: Mon, 12 Feb 2024 13:37:21 +0100 Subject: [PATCH] boards: convert SiFive HiFive Unmatched to Zephyr HWMv2 This commit converts the SiFive HiFive Unmatched board (`hifive_unmatched` target) to the Zephyr Hardware Model v2. Signed-off-by: Filip Kokosinski --- .../hifive_unmatched/hifive_unmatched_defconfig | 8 -------- .../hifive_unmatched/Kconfig.defconfig | 5 +---- .../hifive_unmatched/Kconfig.hifive_unmatched} | 3 +-- .../riscv => sifive}/hifive_unmatched/board.cmake | 0 boards/sifive/hifive_unmatched/board.yml | 5 +++++ .../hifive_unmatched/doc/img/hifive_unmatched.jpg | Bin .../riscv => sifive}/hifive_unmatched/doc/index.rst | 0 .../hifive_unmatched/hifive_unmatched.dts | 0 .../hifive_unmatched/hifive_unmatched.yaml | 0 .../hifive_unmatched/hifive_unmatched_defconfig | 7 +++++++ .../hifive_unmatched/support/hifive_unmatched.resc | 0 .../support/openocd_hifive_unmatched.cfg | 0 12 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched_defconfig rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/Kconfig.defconfig (80%) rename boards/{boards_legacy/riscv/hifive_unmatched/Kconfig.board => sifive/hifive_unmatched/Kconfig.hifive_unmatched} (61%) rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/board.cmake (100%) create mode 100644 boards/sifive/hifive_unmatched/board.yml rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/doc/img/hifive_unmatched.jpg (100%) rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/doc/index.rst (100%) rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/hifive_unmatched.dts (100%) rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/hifive_unmatched.yaml (100%) create mode 100644 boards/sifive/hifive_unmatched/hifive_unmatched_defconfig rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/support/hifive_unmatched.resc (100%) rename boards/{boards_legacy/riscv => sifive}/hifive_unmatched/support/openocd_hifive_unmatched.cfg (100%) diff --git a/boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched_defconfig b/boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched_defconfig deleted file mode 100644 index be13ed10358..00000000000 --- a/boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched_defconfig +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG_SOC_SERIES_SIFIVE_FREEDOM_U700=y -CONFIG_SOC_SIFIVE_FREEDOM_U740=y -CONFIG_BOARD_HIFIVE_UNMATCHED=y -CONFIG_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_UART_SIFIVE_PORT_0=y -CONFIG_UART_CONSOLE=y -CONFIG_XIP=n diff --git a/boards/boards_legacy/riscv/hifive_unmatched/Kconfig.defconfig b/boards/sifive/hifive_unmatched/Kconfig.defconfig similarity index 80% rename from boards/boards_legacy/riscv/hifive_unmatched/Kconfig.defconfig rename to boards/sifive/hifive_unmatched/Kconfig.defconfig index ee38da1c579..3ced33713cb 100644 --- a/boards/boards_legacy/riscv/hifive_unmatched/Kconfig.defconfig +++ b/boards/sifive/hifive_unmatched/Kconfig.defconfig @@ -3,13 +3,10 @@ if BOARD_HIFIVE_UNMATCHED -config BOARD - default "hifive_unmatched" - config SYS_CLOCK_TICKS_PER_SEC default 1000 config SYS_CLOCK_HW_CYCLES_PER_SEC default 1000000 -endif +endif # BOARD_HIFIVE_UNMATCHED diff --git a/boards/boards_legacy/riscv/hifive_unmatched/Kconfig.board b/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched similarity index 61% rename from boards/boards_legacy/riscv/hifive_unmatched/Kconfig.board rename to boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched index bb303cc3aac..87911f3ccb3 100644 --- a/boards/boards_legacy/riscv/hifive_unmatched/Kconfig.board +++ b/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched @@ -2,5 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 config BOARD_HIFIVE_UNMATCHED - bool "HiFive Unmatched target" - depends on SOC_SIFIVE_FREEDOM_U740 + select SOC_SIFIVE_FREEDOM_FU740 diff --git a/boards/boards_legacy/riscv/hifive_unmatched/board.cmake b/boards/sifive/hifive_unmatched/board.cmake similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/board.cmake rename to boards/sifive/hifive_unmatched/board.cmake diff --git a/boards/sifive/hifive_unmatched/board.yml b/boards/sifive/hifive_unmatched/board.yml new file mode 100644 index 00000000000..703d94e852b --- /dev/null +++ b/boards/sifive/hifive_unmatched/board.yml @@ -0,0 +1,5 @@ +board: + name: hifive_unmatched + vendor: sifive + socs: + - name: fu740 diff --git a/boards/boards_legacy/riscv/hifive_unmatched/doc/img/hifive_unmatched.jpg b/boards/sifive/hifive_unmatched/doc/img/hifive_unmatched.jpg similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/doc/img/hifive_unmatched.jpg rename to boards/sifive/hifive_unmatched/doc/img/hifive_unmatched.jpg diff --git a/boards/boards_legacy/riscv/hifive_unmatched/doc/index.rst b/boards/sifive/hifive_unmatched/doc/index.rst similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/doc/index.rst rename to boards/sifive/hifive_unmatched/doc/index.rst diff --git a/boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched.dts b/boards/sifive/hifive_unmatched/hifive_unmatched.dts similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched.dts rename to boards/sifive/hifive_unmatched/hifive_unmatched.dts diff --git a/boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched.yaml b/boards/sifive/hifive_unmatched/hifive_unmatched.yaml similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/hifive_unmatched.yaml rename to boards/sifive/hifive_unmatched/hifive_unmatched.yaml diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_defconfig b/boards/sifive/hifive_unmatched/hifive_unmatched_defconfig new file mode 100644 index 00000000000..02295cf19df --- /dev/null +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_defconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_SIFIVE_PORT_0=y +CONFIG_UART_CONSOLE=y +CONFIG_XIP=n diff --git a/boards/boards_legacy/riscv/hifive_unmatched/support/hifive_unmatched.resc b/boards/sifive/hifive_unmatched/support/hifive_unmatched.resc similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/support/hifive_unmatched.resc rename to boards/sifive/hifive_unmatched/support/hifive_unmatched.resc diff --git a/boards/boards_legacy/riscv/hifive_unmatched/support/openocd_hifive_unmatched.cfg b/boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg similarity index 100% rename from boards/boards_legacy/riscv/hifive_unmatched/support/openocd_hifive_unmatched.cfg rename to boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg