Skip to content

Commit 43f9488

Browse files
karstenkoenigfabiobaltieri
authored andcommitted
dts: bindings: arm: nordic: Add TDDCONF sources
For nrf54h20 a range of combinations exist to configure the test and debug domains data sources and sinks. Expose them in DTS to allow configuring them. Also drop the previous style which was too rigid to extend to cover all cases cleanly. The old style was only used in a single sample application so far. Signed-off-by: Karsten Koenig <[email protected]>
1 parent d14fe91 commit 43f9488

File tree

9 files changed

+62
-9
lines changed

9 files changed

+62
-9
lines changed

dts/bindings/arm/nordic,nrf-tddconf.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ compatible: "nordic,nrf-tddconf"
1111
include: base.yaml
1212

1313
properties:
14-
stmsink:
15-
type: string
16-
description: indicates the sink for STM data
17-
enum:
18-
- "etr"
19-
- "tpiu"
20-
# - "etb" - Not supported yet
14+
etbsources:
15+
type: int
16+
description: |
17+
Bitmask of enabled sources for the ETB sink. Valid values can be found in
18+
dt-bindings/misc/nordic-tddconf.h
19+
20+
tpiusources:
21+
type: int
22+
description: |
23+
Bitmask of enabled sources for the TPIU sink. Valid values can be found in
24+
dt-bindings/misc/nordic-tddconf.h
25+
26+
etrsources:
27+
type: int
28+
description: |
29+
Bitmask of enabled sources for the ETR sink. Valid values can be found in
30+
dt-bindings/misc/nordic-tddconf.h
31+
2132
portconfig:
2233
type: int
34+
default: 3
2335
description: TPIU clock divider - TDD HSFLL / 2^(2 + portconfig)
2436
enum:
2537
- 0

dts/common/nordic/nrf54h20.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <zephyr/dt-bindings/misc/nordic-nrf-ficr-nrf54h20.h>
1111
#include <zephyr/dt-bindings/misc/nordic-domain-id-nrf54h20.h>
1212
#include <zephyr/dt-bindings/misc/nordic-owner-id-nrf54h20.h>
13+
#include <zephyr/dt-bindings/misc/nordic-tddconf.h>
1314

1415
/delete-node/ &sw_pwm;
1516

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_TDDCONF_H_
7+
8+
#define NRF_TDDCONF_SOURCE_STMMAINCORE BIT(0)
9+
#define NRF_TDDCONF_SOURCE_ETMMAINCORE BIT(1)
10+
#define NRF_TDDCONF_SOURCE_STMHWEVENTS BIT(2)
11+
#define NRF_TDDCONF_SOURCE_STMPPR BIT(3)
12+
#define NRF_TDDCONF_SOURCE_STMFLPR BIT(4)
13+
14+
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_TDDCONF_H_ */

snippets/nordic-log-stm-dict/boards/nrf54h20_cpuapp.overlay

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
&tddconf {
1111
status = "okay";
12-
stmsink = "etr";
12+
etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR |
13+
NRF_TDDCONF_SOURCE_STMFLPR)>;
1314
portconfig = <0>;
1415
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&tddconf {
7+
status = "okay";
8+
etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE)>;
9+
};

snippets/nordic-log-stm-dict/snippet.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ boards:
66
append:
77
EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay
88
EXTRA_CONF_FILE: boards/nrf54h20_cpuapp.conf
9+
/.*/nrf54h20/cpurad/:
10+
append:
11+
EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpurad.overlay

snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
&tddconf {
1111
status = "okay";
12-
stmsink = "etr";
12+
etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE | NRF_TDDCONF_SOURCE_STMPPR |
13+
NRF_TDDCONF_SOURCE_STMFLPR)>;
1314
portconfig = <0>;
1415
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&tddconf {
7+
status = "okay";
8+
etrsources = <(NRF_TDDCONF_SOURCE_STMMAINCORE)>;
9+
};

snippets/nordic-log-stm/snippet.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ boards:
66
append:
77
EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay
88
EXTRA_CONF_FILE: boards/nrf54h20_cpuapp.conf
9+
/.*/nrf54h20/cpurad/:
10+
append:
11+
EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpurad.overlay

0 commit comments

Comments
 (0)