I am trying to modify the nRF52840dk_nrf52840 spi_flash sample, ncs/zephyr/samples/drivers/spi_flash, to use dual QSPI.
Following is my device tree configuration:
&spi1 { compatible = "nordic,nrf-spi"; status = "okay"; sck-pin = <31>; mosi-pin = <30>; miso-pin = <45>; }; &qspi { status = "okay"; sck-pin = <31>; io-pins = <30 45>; csn-pins = <29>; mx25r64: mx25r6435f@0 { compatible = "nordic,qspi-nor"; reg = <0>; quad-enable-requirements = "NONE"; /* MX24R64 supports only pp and pp4io */ writeoc = "pp"; /* MX24R64 supports all readoc options */ readoc = "fastread"; sck-frequency = <8000000>; label = "MX25R64"; 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 = <35000>; }; };
I am using the main.c from the ncs/zephyr/samples/drivers/spi_flash example code.
JEDEC QSPI-NOR SPI flash testing
==========================
SPI flash driver MX25R64 was not found!
If I debug it and step into "device_get_binding()" and go down to '*z_impl_device_get_binding()" it will find the device with the following details.
dev->name = "MX25R64"
dev->config = 0x15884 <flash_id>
dev->api = 0x158d4 <qspi_nor_api>
dev->data = 0x200000e4 <qspi_nor_memory_data>
However, "sys_bitfield_test_bit()", in "z_device_ready()", indicates that the device failed initialization.
I am running this code on a custom board that is known good. I have existing code using the nRF_SDK v15.3.0 that successfully uses the MX25R64 with SPI.
What am I missing to get the MX25R64 to work with dual QSPI in Zephyr?