nrf5340 to nrf7002 over SPI NOT QSPI

We have custom PCB and are trying to run nrf5240 to nrf7002 over SPI (not QSPI) using NCS 2.4.2.  I have tried several approaches to a few of the posts in the devzone, but no luck.  I get what look like compiler errors from the devicetree.  The errors vary based on how I treat the qspi node in my overlay.  I'm trying to run the scan example on my PCB just to confirm the wifi chip is basically working and can see wireless networks.  The 2.4.2 scan example works just fine on the DK using QSPI.

Here is my overlay, prj.conf and the output of the build (show in part from the start to the initial compiler error).  If I change the way I treat QSPI in the overlay the compiler will fail slightly differently (deleting the node versus setting status to "disabled") but it still looked like a devicetree error.  

/delete-node/ &qspi;
&spi1 {
	status = "okay";
	compatible = "nordic,nrf-spim";
	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";
	cs-gpios = <&gpio0 14 GPIO_ACTIVE_LOW >; /* D10 */
	nrf7002: nrf7002@0 {
		status = "okay";
		compatible = "nordic,nrf700x-spi";
		reg = <0>;
		spi-max-frequency = <24000000>;
		/* Wi-Fi Pins used */
        iovdd-ctrl-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
        bucken-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
        host-irq-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
	};
};
&pinctrl {
	spi1_default: spi1_default {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 0, 28)>,
				<NRF_PSEL(SPIM_MOSI, 0, 26)>,
				<NRF_PSEL(SPIM_MISO, 0, 27)>;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 0, 28)>,
				<NRF_PSEL(SPIM_MOSI, 0, 26)>,
				<NRF_PSEL(SPIM_MISO, 0, 27)>;
		};
	};
};


&nrf_radio_coex {
    status = "okay";
    compatible = "nordic,nrf700x-coex";
    req-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
    status0-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
    grant-gpios = <&gpio1 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_LOW)>;
    swctrl1-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
};


&uart0_sleep {
	group1 {
		psels = <NRF_PSEL(UART_TX, 0, 20)>, <NRF_PSEL(UART_RX, 0, 22)>, <NRF_PSEL(UART_CTS, 0, 21)>;
	};
};

&uart0_default {
	group1 {
		psels = <NRF_PSEL(UART_TX, 0, 20)>;
	};
};

and prj.conf

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

CONFIG_NO_OPTIMIZATIONS=y

CONFIG_SPI=y
# nrf7002
#CONFIG_NRFX_SPIM2=y
#drv_share spi 
CONFIG_NRFX_SPIM1=y
#LCD spi  
CONFIG_NRFX_SPIM4=y
# drv_bat
CONFIG_ADC=y
CONFIG_NRFX_SAADC=y
#

# Stacks - most of RAM usage happens here
CONFIG_HEAP_MEM_POOL_SIZE=120000
CONFIG_STACK_SENTINEL=y
CONFIG_STACK_USAGE=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_NET_TX_STACK_SIZE=2048
CONFIG_NET_RX_STACK_SIZE=4096


CONFIG_DEBUG_INFO=y

CONFIG_EVENTS=y

CONFIG_WIFI=y
CONFIG_WIFI_LOG_LEVEL_ERR=y
CONFIG_WIFI_NRF700X=y
CONFIG_NET_L2_WIFI_MGMT=y
#CONFIG_NRF700X_ON_SPI=y

# System settings
CONFIG_NEWLIB_LIBC=y

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_NATIVE=n
CONFIG_NET_OFFLOAD=y

CONFIG_INIT_STACKS=y

# Logging
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG_BUFFER_SIZE=2048
# If below config is enabled, printk logs are
# buffered. For unbuffered messages, disable this.
# CONFIG_LOG_PRINTK=n

# printing of scan results puts pressure on queues in new locking
# design in net_mgmt. So, use a higher timeout for a crowded
# environment.
# CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000

# Raw scan Options
# CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS=n
# CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS_ONLY=n

And finally the build output: (in part): 

Building xyz
west build --build-dir c:/dev/xyz_zephyr/xyz_fw/build c:/dev/chrome_zephyr/chromeroads_fw

[0/1] Re-running CMake...
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/dev/chrome_zephyr/chromeroads_fw
-- CMake version: 3.20.5
-- Cache files will be written to: C:/dev/NRF/v2.4.2/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/dev/NRF/v2.4.2/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.0 (C:/dev/NRF/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (C:/dev/NRF/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found BOARD.dts: C:/dev/NRF/v2.4.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/dev/chrome_zephyr/chromeroads_fw/nrf7002dk_nrf5340_cpuapp.overlay
-- Generated zephyr.dts: C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/dts.cmake
Parsing C:/dev/NRF/v2.4.2/zephyr/Kconfig
Loaded configuration 'C:/dev/NRF/v2.4.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/dev/chrome_zephyr/chromeroads_fw/prj.conf'
No change to configuration in 'C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/.config'
No change to Kconfig header in 'C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/include/generated/autoconf.h'
CMake Warning at C:/dev/NRF/v2.4.2/zephyr/CMakeLists.txt:839 (message):
No SOURCES given to Zephyr library: lib__libc__common

Excluding target from build.


CMake Warning at C:/dev/NRF/v2.4.2/zephyr/CMakeLists.txt:839 (message):
No SOURCES given to Zephyr library: drivers__ethernet

Excluding target from build.


CMake Warning at C:/dev/NRF/v2.4.2/zephyr/CMakeLists.txt:839 (message):
No SOURCES given to Zephyr library: drivers__wifi

Excluding target from build.


-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/chrome_zephyr/chromeroads_fw/build
[4/17] Building C object modules/nrf/drivers/wifi/nrf700x/CMakeFiles/..__nrf__drivers__wifi__nrf700x.dir/zephyr/src/qspi/src/spi_if.c.obj
FAILED: modules/nrf/drivers/wifi/nrf700x/CMakeFiles/..__nrf__drivers__wifi__nrf700x.dir/zephyr/src/qspi/src/spi_if.c.obj
C:\dev\NRF\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/dev/NRF/v2.4.2/zephyr/include -Izephyr/include/generated -IC:/dev/NRF/v2.4.2/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/dev/NRF/v2.4.2/zephyr/lib/libc/newlib/include -IC:/dev/NRF/v2.4.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/dev/NRF/v2.4.2/zephyr/subsys/net/l2 -IC:/dev/NRF/v2.4.2/nrf/include -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/zephyr/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/utils/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/os_if/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/bus_if/bus/qspi/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/bus_if/bal/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/fw_load/mips/fw/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/hw_if/hal/inc -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/zephyr/src/qspi/inc -IC:/dev/NRF/v2.4.2/zephyr/subsys/net/ip -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/hw_if/hal/inc/fw -IC:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fw -IC:/dev/NRF/v2.4.2/nrf/tests/include -IC:/dev/NRF/v2.4.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/dev/NRF/v2.4.2/modules/hal/nordic/nrfx -IC:/dev/NRF/v2.4.2/modules/hal/nordic/nrfx/drivers/include -IC:/dev/NRF/v2.4.2/modules/hal/nordic/nrfx/mdk -IC:/dev/NRF/v2.4.2/zephyr/modules/hal_nordic/nrfx/. -IC:/dev/NRF/v2.4.2/modules/debug/segger/SEGGER -IC:/dev/NRF/v2.4.2/modules/debug/segger/Config -IC:/dev/NRF/v2.4.2/zephyr/modules/segger/. -isystem C:/dev/NRF/v2.4.2/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -O0 -imacros C:/dev/chrome_zephyr/chromeroads_fw/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs --sysroot=C:/dev/NRF/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/dev/NRF/v2.4.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fstack-usage -fmacro-prefix-map=C:/dev/chrome_zephyr/chromeroads_fw=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/dev/NRF/v2.4.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/dev/NRF/v2.4.2=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT modules/nrf/drivers/wifi/nrf700x/CMakeFiles/..__nrf__drivers__wifi__nrf700x.dir/zephyr/src/qspi/src/spi_if.c.obj -MF modules\nrf\drivers\wifi\nrf700x\CMakeFiles\..__nrf__drivers__wifi__nrf700x.dir\zephyr\src\qspi\src\spi_if.c.obj.d -o modules/nrf/drivers/wifi/nrf700x/CMakeFiles/..__nrf__drivers__wifi__nrf700x.dir/zephyr/src/qspi/src/spi_if.c.obj -c C:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/zephyr/src/qspi/src/spi_if.c
In file included from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/toolchain/gcc.h:92,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/toolchain.h:50,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/sys/time_units.h:10,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/sys/util.h:582,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/devicetree.h:21,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/device.h:12,
from C:/dev/NRF/v2.4.2/zephyr/include/zephyr/drivers/spi.h:24,
from C:/dev/NRF/v2.4.2/nrf/drivers/wifi/nrf700x/zephyr/src/qspi/src/spi_if.c:14:
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/device.h:84:41: error: '__device_dts_ord_DT_N_NODELABEL_nrf700x_BUS_ORD' undeclared here (not in a function)
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/device.h:84:33: note: in expansion of macro '_CONCAT'
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
C:/dev/NRF/v2.4.2/zephyr/include/zephyr/drivers/spi.h:409:24: note: in expansion of macro 'DEVICE_DT_GET'
409 | .bus = DEVICE_DT_GET(DT_BUS(node_id)), \
| ^~~~~~~~~~~~~

thanks in advance!

Parents Reply Children
Related