Skip to content

Commit

Permalink
[nrf fromlist] dts: nordic: Add nrf-tbm (trace buffer monitor) node
Browse files Browse the repository at this point in the history
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: zephyrproject-rtos/zephyr#72476

Signed-off-by: Krzysztof Chruściński <[email protected]>
  • Loading branch information
nordic-krch authored and rlubos committed Aug 8, 2024
1 parent 3b6c6e0 commit e8ce359
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dts/bindings/misc/nordic,nrf-tbm.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions dts/common/nordic/nrf54h20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
1 change: 1 addition & 0 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions modules/hal_nordic/nrfx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions modules/hal_nordic/nrfx/nrfx_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8ce359

Please sign in to comment.