Skip to content

Add support for StarFive JHB100 SFC

Changhuang Liang linux-devicetree linux-spi lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 1 replyIn review
  2. v111 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Reordered the series so that every symbol is introduced before its first user and each patch is independently reviewable.
- adjust_op_size(): clamp DATA_IN to DW_SPI_NDF_MASK + 1 and DATA_OUT to DW_SPI_NDF_MASK, matching the two NDF programming conventions (receive writes ndf - 1, transmit writes ndf).
- exec_enh_mem_op(): use op->max_freq rather than mem->spi->max_speed_hz
- detect_enh_mode(): clear the accumulated mode bits when clock stretching turns out to be unavailable.
- dw_spi_jhb100_set_addr_nbyte() returns an error code, rejects anything other than 3 or 4 address bytes with a message.
- platform_suspend() and platform_resume() callbacks are introduced to handle platform-private suspend/resume procedures. JHB100 SFC used it to re-mask the SFC filter interrupts after a system resume.
- Limit address bytes supported by JHB100 SFC.
- Remove underflow/overflow interrupts in enhanced SPI mode, as clock stretching ensures these will not occur.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11spi: dw: Introduce spi_frf and STD_SPIdrivers/spi/spi-dw-core.c drivers/spi/spi-dw.h+19 -10 replies
2/11spi: dw: update SPI_CTRLR0 registerdrivers/spi/spi-dw-core.c drivers/spi/spi-dw.h+28 -40 replies
3/11spi: dw: add check for support of enhanced spidrivers/spi/spi-dw-core.c drivers/spi/spi-dw.h+34 -10 replies
4/11spi: dw: adjust size of mem_opdrivers/spi/spi-dw-core.c+16 -20 replies
5/11spi: dw: update NDF while using enhanced spi modedrivers/spi/spi-dw-core.c+3 -00 replies
6/11spi: dw: Introduce enhanced single/dual/quad/octal spidrivers/spi/spi-dw-core.c drivers/spi/spi-dw.h+95 -10 replies
7/11spi: dw: send cmd and addr to start the spi transferdrivers/spi/spi-dw-core.c+15 -00 replies
8/11spi: dw: use irq handler for enhanced spidrivers/spi/spi-dw-core.c+104 -20 replies
9/11spi: dw: detect enhanced spi modedrivers/spi/spi-dw-core.c+72 -30 replies
10/11spi: dt-bindings: snps,dw-apb-ssi: Add starfive,jhb100-sfcDocumentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml+22 -00 replies
11/11spi: dw: Add support for StarFive JHB100 SoC SFCdrivers/spi/spi-dw-core.c drivers/spi/spi-dw-mmio.c drivers/spi/spi-dw.h+127 -110 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by.

PatchConor Dooley
1/11
2/11
3/11
4/11
5/11
6/11
7/11
8/11
9/11
10/11A-b
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/11] Add support for StarFive JHB100 SFC

This serial add support for the StarFive JHB100 SoC SPI Flash Controller (SFC), which is based on the Synopsys DesignWare SSI version 2.00a but with some customizations and it also add enhanced SPI for DesignWare SPI controllers.

I picked up some patches from series [1].
This series depends on the series [2]:

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

Change since v1:
- Reordered the series so that every symbol is introduced before its first user and each patch is independently reviewable.
- adjust_op_size(): clamp DATA_IN to DW_SPI_NDF_MASK + 1 and DATA_OUT to DW_SPI_NDF_MASK, matching the two NDF programming conventions (receive writes ndf - 1, transmit writes ndf).
- exec_enh_mem_op(): use op->max_freq rather than mem->spi->max_speed_hz
- detect_enh_mode(): clear the accumulated mode bits when clock stretching turns out to be unavailable.
- dw_spi_jhb100_set_addr_nbyte() returns an error code, rejects anything other than 3 or 4 address bytes with a message.
- platform_suspend() and platform_resume() callbacks are introduced to handle platform-private suspend/resume procedures. JHB100 SFC used it to re-mask the SFC filter interrupts after a system resume.
- Limit address bytes supported by JHB100 SFC.
- Remove underflow/overflow interrupts in enhanced SPI mode, as clock stretching ensures these will not occur.

v1: https://lore.kernel.org/all/[email protected]/

Changhuang Liang (2):
spi: dt-bindings: snps,dw-apb-ssi: Add starfive,jhb100-sfc
spi: dw: Add support for StarFive JHB100 SoC SFC

Sudip Mukherjee (9):
spi: dw: Introduce spi_frf and STD_SPI
spi: dw: update SPI_CTRLR0 register
spi: dw: add check for support of enhanced spi
spi: dw: adjust size of mem_op
spi: dw: update NDF while using enhanced spi mode
spi: dw: Introduce enhanced single/dual/quad/octal spi
spi: dw: send cmd and addr to start the spi transfer
spi: dw: use irq handler for enhanced spi
spi: dw: detect enhanced spi mode

 .../bindings/spi/snps,dw-apb-ssi.yaml         |  22 +
 drivers/spi/spi-dw-core.c                     | 386 +++++++++++++++++-
 drivers/spi/spi-dw-mmio.c                     |  72 ++++
 drivers/spi/spi-dw.h                          |  52 ++-
 4 files changed, 521 insertions(+), 11 deletions(-)

--
2.25.1