Skip to content

Commit

Permalink
[nrf fromlist] dts: Add uicr nfct_pins_as_gpios prop on 5340_ns
Browse files Browse the repository at this point in the history
Add a uicr node for the NRF5340 non-secure target.
The UICR is mapped as secure only so the non-secure app
doesn't have access to it but we still want to configure
the nfct_pins_as_gpios property the same way for both
secure and non-secure targets.

The uicr option in the non-secure target doesn't have the
register property since it is not usable.

Upstream PR: zephyrproject-rtos/zephyr#69337

Ref: NCSDK-24437

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge committed Feb 26, 2024
1 parent f3f276d commit fa6e70a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dts/arm/nordic/nrf5340_cpuappns.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
compatible = "zephyr,psa-crypto-rng";
status = "okay";
};

uicr: uicr {
compatible = "nordic,nrf-uicr-config-only";
status = "okay";
};
};

&nvic {
Expand Down
17 changes: 17 additions & 0 deletions dts/bindings/arm/nordic,nrf-uicr-config-only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: Nordic UICR (User Information Configuration Registers) for configuration purposes only

compatible: "nordic,nrf-uicr-config-only"

include: base.yaml

properties:
nfct-pins-as-gpios:
type: boolean
description: |
When enabled this property will configure pins dedicated to NFCT
peripheral as regular GPIOs.
NFC pins in nRF5340: P0.02 and P0.03
This setting, once applied, can only be unset by erasing the UICR
registers. Refer to the reference manual for more details.
5 changes: 4 additions & 1 deletion soc/arm/nordic_nrf/validate_base_addresses.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ CHECK_DT_REG(uart134, NRF_UARTE134);
CHECK_DT_REG(uart135, NRF_UARTE135);
CHECK_DT_REG(uart136, NRF_UARTE136);
CHECK_DT_REG(uart137, NRF_UARTE137);
CHECK_DT_REG(uicr, NRF_UICR);
CHECK_DT_REG(usbd, NRF_USBD);
CHECK_DT_REG(usbreg, NRF_USBREGULATOR);
CHECK_DT_REG(vmc, NRF_VMC);
Expand All @@ -233,6 +232,10 @@ CHECK_DT_REG(wdt1, NRF_WDT1);
CHECK_DT_REG(wdt30, NRF_WDT30);
CHECK_DT_REG(wdt31, NRF_WDT31);

#if defined(NRF_UICR)
CHECK_DT_REG(uicr, NRF_UICR);
#endif

/* nRF51/nRF52-specific addresses */
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
CHECK_DT_REG(gpregret1, NRF_POWER_GPREGRET1);
Expand Down

0 comments on commit fa6e70a

Please sign in to comment.