Hi Team,
For my project, I am using nRF 5340 board and using the Zephyr SDK for development. I need to read and write data from/to an external QSPI EEPROM used ( MP95P08-i). For that I am using the compatible string -'nordic,qspi-nor' inside the qspi node defined in the dts overlay file. But when I use the 'nordic,qspi-nor' driver file's read function, I am always getting values of '0x88' and write function also is not yielding results, although both functions do not give any error. Also, when I use the function for reading JEDEC ID and SFDP values , those values are being fetched correctly for the above mentioned EEPROM device.
When I investigated further I saw that the qspi_read_jedec_id function was using the flash opcode - 'SPI_NOR_CMD_RDID' (from 'spi_nor.h') for reading the JEDEC ID. But for the read function it was using some other ways, not using the internal flash opcodes which was there for read and write - SPI_NOR_CMD_READ(0x03) and SPI_NOR_CMD_PP(0x02).
So in turn we tried modifying the functions for read and write using the above flash opcodes (SPI_NOR_CMD_READ(0x03) and SPI_NOR_CMD_PP(0x02)) in nrf_qspi_nor.c.
Then the read and write functionalities were working perfectly.
- Is there any reason for not explicitly using the flash opcodes, for read and write operations?
- Is there any way to configure the "nordic,qspi-nor" driver to use the flash opcodes for read and write, without modifying the original source code?
- For other buses and slave devices, there are separate compatible strings for the bus and the slave devices. But for qspi we could only find compatible property only for the slave device, not for the bus. Is there any reason for this or is my understanding wrong?