Hi,
I have a custom ls1046 board in which i interfaced NOR flash to QSPI A and non-flash device to QSPI_B (used as SPI, i.e., only QSPI_B_DATA0 and QSPI_B_DATA1 are used).
In fsl-ls1046a.dtsi file, start address for QSPI is mentioned as 155_0000 and start address for QSPI memory is mentioned as 4000_0000.
qspi: spi@1550000 {
compatible = "fsl,ls1021a-qspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x1550000 0x0 0x10000>,
<0x0 0x40000000 0x0 0x10000000>;
reg-names = "QuadSPI", "QuadSPI-memory";
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "qspi_en", "qspi";
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
status = "okay";
};
I have connected QSPI_B_CS0, QSPI_B_SCK, QSPI_B_DATA0 and QSPI_B_DATA1 to my non-flash device.
When i add new QSPI devices in dts file, the device is writing to the QSPI_A_SCK, QSPI_A_DATA0..3 and user selected CS lines.
I want to use QSPI-B signals. So please let me know, What are the starting addresses for QSPI_B and what changes should i make in dts file (or) anywhere else, to write data on to the QSPI B data lines?
Thanks in advance.
Solved! Go to Solution.
Is your RCW adapted to your board ?
Bits 393-395 IFC_GRP_D_EXT shall be 001b
Bits 399-401 IFC_GRP_F_EXT shal be 001b (should already be, as your QSPI_A is OK)
Have you tried something like this in your .dts including the .dtsi:
&qspi {
bus-num = <1>; /* 0 for A, 1 for B*/
status = "okay";
qflash0: mt25qu128aba@0 {
compatible = "micron,n25q128a11";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <20000000>;
reg = <0>;
spi-rx-bus-width = <2>;
spi-tx-bus-width = <2>;
};
Is your RCW adapted to your board ?
Bits 393-395 IFC_GRP_D_EXT shall be 001b
Bits 399-401 IFC_GRP_F_EXT shal be 001b (should already be, as your QSPI_A is OK)
Hi,
Firstly, can i interface QSPI to non-flash devices ? please confirm.
Thanks
hi,
Has this issue been fixed?
I also faced the same problem when I connected a non-flash device to QSPI QSPI_B_CS1.
Another 2 NOR flash connected to QSPI_B_CS0 works well.
I used spidev-test tool to test the spidev0.3, It returned an error (-524), not supported. look into spi-fsl-qspi.c controller driver code did not find the implementation of transfer_one_message().
I suspect this controller only supports read/write for NOR flash but does not support ioctl() for regular SPI devices.
it has not confirmed by NXP yet.