From fa4654cbd3c47a5802f40f2f6bc507d7dd2035a1 Mon Sep 17 00:00:00 2001 From: Karsten Koenig Date: Wed, 30 Oct 2024 13:16:56 +0100 Subject: [PATCH 1/2] dts: bindings: arm: nordic: tddconf: Add etrbuffer Introduce etrbuffer in the tddconf bindings to support flexible placement in the memory map. Signed-off-by: Karsten Koenig --- dts/bindings/arm/nordic,nrf-tddconf.yaml | 4 ++++ snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay | 1 + snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay | 1 + 3 files changed, 6 insertions(+) diff --git a/dts/bindings/arm/nordic,nrf-tddconf.yaml b/dts/bindings/arm/nordic,nrf-tddconf.yaml index 46f9a0e7b2d..2273082c12f 100644 --- a/dts/bindings/arm/nordic,nrf-tddconf.yaml +++ b/dts/bindings/arm/nordic,nrf-tddconf.yaml @@ -38,3 +38,7 @@ properties: - 1 - 2 - 3 + + etrbuffer: + description: phandle to the memory region used for the ETR buffer + type: phandle diff --git a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay index d620b83872f..fec54817364 100644 --- a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay @@ -12,4 +12,5 @@ etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR | NRF_TDDCONF_SOURCE_STMFLPR)>; portconfig = <0>; + etrbuffer = <&etr_buffer>; }; diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay index d620b83872f..fec54817364 100644 --- a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay @@ -12,4 +12,5 @@ etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR | NRF_TDDCONF_SOURCE_STMFLPR)>; portconfig = <0>; + etrbuffer = <&etr_buffer>; }; From d48285231937f0091495fbe200788bbd839f39a4 Mon Sep 17 00:00:00 2001 From: Karsten Koenig Date: Thu, 14 Nov 2024 10:14:36 +0100 Subject: [PATCH 2/2] boards: nordic: nrf54h20dk: Remove etr_buffer Move the etr_buffer definition into an overlay so the region is unallocated by default. Signed-off-by: Karsten Koenig --- .../nrf54h20dk_nrf54h20-memory_map.dtsi | 15 --------------- .../nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts | 4 ---- .../boards/nrf54h20_cpuapp.overlay | 18 ++++++++++++++++++ .../boards/nrf54h20_cpuapp.overlay | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi index 2b2473f92b5..6e25fa9a4e7 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi @@ -47,21 +47,6 @@ }; }; - etr_buf_ram0x_region: memory@2f0be000 { - compatible = "nordic,owned-memory"; - reg = <0x2f0be000 DT_SIZE_K(4)>; - status = "disabled"; - nordic,access = ; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x2f0be000 0x1000>; - - /* TODO In future move this region to cpuapp_ram0x_region. */ - etr_buffer: memory@0 { - reg = <0x0 DT_SIZE_K(4)>; - }; - }; - cpuapp_cpurad_ram0x_region: memory@2f0bf000 { compatible = "nordic,owned-memory"; reg = <0x2f0bf000 DT_SIZE_K(4)>; diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts index 9c3556b27c4..d68b0940a5f 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts @@ -119,10 +119,6 @@ status = "okay"; }; -&etr_buf_ram0x_region { - status = "okay"; -}; - &ram21_region { status = "okay"; }; diff --git a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay index fec54817364..a0dc4a0dafa 100644 --- a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay @@ -3,6 +3,24 @@ * SPDX-License-Identifier: Apache-2.0 */ + / { + reserved-memory { + etr_buf_ram0x_region: memory@2f0be000 { + compatible = "nordic,owned-memory"; + reg = <0x2f0be000 DT_SIZE_K(4)>; + status = "okay"; + nordic,access = ; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x2f0be000 0x1000>; + + etr_buffer: memory@0 { + reg = <0x0 DT_SIZE_K(4)>; + }; + }; + }; +}; + &tbm { status = "okay"; }; diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay index fec54817364..390e8d2b5f3 100644 --- a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay @@ -3,6 +3,25 @@ * SPDX-License-Identifier: Apache-2.0 */ + / { + reserved-memory { + etr_buf_ram0x_region: memory@2f0be000 { + compatible = "nordic,owned-memory"; + reg = <0x2f0be000 DT_SIZE_K(4)>; + status = "okay"; + nordic,access = ; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x2f0be000 0x1000>; + + etr_buffer: memory@0 { + reg = <0x0 DT_SIZE_K(4)>; + }; + }; + }; +}; + + &tbm { status = "okay"; };