diff --git a/dts/arm/nordic/nrf9160.dtsi b/dts/arm/nordic/nrf91.dtsi similarity index 95% rename from dts/arm/nordic/nrf9160.dtsi rename to dts/arm/nordic/nrf91.dtsi index 39b3df32ad6..d872680fb20 100644 --- a/dts/arm/nordic/nrf9160.dtsi +++ b/dts/arm/nordic/nrf91.dtsi @@ -41,8 +41,8 @@ #size-cells = <1>; ranges = <0x0 0x50000000 0x10000000>; - /* Common nRF9160 peripheral description */ - #include "nrf9160_common.dtsi" + /* Common nRF91 peripherals description. */ + #include "nrf91_peripherals.dtsi" }; /* Additional Secure peripherals */ diff --git a/dts/arm/nordic/nrf9160_sica.dtsi b/dts/arm/nordic/nrf9160_sica.dtsi index 2ec919bc8bc..e04347fc026 100644 --- a/dts/arm/nordic/nrf9160_sica.dtsi +++ b/dts/arm/nordic/nrf9160_sica.dtsi @@ -5,7 +5,7 @@ */ #include -#include +#include &flash0 { reg = <0x00000000 DT_SIZE_K(1024)>; diff --git a/dts/arm/nordic/nrf9160ns_sica.dtsi b/dts/arm/nordic/nrf9160ns_sica.dtsi index cfcf8853aef..7e35dd76b62 100644 --- a/dts/arm/nordic/nrf9160ns_sica.dtsi +++ b/dts/arm/nordic/nrf9160ns_sica.dtsi @@ -5,7 +5,7 @@ */ #include -#include +#include &flash0 { reg = <0x00000000 DT_SIZE_K(1024)>; diff --git a/dts/arm/nordic/nrf9161_sica.dtsi b/dts/arm/nordic/nrf9161_sica.dtsi new file mode 100644 index 00000000000..d6ae975ceaa --- /dev/null +++ b/dts/arm/nordic/nrf9161_sica.dtsi @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2023 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +&flash0 { + reg = <0x00000000 DT_SIZE_K(1024)>; +}; + +&sram0 { + reg = <0x20000000 DT_SIZE_K(256)>; +}; + +/ { + soc { + compatible = "nordic,nRF9161-SICA", "nordic,nRF9120", "nordic,nRF91", "simple-bus"; + }; +}; diff --git a/dts/arm/nordic/nrf9161ns_sica.dtsi b/dts/arm/nordic/nrf9161ns_sica.dtsi new file mode 100644 index 00000000000..1ff4f1d9ee9 --- /dev/null +++ b/dts/arm/nordic/nrf9161ns_sica.dtsi @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2023 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +&flash0 { + reg = <0x00000000 DT_SIZE_K(1024)>; +}; + +&sram0 { + reg = <0x20000000 DT_SIZE_K(256)>; +}; + +/ { + soc { + compatible = "nordic,nRF9161-SICA", "nordic,nRF9120", "nordic,nRF91", "simple-bus"; + }; +}; diff --git a/dts/arm/nordic/nrf9160_common.dtsi b/dts/arm/nordic/nrf91_peripherals.dtsi similarity index 100% rename from dts/arm/nordic/nrf9160_common.dtsi rename to dts/arm/nordic/nrf91_peripherals.dtsi diff --git a/dts/arm/nordic/nrf9160ns.dtsi b/dts/arm/nordic/nrf91ns.dtsi similarity index 92% rename from dts/arm/nordic/nrf9160ns.dtsi rename to dts/arm/nordic/nrf91ns.dtsi index 0d70b7c0f30..910f45ec706 100644 --- a/dts/arm/nordic/nrf9160ns.dtsi +++ b/dts/arm/nordic/nrf91ns.dtsi @@ -42,8 +42,8 @@ #size-cells = <1>; ranges = <0x0 0x40000000 0x10000000>; - /* Include common nRF9160 peripheral description */ - #include "nrf9160_common.dtsi" + /* Common nRF91 peripherals description. */ + #include "nrf91_peripherals.dtsi" }; /* Additional Non-Secure peripherals */ diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index f00696e4277..0f5efa6c275 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -29,6 +29,7 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF52833 NRF52833_XXAA) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF52840 NRF52840_XXAA) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF5340_CPUAPP NRF5340_XXAA_APPLICATION) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF5340_CPUNET NRF5340_XXAA_NETWORK) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9120 NRF9120_XXAA) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9160 NRF9160_XXAA) zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_LOCK @@ -44,7 +45,7 @@ zephyr_library_compile_definitions_ifdef(CONFIG_NRF_TRACE_PORT zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF5340_CPUAPP NRF_SKIP_FICR_NS_COPY_TO_RAM) -zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9160 +zephyr_compile_definitions_ifdef(CONFIG_SOC_SERIES_NRF91X NRF_SKIP_FICR_NS_COPY_TO_RAM) # Connect Kconfig compilation option for Non-Secure software with option required by MDK/nrfx @@ -61,7 +62,7 @@ zephyr_library_sources_ifdef(CONFIG_SOC_NRF52833 ${MDK_DIR}/system_nrf5283 zephyr_library_sources_ifdef(CONFIG_SOC_NRF52840 ${MDK_DIR}/system_nrf52840.c) 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_NRF9160 ${MDK_DIR}/system_nrf9160.c) +zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF91X ${MDK_DIR}/system_nrf91.c) zephyr_library_sources(nrfx_glue.c) zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c) diff --git a/soc/arm/Kconfig b/soc/arm/Kconfig index f1435fd48d0..443a0031189 100644 --- a/soc/arm/Kconfig +++ b/soc/arm/Kconfig @@ -44,14 +44,14 @@ config CPU_HAS_NRF_IDAU if CPU_HAS_NRF_IDAU config NRF_SPU_FLASH_REGION_SIZE hex - default 0x8000 if SOC_NRF9160 + default 0x8000 if SOC_SERIES_NRF91X default 0x4000 if SOC_NRF5340_CPUAPP help FLASH region size for the NRF_SPU peripheral config NRF_SPU_RAM_REGION_SIZE hex - default 0x2000 if SOC_NRF9160 || SOC_NRF5340_CPUAPP + default 0x2000 if SOC_SERIES_NRF91X || SOC_NRF5340_CPUAPP help RAM region size for the NRF_SPU peripheral endif diff --git a/soc/arm/nordic_nrf/Kconfig b/soc/arm/nordic_nrf/Kconfig index 555043fdf6c..cc0a5e296bb 100644 --- a/soc/arm/nordic_nrf/Kconfig +++ b/soc/arm/nordic_nrf/Kconfig @@ -63,7 +63,8 @@ config NFCT_PINS_AS_GPIOS choice NRF_APPROTECT_HANDLING bool "APPROTECT handling" depends on SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET || \ - (SOC_NRF5340_CPUAPP && !TRUSTED_EXECUTION_NONSECURE) + (SOC_NRF5340_CPUAPP && !TRUSTED_EXECUTION_NONSECURE) || \ + SOC_SERIES_NRF91X default NRF_APPROTECT_USE_UICR help Specifies how the SystemInit() function should handle the APPROTECT diff --git a/soc/arm/nordic_nrf/nrf91/Kconfig.defconfig.nrf9161_SICA b/soc/arm/nordic_nrf/nrf91/Kconfig.defconfig.nrf9161_SICA new file mode 100644 index 00000000000..d083d868f83 --- /dev/null +++ b/soc/arm/nordic_nrf/nrf91/Kconfig.defconfig.nrf9161_SICA @@ -0,0 +1,14 @@ +# Nordic Semiconductor nRF9161 MCU + +# Copyright (c) 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +if SOC_NRF9161_SICA + +config SOC + default "nRF9161_SICA" + +config NUM_IRQS + default 65 + +endif # SOC_NRF9161_SICA diff --git a/soc/arm/nordic_nrf/nrf91/Kconfig.soc b/soc/arm/nordic_nrf/nrf91/Kconfig.soc index 0d5e7992498..592812771d1 100644 --- a/soc/arm/nordic_nrf/nrf91/Kconfig.soc +++ b/soc/arm/nordic_nrf/nrf91/Kconfig.soc @@ -3,21 +3,37 @@ # Copyright (c) 2018 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 +if SOC_SERIES_NRF91X + +config SOC_NRF9120 + bool + config SOC_NRF9160 - depends on SOC_SERIES_NRF91X bool choice prompt "nRF91x MCU Selection" - depends on SOC_SERIES_NRF91X config SOC_NRF9160_SICA bool "NRF9160_SICA" select SOC_NRF9160 +# The nRF9161 is technically a SiP (System-in-Package) that consists of +# the nRF9120 SoC and additional components like PMIC, FEM, and XTAL, +# so for nrfx/MDK the nRF9120 SoC is to be indicated as the build target, +# but since the nRF9161 is what a user can actually see on a board, using +# only nRF9120 in the Zephyr build infrastructure might be confusing. +# That's why in the top level of SoC definitions (for user-configurable +# options in Kconfig, for example) the nRF9161 term is used and nRF9120 +# underneath. +config SOC_NRF9161_SICA + bool "NRF9161_SICA" + select SOC_NRF9120 + endchoice config NRF_ENABLE_ICACHE bool "Instruction cache (I-Cache)" - depends on SOC_NRF9160 default y + +endif # SOC_SERIES_NRF91X diff --git a/west.yml b/west.yml index 4b1bf844dfd..f228a5db798 100644 --- a/west.yml +++ b/west.yml @@ -83,7 +83,7 @@ manifest: groups: - hal - name: hal_nordic - revision: c4044b04b8bf04f11e3051d5f7a41f3d636b6b0c + revision: 140140ea047f441fe076d26f79eb54dc9a38bcb6 path: modules/hal/nordic groups: - hal