SAMA5 NOR flash

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Bianco
Posts: 1
Joined: Tue Jun 02, 2015 9:07 am

SAMA5 NOR flash

Tue Jun 02, 2015 11:36 am

Hello,

I'm working on a project that requires both NAND flash and NOR flash on the board to be used. The board in question is the Ronetix SAMA5D35-CM. The NAND flash will be used as rootfs while the NOR flash will be used as a secondary data storage (the system does not need to be able to boot from NOR flash).

I am wondering whether NOR flash for at91 / sama5 devices is supported in the Linux kernel (in conjunction with a NAND flash device).

The Linux kernel has the atmel_nand driver to manage the NAND flash. There are no references in the source code of this driver to NOR flash support. The NAND flash and NOR flash on the board are connected on a shared EBI, making a second driver concurrent with the atmel_nand driver less feasible.
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5 NOR flash

Fri Jun 05, 2015 1:48 am

Bianco wrote:There are no references in the source code of this driver to NOR flash support.
And there should not be!
Co-mingling support for different devices in one driver simply is bad practice!
And if there was any mutual exclusion code, it should be generalized for any kind of device that might be sharing the EBI/NFC/SMC.
Bianco wrote:The NAND flash and NOR flash on the board are connected on a shared EBI, making a second driver concurrent with the atmel_nand driver less feasible.
SPI can create the exact same issue.
Do you think that Linux can only handle one SPI slave device connected to a SPI master controller?

AFAIK there is no Atmel driver for this NOR flash interface. But there is some sample code in the SoftPackage for configuring the SMC registers for the NOR flash.

There is some support for NOR flash in the MTD subsystem, which could be the proper layer to manage/arbitrate this EBI/NFC/SMC resource contention. If such resource functionality does not already exist, then a new layer (for the EBI/SMC device driver) should be inserted in the framework between MTD and the NOR/NAND drivers.

Regards
brotherr
Posts: 2
Joined: Mon Jun 15, 2015 10:42 am

Re: SAMA5 NOR flash

Mon Jun 15, 2015 10:57 am

Hi, Bianco.
Take a look to this unaccepted kernel patch - I hope it help someone who faced with such problem.
http://lists.infradead.org/pipermail/li ... 07599.html
Good luck!

Return to “Linux”

Who is online

Users browsing this forum: Google [Bot] and 2 guests