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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
241 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
1 Solution
174 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
5 Replies
217 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
187 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
175 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
151 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
61 Views
TrinathK
Contributor III

Hi,

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

Thanks

Tags (2)
0 Kudos