Skip to content

Commit 015b317

Browse files
nika-nordicrlubos
authored andcommitted
[nrf fromlist] soc: nordic: nrf54l15: fix APPROTECT handling
To configure APPROTECT on nRF54L15 different set of MDK symbols must be used. Additionally, nRF54L15 does not support loading APPROTECT configuration from the UICR in runtime. Upstream PR #: 80366 Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent 765c23d commit 015b317

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9230_ENGB_CPUPPR NRF9230_ENGB_XXA
7575
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_LOCK
7676
ENABLE_APPROTECT)
7777
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_USER_HANDLING
78-
ENABLE_APPROTECT_USER_HANDLING)
78+
ENABLE_APPROTECT_USER_HANDLING
79+
ENABLE_AUTHENTICATED_APPROTECT)
7980
zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_LOCK
80-
ENABLE_SECURE_APPROTECT)
81+
ENABLE_SECURE_APPROTECT
82+
ENABLE_SECUREAPPROTECT)
8183
zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING
82-
ENABLE_SECURE_APPROTECT_USER_HANDLING)
84+
ENABLE_SECURE_APPROTECT_USER_HANDLING
85+
ENABLE_AUTHENTICATED_SECUREAPPROTECT)
8386
zephyr_library_compile_definitions_ifdef(CONFIG_NRF_TRACE_PORT
8487
ENABLE_TRACE)
8588

soc/nordic/Kconfig

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,24 @@ config NFCT_PINS_AS_GPIOS
9898

9999
choice NRF_APPROTECT_HANDLING
100100
bool "APPROTECT handling"
101-
depends on SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET || \
102-
SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
101+
depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF53X || SOC_NRF54L15_CPUAPP || \
102+
SOC_SERIES_NRF91X
103+
default NRF_APPROTECT_DISABLE if SOC_NRF54L15_CPUAPP
103104
default NRF_APPROTECT_USE_UICR
104105
help
105106
Specifies how the SystemInit() function should handle the APPROTECT
106107
mechanism.
107108

109+
config NRF_APPROTECT_DISABLE
110+
bool "Disable"
111+
depends on SOC_NRF54L15_CPUAPP
112+
help
113+
When this option is selected, the SystemInit() disables
114+
the APPROTECT mechanism.
115+
108116
config NRF_APPROTECT_USE_UICR
109117
bool "Use UICR"
118+
depends on SOC_SERIES_NRF52X || SOC_SERIES_NRF53X || SOC_SERIES_NRF91X
110119
help
111120
When this option is selected, the SystemInit() function loads the
112121
firmware branch state of the APPROTECT mechanism from UICR, so if
@@ -131,14 +140,23 @@ endchoice
131140

132141
choice NRF_SECURE_APPROTECT_HANDLING
133142
bool "Secure APPROTECT handling"
134-
depends on SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
143+
depends on SOC_NRF5340_CPUAPP || SOC_NRF54L15_CPUAPP || SOC_SERIES_NRF91X
144+
default NRF_SECURE_APPROTECT_DISABLE if SOC_NRF54L15_CPUAPP
135145
default NRF_SECURE_APPROTECT_USE_UICR
136146
help
137147
Specifies how the SystemInit() function should handle the secure
138148
APPROTECT mechanism.
139149

150+
config NRF_SECURE_APPROTECT_DISABLE
151+
bool "Disable"
152+
depends on SOC_NRF54L15_CPUAPP
153+
help
154+
When this option is selected, the SystemInit() disables
155+
the secure APPROTECT mechanism.
156+
140157
config NRF_SECURE_APPROTECT_USE_UICR
141158
bool "Use UICR"
159+
depends on SOC_NRF5340_CPUAPP || SOC_SERIES_NRF91X
142160
help
143161
When this option is selected, the SystemInit() function loads the
144162
firmware branch state of the secure APPROTECT mechanism from UICR,

0 commit comments

Comments
 (0)