mbox series

[v5,0/2] Lattice ECP5 FPGA manager

Message ID 20220719112335.9528-1-i.bornyakov@metrotek.ru (mailing list archive)
Headers show
Series Lattice ECP5 FPGA manager | expand

Message

Ivan Bornyakov July 19, 2022, 11:23 a.m. UTC
Add support to the FPGA manager for programming Lattice ECP5 FPGA over
slave SPI interface with .bit formatted uncompressed bitstream image.

ChangeLog:
  v1 -> v2:
    * remove "spi" from compatible string
    * reword description in dt-bindings doc
    * add reference to spi-peripheral-props.yaml in dt-binding doc
    * fix DTS example in dt-bindings doc: 4-spaces indentations, no
      undersores in node names.
  v2 -> v3:
    * fix typo "##size-cells" -> "#size-cells" in dt-bindings example
  v3 -> v4:
    * dt-bindings: reword description
    * dt-bindings: revert props order
  v4 -> v5:
    * dt-bindings: remove trailing dot from title
    * dt-bindings: reword description to avoid driver reference
    * dt-bindings: add "Reviewed-by: Krzysztof Kozlowski" tag

Ivan Bornyakov (2):
  fpga: ecp5-spi: add Lattice ECP5 FPGA manager
  dt-bindings: fpga: add binding doc for ecp5-spi fpga mgr

 .../bindings/fpga/lattice,ecp5-fpga-mgr.yaml  |  74 +++++
 drivers/fpga/Kconfig                          |   7 +
 drivers/fpga/Makefile                         |   1 +
 drivers/fpga/ecp5-spi.c                       | 275 ++++++++++++++++++
 4 files changed, 357 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fpga/lattice,ecp5-fpga-mgr.yaml
 create mode 100644 drivers/fpga/ecp5-spi.c

Comments

Xu Yilun July 21, 2022, 7:44 a.m. UTC | #1
On Tue, Jul 19, 2022 at 02:23:33PM +0300, Ivan Bornyakov wrote:
> Add support to the FPGA manager for programming Lattice ECP5 FPGA over
> slave SPI interface with .bit formatted uncompressed bitstream image.

I didn't have time to looking into the patches yet, but I have some quick
question.

Where is the bitstream data writing to? To the FPGA active region or the
backup nvmem like flash?

After reconfiguration, how to re-enumerate the hardware devices in the
newly programmed FPGA region?

Thanks,
Yilun

> 
> ChangeLog:
>   v1 -> v2:
>     * remove "spi" from compatible string
>     * reword description in dt-bindings doc
>     * add reference to spi-peripheral-props.yaml in dt-binding doc
>     * fix DTS example in dt-bindings doc: 4-spaces indentations, no
>       undersores in node names.
>   v2 -> v3:
>     * fix typo "##size-cells" -> "#size-cells" in dt-bindings example
>   v3 -> v4:
>     * dt-bindings: reword description
>     * dt-bindings: revert props order
>   v4 -> v5:
>     * dt-bindings: remove trailing dot from title
>     * dt-bindings: reword description to avoid driver reference
>     * dt-bindings: add "Reviewed-by: Krzysztof Kozlowski" tag
> 
> Ivan Bornyakov (2):
>   fpga: ecp5-spi: add Lattice ECP5 FPGA manager
>   dt-bindings: fpga: add binding doc for ecp5-spi fpga mgr
> 
>  .../bindings/fpga/lattice,ecp5-fpga-mgr.yaml  |  74 +++++
>  drivers/fpga/Kconfig                          |   7 +
>  drivers/fpga/Makefile                         |   1 +
>  drivers/fpga/ecp5-spi.c                       | 275 ++++++++++++++++++
>  4 files changed, 357 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/fpga/lattice,ecp5-fpga-mgr.yaml
>  create mode 100644 drivers/fpga/ecp5-spi.c
> 
> -- 
> 2.37.1
>
Ivan Bornyakov July 21, 2022, 8:54 a.m. UTC | #2
On Thu, Jul 21, 2022 at 03:44:31PM +0800, Xu Yilun wrote:
> On Tue, Jul 19, 2022 at 02:23:33PM +0300, Ivan Bornyakov wrote:
> > Add support to the FPGA manager for programming Lattice ECP5 FPGA over
> > slave SPI interface with .bit formatted uncompressed bitstream image.
> 
> I didn't have time to looking into the patches yet, but I have some quick
> question.
> 
> Where is the bitstream data writing to? To the FPGA active region or the
> backup nvmem like flash?

Bitstream is written to FPGA's volatile SRAM configuration memory.

> 
> After reconfiguration, how to re-enumerate the hardware devices in the
> newly programmed FPGA region?
> 

I personally describe FPGA-based devices statically in DT overlay within
fpga-region. Of course this approach is error prone to mismatch between
firmware and devices described in DT overlay...

> Thanks,
> Yilun
> 
> > 
> > ChangeLog:
> >   v1 -> v2:
> >     * remove "spi" from compatible string
> >     * reword description in dt-bindings doc
> >     * add reference to spi-peripheral-props.yaml in dt-binding doc
> >     * fix DTS example in dt-bindings doc: 4-spaces indentations, no
> >       undersores in node names.
> >   v2 -> v3:
> >     * fix typo "##size-cells" -> "#size-cells" in dt-bindings example
> >   v3 -> v4:
> >     * dt-bindings: reword description
> >     * dt-bindings: revert props order
> >   v4 -> v5:
> >     * dt-bindings: remove trailing dot from title
> >     * dt-bindings: reword description to avoid driver reference
> >     * dt-bindings: add "Reviewed-by: Krzysztof Kozlowski" tag
> > 
> > Ivan Bornyakov (2):
> >   fpga: ecp5-spi: add Lattice ECP5 FPGA manager
> >   dt-bindings: fpga: add binding doc for ecp5-spi fpga mgr
> > 
> >  .../bindings/fpga/lattice,ecp5-fpga-mgr.yaml  |  74 +++++
> >  drivers/fpga/Kconfig                          |   7 +
> >  drivers/fpga/Makefile                         |   1 +
> >  drivers/fpga/ecp5-spi.c                       | 275 ++++++++++++++++++
> >  4 files changed, 357 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/fpga/lattice,ecp5-fpga-mgr.yaml
> >  create mode 100644 drivers/fpga/ecp5-spi.c
> > 
> > -- 
> > 2.37.1
> >
Ivan Bornyakov July 27, 2022, 6 a.m. UTC | #3
On Tue, Jul 19, 2022 at 02:23:33PM +0300, Ivan Bornyakov wrote:
> Add support to the FPGA manager for programming Lattice ECP5 FPGA over
> slave SPI interface with .bit formatted uncompressed bitstream image.
> 
> ChangeLog:
>   v1 -> v2:
>     * remove "spi" from compatible string
>     * reword description in dt-bindings doc
>     * add reference to spi-peripheral-props.yaml in dt-binding doc
>     * fix DTS example in dt-bindings doc: 4-spaces indentations, no
>       undersores in node names.
>   v2 -> v3:
>     * fix typo "##size-cells" -> "#size-cells" in dt-bindings example
>   v3 -> v4:
>     * dt-bindings: reword description
>     * dt-bindings: revert props order
>   v4 -> v5:
>     * dt-bindings: remove trailing dot from title
>     * dt-bindings: reword description to avoid driver reference
>     * dt-bindings: add "Reviewed-by: Krzysztof Kozlowski" tag
> 
> Ivan Bornyakov (2):
>   fpga: ecp5-spi: add Lattice ECP5 FPGA manager
>   dt-bindings: fpga: add binding doc for ecp5-spi fpga mgr
> 
>  .../bindings/fpga/lattice,ecp5-fpga-mgr.yaml  |  74 +++++
>  drivers/fpga/Kconfig                          |   7 +
>  drivers/fpga/Makefile                         |   1 +
>  drivers/fpga/ecp5-spi.c                       | 275 ++++++++++++++++++
>  4 files changed, 357 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/fpga/lattice,ecp5-fpga-mgr.yaml
>  create mode 100644 drivers/fpga/ecp5-spi.c
> 
> -- 
> 2.37.1
> 

Friendly ping.