Part Number: TDA2PXEVM
Hello there.
I want to use QSPI as standart 4-wire SPI to communicate with TLE9255W CAN-bus transceiver in full duplex mode using Linux spidev driver. I have dra76-evm-infoadas.dts modified this way:
&qspi {
status = "okay";
reg = <0x4b300000 0x100>,
<0x5c000000 0x4000000>,
<0x4a002558 0x4>;
spi-max-frequency = <100000>;
reg-names = "qspi_base", "qspi_mmap", "qspi_ctrlmod";
/delete-node/ m25p80@0;
spidev@0x00 {
compatible = "rohm,dh2228fv";
reg = <0>;
status = "okay";
spi-max-frequency = <100000>;
spi-cpha;
};
};
Thus when I have spidev module loaded I get /dev/spidev32766.0 device to work with.
Whe I run spidev_test application (compiled from linux kernel sources) I got EINVAL error, because this application tries to use /dev/spidev32766.0 in full duplex mode, but ti-qspi driver in it's probe function cofigures itself as follow:
master->flags = SPI_MASTER_HALF_DUPLEX;
Even if I have this line commented out -- there is another place in code:
static int qspi_transfer_msg(struct ti_qspi *qspi, struct spi_transfer *t,
int count)
{
int ret;
if (t->tx_buf) {
ret = qspi_write_msg(qspi, t, count);
if (ret) {
dev_dbg(qspi->dev, "Error while writing\n");
return ret;
}
}
if (t->rx_buf) {
ret = qspi_read_msg(qspi, t, count);
if (ret) {
dev_dbg(qspi->dev, "Error while reading\n");
return ret;
}
}
return 0;
}
And on SPI bus I got two transactions:

Because CAN-bus transceiver works only in full-duplex mode I can't get it's answer to me.
So I have two questions about this all:
1) Is there any hardware limitation in QSPI controller to use full duplex?
2) If there is no hardware limitations -- how can I enable full duplex mode for QSPI?
