diff --git a/apps/gateway_lte/Kconfig b/apps/gateway_lte/Kconfig index 68b1ec9fb..e1b297191 100644 --- a/apps/gateway_lte/Kconfig +++ b/apps/gateway_lte/Kconfig @@ -25,11 +25,6 @@ configdefault LTE_PSM_REQ default n configdefault INFUSE_NRF_MODEM_DATA_PROFILE_DEFAULT default 4 -# Shuffle memory to prioritise TX buffers -configdefault NRF_MODEM_LIB_SHMEM_TX_SIZE - default 14336 -configdefault NRF_MODEM_LIB_SHMEM_RX_SIZE - default 8192 # # Defaults for offloaded modem_cellular gateways diff --git a/cmake/sdk_nrf.cmake b/cmake/sdk_nrf.cmake index bd3eaeab7..d1fc3e7ff 100644 --- a/cmake/sdk_nrf.cmake +++ b/cmake/sdk_nrf.cmake @@ -1,11 +1,10 @@ # SDK-NRF helpers -if (NOT CONFIG_BUILD_WITH_TFM) - if (CONFIG_NRF_OBERON) +if(NOT CONFIG_BUILD_WITH_TFM) + if(CONFIG_NRF_OBERON) # Link Oberon MbedTLS backend add_library(mbedcrypto_common INTERFACE) target_link_libraries(mbedcrypto_common INTERFACE - mbedcrypto_oberon_mbedtls_imported mbedcrypto_oberon_imported ) target_include_directories(mbedcrypto_common diff --git a/dts/common/nordic/modem_shmem.dtsi b/dts/common/nordic/modem_shmem.dtsi index 91f28ffb9..af4b240db 100644 --- a/dts/common/nordic/modem_shmem.dtsi +++ b/dts/common/nordic/modem_shmem.dtsi @@ -14,8 +14,8 @@ * - Lowest 64 kB SRAM allocated to Secure image (sram0_s). * - Upper 192 kB SRAM allocated to Non-Secure image (sram0_ns). * Of the memory allocated to the Non-Secure image - * - 24 kB SRAM reserved for and used by the modem library (sram0_ns_modem). - * - 168 kB allocated to the application (sram0_ns_app). + * - 18 kB SRAM reserved for and used by the modem library (sram0_ns_modem). + * - 174 kB allocated to the application (sram0_ns_app). */ sram0_s: sram@0 { /* Secure image memory */ @@ -31,12 +31,30 @@ sram0_ns_modem: sram0_ns@0 { /* Modem (shared) memory */ - reg = <0x0 DT_SIZE_K(24)>; + reg = <0x0 DT_SIZE_K(18)>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 DT_SIZE_K(18)>; + + cpuapp_cpucell_ipc_shm_ctrl: sram0_ns_modem@0 { + /* Modem IPC control */ + reg = <0x0 0x728>; + }; + + cpuapp_cpucell_ipc_shm_heap: sram0_ns_modem@728 { + /* Modem IPC transmit */ + reg = <0x728 0x20d8>; + }; + + cpucell_cpuapp_ipc_shm_heap: sram0_ns_modem@2800 { + /* Modem IPC receive */ + reg = <0x2800 0x2000>; + }; }; sram0_ns_app: sram0_ns@6000 { /* Non-Secure application memory */ - reg = <0x6000 DT_SIZE_K(168)>; + reg = <0x6000 DT_SIZE_K(174)>; }; }; }; diff --git a/dts/common/nordic/modem_shmem_trace.dtsi b/dts/common/nordic/modem_shmem_trace.dtsi new file mode 100644 index 000000000..6f8a9c22d --- /dev/null +++ b/dts/common/nordic/modem_shmem_trace.dtsi @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2026 Embeint Holdings Pty Ltd + * SPDX-License-Identifier: FSL-1.1-ALv2 + */ + + +/* Override default SRAM planning */ +/delete-node/ &sram0_ns_modem; +/delete-node/ &sram0_ns_app; + +/* An extra 16kB of SRAM is required by the modem for trace functionality */ +&sram0_ns { + sram0_ns_modem: sram0_ns@0 { + /* Modem (shared) memory */ + reg = <0x0 DT_SIZE_K(34)>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 DT_SIZE_K(34)>; + + cpuapp_cpucell_ipc_shm_ctrl: sram0_ns_modem@0 { + /* Modem IPC control */ + reg = <0x0 0x728>; + }; + + cpuapp_cpucell_ipc_shm_heap: sram0_ns_modem@728 { + /* Modem IPC transmit */ + reg = <0x728 0x20d8>; + }; + + cpucell_cpuapp_ipc_shm_heap: sram0_ns_modem@2800 { + /* Modem IPC receive */ + reg = <0x2800 0x2000>; + }; + + cpucell_cpuapp_ipc_shm_trace: sram0_ns_modem@4800 { + /* Modem IPC receive */ + reg = <0x4800 DT_SIZE_K(16)>; + }; + }; + + sram0_ns_app: sram0_ns@6000 { + /* Non-Secure application memory */ + reg = <0x6000 DT_SIZE_K(158)>; + }; +}; diff --git a/include/infuse/lib/nrf_modem_lib_sim.h b/include/infuse/lib/nrf_modem_lib_sim.h index 914b9eb21..4ed324fdb 100644 --- a/include/infuse/lib/nrf_modem_lib_sim.h +++ b/include/infuse/lib/nrf_modem_lib_sim.h @@ -10,7 +10,7 @@ #ifndef INFUSE_SDK_INCLUDE_INFUSE_LIB_NRF_MODEM_LIB_SIM_H_ #define INFUSE_SDK_INCLUDE_INFUSE_LIB_NRF_MODEM_LIB_SIM_H_ -#include +#include #ifdef __cplusplus extern "C" { @@ -22,7 +22,7 @@ extern "C" { * @param apn Access Point Name * @param family IP family */ -void nrf_modem_lib_sim_default_pdn_ctx(const char **apn, enum pdn_fam *family); +void nrf_modem_lib_sim_default_pdn_ctx(const char **apn, enum lte_lc_pdn_family *family); /** * @brief Set reported signal strenth and quality diff --git a/kconfig/Kconfig.defaults.nrf b/kconfig/Kconfig.defaults.nrf index e69cd1f3b..d8e947733 100644 --- a/kconfig/Kconfig.defaults.nrf +++ b/kconfig/Kconfig.defaults.nrf @@ -42,10 +42,6 @@ configdefault MODEM_KEY_MGMT default y if INFUSE_SECURITY configdefault NRF_MODEM_LIB_NET_IF_APPLICATION_ERROR_HANDLER default y if INFUSE_NRF_MODEM_MONITOR -configdefault NRF_MODEM_LIB_SHMEM_RX_SIZE - default 12288 -configdefault NRF_MODEM_LIB_SHMEM_TX_SIZE - default 10240 choice NRF_MODEM_LIB_ON_FAULT default NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC endchoice @@ -216,10 +212,20 @@ config ZEPHYR_NRF_MODULE bool config SOC_NRF54LV10A bool +config SOC_NRF54LS05A + bool +config SOC_NRF54LS05A_CPUAPP + bool config SOC_NRF54LS05B bool config SOC_NRF54LS05B_CPUAPP bool +config SOC_NRF54LV10A + bool +config SOC_NRF54LV10A_CPUAPP + bool +config SOC_NRF54LV10A_CPUFLPR + bool config NORDIC_SECURITY_BACKEND bool config UNITY diff --git a/lib/modem_monitor/modem_nrf9x/nrf_modem_lib_sim.c b/lib/modem_monitor/modem_nrf9x/nrf_modem_lib_sim.c index b25f04ab1..1f36502a9 100644 --- a/lib/modem_monitor/modem_nrf9x/nrf_modem_lib_sim.c +++ b/lib/modem_monitor/modem_nrf9x/nrf_modem_lib_sim.c @@ -15,7 +15,6 @@ #include #include #include -#include LOG_MODULE_REGISTER(nrf_modem_sim, LOG_LEVEL_INF); @@ -167,11 +166,12 @@ void nrf_modem_fault_handler(struct nrf_modem_fault_info *fault_info) } static char pdn_default_apn[32]; -static enum pdn_fam pdn_default_fam; +static enum lte_lc_pdn_family pdn_default_fam; -int pdn_ctx_configure(uint8_t cid, const char *apn, enum pdn_fam family, struct pdn_pdp_opt *opts) +int pdn_ctx_configure(uint8_t cid, const char *apn, enum lte_lc_pdn_family family, + struct lte_lc_pdn_pdp_context_opts *opt) { - ARG_UNUSED(opts); + ARG_UNUSED(opt); if (cid != 0) { return 0; @@ -181,7 +181,7 @@ int pdn_ctx_configure(uint8_t cid, const char *apn, enum pdn_fam family, struct return 0; } -void nrf_modem_lib_sim_default_pdn_ctx(const char **apn, enum pdn_fam *family) +void nrf_modem_lib_sim_default_pdn_ctx(const char **apn, enum lte_lc_pdn_family *family) { *apn = pdn_default_apn; *family = pdn_default_fam; diff --git a/lib/modem_monitor/modem_nrf9x/nrf_modem_monitor.c b/lib/modem_monitor/modem_nrf9x/nrf_modem_monitor.c index 6da38bf20..10748aad7 100644 --- a/lib/modem_monitor/modem_nrf9x/nrf_modem_monitor.c +++ b/lib/modem_monitor/modem_nrf9x/nrf_modem_monitor.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/samples/nrf91x1_emc_shell/app.overlay b/samples/nrf91x1_emc_shell/app.overlay new file mode 100644 index 000000000..daa3c3d18 --- /dev/null +++ b/samples/nrf91x1_emc_shell/app.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2026 Embeint Holdings Pty Ltd + * SPDX-License-Identifier: FSL-1.1-ALv2 + * + * Infuse snippet not included in build, but we still need + * the devicetree based memory configuration. + */ + +#include diff --git a/snippets/modem_trace/snippet.yml b/snippets/modem_trace/snippet.yml index 89aba386d..002daddc7 100644 --- a/snippets/modem_trace/snippet.yml +++ b/snippets/modem_trace/snippet.yml @@ -5,7 +5,7 @@ boards: append: EXTRA_DTC_OVERLAY_FILE: trace_uart1.overlay EXTRA_CONF_FILE: trace_uart1.conf - tauro(2)?/nrf9151/ns: + /tauro(2)?/nrf9151/ns/: append: EXTRA_DTC_OVERLAY_FILE: trace_rtt.overlay EXTRA_CONF_FILE: trace_rtt.conf diff --git a/snippets/modem_trace/trace_shmem.dtsi b/snippets/modem_trace/trace_shmem.dtsi index 698f4d3e5..96bca72de 100644 --- a/snippets/modem_trace/trace_shmem.dtsi +++ b/snippets/modem_trace/trace_shmem.dtsi @@ -4,18 +4,4 @@ * SPDX-License-Identifier: FSL-1.1-ALv2 */ -/* Allocate more memory to the modem library to enable tracing */ -/delete-node/ &sram0_ns_modem; -/delete-node/ &sram0_ns_app; - -&sram0_ns { - sram0_ns_modem: sram0_ns@0 { - /* Modem (shared) memory */ - reg = <0x0 DT_SIZE_K(40)>; - }; - - sram0_ns_app: sram0_ns@a000 { - /* Non-Secure application memory */ - reg = <0xa000 DT_SIZE_K(152)>; - }; -}; +#include diff --git a/tests/net/nrf_modem_lib/src/main.c b/tests/net/nrf_modem_lib/src/main.c index d74020324..b85d877e6 100644 --- a/tests/net/nrf_modem_lib/src/main.c +++ b/tests/net/nrf_modem_lib/src/main.c @@ -27,7 +27,6 @@ #include #include #include -#include K_SEM_DEFINE(reboot_request, 0, 1); @@ -161,7 +160,7 @@ ZTEST(infuse_nrf_modem_monitor, test_integration) struct lte_modem_network_state net_state; struct nrf_modem_fault_info fault_info = {0}; char ipv4_addr[NET_IPV4_ADDR_LEN] = {0}; - enum pdn_fam default_family; + enum lte_lc_pdn_family default_family; const char *default_apn; struct net_if_addr *added; int rc; @@ -213,14 +212,14 @@ ZTEST(infuse_nrf_modem_monitor, test_integration) zassert_equal(LTE_LC_SYSTEM_MODE_LTEM_NBIOT_GPS, net_modes.modes); zassert_equal(CONFIG_LTE_MODE_PREFERENCE_VALUE, net_modes.prefer); kv_store_read(KV_KEY_LTE_PDP_CONFIG, &pdp_config, sizeof(pdp_config)); - zassert_equal(PDN_FAM_IPV4V6, pdp_config.family); + zassert_equal(LTE_LC_PDN_FAM_IPV4V6, pdp_config.family); zassert_mem_equal(CONFIG_INFUSE_MODEM_MONITOR_DEFAULT_PDP_APN, pdp_config.apn.value, strlen(CONFIG_INFUSE_MODEM_MONITOR_DEFAULT_PDP_APN)); nrf_modem_lib_sim_default_pdn_ctx(&default_apn, &default_family); zassert_mem_equal(CONFIG_INFUSE_MODEM_MONITOR_DEFAULT_PDP_APN, default_apn, strlen(CONFIG_INFUSE_MODEM_MONITOR_DEFAULT_PDP_APN)); - zassert_equal(PDN_FAM_IPV4V6, default_family); + zassert_equal(LTE_LC_PDN_FAM_IPV4V6, default_family); lte_modem_monitor_network_state(&net_state); zassert_equal(CELLULAR_REGISTRATION_NOT_REGISTERED, net_state.nw_reg_status); diff --git a/west.yml b/west.yml index 7668196fe..ce773c691 100644 --- a/west.yml +++ b/west.yml @@ -16,7 +16,7 @@ manifest: projects: - name: zephyr - revision: fe7450e87bbf6754e1d36ffb144f85e92ebcb5f8 + revision: 92e97b3f42b59c633c30a476659043d92cf79fd0 # Limit imported repositories to reduce clone time import: name-allowlist: @@ -46,7 +46,7 @@ manifest: path: bootloader/mcuboot - name: sdk-nrf path: modules/nrfconnect/sdk-nrf - revision: 83ef0d4927200d63a10fe4017f2ebf61a7200b93 + revision: 03a09cfce8cf1a2ff956badae7efdd3fcfed7d8f import: true - name: memfault-firmware-sdk path: modules/lib/memfault