Interfacing Quad Flash, Octal RAM, Octal Flash and/or MCP memory with flexSPI on iMX8 processor

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing Quad Flash, Octal RAM, Octal Flash and/or MCP memory with flexSPI on iMX8 processor

311 Views
Contributor I

Hello,

I am using iMX8QXP processor with linux-imx_5.4.3-1.0.0(linux-imx - i.MX Linux kernel ). I am new to iMX8 series processors and I am trying to interface Quad Flash, Octal Flash, Octal RAM, MCP memory to flexSPI.
I know I can connect Quad/Octal flash to flexspi0 interface, the .dts file is present in source. Change it according to the chip I am using. Create a new driver for the particular chip. Then I can access flash from user space using MTD utils/commands in my application. I have few questions regarding memory access.
1. Is there any example driver which I can go through to create my own flash driver?
2. What is the case if I am using Octal RAM. How can I access it from user space? using MTD utils? Are there any examples?
3. In case of MCP memory(Octal flash + Octal RAM), is it possible to access both Flash and RAM at the same time?

Thank you.

0 Kudos
5 Replies

193 Views
NXP TechSupport
NXP TechSupport

Hi Priyank

1. for driver example one can look at  SDK_MEK-MIMX8QX available

on Welcome | MCUXpresso SDK Builder 

or linux driver:

spi-nxp-fspi.c\spi\drivers - linux-imx - i.MX Linux kernel 

2. unfortunately for Octal RAM I am not aware of any examples, seems MTD utils can be used.

3. I am afraid not.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

193 Views
Contributor I

Hi igorpadykov,

Since the Octal RAM I am using does not use the SPI NOR commands, I have created kernel driver by taking reference from /driver/mtd/devices/mchp23k256.c from Microchip. I have also changed Kconfig & Makefile accordingly.
I want to connect Octal RAM through flexspi interface. I am confused about the changes I will required to do in my dtsi file.
Right now it contains

&flexspi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_flexspi0>;
    status = "okay";

    flash0: mt35xu512aba@0 {
        reg = <0>;
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "jedec,spi-nor";
        spi-max-frequency = <133000000>;
        spi-tx-bus-width = <4>;
        spi-rx-bus-width = <4>;
    };
};‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

And I want to change it for Octal RAM.
Can you provide some reference for Flexspi RAM(Dual/Quad/Octal) dts file?

I have seen SPI SRAM on the IMX6ul but still not clear how to add for flexspi interface.

Thank you.

Priyank.

0 Kudos

193 Views
NXP TechSupport
NXP TechSupport

Hi Priyank

 

I am afraid dts changes are not sufficient and changes in driver are also needed.

 

Best regards
igor

0 Kudos

188 Views
Contributor I

Hi Igor

I understand "dts changes are not sufficient and changes in driver are also needed."

I have made necessary changes in driver. I am a little confused about the CS pin.

I am trying to interface Octal RAM in this manner,

Screenshot from 2020-08-18 14-10-59.png

where an Octal RAM is in place of Flash A2.

In this case what changes would I need to do in dts file to make the CS pin work?

Will making reg = <1> do this?

 

Thank you

Priyank

0 Kudos

193 Views
Contributor I

Hi Igor

Thanks for quick reply.
I have already added driver in kernel to support the Octal RAM, made changes in Kconfig and Makefile.
But I am a little confused about the changes in dts file. That is why I need a reference dts file for flexspi RAM(Quad/Octal).

Thank you.

Priyank

0 Kudos