From e8ce359fd2c3a600efe67c925494cd61fbc005e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 26 Apr 2024 09:24:14 +0200 Subject: [PATCH] [nrf fromlist] dts: nordic: Add nrf-tbm (trace buffer monitor) node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add new binding and a node to nrf54h20. Update Kconfig and nrfx_config to include nrfx_tbm driver when node with that compatible is enabled. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/72476 Signed-off-by: Krzysztof Chruściński --- dts/bindings/misc/nordic,nrf-tbm.yaml | 15 +++++++++++++++ dts/common/nordic/nrf54h20.dtsi | 13 +++++++++++++ modules/hal_nordic/nrfx/CMakeLists.txt | 1 + modules/hal_nordic/nrfx/Kconfig | 4 ++++ modules/hal_nordic/nrfx/nrfx_config.h | 4 ++++ 5 files changed, 37 insertions(+) create mode 100644 dts/bindings/misc/nordic,nrf-tbm.yaml diff --git a/dts/bindings/misc/nordic,nrf-tbm.yaml b/dts/bindings/misc/nordic,nrf-tbm.yaml new file mode 100644 index 00000000000..46708250c25 --- /dev/null +++ b/dts/bindings/misc/nordic,nrf-tbm.yaml @@ -0,0 +1,15 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +description: Nordic TBM (Trace Buffer Monitor) + +compatible: "nordic,nrf-tbm" + +include: base.yaml + +properties: + reg: + required: true + + interrupts: + required: true diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index f57296e5cd0..816a64da105 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -355,6 +355,19 @@ }; }; + tdd_peripherals: peripheral@bf000000 { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xbf000000 0x1000000>; + + tbm: tbm@3000 { + compatible = "nordic,nrf-tbm"; + reg = <0x3000 0x408>; + status = "disabled"; + interrupts = <127 NRF_DEFAULT_IRQ_PRIORITY>; + }; + }; + global_peripherals: peripheral@5f000000 { #address-cells = <1>; #size-cells = <1>; diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 2313c3f311d..8383aee8779 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -117,6 +117,7 @@ zephyr_library_sources_ifdef(CONFIG_NRFX_SPI ${SRC_DIR}/nrfx_spi.c) zephyr_library_sources_ifdef(CONFIG_NRFX_SPIM ${SRC_DIR}/nrfx_spim.c) zephyr_library_sources_ifdef(CONFIG_NRFX_SPIS ${SRC_DIR}/nrfx_spis.c) zephyr_library_sources_ifdef(CONFIG_NRFX_SYSTICK ${SRC_DIR}/nrfx_systick.c) +zephyr_library_sources_ifdef(CONFIG_NRFX_TBM ${SRC_DIR}/nrfx_tbm.c) zephyr_library_sources_ifdef(CONFIG_NRFX_TEMP ${SRC_DIR}/nrfx_temp.c) zephyr_library_sources_ifdef(CONFIG_NRFX_TIMER ${SRC_DIR}/nrfx_timer.c) zephyr_library_sources_ifdef(CONFIG_NRFX_TWI ${SRC_DIR}/nrfx_twi.c) diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index 35c336f40ef..114988a945a 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -523,6 +523,10 @@ config NRFX_SYSTICK bool "SYSTICK driver" depends on CPU_CORTEX_M_HAS_SYSTICK +config NRFX_TBM + bool "TBM driver" + depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_TBM)) + config NRFX_TEMP bool "TEMP driver" depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_TEMP)) diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index 25da991b297..66b9bd99399 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -505,6 +505,10 @@ #define NRFX_SYSTICK_CONFIG_LOG_ENABLED 1 #endif +#ifdef CONFIG_NRFX_TBM +#define NRFX_TBM_ENABLED 1 +#endif + #ifdef CONFIG_NRFX_TEMP #define NRFX_TEMP_ENABLED 1 #endif