From 2db35375e0972480561b03dd7ad9d770e566f3c6 Mon Sep 17 00:00:00 2001 From: Lukasz Stepnicki Date: Thu, 3 Oct 2024 21:37:38 +0200 Subject: [PATCH 01/12] [nrf fromtree] boards: nordic: ipc node added dcache alignement dcache-alignement needs to be defined for ipc to have consistent memory organization on both endpoints, when shared memory is cacheable. nrf54h20 and nrf9280 are using cacheable shared memory. This is applied for ipc with icmsg backend. Signed-off-by: Lukasz Stepnicki (cherry picked from commit 022122d659a7c10180b8a91c6a0b49874f2850fa) (cherry picked from commit 6565fcdc8710f584810bb40f7810302c7426961a) --- boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi | 6 ++++++ boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-ipc_conf.dtsi | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi index fdc93408dd3..94cda5e8ee2 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi @@ -9,6 +9,7 @@ cpusec_cpuapp_ipc: ipc-1-2 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpusec_bellboard 12>, <&cpuapp_bellboard 0>; }; @@ -16,6 +17,7 @@ cpusec_cpurad_ipc: ipc-1-3 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpusec_bellboard 18>, <&cpurad_bellboard 0>; }; @@ -31,6 +33,7 @@ cpuapp_cpusys_ipc: ipc-2-12 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpuapp_bellboard 6>, <&cpusys_vevif 12>; }; @@ -38,6 +41,7 @@ cpuapp_cpuppr_ipc: ipc-2-13 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpuapp_bellboard 13>, <&cpuppr_vevif 12>; }; @@ -45,6 +49,7 @@ cpuapp_cpuflpr_ipc: ipc-2-14 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpuapp_bellboard 14>, <&cpuflpr_vevif 16>; }; @@ -52,6 +57,7 @@ cpurad_cpusys_ipc: ipc-3-12 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpurad_bellboard 6>, <&cpusys_vevif 18>; }; diff --git a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-ipc_conf.dtsi b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-ipc_conf.dtsi index 906342f6f3d..0588e8d0801 100644 --- a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-ipc_conf.dtsi +++ b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-ipc_conf.dtsi @@ -9,6 +9,7 @@ cpusec_cpuapp_ipc: ipc-1-2 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpusec_bellboard 12>, <&cpuapp_bellboard 0>; }; @@ -16,6 +17,7 @@ cpusec_cpurad_ipc: ipc-1-3 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpusec_bellboard 18>, <&cpurad_bellboard 0>; }; @@ -31,6 +33,7 @@ cpuapp_cpusys_ipc: ipc-2-12 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpuapp_bellboard 6>, <&cpusys_vevif 12>; }; @@ -38,6 +41,7 @@ cpuapp_cpuppr_ipc: ipc-2-13 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpuapp_bellboard 13>, <&cpuppr_vevif 12>; }; @@ -45,6 +49,7 @@ cpurad_cpusys_ipc: ipc-3-12 { compatible = "zephyr,ipc-icmsg"; status = "disabled"; + dcache-alignment = <32>; mboxes = <&cpurad_bellboard 6>, <&cpusys_vevif 18>; }; From f591b1b63bd3aad270fd90c1c03eba4d71f7c72f Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Tue, 22 Oct 2024 14:19:46 +0200 Subject: [PATCH 02/12] [nrf fromtree] drivers: cache: Enable LINEADDR workaround on nRF54H20 EngB Just like on nRF54H20 EngC. Signed-off-by: Grzegorz Swiderski (cherry picked from commit 41f53b209169f967cb43bc59f2f730f6f838a5eb) (cherry picked from commit 45109fcae351dc16ef4a2593d1b7f2526203871e) --- drivers/cache/Kconfig.nrf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cache/Kconfig.nrf b/drivers/cache/Kconfig.nrf index c1cfc2c8c58..ffcbfe66d19 100644 --- a/drivers/cache/Kconfig.nrf +++ b/drivers/cache/Kconfig.nrf @@ -10,6 +10,6 @@ config CACHE_NRF_CACHE config CACHE_NRF_PATCH_LINEADDR bool "Patch lineaddr" - default y if SOC_NRF54H20 + default y if SOC_NRF54H20 || SOC_NRF54H20_ENGB help Manually set 28th bit in the LINEADDR in Trustzone Secure build. From fd1e78d890f491b4287ab15f0c859edf83c9c2ed Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Tue, 22 Oct 2024 14:19:46 +0200 Subject: [PATCH 03/12] [nrf fromtree] modules: hal_nordic: Disable 802.15.4 temp update on nRF54H20 EngB Just like on nRF54H20 EngC. Signed-off-by: Grzegorz Swiderski (cherry picked from commit 3f221f9577e33eeee37442d8a22f049c1f1a1f65) (cherry picked from commit 2e2bd810349a677621c19a395585dd1a98917c7d) --- modules/hal_nordic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hal_nordic/Kconfig b/modules/hal_nordic/Kconfig index dd4e0a0859b..9d54c15d715 100644 --- a/modules/hal_nordic/Kconfig +++ b/modules/hal_nordic/Kconfig @@ -55,7 +55,7 @@ endchoice config NRF_802154_TEMPERATURE_UPDATE bool "nRF 802.15.4 temperature update" - default y if !SOC_NRF54H20 + default y if !SOC_NRF54H20 && !SOC_NRF54H20_ENGB help Enable temperature update for nRF 802.15.4 driver From 8ae33d20e9b634952dcf609b7fecd7de20eabd18 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Tue, 22 Oct 2024 14:19:46 +0200 Subject: [PATCH 04/12] [nrf fromtree] modules: hal_nordic: nrfs: Enable DVFS service on nRF54H20 EngB Just like on nRF54H20 EngC. Signed-off-by: Grzegorz Swiderski (cherry picked from commit 0379424b4372eeecf15e57938a74cd4c44ac55f1) (cherry picked from commit da8cc84c1f828f0cfe5d9f406424b8dcf10a1778) --- modules/hal_nordic/nrfs/Kconfig | 2 +- modules/hal_nordic/nrfs/dvfs/ld_dvfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hal_nordic/nrfs/Kconfig b/modules/hal_nordic/nrfs/Kconfig index 3eee664e480..8325c8db3bc 100644 --- a/modules/hal_nordic/nrfs/Kconfig +++ b/modules/hal_nordic/nrfs/Kconfig @@ -106,7 +106,7 @@ config NRFS_PMIC_SERVICE_ENABLED config NRFS_DVFS_SERVICE_ENABLED bool "DVFS service" depends on NRFS_HAS_DVFS_SERVICE - default y if SOC_NRF54H20_CPUAPP || SOC_NRF9280_CPUAPP + default y if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_ENGB_CPUAPP || SOC_NRF9280_CPUAPP config NRFS_DIAG_SERVICE_ENABLED bool "System Diagnostics service (only for development purposes)" diff --git a/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c b/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c index 1faffbdb3c2..57ee0bdc375 100644 --- a/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c +++ b/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c @@ -269,7 +269,7 @@ int32_t ld_dvfs_configure_hsfll(enum dvfs_frequency_setting oppoint) freq_trim = 2; } -#if defined(CONFIG_SOC_NRF54H20_CPUAPP) || defined(CONFIG_SOC_NRF9280_CPUAPP) +#if defined(NRF_APPLICATION) hsfll_trim.vsup = NRF_FICR->TRIM.APPLICATION.HSFLL.TRIM.VSUP; hsfll_trim.coarse = NRF_FICR->TRIM.APPLICATION.HSFLL.TRIM.COARSE[freq_trim]; hsfll_trim.fine = NRF_FICR->TRIM.APPLICATION.HSFLL.TRIM.FINE[freq_trim]; From da423f6f54ff8296567a9ea2bd975ad76b74afba Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Tue, 22 Oct 2024 14:19:46 +0200 Subject: [PATCH 05/12] [nrf fromtree] logging: stmesp: Do not append strings on nRF54H20 EngB VPRs Just like on nRF54H20 EngC. Signed-off-by: Grzegorz Swiderski (cherry picked from commit bcf6a91689eb507d9548fee84866a8b9c4402043) (cherry picked from commit bbb0afee8839982e65aaeb9581639101e506391b) --- subsys/logging/frontends/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subsys/logging/frontends/Kconfig b/subsys/logging/frontends/Kconfig index c232eb7354a..4d6d85e3e88 100644 --- a/subsys/logging/frontends/Kconfig +++ b/subsys/logging/frontends/Kconfig @@ -46,8 +46,9 @@ config LOG_FRONTEND_STMESP_DICT config LOG_FRONTEND_STMESP_FSC bool "Send fully self-contained messages" - select LOG_MSG_APPEND_RO_STRING_LOC if (!NRF_ETR && !SOC_NRF54H20_CPUPPR && \ - !SOC_NRF54H20_CPUFLPR) + select LOG_MSG_APPEND_RO_STRING_LOC if !(NRF_ETR || \ + SOC_NRF54H20_CPUPPR || SOC_NRF54H20_ENGB_CPUPPR || \ + SOC_NRF54H20_CPUFLPR || SOC_NRF54H20_ENGB_CPUFLPR) config LOG_FRONTEND_STMESP_FLUSH_COUNT int "Number of flushing words" From 9b618021ea922cd2b1c5aa3278c0bdd1ba0e270c Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Wed, 23 Oct 2024 12:48:27 +0200 Subject: [PATCH 06/12] [nrf noup] soc: nordic: Enable VPR launcher on nRF54H20 EngB Just like on nRF54H20 EngC. Applied as noup due to conflicts. Signed-off-by: Grzegorz Swiderski (cherry picked from commit ac692027c2b7560c22bb249d1ad8def1f3da16c8) --- soc/nordic/common/vpr/Kconfig.sysbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/nordic/common/vpr/Kconfig.sysbuild b/soc/nordic/common/vpr/Kconfig.sysbuild index 54464f10bc4..cfa42dd8667 100644 --- a/soc/nordic/common/vpr/Kconfig.sysbuild +++ b/soc/nordic/common/vpr/Kconfig.sysbuild @@ -4,7 +4,7 @@ config VPR_LAUNCHER bool "VPR launcher" default y - depends on (SOC_NRF54H20_CPUPPR || SOC_NRF54H20_CPUFLPR || SOC_NRF54L15_ENGA_CPUFLPR || SOC_NRF54L15_CPUFLPR || SOC_NRF9280_CPUPPR) + depends on (SOC_NRF54H20_CPUPPR || SOC_NRF54H20_ENGB_CPUPPR || SOC_NRF54H20_CPUFLPR || SOC_NRF54H20_ENGB_CPUFLPR || SOC_NRF54L15_ENGA_CPUFLPR || SOC_NRF54L15_CPUFLPR || SOC_NRF9280_CPUPPR) help Include VPR launcher in build. VPR launcher is a minimal sample built for an ARM core that starts given VPR core. From 86294deb03ac910bea2841d11a48a86be3ae86e7 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Wed, 23 Oct 2024 09:48:01 +0200 Subject: [PATCH 07/12] [nrf fromtree] drivers: adc: nrfx_saadc: Use CONFIG_NRF_PLATFORM_HALTIUM Apply it in a few more locations that were missed in 5a4655f69fb2c006a4ee0ddcfe4372066b0cb138. Signed-off-by: Grzegorz Swiderski (cherry picked from commit 96f08d53a482beb8867861f230adaf79955bb7c0) (cherry picked from commit 787033713f37411d6c23146d7304f0273e6d5972) --- drivers/adc/adc_nrfx_saadc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/adc/adc_nrfx_saadc.c b/drivers/adc/adc_nrfx_saadc.c index e4c37a1f736..b8782d02454 100644 --- a/drivers/adc/adc_nrfx_saadc.c +++ b/drivers/adc/adc_nrfx_saadc.c @@ -66,9 +66,9 @@ BUILD_ASSERT((NRF_SAADC_AIN0 == NRF_SAADC_INPUT_AIN0) && "Definitions from nrf-adc.h do not match those from nrf_saadc.h"); #endif -#if defined(CONFIG_SOC_NRF54H20) || defined(CONFIG_SOC_NRF9280) +#if defined(CONFIG_NRF_PLATFORM_HALTIUM) -/* nRF54H20 and nRF9280 always use bounce buffers in RAM */ +/* Haltium devices always use bounce buffers in RAM */ #define SAADC_MEMORY_SECTION \ COND_CODE_1(DT_NODE_HAS_PROP(DT_NODELABEL(adc), memory_regions), \ @@ -80,7 +80,7 @@ static uint16_t adc_samples_buffer[SAADC_CH_NUM] SAADC_MEMORY_SECTION; #define ADC_BUFFER_IN_RAM -#endif /* defined(CONFIG_SOC_NRF54H20) || defined(CONFIG_SOC_NRF9280) */ +#endif /* defined(CONFIG_NRF_PLATFORM_HALTIUM) */ struct driver_data { struct adc_context ctx; @@ -669,7 +669,7 @@ static const struct adc_driver_api adc_nrfx_driver_api = { #endif #if defined(CONFIG_SOC_NRF54L15) .ref_internal = 900, -#elif defined(CONFIG_SOC_NRF54H20) || defined(CONFIG_SOC_NRF9280) +#elif defined(CONFIG_NRF_PLATFORM_HALTIUM) .ref_internal = 1024, #else .ref_internal = 600, From afcfbf808690070bcfc294d5070f93ec91dd05e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Amundsen?= Date: Mon, 7 Oct 2024 15:43:13 +0200 Subject: [PATCH 08/12] [nrf fromtree] dts: update memory map and remove ext-uicr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extended UICR will not be used as its configurations will be merged with the UICR registers in NVR. Memory maps changes are needed to align with pre compiled firmware. Signed-off-by: HÃ¥kon Amundsen Signed-off-by: Jonathan Nilsen (cherry picked from commit 26603cefaf41298c417f2eee834ed40d9ab35d3a) (cherry picked from commit 70f83512f952d167a8b0754503f8a27154caec43) --- .../nrf54h20dk/nrf54h20dk_nrf54h20_0_8_0.dtsi | 15 +++++++++++++++ .../nrf54h20dk_nrf54h20_cpuapp_0_8_0.overlay | 7 +++++++ .../nrf54h20dk_nrf54h20_cpuflpr_0_8_0.overlay | 7 +++++++ .../nrf54h20dk_nrf54h20_cpuppr_0_8_0.overlay | 7 +++++++ .../nrf54h20dk_nrf54h20_cpurad_0_8_0.overlay | 7 +++++++ dts/bindings/arm/nordic,nrf-uicr-v2.yaml | 7 ------- dts/common/nordic/nrf54h20.dtsi | 14 ++------------ dts/common/nordic/nrf9280.dtsi | 10 ---------- 8 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_0_8_0.dtsi create mode 100644 boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.overlay create mode 100644 boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.overlay create mode 100644 boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.overlay create mode 100644 boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.overlay diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_0_8_0.dtsi b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_0_8_0.dtsi new file mode 100644 index 00000000000..940ac4d2391 --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_0_8_0.dtsi @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/delete-node/ &suit_storage_partition; + +/ { + reserved-memory { + suit_storage_partition: memory@e1eb000 { + reg = <0xe1eb000 DT_SIZE_K(24)>; + }; + }; +}; diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.overlay b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.overlay new file mode 100644 index 00000000000..dfee18c5b6f --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_8_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf54h20dk_nrf54h20_0_8_0.dtsi" diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.overlay b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.overlay new file mode 100644 index 00000000000..dfee18c5b6f --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuflpr_0_8_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf54h20dk_nrf54h20_0_8_0.dtsi" diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.overlay b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.overlay new file mode 100644 index 00000000000..dfee18c5b6f --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr_0_8_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf54h20dk_nrf54h20_0_8_0.dtsi" diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.overlay b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.overlay new file mode 100644 index 00000000000..dfee18c5b6f --- /dev/null +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad_0_8_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf54h20dk_nrf54h20_0_8_0.dtsi" diff --git a/dts/bindings/arm/nordic,nrf-uicr-v2.yaml b/dts/bindings/arm/nordic,nrf-uicr-v2.yaml index f509fdf4061..9000cce94c5 100644 --- a/dts/bindings/arm/nordic,nrf-uicr-v2.yaml +++ b/dts/bindings/arm/nordic,nrf-uicr-v2.yaml @@ -17,10 +17,3 @@ properties: description: | Domain ID of the domain associated with this UICR instance. Must be unique across all UICR instances in the system. - - ptr-ext-uicr: - type: phandle - required: true - description: | - Handle of a memory region reserved to contain an Extended UICR instance. - The address of that node will be stored in the UICR.PTREXTUICR register. diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index 9af1488fd1b..c448455c579 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -148,16 +148,8 @@ #address-cells = <1>; #size-cells = <1>; - suit_storage_partition: memory@e1eb000 { - reg = <0xe1eb000 DT_SIZE_K(24)>; - }; - - cpurad_uicr_ext: memory@e1ff000 { - reg = <0xe1ff000 DT_SIZE_K(2)>; - }; - - cpuapp_uicr_ext: memory@e1ff800 { - reg = <0xe1ff800 DT_SIZE_K(2)>; + suit_storage_partition: memory@e1ed000 { + reg = <0xe1ed000 DT_SIZE_K(20)>; }; }; @@ -220,14 +212,12 @@ compatible = "nordic,nrf-uicr-v2"; reg = <0xfff8000 DT_SIZE_K(2)>; domain = <2>; - ptr-ext-uicr = <&cpuapp_uicr_ext>; }; cpurad_uicr: uicr@fffa000 { compatible = "nordic,nrf-uicr-v2"; reg = <0xfffa000 DT_SIZE_K(2)>; domain = <3>; - ptr-ext-uicr = <&cpurad_uicr_ext>; }; ficr: ficr@fffe000 { diff --git a/dts/common/nordic/nrf9280.dtsi b/dts/common/nordic/nrf9280.dtsi index 9949f6c9f1c..ae3ffc904d2 100644 --- a/dts/common/nordic/nrf9280.dtsi +++ b/dts/common/nordic/nrf9280.dtsi @@ -74,14 +74,6 @@ reserved-memory { #address-cells = <1>; #size-cells = <1>; - - cpurad_uicr_ext: memory@e401000 { - reg = <0xe401000 DT_SIZE_K(2)>; - }; - - cpuapp_uicr_ext: memory@e401800 { - reg = <0xe401800 DT_SIZE_K(2)>; - }; }; clocks { @@ -113,14 +105,12 @@ compatible = "nordic,nrf-uicr-v2"; reg = <0xfff8000 DT_SIZE_K(2)>; domain = <2>; - ptr-ext-uicr = <&cpuapp_uicr_ext>; }; cpurad_uicr: uicr@fffa000 { compatible = "nordic,nrf-uicr-v2"; reg = <0xfffa000 DT_SIZE_K(2)>; domain = <3>; - ptr-ext-uicr = <&cpurad_uicr_ext>; }; ficr: ficr@fffe000 { From 1c22d7e9fcba1a629dd12a21db592b647738766e Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Tue, 22 Oct 2024 13:34:47 +0200 Subject: [PATCH 09/12] [nrf fromtree] modules: hal_nordic: Require nrf-regtool 7.0.0 Some upcoming changes require this version. Signed-off-by: Carles Cufi (cherry picked from commit 45fbc31a3f0065f0c5a54ab3cf8cd2d38afdc8a3) (cherry picked from commit 285fcbe059faa0ae5f7b83a6f569de1b2531e8eb) --- modules/hal_nordic/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hal_nordic/CMakeLists.txt b/modules/hal_nordic/CMakeLists.txt index eb85fd58f5e..3bed5a033b5 100644 --- a/modules/hal_nordic/CMakeLists.txt +++ b/modules/hal_nordic/CMakeLists.txt @@ -15,7 +15,7 @@ if(CONFIG_NRF_REGTOOL_GENERATE_BICR) list(APPEND nrf_regtool_components GENERATE:BICR) endif() if(DEFINED nrf_regtool_components) - find_package(nrf-regtool 5.6.0 REQUIRED + find_package(nrf-regtool 7.0.0 REQUIRED COMPONENTS ${nrf_regtool_components} PATHS ${CMAKE_CURRENT_LIST_DIR}/nrf-regtool NO_CMAKE_PATH From 4d511264db0254e13927e0385890b5cb06de9d36 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Mon, 28 Oct 2024 12:08:43 +0100 Subject: [PATCH 10/12] Revert "[nrf fromlist] dts: arm: nordic: Add power states for nRF54H20" This reverts commit 13aa40441e2262a9c4406c70364eea45f2799f71. Signed-off-by: Grzegorz Swiderski (cherry picked from commit 473649eddb46124a3ff887bfcd0a1b131921de1a) --- dts/common/nordic/nrf54h20.dtsi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index c448455c579..bf2cd072f37 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -30,7 +30,7 @@ device_type = "cpu"; clocks = <&cpuapp_hsfll>; clock-frequency = ; - cpu-power-states = <&idle_cache_disabled &s2ram>; + cpu-power-states = <&idle &s2ram>; }; cpurad: cpu@3 { @@ -39,7 +39,6 @@ device_type = "cpu"; clocks = <&cpurad_hsfll>; clock-frequency = ; - cpu-power-states = <&idle_cache_disabled>; }; cpuppr: cpu@d { @@ -128,14 +127,12 @@ }; power-states { - // substate-id = <0>; is reserved for "idle", cache powered on - // substate-id = <1>; is reserved for "idle-cache-retained" - idle_cache_disabled: idle_cache_disabled { + idle: idle { compatible = "zephyr,power-state"; power-state-name = "suspend-to-idle"; - substate-id = <2>; min-residency-us = <100000>; }; + s2ram: s2ram { compatible = "zephyr,power-state"; power-state-name = "suspend-to-ram"; From 2e60411d65a5916cacd52be75871b8180e436777 Mon Sep 17 00:00:00 2001 From: Adam Kondraciuk Date: Wed, 2 Oct 2024 10:39:56 +0200 Subject: [PATCH 11/12] [nrf fromlist] dts: arm: nordic: Add power states for nRF54H20 Upstream PR #: 79067 Add `idle` and `s2ram` power states for nRF54H20 cpuapp and cpurad. Also the substate `idle_cache_disable` added. Signed-off-by: Adam Kondraciuk (cherry picked from commit 19a2be222d94985e349766a1e1ba7264d6d2bc0a) (cherry picked from commit 1eef25baf4e477a03d8c070cdbe11465d86a80e6) --- dts/common/nordic/nrf54h20.dtsi | 9 ++++++--- soc/nordic/nrf54h/power.c | 10 +++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index bf2cd072f37..c448455c579 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -30,7 +30,7 @@ device_type = "cpu"; clocks = <&cpuapp_hsfll>; clock-frequency = ; - cpu-power-states = <&idle &s2ram>; + cpu-power-states = <&idle_cache_disabled &s2ram>; }; cpurad: cpu@3 { @@ -39,6 +39,7 @@ device_type = "cpu"; clocks = <&cpurad_hsfll>; clock-frequency = ; + cpu-power-states = <&idle_cache_disabled>; }; cpuppr: cpu@d { @@ -127,12 +128,14 @@ }; power-states { - idle: idle { + // substate-id = <0>; is reserved for "idle", cache powered on + // substate-id = <1>; is reserved for "idle-cache-retained" + idle_cache_disabled: idle_cache_disabled { compatible = "zephyr,power-state"; power-state-name = "suspend-to-idle"; + substate-id = <2>; min-residency-us = <100000>; }; - s2ram: s2ram { compatible = "zephyr,power-state"; power-state-name = "suspend-to-ram"; diff --git a/soc/nordic/nrf54h/power.c b/soc/nordic/nrf54h/power.c index 1a59320d80b..8b73dbaee30 100644 --- a/soc/nordic/nrf54h/power.c +++ b/soc/nordic/nrf54h/power.c @@ -68,7 +68,7 @@ void nrf_poweroff(void) nrf_resetinfo_resetreas_local_set(NRF_RESETINFO, 0); nrf_resetinfo_restore_valid_set(NRF_RESETINFO, false); -#if !defined(CONFIG_SOC_NRF54H20_CPURAD) +#if !defined(NRF_RADIOCORE) /* Disable retention */ nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_MAIN, false); nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false); @@ -98,7 +98,7 @@ static void s2idle_enter(uint8_t substate_id) case 1: /* Substate for idle with cache retained - not implemented yet. */ break; case 2: /* Substate for idle with cache disabled. */ -#if !defined(CONFIG_SOC_NRF54H20_CPURAD) +#if !defined(NRF_RADIOCORE) soc_lrcconf_poweron_request(node, NRF_LRCCONF_POWER_MAIN); #endif common_suspend(); @@ -127,7 +127,7 @@ static void s2idle_exit(uint8_t substate_id) break; case 2: /* Substate for idle with cache disabled. */ common_resume(); -#if !defined(CONFIG_SOC_NRF54H20_CPURAD) +#if !defined(NRF_RADIOCORE) soc_lrcconf_poweron_release(node, NRF_LRCCONF_POWER_MAIN); #endif default: /* Unknown substate. */ @@ -140,7 +140,7 @@ static void s2idle_exit(uint8_t substate_id) static void s2ram_exit(void) { common_resume(); -#if !defined(CONFIG_SOC_NRF54H20_CPURAD) +#if !defined(NRF_RADIOCORE) /* Re-enable domain retention. */ nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, true); #endif @@ -156,7 +156,7 @@ static int sys_suspend_to_ram(void) NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK); nrf_resetinfo_restore_valid_set(NRF_RESETINFO, true); -#if !defined(CONFIG_SOC_NRF54H20_CPURAD) +#if !defined(NRF_RADIOCORE) /* Disable retention */ nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false); #endif From 653b3234a53cb9a9ffeb57141dac5ab93521b041 Mon Sep 17 00:00:00 2001 From: Jonathan Nilsen Date: Wed, 23 Oct 2024 12:30:31 +0200 Subject: [PATCH 12/12] [nrf noup] scripts: west_commands: runners: nrf: workarounds for SDFW v8.0.0 SDFW v8.0.0 introduces certain changes that require matching changes in nrfutil device to ensure that west flash works properly on nrf54h20dk and nrf9280pdk. This commit adds a few temporary workarounds to ensure that west flash works with an older nrfutil device version as well: 1. Don't erase UICR, as this tries to erase the extended UICR regions as well, and those regions no longer exist (resulting in an error). 2. Reset after erasing domains with west flash --erase. This is needed for the memory owned by the different domains to be freely accessible and able to be allocated to different domains. 2. Unless doing a west flash --erase, do a RESET_VIA_SECDOM reset before programming firmware. This ensures that all the cores are stopped before writing firmware. Removing the UICR erase step seemed to cause some instability when programming, which is suspected to be caused by the firmware running while programming. Signed-off-by: Jonathan Nilsen (cherry picked from commit 08f1c5bc9f202932467d1ba8c0398c8093d29fa4) --- scripts/west_commands/runners/nrf_common.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/west_commands/runners/nrf_common.py b/scripts/west_commands/runners/nrf_common.py index 6423253233c..a42e841bdbd 100644 --- a/scripts/west_commands/runners/nrf_common.py +++ b/scripts/west_commands/runners/nrf_common.py @@ -273,6 +273,11 @@ def program_hex(self): if self.erase: self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION') self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK') + # A reset is needed if repartitioning the device memory + self.reset_target() + else: + # Ensure that firmware is not executing while erasing/programming + self.exec_op("reset", option="RESET_VIA_SECDOM") # Manage SUIT artifacts. # This logic should be executed only once per build. @@ -298,16 +303,8 @@ def program_hex(self): self.op_program(app_root_envelope_hex_file, 'ERASE_NONE', None, defer=True, core='NRFDL_DEVICE_CORE_APPLICATION') if cpuapp: - if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): - self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION', - option={'chip_erase_mode': 'ERASE_UICR', - 'qspi_erase_mode': 'ERASE_NONE'}) core = 'NRFDL_DEVICE_CORE_APPLICATION' elif cpurad: - if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): - self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK', - option={'chip_erase_mode': 'ERASE_UICR', - 'qspi_erase_mode': 'ERASE_NONE'}) core = 'NRFDL_DEVICE_CORE_NETWORK' else: if self.erase: