All of lore.kernel.org
 help / color / mirror / Atom feed
* spi-oc-tiny.c and microwatt chip select
@ 2020-06-06  8:50 Benjamin Herrenschmidt
  2020-06-06 11:37 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2020-06-06  8:50 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi

Hi !

I've cooked up a little SPI controller VHDL for the Microwatt project
(https://github.com/antonblanchard/microwatt, though the SPI isnt
merged yet), to control the flash connected to the FPGA (it contains
the bitfile and the SW payload, such as Linux).

Now I could write yet-another bitbang driver for Linux for it, or I
could make my controller look like an existing one :) It's very simple,
but I should be able to make it look like spi-oc-tiny.c quite easily.

Now as for chip-selects... I could also add some concept of GPIOs,
write a simple MMIO GPIO controller etc... or I could for now make my
life easier and send a patch adding an extra register to control chip
select to spi-oc-tiny.c keyd off a device-tree property (or the
compatible property) :-)

Any objection to the "easy/fast" way :-) ?

Cheers,
Ben.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spi-oc-tiny.c and microwatt chip select
  2020-06-06  8:50 spi-oc-tiny.c and microwatt chip select Benjamin Herrenschmidt
@ 2020-06-06 11:37 ` Mark Brown
  2020-06-06 13:02   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2020-06-06 11:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-spi

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Sat, Jun 06, 2020 at 06:50:37PM +1000, Benjamin Herrenschmidt wrote:

> Now as for chip-selects... I could also add some concept of GPIOs,
> write a simple MMIO GPIO controller etc... or I could for now make my
> life easier and send a patch adding an extra register to control chip
> select to spi-oc-tiny.c keyd off a device-tree property (or the
> compatible property) :-)

> Any objection to the "easy/fast" way :-) ?

That sounds fine (I'd go with a different compatible).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spi-oc-tiny.c and microwatt chip select
  2020-06-06 11:37 ` Mark Brown
@ 2020-06-06 13:02   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2020-06-06 13:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi

On Sat, 2020-06-06 at 12:37 +0100, Mark Brown wrote:
> On Sat, Jun 06, 2020 at 06:50:37PM +1000, Benjamin Herrenschmidt
> wrote:
> 
> > Now as for chip-selects... I could also add some concept of GPIOs,
> > write a simple MMIO GPIO controller etc... or I could for now make
> > my
> > life easier and send a patch adding an extra register to control
> > chip
> > select to spi-oc-tiny.c keyd off a device-tree property (or the
> > compatible property) :-)
> > Any objection to the "easy/fast" way :-) ?
> 
> That sounds fine (I'd go with a different compatible).

Great ! Thanks.

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-06 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06  8:50 spi-oc-tiny.c and microwatt chip select Benjamin Herrenschmidt
2020-06-06 11:37 ` Mark Brown
2020-06-06 13:02   ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.