Hi
I want to use qspi feature of the ls1028 processer. I change the dts as below:
dts:
spi@20c0000 {
compatible = "nxp,lx2160a-fspi";
#address-cells = <0x01>;
#size-cells = <0x00>;
reg = <0x00 0x20c0000 0x00 0x10000 0x00 0x20000000 0x00 0x10000000>;
reg-names = "fspi_base\0fspi_mmap";
interrupts = <0x00 0x19 0x04>;
clocks = <0x02 0x02 0x00 0x02 0x02 0x00>;
clock-names = "fspi_en\0fspi";
status = "okay";
phandle = <0x30>;
qspidevice@0 {
compatible = "nxp,qspi-generic";
#address-cells = <0x01>;
#size-cells = <0x01>;
spi-max-frequency = <0x1312d00>;
reg = <0x00>;
spi-rx-bus-width = <0x04>;
spi-tx-bus-width = <0x01>;
phandle = <0x31>;
};
/*
flash@0 {
compatible = "spansion,m25p80";
#address-cells = <0x01>;
#size-cells = <0x01>;
m25p,fast-read;
spi-max-frequency = <0x1312d00>;
reg = <0x00>;
spi-rx-bus-width = <0x04>;
spi-tx-bus-width = <0x01>;
phandle = <0x31>;
};
*/
};
Can I use "spi_sync" API to wirte the qspi device driver code as fallow? if not , which api should be called?
Most QSPI controllers can only be used in combination with flash memories (serial NOR typically, some also support serial NAND). They cannot handle "generic" SPI as they "snoop" the commands sent to control the extra data lines.
Connect your device to a "normal" SPI controller (the NXP has plenty of those).
get it.
Thanks.