nRF54L15 disabling NFC

Hi

I am using an nRF54L15 and trying to use pins for I2C, but to do this I have to disable the NFC pins.

I did the following:

CONFIG_NFCT_PINS_AS_GPIOS=y

But that wasn't enough.

I noticed if, in debug mode, I disabled the NFCT | PADCONFIG, then my i2c bus worked.

So in software I now do the following:

static int disable_nfc_pins_early(const struct device *dev)
{
    ARG_UNUSED(dev);

    // Disable NFC function on NFC pins
    NRF_NFCT->PADCONFIG = 0;

    return 0;
}

SYS_INIT(disable_nfc_pins_early, PRE_KERNEL_1, 0);  
And I still have this setting in the prj,conf file:
CONFIG_NFCT_PINS_AS_GPIOS=y
Is there a way to do this just through configuration, using our own board definition files and prj.conf?
Thanks
Related