Skip to content

Commit 4281b7d

Browse files
[nrf fromtree] soc: nordic: uicr: Parse pinctrls for local domain peripherals
Generate PERIPHCONF SPU/CTRLSEL entries based on pinctrl properties on the local domain peripherals as well as the global ones. This fixes an issue where the required pin configuration was not generated for the pinctrls on the radio local domain GPIOTE0 on nrf54h20. The secure attribute of nodes without an address and without a bus node are now interpreted as being secure by default, instead of failing with an error. This prevents the parsing of certain nodes from triggering failing the build (in particular the 'ieee802154' node in cpurad_peripherals). Signed-off-by: Jonathan Nilsen <[email protected]> (cherry picked from commit b1c68f5)
1 parent 62755cb commit 4281b7d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

soc/nordic/common/uicr/periphconf/builder.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def add_local_peripheral_cfg(
150150
151151
:param node_or_nodelabel: node or label of the node to process.
152152
"""
153-
self._add_peripheral_cfg(node_or_nodelabel, is_global=False, add_gpios=False)
153+
self._add_peripheral_cfg(node_or_nodelabel, is_global=False)
154154

155155
def add_global_peripheral_cfg(
156156
self,
@@ -182,7 +182,6 @@ def _add_peripheral_cfg(
182182
is_global: bool = True,
183183
has_irq_mapping: bool = True,
184184
add_ppib_channel_links: bool = True,
185-
add_gpios: bool = True,
186185
) -> None:
187186
if isinstance(node_or_nodelabel, str):
188187
node = self._dt.label2node[node_or_nodelabel]
@@ -223,13 +222,11 @@ def _add_peripheral_cfg(
223222
if "nordic,nrf-comp" in node.compats or "nordic,nrf-lpcomp" in node.compats:
224223
self._add_nrf_comp_lpcomp_channel_pin_spu_permissions(node)
225224

226-
self._add_peripheral_pinctrls_spu_permissions_and_ctrlsel(node)
227-
228225
if "nordic,nrf-ipct-local" in node.compats:
229226
self._add_nrf_ipct_ipcmap_channel_links(node)
230227

231-
if add_gpios:
232-
self._add_peripheral_gpios_spu_permissions_and_ctrlsel(node)
228+
self._add_peripheral_pinctrls_spu_permissions_and_ctrlsel(node)
229+
self._add_peripheral_gpios_spu_permissions_and_ctrlsel(node)
233230

234231
def add_gpio_spu_permissions(self, node_or_nodelabel: Node | str, /) -> None:
235232
"""Generate macros for populating SPU FEATURE.GPIO[n].PIN[m] registers based on
@@ -884,10 +881,12 @@ def dt_node_is_secure(node: Node) -> bool:
884881
elif node.regs:
885882
addr = dt_reg_addr(node)
886883
else:
887-
raise ValueError(
884+
log.debug(
888885
f"Failed to determine security of {node.path} "
889-
"from the address of its bus node or itself"
886+
"from the address of its bus node or itself. "
887+
"Defaulting to Secure."
890888
)
889+
return True
891890
return Address(addr).security
892891

893892

0 commit comments

Comments
 (0)