Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Patryk <pbiel7@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: How should I integrate my SPI driver into kernel?
Date: Sat, 4 Nov 2023 13:13:36 +0100	[thread overview]
Message-ID: <CA+DkFDZmMfKK3wt1bmN9wSqKGkFLHJ-ZExfvJt66fUL8CdA84w@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1719 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2094 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

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

                 reply	other threads:[~2023-11-04 12:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+DkFDZmMfKK3wt1bmN9wSqKGkFLHJ-ZExfvJt66fUL8CdA84w@mail.gmail.com \
    --to=pbiel7@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).