-
Notifications
You must be signed in to change notification settings - Fork 7.6k
soc: nordic: nrf54h: Add option to use NFCT pins as GPIOs #86280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
soc: nordic: nrf54h: Add option to use NFCT pins as GPIOs #86280
Conversation
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>
@@ -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) && |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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;
};
@masz-nordic @anangl can you take a look? |
Align to changes made in zephyrproject-rtos/zephyr#86280 Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Align to changes made in zephyrproject-rtos/zephyr#86280 Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Requires the following change in the Kconfig option that represents the DTS configuration for NFCT:
->
|
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.