how to use QSPI B in ls1046 for non-flash devices

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use QSPI B in ls1046 for non-flash devices

Jump to solution
2,508 Views
TrinathK
Contributor III

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.

Tags (2)
0 Kudos
Reply
1 Solution
2,441 Views
teddy_gom_e
Contributor III

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)

 

View solution in original post

0 Kudos
Reply
6 Replies
2,484 Views
teddy_gom_e
Contributor III

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>;
};

 

0 Kudos
Reply
2,454 Views
TrinathK
Contributor III

Hi @teddy_gom_e 

Thanks a lot for the reply. I have already tried the same, its not working.

 

Tags (2)
0 Kudos
Reply
2,442 Views
teddy_gom_e
Contributor III

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)

 

0 Kudos
Reply
2,418 Views
TrinathK
Contributor III

Hi @teddy_gom_e 

Yes, RCW is OK. Both IFC_GRP_D_EXT and IFC_GRP_F_EXT are set to 001b.

 

Tags (2)
0 Kudos
Reply
2,328 Views
TrinathK
Contributor III

Hi,

Firstly, can i interface QSPI to non-flash devices ? please confirm.

Thanks

Tags (2)
0 Kudos
Reply
320 Views
tim_lei
Contributor II

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.

0 Kudos
Reply