foss-for-synopsys-dwc-arc-processors/linux

SPI flash support in Arc Linux kernel

cxh2022 opened this issue · 2 comments

Our hardware has SPI flash and we are enabling SPI flash support in Arc Linux kernel. Do you have any document on how to do this? Thanks.

What you're asking about is a very generic thing and explanations on how that could be done you may find in multiple places.
Basically you need to enable corresponding subsystems, components & drivers in the Linux kernel configuration an also "describe" your hardware in so-called "device tree".

For your reference here's an example of how we did that for our HSDK platfrom:

  1. Add DW SPI controller: torvalds@aab128d
  2. Add SPI NOR Flash IC: torvalds@8ca8fa7

Note, this all is very specific to your device. I.e. I don't know what kind of SPI controller do you have on your board and type & vendor of your SPI flash. Depending on that you'll need to use different kernel drivers if they already exist for your hardware or create new drivers if your particular HW is not yet supported.

You may find the following ELCE 2027 talk " Groking the Linux SPI Subsystem" http://events17.linuxfoundation.org/sites/events/files/slides/Groking%20the%20Linux%20SPI%20Subsystem.pdf of some interest as well.

Thanks for the info! It's very helpful. Will looking into it.