From 8e881959a49467e70c786a30987a367e22bb4014 Mon Sep 17 00:00:00 2001 From: Jakub Wasilewski Date: Tue, 28 May 2024 10:51:38 +0200 Subject: [PATCH] boards: hifive_unmatched: add support for S7 and U74 targets Add `hifive_unmatched//s7` (earlier selected by default, using `hifive_unmatched`) and `hifive_unmatched//u74` targets. Define work-area for other 4 cores in openocd.cfg Update twister platform white/black lists, to support new targets Signed-off-by: Jakub Wasilewski Signed-off-by: Filip Kokosinski --- .../hifive_unmatched/Kconfig.hifive_unmatched | 3 +- boards/sifive/hifive_unmatched/doc/index.rst | 18 +++- ...ve_unmatched.dts => hifive_unmatched.dtsi} | 0 .../hifive_unmatched/hifive_unmatched_s7.dts | 29 +++++++ ...nmatched.yaml => hifive_unmatched_s7.yaml} | 5 +- ...efconfig => hifive_unmatched_s7_defconfig} | 0 .../hifive_unmatched/hifive_unmatched_u74.dts | 17 ++++ .../hifive_unmatched_u74.yaml | 21 +++++ .../hifive_unmatched_u74_defconfig | 9 ++ .../support/openocd_hifive_unmatched.cfg | 4 + dts/riscv/sifive/riscv64-fu740.dtsi | 26 ++++-- samples/drivers/jesd216/sample.yaml | 3 +- samples/drivers/mspi/mspi_async/sample.yaml | 2 +- samples/drivers/mspi/mspi_flash/sample.yaml | 2 +- samples/drivers/spi_flash/sample.yaml | 2 +- samples/subsys/fs/fs_sample/README.rst | 4 +- samples/subsys/fs/fs_sample/sample.yaml | 2 +- soc/sifive/sifive_freedom/fu700/Kconfig | 5 ++ .../sifive_freedom/fu700/Kconfig.defconfig | 7 ++ soc/sifive/sifive_freedom/fu700/Kconfig.soc | 16 +++- soc/sifive/sifive_freedom/soc.yml | 3 + .../drivers/charger/sbs_charger/testcase.yaml | 3 +- .../fuel_gauge/sbs_gauge/testcase.yaml | 5 +- tests/drivers/memc/ram/testcase.yaml | 2 +- ...rlay => hifive_unmatched_fu740_s7.overlay} | 0 .../boards/hifive_unmatched_fu740_u74.overlay | 85 +++++++++++++++++++ ...rlay => hifive_unmatched_fu740_s7.overlay} | 0 .../boards/hifive_unmatched_fu740_u74.overlay | 21 +++++ tests/subsys/fs/ext2/testcase.yaml | 6 +- 29 files changed, 270 insertions(+), 30 deletions(-) rename boards/sifive/hifive_unmatched/{hifive_unmatched.dts => hifive_unmatched.dtsi} (100%) create mode 100644 boards/sifive/hifive_unmatched/hifive_unmatched_s7.dts rename boards/sifive/hifive_unmatched/{hifive_unmatched.yaml => hifive_unmatched_s7.yaml} (75%) rename boards/sifive/hifive_unmatched/{hifive_unmatched_defconfig => hifive_unmatched_s7_defconfig} (100%) create mode 100644 boards/sifive/hifive_unmatched/hifive_unmatched_u74.dts create mode 100644 boards/sifive/hifive_unmatched/hifive_unmatched_u74.yaml create mode 100644 boards/sifive/hifive_unmatched/hifive_unmatched_u74_defconfig rename tests/kernel/device/boards/{hifive_unmatched.overlay => hifive_unmatched_fu740_s7.overlay} (100%) create mode 100644 tests/kernel/device/boards/hifive_unmatched_fu740_u74.overlay rename tests/subsys/fs/ext2/boards/{hifive_unmatched.overlay => hifive_unmatched_fu740_s7.overlay} (100%) create mode 100644 tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_u74.overlay diff --git a/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched b/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched index 87911f3ccb3..77ea79eb29d 100644 --- a/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched +++ b/boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched @@ -2,4 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 config BOARD_HIFIVE_UNMATCHED - select SOC_SIFIVE_FREEDOM_FU740 + select SOC_SIFIVE_FREEDOM_FU740_S7 if BOARD_HIFIVE_UNMATCHED_FU740_S7 + select SOC_SIFIVE_FREEDOM_FU740_U74 if BOARD_HIFIVE_UNMATCHED_FU740_U74 diff --git a/boards/sifive/hifive_unmatched/doc/index.rst b/boards/sifive/hifive_unmatched/doc/index.rst index 2ff4d5de6e3..bc2447104b2 100644 --- a/boards/sifive/hifive_unmatched/doc/index.rst +++ b/boards/sifive/hifive_unmatched/doc/index.rst @@ -15,9 +15,21 @@ Building Applications for the ``hifive_unmatched`` board configuration can be built as usual (see :ref:`build_an_application`) using the corresponding board name: -.. zephyr-app-commands:: - :board: hifive_unmatched - :goals: build +.. tabs:: + + .. group-tab:: S7 + + .. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :board: hifive_unmatched/fu740/s7 + :goals: build + + .. group-tab:: U74 + + .. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :board: hifive_unmatched/fu740/u74 + :goals: build Flashing ======== diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched.dts b/boards/sifive/hifive_unmatched/hifive_unmatched.dtsi similarity index 100% rename from boards/sifive/hifive_unmatched/hifive_unmatched.dts rename to boards/sifive/hifive_unmatched/hifive_unmatched.dtsi diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_s7.dts b/boards/sifive/hifive_unmatched/hifive_unmatched_s7.dts new file mode 100644 index 00000000000..a850910b368 --- /dev/null +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_s7.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2024 Antmicro + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include "hifive_unmatched.dtsi" + +/ { + cpus { + cpu@1 { + status = "disabled"; + }; + + cpu@2 { + status = "disabled"; + }; + + cpu@3 { + status = "disabled"; + }; + + cpu@4 { + status = "disabled"; + }; + }; +}; diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched.yaml b/boards/sifive/hifive_unmatched/hifive_unmatched_s7.yaml similarity index 75% rename from boards/sifive/hifive_unmatched/hifive_unmatched.yaml rename to boards/sifive/hifive_unmatched/hifive_unmatched_s7.yaml index 6fbfb696ce1..171d8577d20 100644 --- a/boards/sifive/hifive_unmatched/hifive_unmatched.yaml +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_s7.yaml @@ -1,5 +1,5 @@ -identifier: hifive_unmatched -name: SiFive HiFive Unmatched +identifier: hifive_unmatched/fu740/s7 +name: SiFive HiFive Unmatched (S7) type: mcu arch: riscv toolchain: @@ -8,6 +8,7 @@ ram: 3840 simulation: renode simulation_exec: renode testing: + timeout_multiplier: 6 ignore_tags: - net - bluetooth diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_defconfig b/boards/sifive/hifive_unmatched/hifive_unmatched_s7_defconfig similarity index 100% rename from boards/sifive/hifive_unmatched/hifive_unmatched_defconfig rename to boards/sifive/hifive_unmatched/hifive_unmatched_s7_defconfig diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_u74.dts b/boards/sifive/hifive_unmatched/hifive_unmatched_u74.dts new file mode 100644 index 00000000000..e8adf2bd127 --- /dev/null +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_u74.dts @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2024 Antmicro + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include "hifive_unmatched.dtsi" + +/ { + cpus { + cpu@0 { + status = "disabled"; + }; + }; +}; diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_u74.yaml b/boards/sifive/hifive_unmatched/hifive_unmatched_u74.yaml new file mode 100644 index 00000000000..09dd76d34c6 --- /dev/null +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_u74.yaml @@ -0,0 +1,21 @@ +identifier: hifive_unmatched/fu740/u74 +name: SiFive HiFive Unmatched (U74) +type: mcu +arch: riscv +toolchain: + - zephyr +ram: 3840 +simulation: renode +simulation_exec: renode +testing: + timeout_multiplier: 6 + ignore_tags: + - net + - bluetooth + renode: + uart: sysbus.uart0 + resc: boards/sifive/hifive_unmatched/support/hifive_unmatched.resc +supported: + - spi + - memc +vendor: sifive diff --git a/boards/sifive/hifive_unmatched/hifive_unmatched_u74_defconfig b/boards/sifive/hifive_unmatched/hifive_unmatched_u74_defconfig new file mode 100644 index 00000000000..b63433284cb --- /dev/null +++ b/boards/sifive/hifive_unmatched/hifive_unmatched_u74_defconfig @@ -0,0 +1,9 @@ +# 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 +CONFIG_RV_BOOT_HART=1 +CONFIG_FLOAT_HARD=y diff --git a/boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg b/boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg index 1620f6cbd39..f8092286163 100644 --- a/boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg +++ b/boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg @@ -18,5 +18,9 @@ target create $_TARGETNAME.3 riscv -chain-position $_TARGETNAME -coreid 3 target create $_TARGETNAME.4 riscv -chain-position $_TARGETNAME -coreid 4 target smp $_TARGETNAME.0 $_TARGETNAME.1 $_TARGETNAME.2 $_TARGETNAME.3 $_TARGETNAME.4 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 +$_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 +$_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 +$_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 +$_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 flash bank onboard_spi_flash0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10040000 diff --git a/dts/riscv/sifive/riscv64-fu740.dtsi b/dts/riscv/sifive/riscv64-fu740.dtsi index 314cc175eed..4b82d6338bc 100644 --- a/dts/riscv/sifive/riscv64-fu740.dtsi +++ b/dts/riscv/sifive/riscv64-fu740.dtsi @@ -38,7 +38,7 @@ riscv,isa = "rv64imac_zicsr_zifencei"; status = "okay"; - hlic: interrupt-controller { + hlic0: interrupt-controller { compatible = "riscv,cpu-intc"; #address-cells = <0>; #interrupt-cells = <1>; @@ -52,8 +52,9 @@ reg = <0x1>; riscv,isa = "rv64gc"; - cpu1_intc: interrupt-controller { + hlic1: interrupt-controller { compatible = "riscv,cpu-intc"; + #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; }; @@ -65,8 +66,9 @@ reg = <0x2>; riscv,isa = "rv64gc"; - cpu2_intc: interrupt-controller { + hlic2: interrupt-controller { compatible = "riscv,cpu-intc"; + #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; }; @@ -78,8 +80,9 @@ reg = <0x3>; riscv,isa = "rv64gc"; - cpu3_intc: interrupt-controller { + hlic3: interrupt-controller { compatible = "riscv,cpu-intc"; + #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; }; @@ -91,8 +94,9 @@ reg = <0x4>; riscv,isa = "rv64gc"; - cpu4_intc: interrupt-controller { + hlic4: interrupt-controller { compatible = "riscv,cpu-intc"; + #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; }; @@ -125,7 +129,11 @@ clint: clint@2000000 { compatible = "sifive,clint0"; - interrupts-extended = <&hlic 3 &hlic 7>; + interrupts-extended = <&hlic0 3 &hlic0 7 + &hlic1 3 &hlic1 7 + &hlic2 3 &hlic2 7 + &hlic3 3 &hlic3 7 + &hlic4 3 &hlic4 7>; reg = <0x0 0x2000000 0x0 0x10000>; }; @@ -141,7 +149,11 @@ #address-cells = <0>; #interrupt-cells = <2>; interrupt-controller; - interrupts-extended = <&hlic 11>; + interrupts-extended = <&hlic0 11 + &hlic1 11 + &hlic2 11 + &hlic3 11 + &hlic4 11>; reg = <0x0 0x0c000000 0x0 0x04000000>; riscv,max-priority = <7>; riscv,ndev = <52>; diff --git a/samples/drivers/jesd216/sample.yaml b/samples/drivers/jesd216/sample.yaml index 85f6c07dd92..5dcdc6678dc 100644 --- a/samples/drivers/jesd216/sample.yaml +++ b/samples/drivers/jesd216/sample.yaml @@ -17,7 +17,8 @@ tests: - hifive1 - hifive_unleashed/fu540/e51 - hifive_unleashed/fu540/u54 - - hifive_unmatched + - hifive_unmatched/fu740/s7 + - hifive_unmatched/fu740/u74 - mimxrt1170_evk/mimxrt1176/cm7 - mimxrt1170_evk/mimxrt1176/cm4 filter: dt_compat_enabled("jedec,spi-nor") diff --git a/samples/drivers/mspi/mspi_async/sample.yaml b/samples/drivers/mspi/mspi_async/sample.yaml index 73b5985ea57..3510408365e 100644 --- a/samples/drivers/mspi/mspi_async/sample.yaml +++ b/samples/drivers/mspi/mspi_async/sample.yaml @@ -5,7 +5,7 @@ tests: tags: - mspi filter: dt_compat_enabled("mspi-aps6404l") - platform_exclude: hifive_unmatched + platform_exclude: hifive_unmatched/fu740/s7 hifive_unmatched/fu740/u74 harness: console harness_config: type: multi_line diff --git a/samples/drivers/mspi/mspi_flash/sample.yaml b/samples/drivers/mspi/mspi_flash/sample.yaml index 33645362297..6f71269f9ff 100644 --- a/samples/drivers/mspi/mspi_flash/sample.yaml +++ b/samples/drivers/mspi/mspi_flash/sample.yaml @@ -6,7 +6,7 @@ tests: - mspi - flash filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("mspi-atxp032") - platform_exclude: hifive_unmatched + platform_exclude: hifive_unmatched/fu740/s7 hifive_unmatched/fu740/u74 harness: console harness_config: type: multi_line diff --git a/samples/drivers/spi_flash/sample.yaml b/samples/drivers/spi_flash/sample.yaml index 377c5ccec6e..3e9bffa6a48 100644 --- a/samples/drivers/spi_flash/sample.yaml +++ b/samples/drivers/spi_flash/sample.yaml @@ -8,7 +8,7 @@ tests: filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("st,stm32-qspi-nor") or dt_compat_enabled("st,stm32-ospi-nor") or dt_compat_enabled("st,stm32-xspi-nor") or (dt_compat_enabled("nordic,qspi-nor") and CONFIG_NORDIC_QSPI_NOR) - platform_exclude: hifive_unmatched + platform_exclude: hifive_unmatched/fu740/s7 hifive_unmatched/fu740/u74 harness: console harness_config: type: multi_line diff --git a/samples/subsys/fs/fs_sample/README.rst b/samples/subsys/fs/fs_sample/README.rst index d4da8d8d9be..963172b4f25 100644 --- a/samples/subsys/fs/fs_sample/README.rst +++ b/samples/subsys/fs/fs_sample/README.rst @@ -73,13 +73,13 @@ sample lists them out on the debug serial output. Building and Running EXT2 samples ********************************* -Ext2 sample can be built for ``hifive_unmatched`` or ``bl5340_dvk/nrf5340/cpuapp``. Because +Ext2 sample can be built for ``hifive_unmatched/fu740/s7`` or ``bl5340_dvk/nrf5340/cpuapp``. Because FAT is default file system for this sample, additional flags must be passed to build the sample. .. zephyr-app-commands:: :zephyr-app: samples/subsys/fs/fs_sample - :board: hifive_unmatched + :board: hifive_unmatched/fu740/s7 hifive_unmatched/fu740/u74 :gen-args: -DCONF_FILE=prj_ext.conf :goals: build :compact: diff --git a/samples/subsys/fs/fs_sample/sample.yaml b/samples/subsys/fs/fs_sample/sample.yaml index 91c0fe100b4..3b670ba8492 100644 --- a/samples/subsys/fs/fs_sample/sample.yaml +++ b/samples/subsys/fs/fs_sample/sample.yaml @@ -73,7 +73,7 @@ tests: simulation_exclude: - renode extra_args: CONF_FILE="prj_ext.conf" - platform_allow: hifive_unmatched bl5340_dvk/nrf5340/cpuapp + platform_allow: hifive_unmatched/fu740/s7 bl5340_dvk/nrf5340/cpuapp sample.filesystem.fat_fs.stm32h747i_disco_m7_sdmmc: build_only: true platform_allow: stm32h747i_disco/stm32h747xx/m7 diff --git a/soc/sifive/sifive_freedom/fu700/Kconfig b/soc/sifive/sifive_freedom/fu700/Kconfig index 7179342dc15..5644ea390ab 100644 --- a/soc/sifive/sifive_freedom/fu700/Kconfig +++ b/soc/sifive/sifive_freedom/fu700/Kconfig @@ -22,3 +22,8 @@ config SOC_SERIES_SIFIVE_FREEDOM_FU700 select SOC_EARLY_INIT_HOOK select INCLUDE_RESET_VECTOR imply XIP + +config SOC_SIFIVE_FREEDOM_FU740_U74 + bool + select RISCV_ISA_EXT_G + select CPU_HAS_FPU_DOUBLE_PRECISION diff --git a/soc/sifive/sifive_freedom/fu700/Kconfig.defconfig b/soc/sifive/sifive_freedom/fu700/Kconfig.defconfig index 56aab7e3df8..c990500fcf3 100644 --- a/soc/sifive/sifive_freedom/fu700/Kconfig.defconfig +++ b/soc/sifive/sifive_freedom/fu700/Kconfig.defconfig @@ -1,4 +1,5 @@ # Copyright (c) 2017 Jean-Paul Etienne +# Copyright (c) 2024 Antmicro # SPDX-License-Identifier: Apache-2.0 if SOC_SERIES_SIFIVE_FREEDOM_FU700 @@ -24,4 +25,10 @@ config MAX_IRQ_PER_AGGREGATOR config NUM_IRQS default 64 +config FPU + default y if CPU_HAS_FPU + +config RISCV_IMPRECISE_FPU_STATE_TRACKING + default y if FPU + endif # SOC_SERIES_SIFIVE_FREEDOM_FU700 diff --git a/soc/sifive/sifive_freedom/fu700/Kconfig.soc b/soc/sifive/sifive_freedom/fu700/Kconfig.soc index db58d77a2c3..a46673c768c 100644 --- a/soc/sifive/sifive_freedom/fu700/Kconfig.soc +++ b/soc/sifive/sifive_freedom/fu700/Kconfig.soc @@ -5,12 +5,20 @@ config SOC_SERIES_SIFIVE_FREEDOM_FU700 bool select SOC_FAMILY_SIFIVE_FREEDOM -config SOC_SERIES - default "fu700" if SOC_SERIES_SIFIVE_FREEDOM_FU700 - config SOC_SIFIVE_FREEDOM_FU740 bool select SOC_SERIES_SIFIVE_FREEDOM_FU700 +config SOC_SIFIVE_FREEDOM_FU740_S7 + bool + select SOC_SIFIVE_FREEDOM_FU740 + +config SOC_SIFIVE_FREEDOM_FU740_U74 + bool + select SOC_SIFIVE_FREEDOM_FU740 + +config SOC_SERIES + default "fu700" if SOC_SERIES_SIFIVE_FREEDOM_FU700 + config SOC - default "fu740" if SOC_SIFIVE_FREEDOM_FU740 + default "fu740" if SOC_SIFIVE_FREEDOM_FU740_S7 || SOC_SIFIVE_FREEDOM_FU740_U74 diff --git a/soc/sifive/sifive_freedom/soc.yml b/soc/sifive/sifive_freedom/soc.yml index 9f0d3f193e8..2f5ebd1524e 100644 --- a/soc/sifive/sifive_freedom/soc.yml +++ b/soc/sifive/sifive_freedom/soc.yml @@ -13,3 +13,6 @@ family: - name: fu700 socs: - name: fu740 + cpuclusters: + - name: s7 + - name: u74 diff --git a/tests/drivers/charger/sbs_charger/testcase.yaml b/tests/drivers/charger/sbs_charger/testcase.yaml index 18d5d309876..c49772944b7 100644 --- a/tests/drivers/charger/sbs_charger/testcase.yaml +++ b/tests/drivers/charger/sbs_charger/testcase.yaml @@ -18,7 +18,8 @@ tests: - qemu_kvm_arm64 - xenvm - xenvm/xenvm/gicv3 - - hifive_unmatched + - hifive_unmatched/fu740/s7 + - hifive_unmatched/fu740/u74 - rcar_h3ulcb/r8a77951/a57 - rcar_salvator_xs - numaker_pfm_m467 diff --git a/tests/drivers/fuel_gauge/sbs_gauge/testcase.yaml b/tests/drivers/fuel_gauge/sbs_gauge/testcase.yaml index 4c295cdf7c4..3081e8b7b15 100644 --- a/tests/drivers/fuel_gauge/sbs_gauge/testcase.yaml +++ b/tests/drivers/fuel_gauge/sbs_gauge/testcase.yaml @@ -11,7 +11,8 @@ tests: - CONF_FILE="prj.conf;boards/emulated_board.conf" - DTC_OVERLAY_FILE="boards/emulated_board.overlay" platform_exclude: - - hifive_unmatched + - hifive_unmatched/fu740/s7 + - hifive_unmatched/fu740/u74 - qemu_cortex_a53 - qemu_cortex_a53/qemu_cortex_a53/smp - qemu_kvm_arm64 @@ -30,7 +31,7 @@ tests: - simulation filter: dt_compat_enabled("sbs,sbs-gauge-new-api") platform_allow: - - hifive_unmatched + - hifive_unmatched/fu740/s7 - qemu_cortex_a53 - qemu_cortex_a53/qemu_cortex_a53/smp - qemu_kvm_arm64 diff --git a/tests/drivers/memc/ram/testcase.yaml b/tests/drivers/memc/ram/testcase.yaml index 5d9f768b8bb..7af8417c9e1 100644 --- a/tests/drivers/memc/ram/testcase.yaml +++ b/tests/drivers/memc/ram/testcase.yaml @@ -26,4 +26,4 @@ tests: tags: - drivers - memc - platform_allow: hifive_unmatched + platform_allow: hifive_unmatched/fu740/s7 diff --git a/tests/kernel/device/boards/hifive_unmatched.overlay b/tests/kernel/device/boards/hifive_unmatched_fu740_s7.overlay similarity index 100% rename from tests/kernel/device/boards/hifive_unmatched.overlay rename to tests/kernel/device/boards/hifive_unmatched_fu740_s7.overlay diff --git a/tests/kernel/device/boards/hifive_unmatched_fu740_u74.overlay b/tests/kernel/device/boards/hifive_unmatched_fu740_u74.overlay new file mode 100644 index 00000000000..b5f5176ec54 --- /dev/null +++ b/tests/kernel/device/boards/hifive_unmatched_fu740_u74.overlay @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 Nordic Semiconductor ASA + * Copyright (c) 2020 Intel Corporation + * + * SPDX-License-Identifier: Apache-2.0 + * + * Application overlay for creating a fake device instance we + * can use to test DEVICE_MMIO APIs, which get raw data about + * memory ranges from DTS instances. + * + * Names in this file should be chosen in a way that won't conflict + * with real-world devicetree nodes, to allow these tests to run on + * (and be extended to test) real hardware. + */ + +/ { + fakedriver@E0000000 { + compatible = "fakedriver"; + reg = <0x0 0xE0000000 0x0 0x2000>; + status = "okay"; + }; + fakedriver@E1000000 { + compatible = "fakedriver"; + reg = <0x0 0xE1000000 0x0 0x2000>; + status = "okay"; + }; + fakedriver@E2000000 { + compatible = "fakedriver"; + reg = <0x0 0xE2000000 0x0 0x2000>; + status = "okay"; + }; + fakedriver@E3000000 { + compatible = "fakedriver"; + reg = <0x0 0xE3000000 0x0 0x2000>; + status = "okay"; + }; + fakedriver@E4000000 { + compatible = "fakedriver"; + reg = <0x0 0xE4000000 0x0 0x2000>; + status = "okay"; + }; + + fakedriver_multireg@E5000000 { + compatible = "fakedriver_multireg"; + reg = <0x0 0xE5000000 0x0 0x1000>, + <0x0 0xE6000000 0x0 0x1000>; + reg-names = "chip", + "dale"; + status = "okay"; + }; + + fakedeferdriver@E7000000 { + compatible = "fakedeferdriver"; + reg = <0x0 0xE7000000 0x0 0x2000>; + status = "okay"; + zephyr,deferred-init; + }; + + fakedeferdriver@E8000000 { + compatible = "fakedeferdriver"; + reg = <0x0 0xE8000000 0x0 0x2000>; + status = "okay"; + zephyr,deferred-init; + }; + + fakedomain_0: fakedomain_0 { + compatible = "fakedomain"; + status = "okay"; + #power-domain-cells = <0>; + power-domains = <&fakedomain_2>; + }; + + fakedomain_1: fakedomain_1 { + compatible = "fakedomain"; + status = "okay"; + #power-domain-cells = <0>; + power-domains = <&fakedomain_0>; + }; + + fakedomain_2: fakedomain_2 { + compatible = "fakedomain"; + status = "okay"; + #power-domain-cells = <0>; + }; +}; diff --git a/tests/subsys/fs/ext2/boards/hifive_unmatched.overlay b/tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_s7.overlay similarity index 100% rename from tests/subsys/fs/ext2/boards/hifive_unmatched.overlay rename to tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_s7.overlay diff --git a/tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_u74.overlay b/tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_u74.overlay new file mode 100644 index 00000000000..45f299c3ecf --- /dev/null +++ b/tests/subsys/fs/ext2/boards/hifive_unmatched_fu740_u74.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Antmicro + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&spi2 { + status = "okay"; + + sdhc0: sdhc@0 { + compatible = "zephyr,sdhc-spi-slot"; + reg = <0>; + status = "okay"; + mmc { + compatible = "zephyr,sdmmc-disk"; + disk-name = "SD"; + status = "okay"; + }; + spi-max-frequency = <20000000>; + }; +}; diff --git a/tests/subsys/fs/ext2/testcase.yaml b/tests/subsys/fs/ext2/testcase.yaml index bfe58c979f6..5c6c6df4120 100644 --- a/tests/subsys/fs/ext2/testcase.yaml +++ b/tests/subsys/fs/ext2/testcase.yaml @@ -5,7 +5,8 @@ tests: platform_allow: - native_sim - native_sim/native/64 - - hifive_unmatched + - hifive_unmatched/fu740/s7 + - hifive_unmatched/fu740/u74 - bl5340_dvk/nrf5340/cpuapp extra_args: - EXTRA_DTC_OVERLAY_FILE="ramdisk_small.overlay" @@ -22,7 +23,8 @@ tests: simulation_exclude: - renode platform_allow: - - hifive_unmatched + - hifive_unmatched/fu740/s7 + - hifive_unmatched/fu740/u74 - bl5340_dvk/nrf5340/cpuapp extra_args: CONF_FILE=prj_sdcard.conf