Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dts/arm/nordic/nrf54h20_cpuapp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ wdt011: &cpuapp_wdt011 {};
&grtc {
interrupts = <109 NRF_DEFAULT_IRQ_PRIORITY>;
};

&nfct {
compatible = "nordic,nrf-nfct-v2";
};
18 changes: 18 additions & 0 deletions dts/bindings/net/wireless/nordic,nrf-nfct-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

description: Nordic nRF family NFCT (Near Field Communication Tag)

compatible: "nordic,nrf-nfct-v2"

include: nordic,nrf-nfct.yaml

properties:
nfct-pins-as-gpios:
type: boolean
description: |
When enabled this property will configure pins dedicated to NFCT
peripheral as regular GPIOs. This property must be applied in cpuapp
if NFCT pins are intended to be used as regular GPIOs by any core.

NFC pins in nRF54H series: P2.10 and P2.11
6 changes: 6 additions & 0 deletions soc/nordic/nrf54h/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <hal/nrf_lrcconf.h>
#include <hal/nrf_spu.h>
#include <hal/nrf_memconf.h>
#include <hal/nrf_nfct.h>
#include <soc/nrfx_coredep.h>
#include <soc_lrcconf.h>
#include <dmm.h>
Expand Down Expand Up @@ -151,6 +152,11 @@ static int nordicsemi_nrf54h_init(void)
nrf_spu_periph_perm_dmasec_set(spu, nrf_address_slave_get(ccm030_addr), true);
#endif

if (DT_NODE_HAS_STATUS(DT_NODELABEL(nfct), disabled) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the NFCT node be reserved rather than disabled ?

status == reserved ensures that ownership of NFCT peripheral is assigned to given local domain.
On the other hand, status == okay should not be used because it might implicitly activate NFCT driver (not an issue now, but to be future-proof)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NFCT is by default assigned to cpuapp so it can access NFCT registers by default no need to reserving.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This limits use of NFCT pins to cpuapp.

When I try to use that GPIOs by cpurad I see:

  • cpurad not booting because it tries to access registers of NFCT that it doesn't own
&nfct {
	compatible = "nordic,nrf-nfct-v2";
	status = "disabled";
	nfct-pins-as-gpios;
};
  • NFC not disabled because condition from line 155 is not meet
&nfct {
	compatible = "nordic,nrf-nfct-v2";
	status = "okay";
	nfct-pins-as-gpios;
};

DT_PROP_OR(DT_NODELABEL(nfct), nfct_pins_as_gpios, 0)) {
nrf_nfct_pad_config_enable_set(NRF_NFCT, false);
}

return 0;
}

Expand Down
Loading