AnsweredAssumed Answered

How to check flag status register and How to apply Sector Erase Command(0x20)

Question asked by Eric Kang on Aug 5, 2015
Latest reply on Aug 25, 2015 by Eric Kang

Hi all,

 

I want to know how to add flag status check during SPI Flash write/erase for Micron 512Mb Serial Flash.
We have to change the QSPI-NOR density from 256Mb to 512Mb, because our RootFS is larger than QSPI-NOR density(256Mb).

 

Our development environment is like as below,
- AP/Board : i.MX6SX-SabreSDB
- OS : Linux 3.10.53
- Device : Micron 512Mb QSPI-NOR N25Q512A

 

Firstly I confirmed the 512Mb QSPI-NOR probing.
For this I modified the below files,

drivers/mtd/spi-nor/spi-nor.c
const struct spi_device_id spi_nor_ids[] = {
...
        { "n25q512a",    INFO(0x20ba20, 0, 64 * 1024, 1024, SECT_4K) },
...
};

arch/arm/boot/dts/imx6sx-sdb.dts
&qspi2 {
...
        flash0: n25q512a@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "micron,n25q512a";
                spi-max-frequency = <29000000>;
                reg = <0>;
        };
...
};

 

I couldn't confirm the flash erase operation.
And I couldn't find the flag status check routine and the SECT_4K control routine in Freescale BSP.

 

In the Web-Site, I could find the relative code like as below,
- Check flag status register for Micron n25q512a
  . http://lists.infradead.org/pipermail/linux-mtd/2014-January/051382.html?
- mtd: st_spi_fsm: Add support for Micron N25Q512A (for STMicro)
  . http://www.gossamer-threads.com/lists/linux/kernel/2090517

 

But I couldn't find the relative code for i.MX6SX.
Could you give any guidance to apply Micron N25Q512A?

 

Best Regards,
Eric.

Outcomes