Other Parts Discussed in Thread: AM4372
Hi, we are analyzing TDA4 SoC QSPI capabilities with goal of using it to connect to flash memory.
We noticed several instances of Multichannel SPI on TDA4 device supporting Quad data lanes, and want to use either MCSPI0 or MCU_MCSPI0 to connect to flash memory of FPGA.The flash memory does not support octal SPI and therefor we decided not to use TDA4 OSPI but regular (Quad) MCSPI interfaces.
Please note:
- Processor SDK version: 06_02_00 - we are planing to upgrade to 7_01_00 in near future.
- We are trying to keep pinout simmilar as possible to current default configuration for EVM board
Looking through PROCESSOR SDK Linux and RTOS user guides we did not find anything helpful on how to enable and use MCSPI interfaces. Ill elaborate:
When adding SPI to device tree we referred to kenrel documentation Documentation/devicetree/bindings/spi/ti_qspi.txt to see how to properly include it, but it seemd somewhat outdated as it shows examples only for am4372 and dra7xxx devices using TI QSPI, but TDA4 upgraded to TI McSPI.
User guide also instructs how to enable linux QSPI driver support, but:
<*> DRA7xxx QSPI controller support
Is no where to be found, my guess is, for TDA4 it is replaced with:
<*> McSPI driver for OMAP
which is enabled by default.
But only driver we find when linux boots is cadence-qspi and module cxd2880-spi.ko:
root@j7-evm:~# dmesg | grep spi
[ 4.703505] cadence-qspi 47050000.spi: n25q512a (65536 Kbytes)
[ 4.723071] cadence-qspi 47050000.spi: Cadence QSPI NOR probe failed -517
[ 5.449308] cadence-qspi 47050000.spi: n25q512a (65536 Kbytes)
root@j7-evm:~# find /lib/modules/ -iname "*spi*"
/lib/modules/4.19.94-g5a23bc00e0/kernel/drivers/media/spi
/lib/modules/4.19.94-g5a23bc00e0/kernel/drivers/media/spi/cxd2880-spi.ko
/lib/modules/4.19.94/kernel/drivers/media/spi
/lib/modules/4.19.94/kernel/drivers/media/spi/cxd2880-spi.ko
We also could not figure out which driver API we are suppose to use, as we noticed several being mentioned in documentation, with no clear examples on how to use them:
- psdkra/pdk/packages/ti/drv/spi/src/SPI_drv.c
- psdkla/board-support/linux-4.19.94+gitAUTOINC+5a23bc00e0-g5a23bc00e0/drivers/spi/spi-ti-qspi.c
We can see some useful instructions in this doc: software-dl.ti.com/.../spi.html
but at this point we are wonder can we even enable MCSPI to be used to connect to NOR flash?
Can you help us to achieve the following:
- include MCSPI to linux device tree
- figure out which driver, and which API we can use to perform read and write to flash memory
- enable driver for quad SPI
- How to write some kind QSPI_FlashReadWrite Example application for TDA4x
Regards.
Uros