Skip to content

Commit 7249fac

Browse files
nordic-krchfabiobaltieri
authored andcommitted
soc: nordic: nrf54h: Add option to use NFCT pins as GPIOs
Protection circuit must be disabled to use NFCT antenna pins as GPIOs. It can be done by adding nfct-pins-as-gpios to nfct node in the devicetree in cpuapp. Node must be disabled as NFCT is not used. In legacy platforms same property was added to uicr node because that information was stored in UICR. In nrf54h20 it is not part of UICR so property is part of nfct node. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
1 parent 81df84a commit 7249fac

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

dts/arm/nordic/nrf54h20_cpuapp.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ wdt011: &cpuapp_wdt011 {};
5959
&grtc {
6060
interrupts = <109 NRF_DEFAULT_IRQ_PRIORITY>;
6161
};
62+
63+
&nfct {
64+
compatible = "nordic,nrf-nfct-v2";
65+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Nordic nRF family NFCT (Near Field Communication Tag)
5+
6+
compatible: "nordic,nrf-nfct-v2"
7+
8+
include: nordic,nrf-nfct.yaml
9+
10+
properties:
11+
nfct-pins-as-gpios:
12+
type: boolean
13+
description: |
14+
When enabled this property will configure pins dedicated to NFCT
15+
peripheral as regular GPIOs. This property must be applied in cpuapp
16+
if NFCT pins are intended to be used as regular GPIOs by any core.
17+
18+
NFC pins in nRF54H series: P2.10 and P2.11

soc/nordic/nrf54h/soc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <hal/nrf_lrcconf.h>
1919
#include <hal/nrf_spu.h>
2020
#include <hal/nrf_memconf.h>
21+
#include <hal/nrf_nfct.h>
2122
#include <soc/nrfx_coredep.h>
2223
#include <soc_lrcconf.h>
2324
#include <dmm.h>
@@ -151,6 +152,11 @@ static int nordicsemi_nrf54h_init(void)
151152
nrf_spu_periph_perm_dmasec_set(spu, nrf_address_slave_get(ccm030_addr), true);
152153
#endif
153154

155+
if (DT_NODE_HAS_STATUS(DT_NODELABEL(nfct), disabled) &&
156+
DT_PROP_OR(DT_NODELABEL(nfct), nfct_pins_as_gpios, 0)) {
157+
nrf_nfct_pad_config_enable_set(NRF_NFCT, false);
158+
}
159+
154160
return 0;
155161
}
156162

0 commit comments

Comments
 (0)