soc: nordic_nrf: nrf91: Add support for nRF9161 SiP / nRF9120 SoC
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 selected 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. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
d05a95e5c1
commit
2a4373ce0d
13 changed files with 91 additions and 15 deletions
|
@ -41,8 +41,8 @@
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
ranges = <0x0 0x50000000 0x10000000>;
|
ranges = <0x0 0x50000000 0x10000000>;
|
||||||
|
|
||||||
/* Common nRF9160 peripheral description */
|
/* Common nRF91 peripherals description. */
|
||||||
#include "nrf9160_common.dtsi"
|
#include "nrf91_peripherals.dtsi"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Additional Secure peripherals */
|
/* Additional Secure peripherals */
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mem.h>
|
#include <mem.h>
|
||||||
#include <nordic/nrf9160.dtsi>
|
#include <nordic/nrf91.dtsi>
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
reg = <0x00000000 DT_SIZE_K(1024)>;
|
reg = <0x00000000 DT_SIZE_K(1024)>;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mem.h>
|
#include <mem.h>
|
||||||
#include <nordic/nrf9160ns.dtsi>
|
#include <nordic/nrf91ns.dtsi>
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
reg = <0x00000000 DT_SIZE_K(1024)>;
|
reg = <0x00000000 DT_SIZE_K(1024)>;
|
||||||
|
|
22
dts/arm/nordic/nrf9161_sica.dtsi
Normal file
22
dts/arm/nordic/nrf9161_sica.dtsi
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <mem.h>
|
||||||
|
#include <nordic/nrf91.dtsi>
|
||||||
|
|
||||||
|
&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";
|
||||||
|
};
|
||||||
|
};
|
22
dts/arm/nordic/nrf9161ns_sica.dtsi
Normal file
22
dts/arm/nordic/nrf9161ns_sica.dtsi
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <mem.h>
|
||||||
|
#include <nordic/nrf91ns.dtsi>
|
||||||
|
|
||||||
|
&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";
|
||||||
|
};
|
||||||
|
};
|
|
@ -42,8 +42,8 @@
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
ranges = <0x0 0x40000000 0x10000000>;
|
ranges = <0x0 0x40000000 0x10000000>;
|
||||||
|
|
||||||
/* Include common nRF9160 peripheral description */
|
/* Common nRF91 peripherals description. */
|
||||||
#include "nrf9160_common.dtsi"
|
#include "nrf91_peripherals.dtsi"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Additional Non-Secure peripherals */
|
/* Additional Non-Secure peripherals */
|
|
@ -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_NRF52840 NRF52840_XXAA)
|
||||||
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF5340_CPUAPP NRF5340_XXAA_APPLICATION)
|
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_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_SOC_NRF9160 NRF9160_XXAA)
|
||||||
|
|
||||||
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_LOCK
|
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
|
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF5340_CPUAPP
|
||||||
NRF_SKIP_FICR_NS_COPY_TO_RAM)
|
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)
|
NRF_SKIP_FICR_NS_COPY_TO_RAM)
|
||||||
|
|
||||||
# Connect Kconfig compilation option for Non-Secure software with option required by MDK/nrfx
|
# 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_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_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_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(nrfx_glue.c)
|
||||||
zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c)
|
zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c)
|
||||||
|
|
|
@ -44,14 +44,14 @@ config CPU_HAS_NRF_IDAU
|
||||||
if CPU_HAS_NRF_IDAU
|
if CPU_HAS_NRF_IDAU
|
||||||
config NRF_SPU_FLASH_REGION_SIZE
|
config NRF_SPU_FLASH_REGION_SIZE
|
||||||
hex
|
hex
|
||||||
default 0x8000 if SOC_NRF9160
|
default 0x8000 if SOC_SERIES_NRF91X
|
||||||
default 0x4000 if SOC_NRF5340_CPUAPP
|
default 0x4000 if SOC_NRF5340_CPUAPP
|
||||||
help
|
help
|
||||||
FLASH region size for the NRF_SPU peripheral
|
FLASH region size for the NRF_SPU peripheral
|
||||||
|
|
||||||
config NRF_SPU_RAM_REGION_SIZE
|
config NRF_SPU_RAM_REGION_SIZE
|
||||||
hex
|
hex
|
||||||
default 0x2000 if SOC_NRF9160 || SOC_NRF5340_CPUAPP
|
default 0x2000 if SOC_SERIES_NRF91X || SOC_NRF5340_CPUAPP
|
||||||
help
|
help
|
||||||
RAM region size for the NRF_SPU peripheral
|
RAM region size for the NRF_SPU peripheral
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -63,7 +63,8 @@ config NFCT_PINS_AS_GPIOS
|
||||||
choice NRF_APPROTECT_HANDLING
|
choice NRF_APPROTECT_HANDLING
|
||||||
bool "APPROTECT handling"
|
bool "APPROTECT handling"
|
||||||
depends on SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET || \
|
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
|
default NRF_APPROTECT_USE_UICR
|
||||||
help
|
help
|
||||||
Specifies how the SystemInit() function should handle the APPROTECT
|
Specifies how the SystemInit() function should handle the APPROTECT
|
||||||
|
|
14
soc/arm/nordic_nrf/nrf91/Kconfig.defconfig.nrf9161_SICA
Normal file
14
soc/arm/nordic_nrf/nrf91/Kconfig.defconfig.nrf9161_SICA
Normal file
|
@ -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
|
|
@ -3,21 +3,37 @@
|
||||||
# Copyright (c) 2018 Nordic Semiconductor ASA
|
# Copyright (c) 2018 Nordic Semiconductor ASA
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if SOC_SERIES_NRF91X
|
||||||
|
|
||||||
|
config SOC_NRF9120
|
||||||
|
bool
|
||||||
|
|
||||||
config SOC_NRF9160
|
config SOC_NRF9160
|
||||||
depends on SOC_SERIES_NRF91X
|
|
||||||
bool
|
bool
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "nRF91x MCU Selection"
|
prompt "nRF91x MCU Selection"
|
||||||
depends on SOC_SERIES_NRF91X
|
|
||||||
|
|
||||||
config SOC_NRF9160_SICA
|
config SOC_NRF9160_SICA
|
||||||
bool "NRF9160_SICA"
|
bool "NRF9160_SICA"
|
||||||
select SOC_NRF9160
|
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
|
endchoice
|
||||||
|
|
||||||
config NRF_ENABLE_ICACHE
|
config NRF_ENABLE_ICACHE
|
||||||
bool "Instruction cache (I-Cache)"
|
bool "Instruction cache (I-Cache)"
|
||||||
depends on SOC_NRF9160
|
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
endif # SOC_SERIES_NRF91X
|
||||||
|
|
2
west.yml
2
west.yml
|
@ -83,7 +83,7 @@ manifest:
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
- name: hal_nordic
|
- name: hal_nordic
|
||||||
revision: c4044b04b8bf04f11e3051d5f7a41f3d636b6b0c
|
revision: 140140ea047f441fe076d26f79eb54dc9a38bcb6
|
||||||
path: modules/hal/nordic
|
path: modules/hal/nordic
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue