linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mgr@pengutronix.de (Michael Grzeschik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] spi: psdev: add passive serial driver
Date: Fri, 14 Mar 2014 11:19:07 +0100	[thread overview]
Message-ID: <20140314101907.GF4234@pengutronix.de> (raw)
In-Reply-To: <20140312163427.GV28112@sirena.org.uk>

On Wed, Mar 12, 2014 at 04:34:27PM +0000, Mark Brown wrote:
> On Wed, Mar 12, 2014 at 04:53:37PM +0100, Michael Grzeschik wrote:
> 
> > This patch introduces the psdev driver. It is used to communicate to an
> > Altera passive serial connected FPGA by writing into an character
> > device.
> > 
> > It simply initates the protocol on open and clocks the data into the
> > FPGA by using the underlying SPI bus on write. The used SPI bus can also
> > be an bitbang SPI bus. On close it will check for the response of the
> > FPGA and tells if the write process was successful.
> 
> Having read the above I'm still not entirely sure what this is supposed
> to do.  It sounds like it might be something to do with programming
> FPGAs but that doesn't seem like something for the SPI subsystem, it
> sounds like something for a FPGA handling subsystem.  People keep
> talking about that, there's a bunch of other stuff to integrate with
> there like loading DTs for the downloeaded bitstream.  I'm not sure what
> the status is there.

Ok, so first of all it needs better documentation, also for the
bindings. I will add some.

Second, the driver has "per se" nothing to do with SPI, beside it needs
a clock and data line to transfer an image to the FPGA. (One way,
therefor: passive). It needs to use some SPI controller to do that. Even
the SPI Bitbang driver. Because of this, it depends on the SPI
framework.

Beside the SCLK and MOSI, the protocol needs to toggle and check some
GPIOs for protocol start and end. For that I chose the posix open and
close, so that in userland it can be used as simple as $(cat
firmware.rbf > /dev/psdev0). This protocol also needs no SS line.

It is actually not more than that. I took the spidev character device
driver as reference implementation. Any Idea where to put this driver
instead.

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2014-03-14 10:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 15:53 [PATCH 0/3] spi: bitbang fixes and passive serial driver Michael Grzeschik
2014-03-12 15:53 ` [PATCH 1/3] spi: bitbang: fix shift for getmosi Michael Grzeschik
2014-03-12 16:24   ` Mark Brown
2014-03-12 21:45     ` Gerhard Sittig
2014-03-12 15:53 ` [PATCH 2/3] spi: bitbang: add lsb first support Michael Grzeschik
2014-03-12 15:53 ` [PATCH 3/3] spi: psdev: add passive serial driver Michael Grzeschik
2014-03-12 16:34   ` Mark Brown
2014-03-14 10:19     ` Michael Grzeschik [this message]
2014-03-14 10:22       ` Mark Brown
2014-03-14 13:59         ` Linus Walleij
2014-03-14 18:11           ` Michael Grzeschik
2014-03-12 17:54   ` Alexander Shiyan
2014-03-13 17:14   ` Mark Rutland
2014-03-14  8:06   ` Lothar Waßmann

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=20140314101907.GF4234@pengutronix.de \
    --to=mgr@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).