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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
2,438件の閲覧回数
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.

タグ(2)
0 件の賞賛
返信
1 解決策
2,371件の閲覧回数
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 件の賞賛
返信
6 返答(返信)
2,414件の閲覧回数
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 件の賞賛
返信
2,384件の閲覧回数
TrinathK
Contributor III

Hi @teddy_gom_e 

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

 

タグ(2)
0 件の賞賛
返信
2,372件の閲覧回数
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 件の賞賛
返信
2,348件の閲覧回数
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.

 

タグ(2)
0 件の賞賛
返信
2,258件の閲覧回数
TrinathK
Contributor III

Hi,

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

Thanks

タグ(2)
0 件の賞賛
返信
250件の閲覧回数
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 件の賞賛
返信