How should I integrate my SPI driver into kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
First, let me explain what I would like to achieve.
I'm using the NXP LS1028a CPU, which will be used as a base for our SoM.
This CPU features two types of SPI controllers:
- 1 FlexSPI (cabable of Single/Dual/Quad/Octal mode)
- 3 traditional SPIs
Because of the design of our SoM all traditional SPIs are not available (designed to be used for other needs), so the only one left is FlexSPI.
This FlexSPI will be used to communicate with 3 different things:
- SPI NOR Flash
- SPI NOR Flash
- Hilsher netX90
As far as I understand FlexSPI is designed to work with Flash-like devices, which are obviously Flash memories. Each time one wants to send something over this FlexSPI it puts the data on the bus like this:
- opcode | addr | dummy | data

So communication with Flash memories won't be a problem. The problem I see is the communication with this Hilsher thing. Fortunately, we can put on the Hilsher our own FW that will handle SPI communication. So my idea was to:
- develop a FW designed for Hilsher that will behave like a Flash device
- develop a driver on the Linux side that will use this FlexSPI controller to communicate with Hisler in a Flash (thus FlexSPI) compatible manner.

However, I'm not sure how I should go about this. I checked and e.g. driver that we use to communicate with SPI NOR Flash (jedec,spi-nor) uses something like spi-nor which in turn uses a driver spi-mem.
Obviously, I get that the spi-nor is designed to work with SPI NOR flashes so that's not the way I'm going to go, however, I'm curious about this spi-mem thing.
Is this spi-mem designed to work with devices that are like memory-mapped but not necessarily flash memories?

What would you advise in this case?

BR
Patrick
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux