Skip to content

Commit 72d7950

Browse files
lemreyrlubos
authored andcommitted
kconfig: tfm: move UART-related pin config entries
Move them out of the top-level KConfig menu to clean it up a bit. Signed-off-by: Emanuele Di Santo <[email protected]>
1 parent 8f19de1 commit 72d7950

File tree

2 files changed

+77
-76
lines changed

2 files changed

+77
-76
lines changed

modules/tfm/zephyr/Kconfig

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -12,79 +12,3 @@ config TFM_BOARD
1212
help
1313
Redefinition of TFM_BOARD to use out-of-tree boards. These depend on
1414
${TFM_BOARD_BASE_DIR} being set to the TFM board dir inside sdk-nrf.
15-
16-
if BUILD_WITH_TFM
17-
18-
config TFM_SECURE_UART1
19-
bool
20-
select NRF_UARTE1_SECURE
21-
22-
config TFM_UART0_TXD_PIN
23-
int "UART0 TXD pin"
24-
default 29 if BOARD_NRF9160DK_NRF9160_NS
25-
default 20 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
26-
default 4294967295 # 0xffffffff i.e. disconnected
27-
help
28-
The GPIO pin the TFM build system will use for UART0 TXD pin.
29-
UART0 is used by TF-M as the log output for the non-secure image.
30-
31-
Note: The non-secure image is only ever used when running the
32-
TF-M regression tests.
33-
34-
config TFM_UART0_RXD_PIN
35-
int "UART0 RXD pin"
36-
default 28 if BOARD_NRF9160DK_NRF9160_NS
37-
default 22 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
38-
default 4294967295 # 0xffffffff i.e. disconnected
39-
help
40-
The GPIO pin the TFM build system will use for UART0 RXD pin.
41-
UART0 is used by TF-M as the log output for the non-secure image.
42-
43-
Note: The non-secure image is only ever used when running the
44-
TF-M regression tests.
45-
46-
config TFM_UART0_RTS_PIN
47-
int "UART0 RTS pin"
48-
default 27 if BOARD_NRF9160DK_NRF9160_NS
49-
default 19 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
50-
default 4294967295 # 0xffffffff i.e. disconnected
51-
help
52-
The GPIO pin the TFM build system will use for UART0 RTS pin.
53-
UART0 is used by TF-M as the log output for the non-secure image.
54-
55-
Note: The non-secure image is only ever used when running the
56-
TF-M regression tests.
57-
58-
config TFM_UART0_CTS_PIN
59-
int "UART0 CTS pin"
60-
default 26 if BOARD_NRF9160DK_NRF9160_NS
61-
default 21 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
62-
default 4294967295 # 0xffffffff i.e. disconnected
63-
help
64-
The GPIO pin the TFM build system will use for UART0 CTS pin.
65-
UART0 is used by TF-M as the log output for the non-secure image.
66-
67-
Note: The non-secure image is only ever used when running the
68-
TF-M regression tests.
69-
70-
config TFM_UART1_TXD_PIN
71-
int "UART1 TXD pin"
72-
depends on TFM_SECURE_UART1
73-
default 1 if BOARD_NRF9160DK_NRF9160_NS
74-
default 25 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
75-
default 4294967295 # 0xffffffff i.e. disconnected
76-
help
77-
The GPIO pin the TFM build system will use for UART1 TXD pin.
78-
UART1 is used by TF-M as the log output for the secure image.
79-
80-
config TFM_UART1_RXD_PIN
81-
int "UART1 RXD pin"
82-
depends on TFM_SECURE_UART1
83-
default 0 if BOARD_NRF9160DK_NRF9160_NS
84-
default 26 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
85-
default 4294967295 # 0xffffffff i.e. disconnected
86-
help
87-
The GPIO pin the TFM build system will use for UART1 RXD pin.
88-
UART1 is used by TF-M as the log output for the secure image.
89-
90-
endif # BUILD_WITH_TFM

subsys/nonsecure/Kconfig

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,83 @@
77
if BUILD_WITH_TFM || IS_SPM
88
menu "Trusted Execution Non-Secure"
99

10+
menu "TF-M UART pins"
11+
visible if BUILD_WITH_TFM
12+
13+
config TFM_SECURE_UART1
14+
bool
15+
select NRF_UARTE1_SECURE
16+
17+
config TFM_UART0_TXD_PIN
18+
int "UART0 TXD pin"
19+
default 29 if BOARD_NRF9160DK_NRF9160_NS
20+
default 20 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
21+
default 4294967295 # 0xffffffff i.e. disconnected
22+
help
23+
The GPIO pin the TFM build system will use for UART0 TXD pin.
24+
UART0 is used by TF-M as the log output for the non-secure image.
25+
26+
Note: The non-secure image is only ever used when running the
27+
TF-M regression tests.
28+
29+
config TFM_UART0_RXD_PIN
30+
int "UART0 RXD pin"
31+
default 28 if BOARD_NRF9160DK_NRF9160_NS
32+
default 22 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
33+
default 4294967295 # 0xffffffff i.e. disconnected
34+
help
35+
The GPIO pin the TFM build system will use for UART0 RXD pin.
36+
UART0 is used by TF-M as the log output for the non-secure image.
37+
38+
Note: The non-secure image is only ever used when running the
39+
TF-M regression tests.
40+
41+
config TFM_UART0_RTS_PIN
42+
int "UART0 RTS pin"
43+
default 27 if BOARD_NRF9160DK_NRF9160_NS
44+
default 19 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
45+
default 4294967295 # 0xffffffff i.e. disconnected
46+
help
47+
The GPIO pin the TFM build system will use for UART0 RTS pin.
48+
UART0 is used by TF-M as the log output for the non-secure image.
49+
50+
Note: The non-secure image is only ever used when running the
51+
TF-M regression tests.
52+
53+
config TFM_UART0_CTS_PIN
54+
int "UART0 CTS pin"
55+
default 26 if BOARD_NRF9160DK_NRF9160_NS
56+
default 21 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
57+
default 4294967295 # 0xffffffff i.e. disconnected
58+
help
59+
The GPIO pin the TFM build system will use for UART0 CTS pin.
60+
UART0 is used by TF-M as the log output for the non-secure image.
61+
62+
Note: The non-secure image is only ever used when running the
63+
TF-M regression tests.
64+
65+
config TFM_UART1_TXD_PIN
66+
int "UART1 TXD pin"
67+
depends on TFM_SECURE_UART1
68+
default 1 if BOARD_NRF9160DK_NRF9160_NS
69+
default 25 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
70+
default 4294967295 # 0xffffffff i.e. disconnected
71+
help
72+
The GPIO pin the TFM build system will use for UART1 TXD pin.
73+
UART1 is used by TF-M as the log output for the secure image.
74+
75+
config TFM_UART1_RXD_PIN
76+
int "UART1 RXD pin"
77+
depends on TFM_SECURE_UART1
78+
default 0 if BOARD_NRF9160DK_NRF9160_NS
79+
default 26 if BOARD_NRF5340DK_NRF5340_CPUAPP_NS
80+
default 4294967295 # 0xffffffff i.e. disconnected
81+
help
82+
The GPIO pin the TFM build system will use for UART1 RXD pin.
83+
UART1 is used by TF-M as the log output for the secure image.
84+
85+
endmenu
86+
1087
menu "Peripheral Secure mapping"
1188

1289
rsource "${ZEPHYR_BASE}/modules/hal_nordic/Kconfig.dt"

0 commit comments

Comments
 (0)