Can't disable CONFIG_NORDIC_QSPI_NOR in MCUBOOT

Hello DevZone,

I'm trying to run Matter over Thread demo on nRF7002DK. In fact, it's not a real 7002DK, but a simplified version. You can check the documents about this board. We gived these away to developers.

Under normal conditions, we just select `nrf7002dk_nrf5340_cpuapp` in NCS. But when I want to run Matter over Thread demo with this board, I want to select `nrf5340dk_nrf5340_cpuapp` in NCS.

I've modified the overlay and Kconfig in the application, this works well.

boards/nrf5340dk_nrf5340_cpuapp.conf:

# Matter
CONFIG_CHIP_QSPI_NOR=n
CONFIG_CHIP_SPI_NOR=y

# Zephyr
CONFIG_NORDIC_QSPI_NOR=n
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

boards/nrf5340dk_nrf5340_cpuapp.overlay:

/*
 * Copyright (c) 2021 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
	chosen {
		nordic,pm-ext-flash = &mx25r64;
	};

    leds {
        led_0 {
            gpios = < &gpio1 6 GPIO_ACTIVE_LOW >;
        };
        led_1 {
            gpios = < &gpio1 7 GPIO_ACTIVE_LOW >;
        };
        /delete-node/ led_2;
        /delete-node/ led_3;
    };

    aliases {
        /delete-property/ sw2;
        /delete-property/ sw3;
        /delete-property/ led2;
        /delete-property/ led3;
    };
};

/* Set IPC thread priority to the highest value to not collide with other threads. */
&ipc0 {
    zephyr,priority = <0 PRIO_COOP>;
};

/* Disable unused peripherals to reduce power consumption */
&adc {
	status = "disabled";
};
&i2c1 {
	status = "disabled";
};
&pwm0 {
	status = "disabled";
};
&spi2 {
	status = "disabled";
};
&usbd {
	status = "disabled";
};

&qspi {
    status = "disabled";
    /delete-node/ mx25r6435f@0;
};

&spi4 {
    compatible = "nordic,nrf-spim";
	status = "okay";
	pinctrl-0 = <&spi4_default>;
	pinctrl-1 = <&spi4_sleep>;
	pinctrl-names = "default", "sleep";
	cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
	mx25r64: mx25r6435f@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <33000000>;
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
			ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
			10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44
			30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
		];
		size = <67108864>;
		has-dpd;
		t-enter-dpd = <10000>;
		t-exit-dpd = <5000>;
	};
};



&pinctrl {
    spi4_default {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                <NRF_PSEL(SPIM_MISO, 0, 10)>,
                <NRF_PSEL(SPIM_MOSI, 0, 9)>;
        };
    };
    
    spi4_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                <NRF_PSEL(SPIM_MISO, 0, 10)>,
                <NRF_PSEL(SPIM_MOSI, 0, 9)>;
            low-power-enable;
        };
    };
    
};

But when I want to do the same thing in the mcuboot, the CONFIG_NORDIC_QSPI_NOR can't be set to "n".

child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf:

# Zephyr
CONFIG_NORDIC_QSPI_NOR=n

CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay:

/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/ {
	chosen {
		nordic,pm-ext-flash = &mx25r64;
	};

    leds {
        led_0 {
            gpios = < &gpio1 6 GPIO_ACTIVE_LOW >;
        };
        led_1 {
            gpios = < &gpio1 7 GPIO_ACTIVE_LOW >;
        };
        /delete-node/ led_2;
        /delete-node/ led_3;
    };

    aliases {
        /delete-property/ sw2;
        /delete-property/ sw3;
        /delete-property/ led2;
        /delete-property/ led3;
    };
};

&qspi {
    status = "disabled";
    /delete-node/ mx25r6435f@0;
};

&spi4 {
    compatible = "nordic,nrf-spim";
	status = "okay";
	pinctrl-0 = <&spi4_default>;
	pinctrl-1 = <&spi4_sleep>;
	pinctrl-names = "default", "sleep";
	cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
	mx25r64: mx25r6435f@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <33000000>;
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
			ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
			10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44
			30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
		];
		size = <67108864>;
		has-dpd;
		t-enter-dpd = <10000>;
		t-exit-dpd = <5000>;
	};
};

&pinctrl {
    spi4_default {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                <NRF_PSEL(SPIM_MISO, 0, 10)>,
                <NRF_PSEL(SPIM_MOSI, 0, 9)>;
        };
    };
    
    spi4_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                <NRF_PSEL(SPIM_MISO, 0, 10)>,
                <NRF_PSEL(SPIM_MOSI, 0, 9)>;
            low-power-enable;
        };
    };
    
};

The "build/mcuboot/zephyr/.config" shows that:

The `CONFIG_SPI_NOR` was set to "y" successfully, but `CONFIG_NORDIC_QSPI_NOR` was not set to `n`.

Did I miss any configurations? Or is this a bug? I've searched all the Kconfig in NCS that will `select` this config, but still find any solution.

Best regards,

Jayant

Related