diff --git a/dts/bindings/arm/nordic,nrf-tddconf.yaml b/dts/bindings/arm/nordic,nrf-tddconf.yaml index 8ef56b44c58..46f9a0e7b2d 100644 --- a/dts/bindings/arm/nordic,nrf-tddconf.yaml +++ b/dts/bindings/arm/nordic,nrf-tddconf.yaml @@ -11,15 +11,27 @@ compatible: "nordic,nrf-tddconf" include: base.yaml properties: - stmsink: - type: string - description: indicates the sink for STM data - enum: - - "etr" - - "tpiu" - # - "etb" - Not supported yet + etbsources: + type: int + description: | + Bitmask of enabled sources for the ETB sink. Valid values can be found in + dt-bindings/misc/nordic-tddconf.h + + tpiusources: + type: int + description: | + Bitmask of enabled sources for the TPIU sink. Valid values can be found in + dt-bindings/misc/nordic-tddconf.h + + etrsources: + type: int + description: | + Bitmask of enabled sources for the ETR sink. Valid values can be found in + dt-bindings/misc/nordic-tddconf.h + portconfig: type: int + default: 3 description: TPIU clock divider - TDD HSFLL / 2^(2 + portconfig) enum: - 0 diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index c87db0167fa..370b560bc0b 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include /delete-node/ &sw_pwm; diff --git a/include/zephyr/dt-bindings/misc/nordic-tddconf.h b/include/zephyr/dt-bindings/misc/nordic-tddconf.h new file mode 100644 index 00000000000..b1b45b99252 --- /dev/null +++ b/include/zephyr/dt-bindings/misc/nordic-tddconf.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_TDDCONF_H_ + +#define NRF_TDDCONF_SOURCE_STMMAINCORE BIT(0) +#define NRF_TDDCONF_SOURCE_ETMMAINCORE BIT(1) +#define NRF_TDDCONF_SOURCE_STMHWEVENTS BIT(2) +#define NRF_TDDCONF_SOURCE_STMPPR BIT(3) +#define NRF_TDDCONF_SOURCE_STMFLPR BIT(4) + +#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_TDDCONF_H_ */ diff --git a/modules/hal_nordic/CMakeLists.txt b/modules/hal_nordic/CMakeLists.txt index 2ba8eea33a0..eb85fd58f5e 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 EXACT REQUIRED + find_package(nrf-regtool 5.6.0 REQUIRED COMPONENTS ${nrf_regtool_components} PATHS ${CMAKE_CURRENT_LIST_DIR}/nrf-regtool NO_CMAKE_PATH diff --git a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay index bedc93411c9..d620b83872f 100644 --- a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay @@ -9,6 +9,7 @@ &tddconf { status = "okay"; - stmsink = "etr"; + etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR | + NRF_TDDCONF_SOURCE_STMFLPR)>; portconfig = <0>; }; diff --git a/snippets/nordic-log-stm-dict/boards/nrf54h20_cpurad.overlay b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpurad.overlay new file mode 100644 index 00000000000..5bdeddd3c07 --- /dev/null +++ b/snippets/nordic-log-stm-dict/boards/nrf54h20_cpurad.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * SPDX-License-Identifier: Apache-2.0 + */ + +&tddconf { + status = "okay"; + etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE)>; +}; diff --git a/snippets/nordic-log-stm-dict/snippet.yml b/snippets/nordic-log-stm-dict/snippet.yml index 5bacbaf5af0..a482498d1e9 100644 --- a/snippets/nordic-log-stm-dict/snippet.yml +++ b/snippets/nordic-log-stm-dict/snippet.yml @@ -6,3 +6,6 @@ boards: append: EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay EXTRA_CONF_FILE: boards/nrf54h20_cpuapp.conf + /.*/nrf54h20/cpurad/: + append: + EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpurad.overlay diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay index bedc93411c9..d620b83872f 100644 --- a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay @@ -9,6 +9,7 @@ &tddconf { status = "okay"; - stmsink = "etr"; + etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR | + NRF_TDDCONF_SOURCE_STMFLPR)>; portconfig = <0>; }; diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpurad.overlay b/snippets/nordic-log-stm/boards/nrf54h20_cpurad.overlay new file mode 100644 index 00000000000..5bdeddd3c07 --- /dev/null +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpurad.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * SPDX-License-Identifier: Apache-2.0 + */ + +&tddconf { + status = "okay"; + etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE)>; +}; diff --git a/snippets/nordic-log-stm/snippet.yml b/snippets/nordic-log-stm/snippet.yml index 1cd65087bcc..e2ff7b6f8a1 100644 --- a/snippets/nordic-log-stm/snippet.yml +++ b/snippets/nordic-log-stm/snippet.yml @@ -6,3 +6,6 @@ boards: append: EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay EXTRA_CONF_FILE: boards/nrf54h20_cpuapp.conf + /.*/nrf54h20/cpurad/: + append: + EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpurad.overlay