diff --git a/boards/native/nrf_bsim/CMakeLists.txt b/boards/native/nrf_bsim/CMakeLists.txt index d55a52e1a53..6aeb3f01634 100644 --- a/boards/native/nrf_bsim/CMakeLists.txt +++ b/boards/native/nrf_bsim/CMakeLists.txt @@ -24,6 +24,7 @@ zephyr_library_sources( cpu_wait.c argparse.c nsi_if.c + native_remap.c soc/nrfx_coredep.c common/bstests_entry.c common/cmsis/cmsis.c diff --git a/boards/native/nrf_bsim/native_remap.c b/boards/native/nrf_bsim/native_remap.c new file mode 100644 index 00000000000..d8b756a9576 --- /dev/null +++ b/boards/native/nrf_bsim/native_remap.c @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +#include "NHW_misc.h" + +bool native_emb_addr_remap(void **addr) +{ + return nhw_convert_RAM_addr(addr); +} diff --git a/boards/nordic/nrf54h20dk/Kconfig.nrf54h20dk b/boards/nordic/nrf54h20dk/Kconfig.nrf54h20dk index 9a260be4868..af29072fbd5 100644 --- a/boards/nordic/nrf54h20dk/Kconfig.nrf54h20dk +++ b/boards/nordic/nrf54h20dk/Kconfig.nrf54h20dk @@ -2,9 +2,15 @@ # SPDX-License-Identifier: Apache-2.0 config BOARD_NRF54H20DK - select SOC_NRF54H20_CPUAPP if BOARD_NRF54H20DK_NRF54H20_CPUAPP - select SOC_NRF54H20_CPURAD if BOARD_NRF54H20DK_NRF54H20_CPURAD - select SOC_NRF54H20_CPUPPR if BOARD_NRF54H20DK_NRF54H20_CPUPPR || \ - BOARD_NRF54H20DK_NRF54H20_CPUPPR_XIP - select SOC_NRF54H20_CPUFLPR if BOARD_NRF54H20DK_NRF54H20_CPUFLPR || \ - BOARD_NRF54H20DK_NRF54H20_CPUFLPR_XIP + select SOC_NRF54H20_ENGB_CPUAPP if BOARD_NRF54H20DK_NRF54H20_CPUAPP && BOARD_REVISION = "0.8.0" + select SOC_NRF54H20_ENGB_CPURAD if BOARD_NRF54H20DK_NRF54H20_CPURAD && BOARD_REVISION = "0.8.0" + select SOC_NRF54H20_ENGB_CPUPPR if (BOARD_NRF54H20DK_NRF54H20_CPUPPR || \ + BOARD_NRF54H20DK_NRF54H20_CPUPPR_XIP) && BOARD_REVISION = "0.8.0" + select SOC_NRF54H20_ENGB_CPUFLPR if (BOARD_NRF54H20DK_NRF54H20_CPUFLPR || \ + BOARD_NRF54H20DK_NRF54H20_CPUFLPR_XIP) && BOARD_REVISION = "0.8.0" + select SOC_NRF54H20_CPUAPP if BOARD_NRF54H20DK_NRF54H20_CPUAPP && BOARD_REVISION = "0.9.0" + select SOC_NRF54H20_CPURAD if BOARD_NRF54H20DK_NRF54H20_CPURAD && BOARD_REVISION = "0.9.0" + select SOC_NRF54H20_CPUPPR if (BOARD_NRF54H20DK_NRF54H20_CPUPPR || \ + BOARD_NRF54H20DK_NRF54H20_CPUPPR_XIP) && BOARD_REVISION = "0.9.0" + select SOC_NRF54H20_CPUFLPR if (BOARD_NRF54H20DK_NRF54H20_CPUFLPR || \ + BOARD_NRF54H20DK_NRF54H20_CPUFLPR_XIP) && BOARD_REVISION = "0.9.0" diff --git a/boards/nordic/nrf54h20dk/board.yml b/boards/nordic/nrf54h20dk/board.yml index 61690145d9f..7d57b61cd53 100644 --- a/boards/nordic/nrf54h20dk/board.yml +++ b/boards/nordic/nrf54h20dk/board.yml @@ -8,3 +8,9 @@ board: cpucluster: cpuppr - name: xip cpucluster: cpuflpr + revision: + format: major.minor.patch + default: "0.9.0" + revisions: + - name: "0.8.0" + - name: "0.9.0" diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.yaml new file mode 100644 index 00000000000..01c44b51577 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.yaml @@ -0,0 +1,24 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpuapp +name: nRF54H20-DK-nRF54H20-Application (revision 0.8.0) +type: mcu +arch: arm +toolchain: + - gnuarmemb + - xtools + - zephyr +sysbuild: true +ram: 256 +flash: 296 +supported: + - adc + - can + - counter + - gpio + - i2c + - pwm + - spi + - watchdog + - usbd diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_9_0.yaml similarity index 85% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_9_0.yaml index 1fb5a039875..89b85746540 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpuapp -name: nRF54H20-DK-nRF54H20-Application +name: nRF54H20-DK-nRF54H20-Application (revision 0.9.0) type: mcu arch: arm toolchain: diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.yaml new file mode 100644 index 00000000000..bd60b8d2af3 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpuflpr +name: nRF54H20-DK-nRF54H20-FLPR (revision 0.8.0) +type: mcu +arch: riscv +toolchain: + - zephyr +sysbuild: true +ram: 46 +flash: 46 +supported: + - counter + - gpio + - i2c + - pwm + - spi diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_9_0.yaml similarity index 84% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_9_0.yaml index ba7d9a93382..ff9513fd593 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpuflpr -name: nRF54H20-DK-nRF54H20-FLPR +name: nRF54H20-DK-nRF54H20-FLPR (revision 0.9.0) type: mcu arch: riscv toolchain: diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_8_0.yaml new file mode 100644 index 00000000000..7deaf20135f --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_8_0.yaml @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpuflpr/xip +name: nRF54H20-DK-nRF54H20-FLPR (MRAM XIP) (revision 0.8.0) +type: mcu +arch: riscv +toolchain: + - zephyr +sysbuild: true +ram: 46 +flash: 48 +supported: + - gpio diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_9_0.yaml similarity index 79% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_9_0.yaml index 63c771688b4..e2880af9be3 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_xip_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpuflpr/xip -name: nRF54H20-DK-nRF54H20-FLPR (MRAM XIP) +name: nRF54H20-DK-nRF54H20-FLPR (MRAM XIP) (revision 0.9.0) type: mcu arch: riscv toolchain: diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.yaml new file mode 100644 index 00000000000..26412657070 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpuppr +name: nRF54H20-DK-nRF54H20-PPR (revision 0.8.0) +type: mcu +arch: riscv +toolchain: + - zephyr +sysbuild: true +ram: 62 +flash: 62 +supported: + - counter + - gpio + - i2c + - pwm + - spi diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_9_0.yaml similarity index 84% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_9_0.yaml index db1bf4fbefe..60f22350504 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpuppr -name: nRF54H20-DK-nRF54H20-PPR +name: nRF54H20-DK-nRF54H20-PPR (revision 0.9.0) type: mcu arch: riscv toolchain: diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_8_0.yaml new file mode 100644 index 00000000000..0ce1718cb60 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_8_0.yaml @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpuppr/xip +name: nRF54H20-DK-nRF54H20-PPR (MRAM XIP) (revision 0.8.0) +type: mcu +arch: riscv +toolchain: + - zephyr +sysbuild: true +ram: 62 +flash: 64 +supported: + - gpio diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_9_0.yaml similarity index 79% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_9_0.yaml index 8cfc343647f..7198a379a9c 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_xip_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpuppr/xip -name: nRF54H20-DK-nRF54H20-PPR (MRAM XIP) +name: nRF54H20-DK-nRF54H20-PPR (MRAM XIP) (revision 0.9.0) type: mcu arch: riscv toolchain: diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.yaml new file mode 100644 index 00000000000..26df539a803 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.yaml @@ -0,0 +1,19 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: nrf54h20dk@0.8.0/nrf54h20/cpurad +name: nRF54H20-DK-nRF54H20-Radio (revision 0.8.0) +type: mcu +arch: arm +toolchain: + - gnuarmemb + - xtools + - zephyr +sysbuild: true +ram: 192 +flash: 256 +supported: + - counter + - gpio + - pwm + - spi diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.yaml b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_9_0.yaml similarity index 84% rename from boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.yaml rename to boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_9_0.yaml index 36c0fc01dce..818a8d74b79 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.yaml +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_9_0.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 identifier: nrf54h20dk/nrf54h20/cpurad -name: nRF54H20-DK-nRF54H20-Radio +name: nRF54H20-DK-nRF54H20-Radio (revision 0.9.0) type: mcu arch: arm toolchain: diff --git a/drivers/adc/adc_nrfx_saadc.c b/drivers/adc/adc_nrfx_saadc.c index 052eab45b6c..132e8e78c3e 100644 --- a/drivers/adc/adc_nrfx_saadc.c +++ b/drivers/adc/adc_nrfx_saadc.c @@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(adc_nrfx_saadc); #if (NRF_SAADC_HAS_AIN_AS_PIN) -#if defined(CONFIG_SOC_NRF54H20) || defined(CONFIG_SOC_NRF9280) +#if defined(CONFIG_NRF_PLATFORM_HALTIUM) static const uint8_t saadc_psels[NRF_SAADC_AIN7 + 1] = { [NRF_SAADC_AIN0] = NRF_PIN_PORT_TO_PIN_NUMBER(0U, 1), [NRF_SAADC_AIN1] = NRF_PIN_PORT_TO_PIN_NUMBER(1U, 1), diff --git a/drivers/audio/Kconfig.dmic_pdm_nrfx b/drivers/audio/Kconfig.dmic_pdm_nrfx index 9f45144effa..dfbda8259f2 100644 --- a/drivers/audio/Kconfig.dmic_pdm_nrfx +++ b/drivers/audio/Kconfig.dmic_pdm_nrfx @@ -5,7 +5,7 @@ config AUDIO_DMIC_NRFX_PDM bool "nRF PDM nrfx driver" default y depends on DT_HAS_NORDIC_NRF_PDM_ENABLED - select NRFX_PDM + select NRFX_PDM0 if HAS_HW_NRF_PDM0 select PINCTRL help Enable support for nrfx PDM driver for nRF MCU series. diff --git a/drivers/timer/Kconfig.nrf_grtc b/drivers/timer/Kconfig.nrf_grtc index b136f654252..082c15333dc 100644 --- a/drivers/timer/Kconfig.nrf_grtc +++ b/drivers/timer/Kconfig.nrf_grtc @@ -15,11 +15,10 @@ menuconfig NRF_GRTC_TIMER if NRF_GRTC_TIMER -config NRF_GRTC_SLEEP_ALLOWED - def_bool y - depends on POWEROFF +config NRF_GRTC_ALWAYS_ON + bool help - This feature allows GRTC SYSCOUNTER to go to sleep state. + Always keep the SYSCOUNTER active even if the CPU is in sleep mode. config NRF_GRTC_TIMER_APP_DEFINED_INIT bool "Application defines GRTC initialization" @@ -44,7 +43,7 @@ config NRF_GRTC_TIMER_CLOCK_MANAGEMENT config NRF_GRTC_SYSCOUNTER_SLEEP_MINIMUM_LATENCY int default 1000 - depends on NRF_GRTC_SLEEP_ALLOWED + depends on POWEROFF help The value (in us) ensures that the wakeup event will not fire too early. In other words, applying SYSCOUNTER sleep state for less than diff --git a/drivers/timer/nrf_grtc_timer.c b/drivers/timer/nrf_grtc_timer.c index 187c7e12326..07d58e402c9 100644 --- a/drivers/timer/nrf_grtc_timer.c +++ b/drivers/timer/nrf_grtc_timer.c @@ -367,7 +367,7 @@ int z_nrf_grtc_timer_capture_read(int32_t chan, uint64_t *captured_time) return 0; } -#if defined(CONFIG_NRF_GRTC_SLEEP_ALLOWED) && defined(CONFIG_NRF_GRTC_START_SYSCOUNTER) +#if defined(CONFIG_POWEROFF) && defined(CONFIG_NRF_GRTC_START_SYSCOUNTER) int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us) { nrfx_err_t err_code; @@ -432,7 +432,7 @@ int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us) k_spin_unlock(&lock, key); return 0; } -#endif /* CONFIG_NRF_GRTC_SLEEP_ALLOWED */ +#endif /* CONFIG_POWEROFF */ uint32_t sys_clock_cycle_get_32(void) { @@ -465,12 +465,6 @@ static int sys_clock_driver_init(void) { nrfx_err_t err_code; -#if defined(CONFIG_NRF_GRTC_TIMER_CLOCK_MANAGEMENT) && \ - (defined(NRF_GRTC_HAS_CLKSEL) && (NRF_GRTC_HAS_CLKSEL == 1)) - /* Use System LFCLK as the low-frequency clock source during initialization. */ - nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFCLK); -#endif - IRQ_CONNECT(DT_IRQN(GRTC_NODE), DT_IRQ(GRTC_NODE, priority), nrfx_isr, nrfx_grtc_irq_handler, 0); @@ -513,6 +507,9 @@ static int sys_clock_driver_init(void) nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFXO); #endif +#if defined(CONFIG_NRF_GRTC_ALWAYS_ON) + nrfx_grtc_active_request_set(true); +#endif return 0; } diff --git a/include/zephyr/ipc/pbuf.h b/include/zephyr/ipc/pbuf.h index 0be5bd5185c..8783cdbbf14 100644 --- a/include/zephyr/ipc/pbuf.h +++ b/include/zephyr/ipc/pbuf.h @@ -35,6 +35,13 @@ extern "C" { */ #define _PBUF_MIN_DATA_LEN ROUND_UP(PBUF_PACKET_LEN_SZ + 1 + _PBUF_IDX_SIZE, _PBUF_IDX_SIZE) +#if defined(CONFIG_ARCH_POSIX) +/* For the native simulated boards we need to modify some pointers at init */ +#define PBUF_MAYBE_CONST +#else +#define PBUF_MAYBE_CONST const +#endif + /** @brief Control block of packet buffer. * * The structure contains configuration data. @@ -87,9 +94,9 @@ struct pbuf_data { * written in a way to protect the data from being corrupted. */ struct pbuf { - const struct pbuf_cfg *const cfg; /* Configuration of the - * buffer. - */ + PBUF_MAYBE_CONST struct pbuf_cfg *const cfg; /* Configuration of the + * buffer. + */ struct pbuf_data data; /* Data used to read and write * to the buffer */ @@ -144,17 +151,32 @@ struct pbuf { "Misaligned memory."); \ BUILD_ASSERT(size >= (MAX(dcache_align, _PBUF_IDX_SIZE) + _PBUF_IDX_SIZE + \ _PBUF_MIN_DATA_LEN), "Insufficient size."); \ - \ - static const struct pbuf_cfg cfg_##name = \ + static PBUF_MAYBE_CONST struct pbuf_cfg cfg_##name = \ PBUF_CFG_INIT(mem_addr, size, dcache_align); \ static struct pbuf name = { \ .cfg = &cfg_##name, \ } /** - * @brief Initialize the packet buffer. + * @brief Initialize the Tx packet buffer. + * + * This function initializes the Tx packet buffer based on provided configuration. + * If the configuration is incorrect, the function will return error. + * + * It is recommended to use PBUF_DEFINE macro for build time initialization. + * + * @param pb Pointer to the packed buffer containing + * configuration and data. Configuration has to be + * fixed before the initialization. + * @retval 0 on success. + * @retval -EINVAL when the input parameter is incorrect. + */ +int pbuf_tx_init(struct pbuf *pb); + +/** + * @brief Initialize the Rx packet buffer. * - * This function initializes the packet buffer based on provided configuration. + * This function initializes the Rx packet buffer. * If the configuration is incorrect, the function will return error. * * It is recommended to use PBUF_DEFINE macro for build time initialization. @@ -165,7 +187,7 @@ struct pbuf { * @retval 0 on success. * @retval -EINVAL when the input parameter is incorrect. */ -int pbuf_init(struct pbuf *pb); +int pbuf_rx_init(struct pbuf *pb); /** * @brief Write specified amount of data to the packet buffer. diff --git a/modules/hal_nordic/nrfs/Kconfig b/modules/hal_nordic/nrfs/Kconfig index 49ffc2595e1..cf7c9be939b 100644 --- a/modules/hal_nordic/nrfs/Kconfig +++ b/modules/hal_nordic/nrfs/Kconfig @@ -36,7 +36,12 @@ config NRFS_HAS_VBUS_DETECTOR_SERVICE config NRFS bool "nRF Services Support" - select NRFS_LOCAL_DOMAIN if (SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD || SOC_NRF9280_CPUAPP || SOC_NRF9280_CPURAD) + select NRFS_LOCAL_DOMAIN if SOC_NRF54H20_CPUAPP || \ + SOC_NRF54H20_ENGB_CPUAPP || \ + SOC_NRF54H20_CPURAD || \ + SOC_NRF54H20_ENGB_CPURAD || \ + SOC_NRF9280_CPUAPP || \ + SOC_NRF9280_CPURAD depends on HAS_NRFS depends on !MISRA_SANE default y if !ZTEST diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 2e8e0cc1eb5..8d7adc114d7 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -44,6 +44,14 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_CPUPPR NRF54H20_XXAA NRF_PPR) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_CPUFLPR NRF54H20_XXAA NRF_FLPR) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUAPP NRF54H20_ENGB_XXAA + NRF_APPLICATION) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPURAD NRF54H20_ENGB_XXAA + NRF_RADIOCORE) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUPPR NRF54H20_ENGB_XXAA + NRF_PPR) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUFLPR NRF54H20_ENGB_XXAA + NRF_FLPR) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L15_ENGA NRF54L15_ENGA_XXAA) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L15_ENGA_CPUAPP NRF_APPLICATION) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L15_ENGA_CPUFLPR NRF_FLPR) @@ -95,7 +103,9 @@ zephyr_library_sources_ifdef(CONFIG_SOC_NRF52840 ${MDK_DIR}/system_nrf5284 zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUAPP ${MDK_DIR}/system_nrf5340_application.c) zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUNET ${MDK_DIR}/system_nrf5340_network.c) zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF54HX ${MDK_DIR}/system_nrf54h.c) -zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF54LX ${MDK_DIR}/system_nrf54l.c) +if(CONFIG_SOC_SERIES_NRF54LX OR CONFIG_SOC_SERIES_BSIM_NRF54LX) + zephyr_library_sources(${MDK_DIR}/system_nrf54l.c) +endif() zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF91X ${MDK_DIR}/system_nrf91.c) zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF92X ${MDK_DIR}/system_nrf92.c) @@ -219,6 +229,10 @@ mdk_svd_ifdef(CONFIG_SOC_NRF54H20_CPUAPP nrf54h20_application.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54H20_CPUPPR nrf54h20_ppr.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54H20_CPUFLPR nrf54h20_flpr.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54H20_CPURAD nrf54h20_radiocore.svd) +mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUAPP nrf54h20_engb_application.svd) +mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUPPR nrf54h20_engb_ppr.svd) +mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPUFLPR nrf54h20_engb_flpr.svd) +mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGB_CPURAD nrf54h20_engb_radiocore.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54L15_ENGA_CPUAPP nrf54l15_enga_application.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54L15_ENGA_CPUFLPR nrf54l15_enga_flpr.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54L15_CPUAPP nrf54l15_application.svd) diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index 6f3bd8a984e..e7df6d3b389 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -166,8 +166,12 @@ config NRFX_NVMC || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF91_FLASH_CONTROLLER)) config NRFX_PDM - bool "PDM driver" - depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_PDM)) + bool + +config NRFX_PDM0 + bool "PDM0 driver instance" + depends on $(dt_nodelabel_has_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM)) + select NRFX_PDM config NRFX_POWER bool "POWER driver" diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index b0c27bb2fe8..a7632a8cc43 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -132,9 +132,6 @@ #ifdef CONFIG_NRF_GRTC_TIMER_CLOCK_MANAGEMENT #define NRF_GRTC_HAS_EXTENDED 1 #endif -#ifdef CONFIG_NRF_GRTC_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 1 -#endif #ifdef CONFIG_NRF_GRTC_TIMER_AUTO_KEEP_ALIVE #define NRFX_GRTC_CONFIG_AUTOEN 1 #endif @@ -212,6 +209,9 @@ #ifdef CONFIG_NRFX_PDM #define NRFX_PDM_ENABLED 1 #endif +#ifdef CONFIG_NRFX_PDM0 +#define NRFX_PDM0_ENABLED 1 +#endif #ifdef CONFIG_NRFX_PDM_LOG #define NRFX_PDM_CONFIG_LOG_ENABLED 1 #endif @@ -1042,13 +1042,13 @@ #include #elif defined(NRF5340_XXAA_NETWORK) #include -#elif defined(NRF54H20_XXAA) && defined(NRF_APPLICATION) +#elif (defined(NRF54H20_XXAA) || defined(NRF54H20_ENGB_XXAA)) && defined(NRF_APPLICATION) #include -#elif defined(NRF54H20_XXAA) && defined(NRF_RADIOCORE) +#elif (defined(NRF54H20_XXAA) || defined(NRF54H20_ENGB_XXAA)) && defined(NRF_RADIOCORE) #include -#elif defined(NRF54H20_XXAA) && defined(NRF_PPR) +#elif (defined(NRF54H20_XXAA) || defined(NRF54H20_ENGB_XXAA)) && defined(NRF_PPR) #include -#elif defined(NRF54H20_XXAA) && defined(NRF_FLPR) +#elif (defined(NRF54H20_XXAA) || defined(NRF54H20_ENGB_XXAA)) && defined(NRF_FLPR) #include #elif (defined(NRF54L15_XXAA) || defined(NRF54L15_ENGA_XXAA)) && defined(NRF_APPLICATION) #include diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_application.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_application.h index 7f5d4d30ce9..3caed86c48b 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_application.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_application.h @@ -11,6 +11,7 @@ #error "This file should not be included directly. Include nrfx_config.h instead." #endif + /** * @brief NRFX_DEFAULT_IRQ_PRIORITY * @@ -358,30 +359,30 @@ #endif /** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED + * @brief NRFX_GRTC_CONFIG_AUTOEN * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 +#ifndef NRFX_GRTC_CONFIG_AUTOEN +#define NRFX_GRTC_CONFIG_AUTOEN 1 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOEN + * @brief NRFX_GRTC_CONFIG_AUTOSTART * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOEN -#define NRFX_GRTC_CONFIG_AUTOEN 0 +#ifndef NRFX_GRTC_CONFIG_AUTOSTART +#define NRFX_GRTC_CONFIG_AUTOSTART 0 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOSTART + * @brief NRFX_GRTC_CONFIG_CLEAR_AT_INIT * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOSTART -#define NRFX_GRTC_CONFIG_AUTOSTART 0 +#ifndef NRFX_GRTC_CONFIG_CLEAR_AT_INIT +#define NRFX_GRTC_CONFIG_CLEAR_AT_INIT 0 #endif /** diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_flpr.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_flpr.h index 77f5c3c9fc5..f5689f79a96 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_flpr.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_flpr.h @@ -254,30 +254,30 @@ #endif /** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED + * @brief NRFX_GRTC_CONFIG_AUTOEN * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 +#ifndef NRFX_GRTC_CONFIG_AUTOEN +#define NRFX_GRTC_CONFIG_AUTOEN 1 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOEN + * @brief NRFX_GRTC_CONFIG_AUTOSTART * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOEN -#define NRFX_GRTC_CONFIG_AUTOEN 0 +#ifndef NRFX_GRTC_CONFIG_AUTOSTART +#define NRFX_GRTC_CONFIG_AUTOSTART 0 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOSTART + * @brief NRFX_GRTC_CONFIG_CLEAR_AT_INIT * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOSTART -#define NRFX_GRTC_CONFIG_AUTOSTART 0 +#ifndef NRFX_GRTC_CONFIG_CLEAR_AT_INIT +#define NRFX_GRTC_CONFIG_CLEAR_AT_INIT 0 #endif /** @@ -1619,6 +1619,15 @@ #define NRFX_UARTE_CONFIG_RX_CACHE_ENABLED 1 #endif +/** + * @brief NRFX_UARTE_RX_FIFO_FLUSH_WORKAROUND_MAGIC_BYTE + * + * Integer value. Minimum: 0. Maximum: 255. + */ +#ifndef NRFX_UARTE_RX_FIFO_FLUSH_WORKAROUND_MAGIC_BYTE +#define NRFX_UARTE_RX_FIFO_FLUSH_WORKAROUND_MAGIC_BYTE 171 +#endif + /** * @brief NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY * diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_ppr.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_ppr.h index d274abb5b88..35716978f28 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_ppr.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_ppr.h @@ -11,6 +11,7 @@ #error "This file should not be included directly. Include nrfx_config.h instead." #endif + /** * @brief NRFX_DEFAULT_IRQ_PRIORITY * @@ -62,6 +63,15 @@ #define NRFX_COMP_CONFIG_LOG_LEVEL 3 #endif +/** + * @brief NRFX_COREDEP_VPR_LEGACY + * + * Boolean. Accepted values: 0 and 1. + */ +#ifndef NRFX_COREDEP_VPR_LEGACY +#define NRFX_COREDEP_VPR_LEGACY 0 +#endif + /** * @brief NRFX_DPPI_ENABLED * @@ -304,30 +314,30 @@ #endif /** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED + * @brief NRFX_GRTC_CONFIG_AUTOEN * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 +#ifndef NRFX_GRTC_CONFIG_AUTOEN +#define NRFX_GRTC_CONFIG_AUTOEN 1 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOEN + * @brief NRFX_GRTC_CONFIG_AUTOSTART * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOEN -#define NRFX_GRTC_CONFIG_AUTOEN 0 +#ifndef NRFX_GRTC_CONFIG_AUTOSTART +#define NRFX_GRTC_CONFIG_AUTOSTART 0 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOSTART + * @brief NRFX_GRTC_CONFIG_CLEAR_AT_INIT * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOSTART -#define NRFX_GRTC_CONFIG_AUTOSTART 0 +#ifndef NRFX_GRTC_CONFIG_CLEAR_AT_INIT +#define NRFX_GRTC_CONFIG_CLEAR_AT_INIT 0 #endif /** diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_radiocore.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_radiocore.h index 3a6cde96126..5847cace47e 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_radiocore.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54h20_radiocore.h @@ -395,30 +395,30 @@ #endif /** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED + * @brief NRFX_GRTC_CONFIG_AUTOEN * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 +#ifndef NRFX_GRTC_CONFIG_AUTOEN +#define NRFX_GRTC_CONFIG_AUTOEN 1 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOEN + * @brief NRFX_GRTC_CONFIG_AUTOSTART * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOEN -#define NRFX_GRTC_CONFIG_AUTOEN 0 +#ifndef NRFX_GRTC_CONFIG_AUTOSTART +#define NRFX_GRTC_CONFIG_AUTOSTART 0 #endif /** - * @brief NRFX_GRTC_CONFIG_AUTOSTART + * @brief NRFX_GRTC_CONFIG_CLEAR_AT_INIT * * Boolean. Accepted values: 0 and 1. */ -#ifndef NRFX_GRTC_CONFIG_AUTOSTART -#define NRFX_GRTC_CONFIG_AUTOSTART 0 +#ifndef NRFX_GRTC_CONFIG_CLEAR_AT_INIT +#define NRFX_GRTC_CONFIG_CLEAR_AT_INIT 0 #endif /** diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_application.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_application.h index eeea811aeff..aa23f93c9e3 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_application.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_application.h @@ -283,15 +283,6 @@ #define NRFX_GRTC_ENABLED 0 #endif -/** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED - * - * Boolean. Accepted values: 0 and 1. - */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 -#endif - /** * @brief NRFX_GRTC_CONFIG_AUTOEN * diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_flpr.h b/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_flpr.h index 7f3c5a80c2c..568790051a3 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_flpr.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf54l15_enga_flpr.h @@ -283,15 +283,6 @@ #define NRFX_GRTC_ENABLED 0 #endif -/** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED - * - * Boolean. Accepted values: 0 and 1. - */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 -#endif - /** * @brief NRFX_GRTC_CONFIG_AUTOEN * diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_application.h b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_application.h index a7905c199d2..38ce6226468 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_application.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_application.h @@ -367,15 +367,6 @@ #define NRFX_GRTC_ENABLED 0 #endif -/** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED - * - * Boolean. Accepted values: 0 and 1. - */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 -#endif - /** * @brief NRFX_GRTC_CONFIG_AUTOEN * diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_ppr.h b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_ppr.h index ae1f931e3da..9ae53d739e9 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_ppr.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_ppr.h @@ -322,15 +322,6 @@ #define NRFX_GRTC_ENABLED 0 #endif -/** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED - * - * Boolean. Accepted values: 0 and 1. - */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 -#endif - /** * @brief NRFX_GRTC_CONFIG_AUTOEN * diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_radiocore.h b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_radiocore.h index 84a0a7558e6..98d71e6b385 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_radiocore.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf9230_engb_radiocore.h @@ -407,15 +407,6 @@ #define NRFX_GRTC_ENABLED 0 #endif -/** - * @brief NRFX_GRTC_CONFIG_SLEEP_ALLOWED - * - * Boolean. Accepted values: 0 and 1. - */ -#ifndef NRFX_GRTC_CONFIG_SLEEP_ALLOWED -#define NRFX_GRTC_CONFIG_SLEEP_ALLOWED 0 -#endif - /** * @brief NRFX_GRTC_CONFIG_AUTOEN * diff --git a/samples/subsys/ipc/ipc_service/icmsg/CMakeLists.txt b/samples/subsys/ipc/ipc_service/icmsg/CMakeLists.txt index 725fd707174..e9e246b02fa 100644 --- a/samples/subsys/ipc/ipc_service/icmsg/CMakeLists.txt +++ b/samples/subsys/ipc/ipc_service/icmsg/CMakeLists.txt @@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP AND + NOT CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP AND NOT CONFIG_BOARD_STM32H747I_DISCO AND NOT CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUAPP) message(FATAL_ERROR "${BOARD} is not supported for this sample") diff --git a/samples/subsys/ipc/ipc_service/icmsg/Kconfig.sysbuild b/samples/subsys/ipc/ipc_service/icmsg/Kconfig.sysbuild index 9a2c85d065d..41b892aba6a 100644 --- a/samples/subsys/ipc/ipc_service/icmsg/Kconfig.sysbuild +++ b/samples/subsys/ipc/ipc_service/icmsg/Kconfig.sysbuild @@ -7,5 +7,6 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim" default "nrf54l15pdk/nrf54l15/cpuflpr" if $(BOARD) = "nrf54l15pdk" default "stm32h747i_disco/stm32h747xx/m4" if $(BOARD) = "stm32h747i_disco" diff --git a/samples/subsys/ipc/ipc_service/icmsg/boards/nrf5340bsim_nrf5340_cpuapp.overlay b/samples/subsys/ipc/ipc_service/icmsg/boards/nrf5340bsim_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..53c9b68afe7 --- /dev/null +++ b/samples/subsys/ipc/ipc_service/icmsg/boards/nrf5340bsim_nrf5340_cpuapp.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpuapp.overlay" diff --git a/samples/subsys/ipc/ipc_service/icmsg/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay b/samples/subsys/ipc/ipc_service/icmsg/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay new file mode 100644 index 00000000000..c5194cf93cd --- /dev/null +++ b/samples/subsys/ipc/ipc_service/icmsg/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2022 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpunet.overlay" diff --git a/samples/subsys/ipc/ipc_service/icmsg/sample.yaml b/samples/subsys/ipc/ipc_service/icmsg/sample.yaml index b981c1b8215..321ed3398ed 100644 --- a/samples/subsys/ipc/ipc_service/icmsg/sample.yaml +++ b/samples/subsys/ipc/ipc_service/icmsg/sample.yaml @@ -2,9 +2,12 @@ sample: name: IPC Service example integration (icmsg backend) tests: sample.ipc.icmsg: - platform_allow: nrf5340dk/nrf5340/cpuapp + platform_allow: + - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp integration_platforms: - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp tags: ipc sysbuild: true harness: console diff --git a/samples/subsys/ipc/ipc_service/icmsg/sysbuild.cmake b/samples/subsys/ipc/ipc_service/icmsg/sysbuild.cmake index b1f0947aff7..305c85cc3eb 100644 --- a/samples/subsys/ipc/ipc_service/icmsg/sysbuild.cmake +++ b/samples/subsys/ipc/ipc_service/icmsg/sysbuild.cmake @@ -12,3 +12,6 @@ ExternalZephyrProject_Add( SOURCE_DIR ${APP_DIR}/remote BOARD ${SB_CONFIG_REMOTE_BOARD} ) + +native_simulator_set_child_images(${DEFAULT_IMAGE} remote) +native_simulator_set_final_executable(${DEFAULT_IMAGE}) diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/CMakeLists.txt b/samples/subsys/ipc/ipc_service/multi_endpoint/CMakeLists.txt index c167dd5375b..fca156d9fe2 100644 --- a/samples/subsys/ipc/ipc_service/multi_endpoint/CMakeLists.txt +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/CMakeLists.txt @@ -8,7 +8,8 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP) +if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP AND + NOT CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP ) message(FATAL_ERROR "${BOARD} is not supported for this sample") endif() diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/Kconfig.sysbuild b/samples/subsys/ipc/ipc_service/multi_endpoint/Kconfig.sysbuild index d0849e37dde..5e4c6d497cf 100644 --- a/samples/subsys/ipc/ipc_service/multi_endpoint/Kconfig.sysbuild +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/Kconfig.sysbuild @@ -7,3 +7,4 @@ source "share/sysbuild/Kconfig" config NET_CORE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim" diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/boards/nrf5340bsim_nrf5340_cpuapp.overlay b/samples/subsys/ipc/ipc_service/multi_endpoint/boards/nrf5340bsim_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..53c9b68afe7 --- /dev/null +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/boards/nrf5340bsim_nrf5340_cpuapp.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpuapp.overlay" diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay b/samples/subsys/ipc/ipc_service/multi_endpoint/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay new file mode 100644 index 00000000000..c5194cf93cd --- /dev/null +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2022 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpunet.overlay" diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/sample.yaml b/samples/subsys/ipc/ipc_service/multi_endpoint/sample.yaml index b05c8f001f2..f808c95252e 100644 --- a/samples/subsys/ipc/ipc_service/multi_endpoint/sample.yaml +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/sample.yaml @@ -14,15 +14,21 @@ common: - "IPC-service HOST \\[INST 1\\] demo ended\\." tests: sample.ipc.multi_endpoint: - platform_allow: nrf5340dk/nrf5340/cpuapp + platform_allow: + - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp integration_platforms: - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp tags: ipc sysbuild: true sample.ipc.multi_endpoint.icbmsg: - platform_allow: nrf5340dk/nrf5340/cpuapp + platform_allow: + - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp integration_platforms: - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp tags: ipc sysbuild: true extra_args: diff --git a/samples/subsys/ipc/ipc_service/multi_endpoint/sysbuild.cmake b/samples/subsys/ipc/ipc_service/multi_endpoint/sysbuild.cmake index d0d79b8f240..9117870be8a 100644 --- a/samples/subsys/ipc/ipc_service/multi_endpoint/sysbuild.cmake +++ b/samples/subsys/ipc/ipc_service/multi_endpoint/sysbuild.cmake @@ -12,3 +12,6 @@ ExternalZephyrProject_Add( SOURCE_DIR ${APP_DIR}/remote BOARD ${SB_CONFIG_NET_CORE_BOARD} ) + +native_simulator_set_child_images(${DEFAULT_IMAGE} remote) +native_simulator_set_final_executable(${DEFAULT_IMAGE}) diff --git a/samples/subsys/ipc/ipc_service/static_vrings/CMakeLists.txt b/samples/subsys/ipc/ipc_service/static_vrings/CMakeLists.txt index 4deb07c4789..588bfe71dd0 100644 --- a/samples/subsys/ipc/ipc_service/static_vrings/CMakeLists.txt +++ b/samples/subsys/ipc/ipc_service/static_vrings/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/../remote/zephyr) if(NOT (CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP OR + CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP OR CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM7 OR CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM7 diff --git a/samples/subsys/ipc/ipc_service/static_vrings/Kconfig.sysbuild b/samples/subsys/ipc/ipc_service/static_vrings/Kconfig.sysbuild index a1214db3284..4f9caa82501 100644 --- a/samples/subsys/ipc/ipc_service/static_vrings/Kconfig.sysbuild +++ b/samples/subsys/ipc/ipc_service/static_vrings/Kconfig.sysbuild @@ -8,6 +8,7 @@ source "share/sysbuild/Kconfig" config NET_CORE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim" default "lpcxpresso55s69/lpc55s69/cpu1" if $(BOARD) = "lpcxpresso55s69" default "mimxrt1160_evk/mimxrt1166/cm4" if $(BOARD) = "mimxrt1160_evk" default "mimxrt1170_evk/mimxrt1176/cm4" if $(BOARD) = "mimxrt1170_evk" diff --git a/samples/subsys/ipc/ipc_service/static_vrings/boards/nrf5340bsim_nrf5340_cpuapp.overlay b/samples/subsys/ipc/ipc_service/static_vrings/boards/nrf5340bsim_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..53c9b68afe7 --- /dev/null +++ b/samples/subsys/ipc/ipc_service/static_vrings/boards/nrf5340bsim_nrf5340_cpuapp.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpuapp.overlay" diff --git a/samples/subsys/ipc/ipc_service/static_vrings/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay b/samples/subsys/ipc/ipc_service/static_vrings/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay new file mode 100644 index 00000000000..57176705564 --- /dev/null +++ b/samples/subsys/ipc/ipc_service/static_vrings/remote/boards/nrf5340bsim_nrf5340_cpunet.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf5340dk_nrf5340_cpunet.overlay" diff --git a/samples/subsys/ipc/ipc_service/static_vrings/sample.yaml b/samples/subsys/ipc/ipc_service/static_vrings/sample.yaml index 911b3624e44..d15df7b803e 100644 --- a/samples/subsys/ipc/ipc_service/static_vrings/sample.yaml +++ b/samples/subsys/ipc/ipc_service/static_vrings/sample.yaml @@ -4,12 +4,14 @@ tests: sample.ipc.static_vrings: platform_allow: - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp - lpcxpresso55s69/lpc55s69/cpu0 - mimxrt1160_evk/mimxrt1166/cm7 - mimxrt1170_evk/mimxrt1176/cm7 - mimxrt1170_evk@B/mimxrt1176/cm7 integration_platforms: - nrf5340dk/nrf5340/cpuapp + - nrf5340bsim/nrf5340/cpuapp tags: ipc sysbuild: true harness: console diff --git a/samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake b/samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake index 2e99a95d3c3..cf5de9dd941 100644 --- a/samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake +++ b/samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake @@ -21,3 +21,6 @@ ExternalZephyrProject_Add( # remote core's build, such as the output image's LMA add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP}) sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} ${REMOTE_APP}) + +native_simulator_set_child_images(${DEFAULT_IMAGE} remote) +native_simulator_set_final_executable(${DEFAULT_IMAGE}) diff --git a/scripts/ci/Kconfig.board.v2 b/scripts/ci/Kconfig.board.v2 index e1335cafe39..3058e8e46bb 100644 --- a/scripts/ci/Kconfig.board.v2 +++ b/scripts/ci/Kconfig.board.v2 @@ -6,5 +6,8 @@ mainmenu "Zephyr board / SoC v2 Configuration" +config BOARD_REVISION + def_string "$(BOARD_REVISION)" + source "boards/Kconfig.v2" source "soc/Kconfig.v2" diff --git a/scripts/west_commands/runners/nrf_common.py b/scripts/west_commands/runners/nrf_common.py index 35f1f53b07f..6423253233c 100644 --- a/scripts/west_commands/runners/nrf_common.py +++ b/scripts/west_commands/runners/nrf_common.py @@ -259,8 +259,16 @@ def program_hex(self): if self.family in ('NRF54H_FAMILY', 'NRF92_FAMILY'): erase_arg = 'ERASE_NONE' - cpuapp = self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPUAPP') or self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPUAPP') - cpurad = self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPURAD') or self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPURAD') + cpuapp = ( + self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPUAPP') or + self.build_conf.getboolean('CONFIG_SOC_NRF54H20_ENGB_CPUAPP') or + self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPUAPP') + ) + cpurad = ( + self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPURAD') or + self.build_conf.getboolean('CONFIG_SOC_NRF54H20_ENGB_CPURAD') or + self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPURAD') + ) if self.erase: self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION') diff --git a/soc/native/inf_clock/CMakeLists.txt b/soc/native/inf_clock/CMakeLists.txt index 7f9d09b2c34..494ea4de774 100644 --- a/soc/native/inf_clock/CMakeLists.txt +++ b/soc/native/inf_clock/CMakeLists.txt @@ -8,6 +8,7 @@ zephyr_library_compile_definitions(NO_POSIX_CHEATS) zephyr_library_sources( soc.c native_tasks.c + native_remap.c ) zephyr_library_include_directories( diff --git a/soc/native/inf_clock/native_remap.c b/soc/native/inf_clock/native_remap.c new file mode 100644 index 00000000000..4aa6bd1129e --- /dev/null +++ b/soc/native/inf_clock/native_remap.c @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +#include + +/** + * Dummy version which does nothing + * Boards which do not have a better implementation can use this + */ +__weak bool native_emb_addr_remap(void **addr) +{ + return false; +} diff --git a/soc/native/inf_clock/soc.h b/soc/native/inf_clock/soc.h index 36d54ac3f72..c7de6c22802 100644 --- a/soc/native/inf_clock/soc.h +++ b/soc/native/inf_clock/soc.h @@ -7,6 +7,7 @@ #ifndef _POSIX_SOC_INF_CLOCK_SOC_H #define _POSIX_SOC_INF_CLOCK_SOC_H +#include #include #include "board_soc.h" #include "posix_soc.h" @@ -18,6 +19,20 @@ extern "C" { void posix_soc_clean_up(void); +/** + * Remap an embedded device address, into an address which can be used in the simulated native + * board. + * + * If the provided address is not in a range known to this function it will not be modified and the + * function will return false. + * Otherwise the provided address pointer will be modified, and true returned. + * + * Note: The SOC provides a dummy version of this function which does nothing, + * so all boards will have an implementation. + * It is optional for boards to provide one if desired. + */ +bool native_emb_addr_remap(void **addr); + #ifdef __cplusplus } #endif diff --git a/soc/nordic/common/Kconfig.peripherals b/soc/nordic/common/Kconfig.peripherals index dc06a1f7c96..09e962283bc 100644 --- a/soc/nordic/common/Kconfig.peripherals +++ b/soc/nordic/common/Kconfig.peripherals @@ -128,8 +128,8 @@ config HAS_HW_NRF_NVMC_PE config HAS_HW_NRF_OSCILLATORS def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_OSCILLATORS)) -config HAS_HW_NRF_PDM - def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_PDM)) +config HAS_HW_NRF_PDM0 + def_bool $(dt_nodelabel_enabled_with_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM)) config HAS_HW_NRF_POWER def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_POWER)) diff --git a/soc/nordic/nrf54h/Kconfig b/soc/nordic/nrf54h/Kconfig index dd647174b14..51dc4e07480 100644 --- a/soc/nordic/nrf54h/Kconfig +++ b/soc/nordic/nrf54h/Kconfig @@ -9,7 +9,8 @@ config SOC_SERIES_NRF54HX select HAS_NORDIC_DRIVERS select NRF_PLATFORM_HALTIUM -config SOC_NRF54H20_CPUAPP +config SOC_NRF54H20_CPUAPP_COMMON + bool select ARM select ARMV8_M_DSP select CPU_CORTEX_M33 @@ -29,7 +30,14 @@ config SOC_NRF54H20_CPUAPP select HAS_PM select HAS_POWEROFF -config SOC_NRF54H20_CPURAD +config SOC_NRF54H20_CPUAPP + select SOC_NRF54H20_CPUAPP_COMMON + +config SOC_NRF54H20_ENGB_CPUAPP + select SOC_NRF54H20_CPUAPP_COMMON + +config SOC_NRF54H20_CPURAD_COMMON + bool select ARM select ARMV8_M_DSP select CPU_CORTEX_M33 @@ -48,8 +56,20 @@ config SOC_NRF54H20_CPURAD select HAS_PM select HAS_POWEROFF +config SOC_NRF54H20_CPURAD + select SOC_NRF54H20_CPURAD_COMMON + +config SOC_NRF54H20_ENGB_CPURAD + select SOC_NRF54H20_CPURAD_COMMON + config SOC_NRF54H20_CPUPPR depends on RISCV_CORE_NORDIC_VPR +config SOC_NRF54H20_ENGB_CPUPPR + depends on RISCV_CORE_NORDIC_VPR + config SOC_NRF54H20_CPUFLPR depends on RISCV_CORE_NORDIC_VPR + +config SOC_NRF54H20_ENGB_CPUFLPR + depends on RISCV_CORE_NORDIC_VPR diff --git a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuapp b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuapp index 61cc96da71f..597f7fbea22 100644 --- a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuapp +++ b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuapp @@ -3,7 +3,7 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -if SOC_NRF54H20_CPUAPP +if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_ENGB_CPUAPP config NUM_IRQS default 471 @@ -14,4 +14,4 @@ config NRF_REGTOOL_GENERATE_UICR config NRF_REGTOOL_GENERATE_BICR default y -endif # SOC_NRF54H20_CPUAPP +endif # SOC_NRF54H20_CPUAPP || SOC_NRF54H20_ENGB_CPUAPP diff --git a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuflpr b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuflpr index 2b792e9f1b9..97b1e89a9c1 100644 --- a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuflpr +++ b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuflpr @@ -1,7 +1,7 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -if SOC_NRF54H20_CPUFLPR +if SOC_NRF54H20_CPUFLPR || SOC_NRF54H20_ENGB_CPUFLPR config NUM_IRQS default 496 @@ -10,4 +10,4 @@ config NUM_IRQS config ASSERT default n -endif # SOC_NRF54H20_CPUFLPR +endif # SOC_NRF54H20_CPUFLPR || SOC_NRF54H20_ENGB_CPUFLPR diff --git a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuppr b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuppr index bf7c12a3a69..02649146ad7 100644 --- a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuppr +++ b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpuppr @@ -1,7 +1,7 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -if SOC_NRF54H20_CPUPPR +if SOC_NRF54H20_CPUPPR || SOC_NRF54H20_ENGB_CPUPPR config NUM_IRQS default 496 @@ -13,4 +13,4 @@ config SYS_CLOCK_TICKS_PER_SEC config ASSERT default n -endif # SOC_NRF54H20_CPUPPR +endif # SOC_NRF54H20_CPUPPR || SOC_NRF54H20_ENGB_CPUPPR diff --git a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpurad b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpurad index 4437e7aadc4..9ad0b30e1c8 100644 --- a/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpurad +++ b/soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpurad @@ -3,7 +3,7 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -if SOC_NRF54H20_CPURAD +if SOC_NRF54H20_CPURAD || SOC_NRF54H20_ENGB_CPURAD config NUM_IRQS default 471 @@ -11,4 +11,4 @@ config NUM_IRQS config NRF_REGTOOL_GENERATE_UICR default y -endif # SOC_NRF54H20_CPURAD +endif # SOC_NRF54H20_CPURAD || SOC_NRF54H20_ENGB_CPURAD diff --git a/soc/nordic/nrf54h/Kconfig.soc b/soc/nordic/nrf54h/Kconfig.soc index 459854e13b2..852e92bb138 100644 --- a/soc/nordic/nrf54h/Kconfig.soc +++ b/soc/nordic/nrf54h/Kconfig.soc @@ -9,29 +9,59 @@ config SOC_NRF54H20 help nRF54H20 +config SOC_NRF54H20_ENGB + bool + select SOC_SERIES_NRF54HX + help + nRF54H20 (EngB) + config SOC_NRF54H20_CPUAPP bool select SOC_NRF54H20 help nRF54H20 CPUAPP +config SOC_NRF54H20_ENGB_CPUAPP + bool + select SOC_NRF54H20_ENGB + help + nRF54H20 (EngB) CPUAPP + config SOC_NRF54H20_CPURAD bool select SOC_NRF54H20 help nRF54H20 CPURAD +config SOC_NRF54H20_ENGB_CPURAD + bool + select SOC_NRF54H20_ENGB + help + nRF54H20 (EngB) CPURAD + config SOC_NRF54H20_CPUPPR bool select SOC_NRF54H20 help nRF54H20 CPUPPR +config SOC_NRF54H20_ENGB_CPUPPR + bool + select SOC_NRF54H20_ENGB + help + nRF54H20 (EngB) CPUPPR + config SOC_NRF54H20_CPUFLPR bool select SOC_NRF54H20 help nRF54H20 CPUFLPR +config SOC_NRF54H20_ENGB_CPUFLPR + bool + select SOC_NRF54H20_ENGB + help + nRF54H20 (EngB) CPUFLPR + config SOC - default "nrf54h20" if SOC_NRF54H20 + default "nrf54h20" if SOC_NRF54H20 || SOC_NRF54H20_ENGB diff --git a/soc/nordic/nrf54h/soc.h b/soc/nordic/nrf54h/soc.h index 92c411ec9c9..f952bd092d6 100644 --- a/soc/nordic/nrf54h/soc.h +++ b/soc/nordic/nrf54h/soc.h @@ -10,7 +10,7 @@ #include #include -#if defined(CONFIG_SOC_NRF54H20_CPUAPP) +#if defined(CONFIG_SOC_NRF54H20_CPUAPP) || defined(CONFIG_SOC_NRF54H20_ENGB_CPUAPP) #define RAMBLOCK_CONTROL_BIT_ICACHE MEMCONF_POWER_CONTROL_MEM1_Pos #define RAMBLOCK_CONTROL_BIT_DCACHE MEMCONF_POWER_CONTROL_MEM2_Pos #define RAMBLOCK_POWER_ID 0 @@ -18,7 +18,7 @@ #define RAMBLOCK_RET_MASK (MEMCONF_POWER_RET_MEM0_Msk) #define RAMBLOCK_RET_BIT_ICACHE MEMCONF_POWER_RET_MEM1_Pos #define RAMBLOCK_RET_BIT_DCACHE MEMCONF_POWER_RET_MEM2_Pos -#elif defined(CONFIG_SOC_NRF54H20_CPURAD) +#elif defined(CONFIG_SOC_NRF54H20_CPURAD) || defined(CONFIG_SOC_NRF54H20_ENGB_CPURAD) #define RAMBLOCK_CONTROL_BIT_ICACHE MEMCONF_POWER_CONTROL_MEM6_Pos #define RAMBLOCK_CONTROL_BIT_DCACHE MEMCONF_POWER_CONTROL_MEM7_Pos #define RAMBLOCK_POWER_ID 0 diff --git a/soc/nordic/nrf54l/Kconfig b/soc/nordic/nrf54l/Kconfig index 43d914c4de6..24d860ee2b5 100644 --- a/soc/nordic/nrf54l/Kconfig +++ b/soc/nordic/nrf54l/Kconfig @@ -94,7 +94,7 @@ if NRF_GRTC_TIMER config ELV_GRTC_LFXO_ALLOWED bool - depends on NRF_GRTC_SLEEP_ALLOWED + depends on POWEROFF select EXPERIMENTAL help This feature allows using ELV mode when GRTC operates with the LFXO as diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c index 8ec0e62fa50..9d3a312f51f 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c @@ -2107,7 +2107,7 @@ static void *radio_ccm_ext_rx_pkt_set(struct ccm *cnf, uint8_t phy, uint8_t pdu_ NRF_CCM->SCRATCHPTR = (uint32_t)_ccm_scratch; NRF_CCM->SHORTS = 0; nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ENDKSGEN); - nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ENDCRYPT); + nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_END); nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ERROR); nrf_ccm_task_trigger(NRF_CCM, NRF_CCM_TASK_KSGEN); @@ -2182,7 +2182,7 @@ static void *radio_ccm_ext_tx_pkt_set(struct ccm *cnf, uint8_t pdu_type, void *p NRF_CCM->SCRATCHPTR = (uint32_t)_ccm_scratch; NRF_CCM->SHORTS = CCM_SHORTS_ENDKSGEN_CRYPT_Msk; nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ENDKSGEN); - nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ENDCRYPT); + nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_END); nrf_ccm_event_clear(NRF_CCM, NRF_CCM_EVENT_ERROR); nrf_ccm_task_trigger(NRF_CCM, NRF_CCM_TASK_KSGEN); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf54lx.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf54lx.h index b0d3948aefb..bc0cc2993c5 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf54lx.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf54lx.h @@ -633,9 +633,17 @@ static inline uint32_t hal_radio_tx_power_value(int8_t tx_power_lvl) return RADIO_TXPOWER_TXPOWER_Neg20dBm; } +#if defined(RADIO_TXPOWER_TXPOWER_Neg26dBm) if (tx_power_lvl >= -26) { return RADIO_TXPOWER_TXPOWER_Neg26dBm; } +#endif + +#if defined(RADIO_TXPOWER_TXPOWER_Neg28dBm) + if (tx_power_lvl >= -28) { + return RADIO_TXPOWER_TXPOWER_Neg28dBm; + } +#endif if (tx_power_lvl >= -40) { return RADIO_TXPOWER_TXPOWER_Neg40dBm; diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h index 770cb70d8cc..1ddf9af1ccf 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h @@ -149,7 +149,7 @@ static inline void hal_trigger_crypt_ppi_config(void) { nrf_radio_publish_set(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS, HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI); - nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_CRYPT, HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI); + nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_START, HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI); } /******************************************************************************* @@ -157,7 +157,7 @@ static inline void hal_trigger_crypt_ppi_config(void) */ static inline void hal_trigger_crypt_ppi_disable(void) { - nrf_ccm_subscribe_clear(NRF_CCM, NRF_CCM_TASK_CRYPT); + nrf_ccm_subscribe_clear(NRF_CCM, NRF_CCM_TASK_START); } /******************************************************************************* @@ -207,7 +207,7 @@ static inline void hal_trigger_crypt_by_bcmatch_ppi_config(void) */ nrf_radio_publish_set(NRF_RADIO, NRF_RADIO_EVENT_BCMATCH, HAL_TRIGGER_CRYPT_DELAY_PPI); - nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_CRYPT, HAL_TRIGGER_CRYPT_DELAY_PPI); + nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_START, HAL_TRIGGER_CRYPT_DELAY_PPI); } #endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */ #endif /* CONFIG_BT_CTLR_LE_ENC || CONFIG_BT_CTLR_BROADCAST_ISO_ENC */ diff --git a/subsys/ipc/ipc_service/backends/ipc_icbmsg.c b/subsys/ipc/ipc_service/backends/ipc_icbmsg.c index 70c4c4c362f..9fd7752999f 100644 --- a/subsys/ipc/ipc_service/backends/ipc_icbmsg.c +++ b/subsys/ipc/ipc_service/backends/ipc_icbmsg.c @@ -87,6 +87,13 @@ #include #include +#if defined(CONFIG_ARCH_POSIX) +#include +#define MAYBE_CONST +#else +#define MAYBE_CONST const +#endif + LOG_MODULE_REGISTER(ipc_icbmsg, CONFIG_IPC_SERVICE_BACKEND_ICBMSG_LOG_LEVEL); @@ -1238,12 +1245,17 @@ static int release_rx_buffer(const struct device *instance, void *token, void *d */ static int backend_init(const struct device *instance) { - const struct icbmsg_config *conf = instance->config; + MAYBE_CONST struct icbmsg_config *conf = (struct icbmsg_config *)instance->config; struct backend_data *dev_data = instance->data; #ifdef CONFIG_MULTITHREADING static K_THREAD_STACK_DEFINE(ep_bound_work_q_stack, EP_BOUND_WORK_Q_STACK_SIZE); static bool is_work_q_started; +#if defined(CONFIG_ARCH_POSIX) + native_emb_addr_remap((void **)&conf->tx.blocks_ptr); + native_emb_addr_remap((void **)&conf->rx.blocks_ptr); +#endif + if (!is_work_q_started) { k_work_queue_init(&ep_bound_work_q); k_work_queue_start(&ep_bound_work_q, ep_bound_work_q_stack, @@ -1401,7 +1413,7 @@ const static struct ipc_service_backend backend_ops = { .rx_pb = &rx_icbmsg_pb_##i, \ } \ }; \ - static const struct icbmsg_config backend_config_##i = \ + static MAYBE_CONST struct icbmsg_config backend_config_##i = \ { \ .control_config = { \ .mbox_tx = MBOX_DT_SPEC_INST_GET(i, tx), \ diff --git a/subsys/ipc/ipc_service/lib/Kconfig.icmsg b/subsys/ipc/ipc_service/lib/Kconfig.icmsg index 93427404dca..bc15d9a5999 100644 --- a/subsys/ipc/ipc_service/lib/Kconfig.icmsg +++ b/subsys/ipc/ipc_service/lib/Kconfig.icmsg @@ -51,7 +51,7 @@ if IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE config IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE int "Size of RX work queue stack" - default 1024 + default 1280 help Size of stack used by work queue RX thread. This work queue is created to prevent notifying service users about received data diff --git a/subsys/ipc/ipc_service/lib/icmsg.c b/subsys/ipc/ipc_service/lib/icmsg.c index e73bdaaa723..9de8a99ad58 100644 --- a/subsys/ipc/ipc_service/lib/icmsg.c +++ b/subsys/ipc/ipc_service/lib/icmsg.c @@ -270,16 +270,14 @@ int icmsg_open(const struct icmsg_config_t *conf, k_mutex_init(&dev_data->tx_lock); #endif - int ret = pbuf_init(dev_data->tx_pb); + int ret = pbuf_tx_init(dev_data->tx_pb); if (ret < 0) { __ASSERT(false, "Incorrect configuration"); return ret; } - /* Initialize local copies of rx_pb. */ - dev_data->rx_pb->data.wr_idx = 0; - dev_data->rx_pb->data.rd_idx = 0; + (void)pbuf_rx_init(dev_data->rx_pb); ret = pbuf_write(dev_data->tx_pb, magic, sizeof(magic)); diff --git a/subsys/ipc/ipc_service/lib/icmsg_me.c b/subsys/ipc/ipc_service/lib/icmsg_me.c index b4d384e6bb0..8606b56161e 100644 --- a/subsys/ipc/ipc_service/lib/icmsg_me.c +++ b/subsys/ipc/ipc_service/lib/icmsg_me.c @@ -4,6 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L + #include #include diff --git a/subsys/ipc/ipc_service/lib/pbuf.c b/subsys/ipc/ipc_service/lib/pbuf.c index 1164f814ca0..c744946f4ca 100644 --- a/subsys/ipc/ipc_service/lib/pbuf.c +++ b/subsys/ipc/ipc_service/lib/pbuf.c @@ -11,6 +11,10 @@ #include #include +#if defined(CONFIG_ARCH_POSIX) +#include +#endif + /* Helper funciton for getting numer of bytes being written to the bufer. */ static uint32_t idx_occupied(uint32_t len, uint32_t wr_idx, uint32_t rd_idx) { @@ -54,11 +58,23 @@ static int validate_cfg(const struct pbuf_cfg *cfg) return 0; } -int pbuf_init(struct pbuf *pb) +#if defined(CONFIG_ARCH_POSIX) +void pbuf_native_addr_remap(struct pbuf *pb) +{ + native_emb_addr_remap((void **)&pb->cfg->rd_idx_loc); + native_emb_addr_remap((void **)&pb->cfg->wr_idx_loc); + native_emb_addr_remap((void **)&pb->cfg->data_loc); +} +#endif + +int pbuf_tx_init(struct pbuf *pb) { if (validate_cfg(pb->cfg) != 0) { return -EINVAL; } +#if defined(CONFIG_ARCH_POSIX) + pbuf_native_addr_remap(pb); +#endif /* Initialize local copy of indexes. */ pb->data.wr_idx = 0; @@ -77,6 +93,22 @@ int pbuf_init(struct pbuf *pb) return 0; } +int pbuf_rx_init(struct pbuf *pb) +{ + if (validate_cfg(pb->cfg) != 0) { + return -EINVAL; + } +#if defined(CONFIG_ARCH_POSIX) + pbuf_native_addr_remap(pb); +#endif + + /* Initialize local copy of indexes. */ + pb->data.wr_idx = 0; + pb->data.rd_idx = 0; + + return 0; +} + int pbuf_write(struct pbuf *pb, const char *data, uint16_t len) { if (pb == NULL || len == 0 || data == NULL) { diff --git a/tests/lib/cpp/cxx/testcase.yaml b/tests/lib/cpp/cxx/testcase.yaml index 5601886b150..642a2ed984d 100644 --- a/tests/lib/cpp/cxx/testcase.yaml +++ b/tests/lib/cpp/cxx/testcase.yaml @@ -42,6 +42,8 @@ tests: - nrf54l20pdk/nrf54l20/cpuapp - nrf54h20dk/nrf54h20/cpuapp - nrf54h20dk/nrf54h20/cpurad + - nrf54h20dk@0.8.0/nrf54h20/cpuapp + - nrf54h20dk@0.8.0/nrf54h20/cpurad - nrf9280pdk/nrf9280/cpuapp - nrf9280pdk/nrf9280/cpurad filter: not CONFIG_HAS_RENESAS_RA_FSP diff --git a/tests/subsys/ipc/pbuf/src/main.c b/tests/subsys/ipc/pbuf/src/main.c index d4bbb9db4fe..4af9da68c47 100644 --- a/tests/subsys/ipc/pbuf/src/main.c +++ b/tests/subsys/ipc/pbuf/src/main.c @@ -48,7 +48,7 @@ ZTEST(test_pbuf, test_rw) * order to avoid clang complains about memory_area not being constant * expression. */ - static const struct pbuf_cfg cfg = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 0); + static PBUF_MAYBE_CONST struct pbuf_cfg cfg = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 0); static struct pbuf pb = { .cfg = &cfg, @@ -58,7 +58,7 @@ ZTEST(test_pbuf, test_rw) write_buf[i] = i+1; } - zassert_equal(pbuf_init(&pb), 0); + zassert_equal(pbuf_tx_init(&pb), 0); /* Write MSGA_SZ bytes packet. */ ret = pbuf_write(&pb, write_buf, MSGA_SZ); @@ -115,9 +115,9 @@ ZTEST(test_pbuf, test_retcodes) * order to avoid clang complains about memory_area not being constant * expression. */ - static const struct pbuf_cfg cfg0 = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 32); - static const struct pbuf_cfg cfg1 = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 0); - static const struct pbuf_cfg cfg2 = PBUF_CFG_INIT(memory_area, 20, 4); + static PBUF_MAYBE_CONST struct pbuf_cfg cfg0 = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 32); + static PBUF_MAYBE_CONST struct pbuf_cfg cfg1 = PBUF_CFG_INIT(memory_area, MEM_AREA_SZ, 0); + static PBUF_MAYBE_CONST struct pbuf_cfg cfg2 = PBUF_CFG_INIT(memory_area, 20, 4); static struct pbuf pb0 = { .cfg = &cfg0, @@ -132,9 +132,9 @@ ZTEST(test_pbuf, test_retcodes) }; /* Initialize buffers. */ - zassert_equal(pbuf_init(&pb0), 0); - zassert_equal(pbuf_init(&pb1), 0); - zassert_equal(pbuf_init(&pb2), 0); + zassert_equal(pbuf_tx_init(&pb0), 0); + zassert_equal(pbuf_tx_init(&pb1), 0); + zassert_equal(pbuf_tx_init(&pb2), 0); print_pbuf_info(&pb0); print_pbuf_info(&pb1); @@ -268,13 +268,13 @@ ZTEST(test_pbuf, test_stress) * order to avoid clang complains about buffer not being constant * expression. */ - static const struct pbuf_cfg cfg = PBUF_CFG_INIT(buffer, MEM_AREA_SZ, 4); + static PBUF_MAYBE_CONST struct pbuf_cfg cfg = PBUF_CFG_INIT(buffer, MEM_AREA_SZ, 4); static struct pbuf pb = { .cfg = &cfg, }; - zassert_equal(pbuf_init(&pb), 0); + zassert_equal(pbuf_tx_init(&pb), 0); ctx.pbuf = &pb; ctx.wr_cnt = 0; ctx.rd_cnt = 0; diff --git a/west.yml b/west.yml index ee8ed5eaae5..241102be58f 100644 --- a/west.yml +++ b/west.yml @@ -188,7 +188,7 @@ manifest: groups: - hal - name: hal_nordic - revision: pull/225/head + revision: bc25c094a8cf3064f4f9c1e8060b46e1989edf95 path: modules/hal/nordic groups: - hal @@ -300,7 +300,7 @@ manifest: groups: - tools - name: nrf_hw_models - revision: d2a119a9c7600ce06033a794de042e0ad9a38702 + revision: bf8e45bd1f870e49cc15392e045c28d54ea12285 path: modules/bsim_hw_models/nrf_hw_models - name: open-amp revision: b735edbc739ad59156eb55bb8ce2583d74537719