diff --git a/soc/nordic/common/Kconfig.peripherals b/soc/nordic/common/Kconfig.peripherals index 0c8f958eb3..b56a60505b 100644 --- a/soc/nordic/common/Kconfig.peripherals +++ b/soc/nordic/common/Kconfig.peripherals @@ -72,6 +72,9 @@ config HAS_HW_NRF_GPIO0 config HAS_HW_NRF_GPIO1 def_bool $(dt_nodelabel_enabled_with_compat,gpio1,$(DT_COMPAT_NORDIC_NRF_GPIO)) +config HAS_HW_NRF_GPIO2 + def_bool $(dt_nodelabel_enabled_with_compat,gpio2,$(DT_COMPAT_NORDIC_NRF_GPIO)) + config HAS_HW_NRF_GPIOTE0 def_bool $(dt_nodelabel_enabled_with_compat,gpiote0,$(DT_COMPAT_NORDIC_NRF_GPIOTE)) diff --git a/soc/nordic/nrf54l/Kconfig b/soc/nordic/nrf54l/Kconfig index 640e090005..f5e62021e1 100644 --- a/soc/nordic/nrf54l/Kconfig +++ b/soc/nordic/nrf54l/Kconfig @@ -19,6 +19,9 @@ config SOC_NRF54L15_ENGA_CPUAPP select HAS_HW_NRF_RADIO_IEEE802154 select HAS_POWEROFF +config SOC_NRF54L15_ENGA_CPUFLPR + depends on RISCV_CORE_NORDIC_VPR + if SOC_SERIES_NRF54LX config SOC_NRF54LX_SKIP_CLOCK_CONFIG diff --git a/soc/nordic/nrf54l/Kconfig.defconfig b/soc/nordic/nrf54l/Kconfig.defconfig index 39ed9025ea..b6ba2a07a8 100644 --- a/soc/nordic/nrf54l/Kconfig.defconfig +++ b/soc/nordic/nrf54l/Kconfig.defconfig @@ -7,10 +7,26 @@ if SOC_SERIES_NRF54LX rsource "Kconfig.defconfig.nrf54l*" +if ARM + config CORTEX_M_SYSTICK default !NRF_GRTC_TIMER config CACHE_NRF_CACHE default y if EXTERNAL_CACHE +endif # ARM + +if RISCV + +DT_CHOSEN_Z_SRAM = zephyr,sram +DT_CHOSEN_Z_CODE = zephyr,code-partition + +config BUILD_OUTPUT_ADJUST_LMA + depends on !XIP + default "$(dt_chosen_partition_addr_hex,$(DT_CHOSEN_Z_CODE)) - \ + $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))" + +endif # RISCV + endif # SOC_SERIES_NRF54LX diff --git a/soc/nordic/nrf54l/Kconfig.defconfig.nrf54l15_enga_cpuflpr b/soc/nordic/nrf54l/Kconfig.defconfig.nrf54l15_enga_cpuflpr new file mode 100644 index 0000000000..de1a851922 --- /dev/null +++ b/soc/nordic/nrf54l/Kconfig.defconfig.nrf54l15_enga_cpuflpr @@ -0,0 +1,15 @@ +# Nordic Semiconductor nRF54L15 MCU + +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +if SOC_NRF54L15_ENGA_CPUFLPR + +config RISCV_HAS_CPU_IDLE + bool + +config NUM_IRQS + int + default 287 + +endif # SOC_NRF54L15_ENGA_CPUFLPR diff --git a/soc/nordic/nrf54l/Kconfig.soc b/soc/nordic/nrf54l/Kconfig.soc index 05ce9db0a3..506db433b2 100644 --- a/soc/nordic/nrf54l/Kconfig.soc +++ b/soc/nordic/nrf54l/Kconfig.soc @@ -21,5 +21,11 @@ config SOC_NRF54L15_ENGA_CPUAPP help NRF54L15 ENGA CPUAPP +config SOC_NRF54L15_ENGA_CPUFLPR + bool + select SOC_NRF54L15_ENGA + help + NRF54L15 ENGA CPUFLPR + config SOC default "nrf54l15" if SOC_NRF54L15 diff --git a/soc/nordic/nrf54l/soc.c b/soc/nordic/nrf54l/soc.c index 6af0ff4ebc..94f48c1423 100644 --- a/soc/nordic/nrf54l/soc.c +++ b/soc/nordic/nrf54l/soc.c @@ -18,19 +18,23 @@ #include #include +#if defined(NRF_APPLICATION) #include #include #include #include #include +#endif #include #include LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); +#if defined(NRF_APPLICATION) #define LFXO_NODE DT_NODELABEL(lfxo) #define HFXO_NODE DT_NODELABEL(hfxo) +#endif static int nordicsemi_nrf54l_init(void) { @@ -39,6 +43,7 @@ static int nordicsemi_nrf54l_init(void) */ SystemCoreClockUpdate(); +#if defined(NRF_APPLICATION) /* Enable ICACHE */ sys_cache_instr_enable(); @@ -120,6 +125,7 @@ static int nordicsemi_nrf54l_init(void) #if defined(CONFIG_ELV_GRTC_LFXO_ALLOWED) nrf_regulators_elv_mode_allow_set(NRF_REGULATORS, NRF_REGULATORS_ELV_ELVGRTCLFXO_MASK); #endif /* CONFIG_ELV_GRTC_LFXO_ALLOWED */ +#endif /* NRF_APPLICATION */ return 0; } diff --git a/soc/nordic/soc.yml b/soc/nordic/soc.yml index 87f35a4655..cc92ea9bc3 100644 --- a/soc/nordic/soc.yml +++ b/soc/nordic/soc.yml @@ -24,6 +24,7 @@ family: - name: nrf54l15 cpuclusters: - name: cpuapp + - name: cpuflpr - name: nrf54h socs: - name: nrf54h20 diff --git a/soc/nordic/validate_base_addresses.c b/soc/nordic/validate_base_addresses.c index 1fa4c87c97..a6292b7129 100644 --- a/soc/nordic/validate_base_addresses.c +++ b/soc/nordic/validate_base_addresses.c @@ -310,6 +310,10 @@ CHECK_DT_REG(uicr, NRF_UICR); CHECK_DT_REG(usbd, NRF_USBD); CHECK_DT_REG(usbreg, NRF_USBREGULATOR); CHECK_DT_REG(vmc, NRF_VMC); +CHECK_DT_REG(cpuflpr_clic, NRF_FLPR_VPRCLIC); +#if defined(CONFIG_SOC_NRF54L15) +CHECK_DT_REG(cpuflpr_vpr, NRF_VPR00); +#endif CHECK_DT_REG(wdt, NRF_WDT0); /* this should be the same node as wdt0 */ CHECK_DT_REG(wdt0, NRF_WDT0); CHECK_DT_REG(wdt1, NRF_WDT1); diff --git a/soc/nordic/validate_rram_partitions.c b/soc/nordic/validate_rram_partitions.c index f35d9cf73f..99f75f291a 100644 --- a/soc/nordic/validate_rram_partitions.c +++ b/soc/nordic/validate_rram_partitions.c @@ -43,7 +43,7 @@ /* clang-format off */ -#define RRAM_BASE REG_ADDR_NS(DT_NODELABEL(rram0)) +#define RRAM_BASE REG_ADDR_NS(DT_CHOSEN(zephyr_flash)) #define RRAM_CONTROLLER DT_NODELABEL(rram_controller) #if !DT_NODE_EXISTS(RRAM_CONTROLLER)