mbox series

[v1,0/2] SPI-NOR add NPCM FIU controller driver

Message ID 20181203091456.454030-1-tmaimon77@gmail.com
Headers show
Series SPI-NOR add NPCM FIU controller driver | expand

Message

Tomer Maimon Dec. 3, 2018, 9:14 a.m. UTC
This patch set adds Flash Interface Unit(FIU) SPI-NOR
support for the Nuvoton NPCM Baseboard Management 
Controller (BMC).
    
The FIU supports single, dual or quad communication interface.
    
the FIU controller can operate in following modes:
- User Mode Access(UMA): provides flash access by using an
  indirect address/data mechanism.
- direct rd/wr mode: maps the flash memory into the core
  address space.
- SPI-X mode: used for an expansion bus to an ASIC or CPLD.

The NPCM750/730/715/710 supports up to three FIU devices:
- FIU0 supports two chip select.
- FIU3 supports four chip select.
- FIUX supports two chip select.

The NPCM FIU driver tested on NPCM750 evaluation board.

Tomer Maimon (2):
  dt-binding: mtd: add NPCM FIU controller
  mtd: spi-nor: add NPCM FIU controller driver

 Documentation/devicetree/bindings/mtd/npcm-fiu.txt |  64 ++
 drivers/mtd/spi-nor/Kconfig                        |   8 +
 drivers/mtd/spi-nor/Makefile                       |   1 +
 drivers/mtd/spi-nor/npcm-fiu.c                     | 930 +++++++++++++++++++++
 4 files changed, 1003 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/npcm-fiu.txt
 create mode 100644 drivers/mtd/spi-nor/npcm-fiu.c

Comments

Boris Brezillon Dec. 3, 2018, 9:22 a.m. UTC | #1
On Mon,  3 Dec 2018 11:14:54 +0200
Tomer Maimon <tmaimon77@gmail.com> wrote:

> This patch set adds Flash Interface Unit(FIU) SPI-NOR
> support for the Nuvoton NPCM Baseboard Management 
> Controller (BMC).
>     
> The FIU supports single, dual or quad communication interface.
>     
> the FIU controller can operate in following modes:
> - User Mode Access(UMA): provides flash access by using an
>   indirect address/data mechanism.
> - direct rd/wr mode: maps the flash memory into the core
>   address space.
> - SPI-X mode: used for an expansion bus to an ASIC or CPLD.
> 
> The NPCM750/730/715/710 supports up to three FIU devices:
> - FIU0 supports two chip select.
> - FIU3 supports four chip select.
> - FIUX supports two chip select.
> 
> The NPCM FIU driver tested on NPCM750 evaluation board.
> 
> Tomer Maimon (2):
>   dt-binding: mtd: add NPCM FIU controller
>   mtd: spi-nor: add NPCM FIU controller driver
> 
>  Documentation/devicetree/bindings/mtd/npcm-fiu.txt |  64 ++
>  drivers/mtd/spi-nor/Kconfig                        |   8 +
>  drivers/mtd/spi-nor/Makefile                       |   1 +
>  drivers/mtd/spi-nor/npcm-fiu.c                     | 930 +++++++++++++++++++++

We are currently trying to move all SPI NOR controller drivers out of
drivers/mtd/spi-nor. Can you try to implement the spi-mem interface [1]
and place your driver in drivers/spi/. 

[1]https://elixir.bootlin.com/linux/v4.20-rc5/source/include/linux/spi/spi-mem.h#L185
Tomer Maimon Dec. 3, 2018, 2:09 p.m. UTC | #2
Hi Boris,



Thanks for getting back to me on this driver.


A few comments/input:


   1. We have been working on this driver for quite a long time to port it
   to the latest Linux conventions, polish the code, run tests and reach high
   quality.
   Our partners and customers are waiting to get this driver upstream so
   they can freely use it.
   Since this driver is already in final stages and is in very good shape
   we will appreciate if you can review this specific driver/interface and
   help us to upstream it.
   2.  As for the new interface, we are open for any discussion and for
   porting the driver as required.
   We are unsure what is this specific interface and weather it really fits
   a driver for a Flash Interface Controller module (rather than a SPI flash
   device).
   Is it possible to get a sample driver from another Flash Interface
   Controller module that was ported to this new interface ?
   Based on this we can evaluate the required effort and assign it
   accordingly.

Regards,

Tomer


On Mon, 3 Dec 2018 at 11:22, Boris Brezillon <boris.brezillon@bootlin.com>
wrote:

> On Mon,  3 Dec 2018 11:14:54 +0200
> Tomer Maimon <tmaimon77@gmail.com> wrote:
>
> > This patch set adds Flash Interface Unit(FIU) SPI-NOR
> > support for the Nuvoton NPCM Baseboard Management
> > Controller (BMC).
> >
> > The FIU supports single, dual or quad communication interface.
> >
> > the FIU controller can operate in following modes:
> > - User Mode Access(UMA): provides flash access by using an
> >   indirect address/data mechanism.
> > - direct rd/wr mode: maps the flash memory into the core
> >   address space.
> > - SPI-X mode: used for an expansion bus to an ASIC or CPLD.
> >
> > The NPCM750/730/715/710 supports up to three FIU devices:
> > - FIU0 supports two chip select.
> > - FIU3 supports four chip select.
> > - FIUX supports two chip select.
> >
> > The NPCM FIU driver tested on NPCM750 evaluation board.
> >
> > Tomer Maimon (2):
> >   dt-binding: mtd: add NPCM FIU controller
> >   mtd: spi-nor: add NPCM FIU controller driver
> >
> >  Documentation/devicetree/bindings/mtd/npcm-fiu.txt |  64 ++
> >  drivers/mtd/spi-nor/Kconfig                        |   8 +
> >  drivers/mtd/spi-nor/Makefile                       |   1 +
> >  drivers/mtd/spi-nor/npcm-fiu.c                     | 930
> +++++++++++++++++++++
>
> We are currently trying to move all SPI NOR controller drivers out of
> drivers/mtd/spi-nor. Can you try to implement the spi-mem interface [1]
> and place your driver in drivers/spi/.
>
> [1]
> https://elixir.bootlin.com/linux/v4.20-rc5/source/include/linux/spi/spi-mem.h#L185
>
<div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Hi Boris,</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Thanks for getting back to me on this driver.</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">A few comments/input:</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"></p><ol style=""><li style=""><font face="Calibri, sans-serif"><span style="font-size:14.6667px">We have been working on this driver for quite a long time to port it to the latest Linux conventions, polish the code, run tests and reach high quality.<br>Our partners and customers are waiting to get this driver upstream so they can freely use it.<br>Since this driver is already in final stages and is in very good shape we will appreciate if you can review this specific driver/interface and help us to upstream it. </span></font></li><li style=""><font face="Calibri, sans-serif"><span style="font-size:14.6667px"> As for the new interface, we are open for any discussion and for porting the driver as required.<br>We are unsure what is this specific interface and weather it really fits a driver for a Flash Interface Controller module (rather than a SPI flash device).<br>Is it possible to get a sample driver from another Flash Interface Controller module that was ported to this new interface ?<br>Based on this we can evaluate the required effort and assign it accordingly. </span></font></li></ol><div><font face="Calibri, sans-serif"><span style="font-size:14.6667px">Regards,</span></font></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></div><div><font face="Calibri, sans-serif"><span style="font-size:14.6667px">Tomer</span></font></div><p></p></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 3 Dec 2018 at 11:22, Boris Brezillon &lt;<a href="mailto:boris.brezillon@bootlin.com">boris.brezillon@bootlin.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon,  3 Dec 2018 11:14:54 +0200<br>
Tomer Maimon &lt;<a href="mailto:tmaimon77@gmail.com" target="_blank">tmaimon77@gmail.com</a>&gt; wrote:<br>
<br>
&gt; This patch set adds Flash Interface Unit(FIU) SPI-NOR<br>
&gt; support for the Nuvoton NPCM Baseboard Management <br>
&gt; Controller (BMC).<br>
&gt;     <br>
&gt; The FIU supports single, dual or quad communication interface.<br>
&gt;     <br>
&gt; the FIU controller can operate in following modes:<br>
&gt; - User Mode Access(UMA): provides flash access by using an<br>
&gt;   indirect address/data mechanism.<br>
&gt; - direct rd/wr mode: maps the flash memory into the core<br>
&gt;   address space.<br>
&gt; - SPI-X mode: used for an expansion bus to an ASIC or CPLD.<br>
&gt; <br>
&gt; The NPCM750/730/715/710 supports up to three FIU devices:<br>
&gt; - FIU0 supports two chip select.<br>
&gt; - FIU3 supports four chip select.<br>
&gt; - FIUX supports two chip select.<br>
&gt; <br>
&gt; The NPCM FIU driver tested on NPCM750 evaluation board.<br>
&gt; <br>
&gt; Tomer Maimon (2):<br>
&gt;   dt-binding: mtd: add NPCM FIU controller<br>
&gt;   mtd: spi-nor: add NPCM FIU controller driver<br>
&gt; <br>
&gt;  Documentation/devicetree/bindings/mtd/npcm-fiu.txt |  64 ++<br>
&gt;  drivers/mtd/spi-nor/Kconfig                        |   8 +<br>
&gt;  drivers/mtd/spi-nor/Makefile                       |   1 +<br>
&gt;  drivers/mtd/spi-nor/npcm-fiu.c                     | 930 +++++++++++++++++++++<br>
<br>
We are currently trying to move all SPI NOR controller drivers out of<br>
drivers/mtd/spi-nor. Can you try to implement the spi-mem interface [1]<br>
and place your driver in drivers/spi/. <br>
<br>
[1]<a href="https://elixir.bootlin.com/linux/v4.20-rc5/source/include/linux/spi/spi-mem.h#L185" rel="noreferrer" target="_blank">https://elixir.bootlin.com/linux/v4.20-rc5/source/include/linux/spi/spi-mem.h#L185</a><br>
</blockquote></div>
Boris Brezillon Dec. 3, 2018, 2:30 p.m. UTC | #3
Hi Tomer;

On Mon, 3 Dec 2018 16:09:19 +0200
Tomer Maimon <tmaimon77@gmail.com> wrote:


> A few comments/input:
> 
> 
>    1. We have been working on this driver for quite a long time to port it
>    to the latest Linux conventions, polish the code, run tests and reach high
>    quality.
>    Our partners and customers are waiting to get this driver upstream so
>    they can freely use it.

Your patch prefix says "v1", so I'm assuming this is the first public
version. I'm sure you spent a lot of time developing this driver
internally, but no matter how long it took, it's a first version for
us, and since we are moving away from the spi_nor controller interface,
I'm not willing to accept new drivers using this interface.

If you want more background about the spi_nor controller interface
deprecation, you can read [1].

>    Since this driver is already in final stages and is in very good shape
>    we will appreciate if you can review this specific driver/interface and
>    help us to upstream it.

Actually, I'd like to do it the other way around: let you rework the
driver to implement the spi-mem interface and review this version.
Otherwise I'll be reviewing things I don't intend to merge anyway.

>    2.  As for the new interface, we are open for any discussion and for
>    porting the driver as required.
>    We are unsure what is this specific interface and weather it really fits
>    a driver for a Flash Interface Controller module (rather than a SPI flash
>    device).

Didn't go through the code in details, but at first glance, it looks
like it would fit pretty well.

>    Is it possible to get a sample driver from another Flash Interface
>    Controller module that was ported to this new interface ?

We recently converted the atmel QSPI driver [2].

Regards,

Boris

[1]https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/
[2]https://patchwork.kernel.org/project/spi-devel-general/list/?series=38347&state=*
Tomer Maimon Dec. 3, 2018, 3:28 p.m. UTC | #4
Hi Boris,

Thanks for your prompt reply,

We will start to work on it soon.

Regards,

Tomer

On Mon, 3 Dec 2018 at 16:30, Boris Brezillon <boris.brezillon@bootlin.com>
wrote:

> Hi Tomer;
>
> On Mon, 3 Dec 2018 16:09:19 +0200
> Tomer Maimon <tmaimon77@gmail.com> wrote:
>
>
> > A few comments/input:
> >
> >
> >    1. We have been working on this driver for quite a long time to port
> it
> >    to the latest Linux conventions, polish the code, run tests and reach
> high
> >    quality.
> >    Our partners and customers are waiting to get this driver upstream so
> >    they can freely use it.
>
> Your patch prefix says "v1", so I'm assuming this is the first public
> version. I'm sure you spent a lot of time developing this driver
> internally, but no matter how long it took, it's a first version for
> us, and since we are moving away from the spi_nor controller interface,
> I'm not willing to accept new drivers using this interface.
>
> If you want more background about the spi_nor controller interface
> deprecation, you can read [1].
>
> >    Since this driver is already in final stages and is in very good shape
> >    we will appreciate if you can review this specific driver/interface
> and
> >    help us to upstream it.
>
> Actually, I'd like to do it the other way around: let you rework the
> driver to implement the spi-mem interface and review this version.
> Otherwise I'll be reviewing things I don't intend to merge anyway.
>
> >    2.  As for the new interface, we are open for any discussion and for
> >    porting the driver as required.
> >    We are unsure what is this specific interface and weather it really
> fits
> >    a driver for a Flash Interface Controller module (rather than a SPI
> flash
> >    device).
>
> Didn't go through the code in details, but at first glance, it looks
> like it would fit pretty well.
>
> >    Is it possible to get a sample driver from another Flash Interface
> >    Controller module that was ported to this new interface ?
>
> We recently converted the atmel QSPI driver [2].
>
> Regards,
>
> Boris
>
> [1]
> https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/
> [2]
> https://patchwork.kernel.org/project/spi-devel-general/list/?series=38347&state=*
>
<div dir="ltr">Hi Boris,<div><br></div><div>Thanks for your prompt reply,</div><div><br></div><div>We will start to work on it soon.</div><div><br></div><div>Regards,</div><div><br></div><div>Tomer</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 3 Dec 2018 at 16:30, Boris Brezillon &lt;<a href="mailto:boris.brezillon@bootlin.com">boris.brezillon@bootlin.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tomer;<br>
<br>
On Mon, 3 Dec 2018 16:09:19 +0200<br>
Tomer Maimon &lt;<a href="mailto:tmaimon77@gmail.com" target="_blank">tmaimon77@gmail.com</a>&gt; wrote:<br>
<br>
<br>
&gt; A few comments/input:<br>
&gt; <br>
&gt; <br>
&gt;    1. We have been working on this driver for quite a long time to port it<br>
&gt;    to the latest Linux conventions, polish the code, run tests and reach high<br>
&gt;    quality.<br>
&gt;    Our partners and customers are waiting to get this driver upstream so<br>
&gt;    they can freely use it.<br>
<br>
Your patch prefix says &quot;v1&quot;, so I&#39;m assuming this is the first public<br>
version. I&#39;m sure you spent a lot of time developing this driver<br>
internally, but no matter how long it took, it&#39;s a first version for<br>
us, and since we are moving away from the spi_nor controller interface,<br>
I&#39;m not willing to accept new drivers using this interface.<br>
<br>
If you want more background about the spi_nor controller interface<br>
deprecation, you can read [1].<br>
<br>
&gt;    Since this driver is already in final stages and is in very good shape<br>
&gt;    we will appreciate if you can review this specific driver/interface and<br>
&gt;    help us to upstream it.<br>
<br>
Actually, I&#39;d like to do it the other way around: let you rework the<br>
driver to implement the spi-mem interface and review this version.<br>
Otherwise I&#39;ll be reviewing things I don&#39;t intend to merge anyway.<br>
<br>
&gt;    2.  As for the new interface, we are open for any discussion and for<br>
&gt;    porting the driver as required.<br>
&gt;    We are unsure what is this specific interface and weather it really fits<br>
&gt;    a driver for a Flash Interface Controller module (rather than a SPI flash<br>
&gt;    device).<br>
<br>
Didn&#39;t go through the code in details, but at first glance, it looks<br>
like it would fit pretty well.<br>
<br>
&gt;    Is it possible to get a sample driver from another Flash Interface<br>
&gt;    Controller module that was ported to this new interface ?<br>
<br>
We recently converted the atmel QSPI driver [2].<br>
<br>
Regards,<br>
<br>
Boris<br>
<br>
[1]<a href="https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/" rel="noreferrer" target="_blank">https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/</a><br>
[2]<a href="https://patchwork.kernel.org/project/spi-devel-general/list/?series=38347&amp;state=*" rel="noreferrer" target="_blank">https://patchwork.kernel.org/project/spi-devel-general/list/?series=38347&amp;state=*</a><br>
</blockquote></div>