mbox series

[GIT,PULL] SPI updates for v6.8

Message ID 20240107223817.EDB59C433C7@smtp.kernel.org (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] SPI updates for v6.8 | expand

Pull-request

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.8

Message

Mark Brown Jan. 7, 2024, 10:38 p.m. UTC
The following changes since commit 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab:

  Linux 6.7-rc3 (2023-11-26 19:59:33 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.8

for you to fetch changes up to f6cd66231aa58599526584ff4df1bdde8d86eac8:

  spi: stm32: add st,stm32mp25-spi compatible supporting STM32MP25 soc (2023-12-21 20:44:05 +0000)

----------------------------------------------------------------
spi: Updates for v6.8

A moderately busy release for SPI, the main core update was the merging
of support for multiple chip selects, used in some flash configurations.
There were also big overhauls for the AXI SPI Engine and PL022 drivers,
plus some new device support for ST.

There's a few patches for other trees, API updates to allow the
multiple chip select support and one of the naming modernisations
touched a controller embedded in the USB code.

 - Support for multiple chip selects.
 - A big overhaul for the AXI SPI engine driver, modernising it and
   adding a bunch of new features.
 - Modernisation of the PL022 driver, fixing some issues with submitting
   messages while in atomic context in the process.
 - Many drivers were converted to use new APIs which avoid outdated
   terminology for devices and controllers.
 - Support for ST Microelectronics STM32F7 and STM32MP25, and Renesas
   RZ/Five.

----------------------------------------------------------------
Alain Volmat (1):
      spi: stm32: use dma_get_slave_caps prior to configuring dma channel

Amit Kumar Mahapatra (4):
      spi: spi-zynqmp-gqspi: fix driver kconfig dependencies
      mfd: tps6594: Use spi_get_chipselect() API to access spi->chip_select
      ALSA: hda/cs35l56: Use set/get APIs to access spi->chip_select
      spi: Add multi-cs memories support in SPI core

Andrew Davis (1):
      spi: sprd: adi: Use devm_register_restart_handler()

Andy Shevchenko (3):
      treewide, spi: Get rid of SPI_MASTER_HALF_DUPLEX
      spi: pxa2xx: Use inclusive language
      spi: pxa2xx: Update DMA mapping and using logic in the documentation

Ben Wolsieffer (4):
      spi: stm32: rename stm32f4_* to stm32fx_*
      spi: stm32: use callbacks for read_rx and write_tx
      spi: stm32: add STM32F7 support
      spi: add stm32f7-spi compatible

Chia-Lin Kao (AceLan) (2):
      spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP
      mtd: spi-nor: Stop reporting warning message when soft reset is not suported

Christophe JAILLET (1):
      spi: ingenic: convert not to use dma_request_slave_channel()

David Lechner (24):
      dt-bindings: spi: axi-spi-engine: convert to yaml
      MAINTAINERS: add entry for AXI SPI Engine
      spi: axi-spi-engine: simplify driver data allocation
      spi: axi-spi-engine: use devm_spi_alloc_host()
      spi: axi-spi-engine: use devm action to reset hw on remove
      spi: axi-spi-engine: use devm_request_irq()
      spi: axi-spi-engine: use devm_spi_register_controller()
      spi: axi-spi-engine: check for valid clock rate
      spi: axi-spi-engine: move msg state to new struct
      spi: axi-spi-engine: use message_prepare/unprepare
      spi: axi-spi-engine: remove completed_id from driver state
      spi: axi-spi-engine: remove struct spi_engine::msg
      spi: axi-spi-engine: add support for cs_off
      spi: axi-spi-engine: add support for any word size
      spi: axi-spi-engine: return void from spi_engine_compile_message()
      spi: axi-spi-engine: populate xfer->effective_speed_hz
      spi: axi-spi-engine: remove spi_engine_get_clk_div()
      spi: axi-spi-engine: fix sleep ticks calculation
      spi: axi-spi-engine: remove xfer arg from spi_engine_gen_sleep()
      spi: axi-spi-engine: implement xfer->cs_change_delay
      spi: axi-spi-engine: restore clkdiv at end of message
      spi: axi-spi-engine: remove delay from CS assertion
      spi: axi-spi-engine: add watchdog timer
      spi: axi-spi-engine: fix struct member doc warnings

Lad Prabhakar (1):
      spi: dt-bindings: renesas,rspi: Document RZ/Five SoC

Mark Brown (7):
      Add STM32F7 SPI support
      spi: axi-spi-engine improvements
      spi: spl022: fix sleeping in interrupt context
      spi: axi-spi-engine: improvements round 2
      spi: Add support for stacked/parallel memories
      spi: pxa2xx: Update documentation
      spi: pl022: clean up some unused variables

Nam Cao (6):
      spi: introduce SPI_TRANS_FAIL_IO for error reporting
      spi: spl022: switch to use default spi_transfer_one_message()
      spi: pl022: delete unused cur_gpiod in struct pl022
      spi: pl022: delete unused next_msg_cs_active in struct pl022
      spi: pl022: delete description of cur_msg
      spi: pl022: update description of internal_cs_control()

Nandhini Srikandan (2):
      spi: dw: Remove Intel Thunder Bay SOC support
      spi: dw: Remove Intel Thunder Bay SOC support

Raag Jadav (1):
      spi: intel: make mem_ops comparison unique to opcode match

Randy Dunlap (1):
      spi: mpc52xx: explicitly include linux/platform_device.h

Uwe Kleine-König (2):
      spi: cadence-xspi: Drop useless assignment to NULL
      spi: spi-ti-qspi: Convert to platform remove callback returning void

Valentin Caron (2):
      dt-bindings: spi: stm32: add st,stm32mp25-spi compatible
      spi: stm32: add st,stm32mp25-spi compatible supporting STM32MP25 soc

Wolfram Sang (1):
      spi: sh-msiof: Enforce fixed DTDL for R-Car H3

Yang Yingliang (27):
      spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe()
      spi: sprd-adi: switch to use spi_alloc_host()
      spi: sprd: switch to use modern name
      spi: st-ssc4: switch to use modern name
      spi: stm32-qspi: switch to use modern name
      spi: stm32: switch to use modern name
      spi: sun4i: switch to use modern name
      spi: sun6i: switch to use modern name
      spi: sunplus-sp7021: switch to use modern name
      spi: synquacer: switch to use modern name
      spi: geni-qcom: switch to use modern name
      spi: tegra114: switch to use modern name
      spi: tegra20-sflash: switch to use modern name
      spi: tegra20-slink: switch to use modern name
      spi: tegra210-quad: switch to use modern name
      spi: spi-ti-qspi: switch to use modern name
      spi: wpcm-fiu: switch to use devm_spi_alloc_host()
      spi: topcliff-pch: switch to use modern name
      spi: uniphier: switch to use modern name
      spi: xcomm: switch to use modern name
      spi: xilinx: switch to use modern name
      spi: xlp: switch to use modern name
      spi: xtensa-xtfpga: switch to use modern name
      spi: zynq-qspi: switch to use modern name
      spi: zynqmp-gqspi: switch to use modern name
      spi: cs42l43: switch to use devm_spi_alloc_host()
      spi: ljca: switch to use devm_spi_alloc_host()

 .../devicetree/bindings/spi/adi,axi-spi-engine.txt |  31 -
 .../bindings/spi/adi,axi-spi-engine.yaml           |  66 +++
 .../devicetree/bindings/spi/renesas,rspi.yaml      |   2 +-
 .../devicetree/bindings/spi/snps,dw-apb-ssi.yaml   |   2 -
 .../devicetree/bindings/spi/st,stm32-spi.yaml      |   2 +
 Documentation/spi/pxa2xx.rst                       |  59 +-
 MAINTAINERS                                        |  10 +
 drivers/input/rmi4/rmi_spi.c                       |   2 +-
 drivers/mfd/tps6594-spi.c                          |   2 +-
 drivers/mmc/host/mmc_spi.c                         |   2 +-
 drivers/mtd/nand/spi/core.c                        |   2 +-
 drivers/mtd/spi-nor/core.c                         |   5 +-
 drivers/net/ethernet/micrel/ks8851_spi.c           |   4 +-
 drivers/spi/Kconfig                                |   3 +-
 drivers/spi/atmel-quadspi.c                        |   2 +-
 drivers/spi/spi-ath79.c                            |   2 +-
 drivers/spi/spi-axi-spi-engine.c                   | 519 +++++++++++------
 drivers/spi/spi-bcm-qspi.c                         |   2 +-
 drivers/spi/spi-cadence-quadspi.c                  |   4 +-
 drivers/spi/spi-cadence-xspi.c                     |   1 -
 drivers/spi/spi-cs42l43.c                          |   2 +-
 drivers/spi/spi-dw-mmio.c                          |   1 -
 drivers/spi/spi-geni-qcom.c                        |  96 ++--
 drivers/spi/spi-ingenic.c                          |  15 +-
 drivers/spi/spi-intel.c                            |  10 +-
 drivers/spi/spi-ljca.c                             |   2 +-
 drivers/spi/spi-mem.c                              |   6 +-
 drivers/spi/spi-mpc52xx.c                          |   1 +
 drivers/spi/spi-npcm-fiu.c                         |   2 +-
 drivers/spi/spi-pl022.c                            | 382 +++---------
 drivers/spi/spi-sh-msiof.c                         |  17 +
 drivers/spi/spi-sprd-adi.c                         |  32 +-
 drivers/spi/spi-sprd.c                             |   4 +-
 drivers/spi/spi-st-ssc4.c                          |  70 +--
 drivers/spi/spi-stm32-qspi.c                       |  18 +-
 drivers/spi/spi-stm32.c                            | 638 +++++++++++++++------
 drivers/spi/spi-sun4i.c                            |  72 +--
 drivers/spi/spi-sun6i.c                            | 148 ++---
 drivers/spi/spi-sunplus-sp7021.c                   |  88 +--
 drivers/spi/spi-synquacer.c                        |  82 +--
 drivers/spi/spi-tegra114.c                         | 118 ++--
 drivers/spi/spi-tegra20-sflash.c                   |  76 +--
 drivers/spi/spi-tegra20-slink.c                    |  98 ++--
 drivers/spi/spi-tegra210-quad.c                    |  80 +--
 drivers/spi/spi-ti-qspi.c                          | 103 ++--
 drivers/spi/spi-topcliff-pch.c                     | 226 ++++----
 drivers/spi/spi-uniphier.c                         | 194 +++----
 drivers/spi/spi-wpcm-fiu.c                         |   4 +-
 drivers/spi/spi-xcomm.c                            |  32 +-
 drivers/spi/spi-xilinx.c                           |  58 +-
 drivers/spi/spi-xlp.c                              |  40 +-
 drivers/spi/spi-xtensa-xtfpga.c                    |  30 +-
 drivers/spi/spi-zynq-qspi.c                        |  28 +-
 drivers/spi/spi-zynqmp-gqspi.c                     |  50 +-
 drivers/spi/spi.c                                  | 262 +++++++--
 drivers/usb/gadget/udc/max3420_udc.c               |   2 +-
 include/linux/spi/spi-mem.h                        |   2 +
 include/linux/spi/spi.h                            |  65 ++-
 sound/pci/hda/cs35l56_hda_spi.c                    |   2 +-
 59 files changed, 2156 insertions(+), 1722 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/spi/adi,axi-spi-engine.txt
 create mode 100644 Documentation/devicetree/bindings/spi/adi,axi-spi-engine.yaml

Comments

pr-tracker-bot@kernel.org Jan. 9, 2024, 11:41 p.m. UTC | #1
The pull request you sent on Sun, 07 Jan 2024 22:38:09 +0000:

> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.8

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/301940020a92ebdef9352a0573075a1db42d17aa

Thank you!
Klaus Kudielka Jan. 22, 2024, 6:30 p.m. UTC | #2
On Sun, 2024-01-07 at 22:38 +0000, Mark Brown wrote:
> The following changes since commit 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab:
> 
>   Linux 6.7-rc3 (2023-11-26 19:59:33 -0800)
> 
> are available in the Git repository at:
> 
>   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.8
> 
> for you to fetch changes up to f6cd66231aa58599526584ff4df1bdde8d86eac8:
> 
>   spi: stm32: add st,stm32mp25-spi compatible supporting STM32MP25 soc (2023-12-21 20:44:05 +0000)
> 
> ----------------------------------------------------------------
> spi: Updates for v6.8
> 
> A moderately busy release for SPI, the main core update was the merging
> of support for multiple chip selects, used in some flash configurations.
> There were also big overhauls for the AXI SPI Engine and PL022 drivers,
> plus some new device support for ST.
> 
> There's a few patches for other trees, API updates to allow the
> multiple chip select support and one of the naming modernisations
> touched a controller embedded in the USB code.
> 
>  - Support for multiple chip selects.

[skipped the rest]

Hi, it seems I have an issue related with this new feature.

I just booted 6.8.0-rc1 on Turris Omnia (CONFIG_SPI_ORION=y,
device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts)

and got the following error:

[    0.090231] spi_master spi0: No. of CS is more than max. no. of supported CS
[    0.097358] spi_master spi0: Failed to create SPI device for /soc/spi@10600/flash@0

End result: the three MTD partitions I used to have on the SPI-NOR are gone.

***

For reference, here's the output of 6.7.0 (configs as identical as they can be):

[    0.087965] spi-nor spi0.0: s25fl164k (8192 Kbytes)
[    0.183729] Freeing initrd memory: 4676K
[    0.191605] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.191619] Creating 3 MTD partitions on "spi0.0":
[    0.191624] 0x000000000000-0x0000000f0000 : "U-Boot"
[    0.191837] 0x000000100000-0x000000800000 : "Rescue system"
[    0.191982] 0x0000000f0000-0x000000100000 : "u-boot-env"


I haven't bisected this further, but maybe the error message already rings a bell.


Best regards, Klaus
Mark Brown Jan. 22, 2024, 6:35 p.m. UTC | #3
On Mon, Jan 22, 2024 at 07:30:09PM +0100, Klaus Kudielka wrote:
> On Sun, 2024-01-07 at 22:38 +0000, Mark Brown wrote:

> >  - Support for multiple chip selects.

> [skipped the rest]
> 
> Hi, it seems I have an issue related with this new feature.
> 
> I just booted 6.8.0-rc1 on Turris Omnia (CONFIG_SPI_ORION=y,
> device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts)

> and got the following error:
> 
> [    0.090231] spi_master spi0: No. of CS is more than max. no. of supported CS
> [    0.097358] spi_master spi0: Failed to create SPI device for /soc/spi@10600/flash@0

> End result: the three MTD partitions I used to have on the SPI-NOR are gone.

Yes, this was found on another platform - there's a patch which should
address this (unless the number is more than 8) in CI:

   https://lore.kernel.org/linux-spi/20240122-spi-multi-cs-max-v1-1-a7e98cd5f6c7@kernel.org/T/#u
Mark Brown Jan. 22, 2024, 6:38 p.m. UTC | #4
On Mon, Jan 22, 2024 at 07:30:09PM +0100, Klaus Kudielka wrote:
> On Sun, 2024-01-07 at 22:38 +0000, Mark Brown wrote:

> I just booted 6.8.0-rc1 on Turris Omnia (CONFIG_SPI_ORION=y,
> device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts)

> and got the following error:
> 
> [    0.090231] spi_master spi0: No. of CS is more than max. no. of supported CS
> [    0.097358] spi_master spi0: Failed to create SPI device for /soc/spi@10600/flash@0
> 
> End result: the three MTD partitions I used to have on the SPI-NOR are gone.

Actualy looking at the DT it's not immediately obvious why this is
triggering - there's only one chip select in use, numbered 0 AFAICT.
Anyway, if you could test the patch I linked hopefully it does fix the
issue.
Klaus Kudielka Jan. 22, 2024, 6:57 p.m. UTC | #5
On Mon, 2024-01-22 at 18:38 +0000, Mark Brown wrote:
> On Mon, Jan 22, 2024 at 07:30:09PM +0100, Klaus Kudielka wrote:
> > On Sun, 2024-01-07 at 22:38 +0000, Mark Brown wrote:
> 
> > I just booted 6.8.0-rc1 on Turris Omnia (CONFIG_SPI_ORION=y,
> > device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts)
> 
> > and got the following error:
> > 
> > [    0.090231] spi_master spi0: No. of CS is more than max. no. of supported CS
> > [    0.097358] spi_master spi0: Failed to create SPI device for /soc/spi@10600/flash@0
> > 
> > End result: the three MTD partitions I used to have on the SPI-NOR are gone.
> 
> Actualy looking at the DT it's not immediately obvious why this is
> triggering - there's only one chip select in use, numbered 0 AFAICT.
> Anyway, if you could test the patch I linked hopefully it does fix the
> issue.

I wouldn't have an explanation either. But said patch, applied on top of 6.8.0-rc1,
seems to be a possible cure. Everything nominal again, AFAICT.

[    0.191427] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.191440] Creating 3 MTD partitions on "spi0.0":
[    0.191446] 0x000000000000-0x0000000f0000 : "U-Boot"
[    0.191656] 0x000000100000-0x000000800000 : "Rescue system"
[    0.191796] 0x0000000f0000-0x000000100000 : "u-boot-env"

Thanks, Klaus
Mark Brown Jan. 22, 2024, 7:24 p.m. UTC | #6
On Mon, Jan 22, 2024 at 07:57:01PM +0100, Klaus Kudielka wrote:

> I wouldn't have an explanation either. But said patch, applied on top of 6.8.0-rc1,
> seems to be a possible cure. Everything nominal again, AFAICT.

Great, thanks for checking - the fix should in -rc2 all being well.
Klaus Kudielka Jan. 23, 2024, 7:57 p.m. UTC | #7
On Mon, 2024-01-22 at 18:38 +0000, Mark Brown wrote:
> On Mon, Jan 22, 2024 at 07:30:09PM +0100, Klaus Kudielka wrote:
> > On Sun, 2024-01-07 at 22:38 +0000, Mark Brown wrote:
> 
> > I just booted 6.8.0-rc1 on Turris Omnia (CONFIG_SPI_ORION=y,
> > device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts)
> 
> > and got the following error:
> > 
> > [    0.090231] spi_master spi0: No. of CS is more than max. no. of supported CS
> > [    0.097358] spi_master spi0: Failed to create SPI device for /soc/spi@10600/flash@0
> > 
> > End result: the three MTD partitions I used to have on the SPI-NOR are gone.
> 
> Actualy looking at the DT it's not immediately obvious why this is
> triggering - there's only one chip select in use, numbered 0 AFAICT.
> Anyway, if you could test the patch I linked hopefully it does fix the
> issue.

For the records, drivers/spi/spi-orion.c states:

/* Some SoCs using this driver support up to 8 chip selects.
 * It is up to the implementer to only use the chip selects
 * that are available.
 */
#define ORION_NUM_CHIPSELECTS           8

[...]

and then in orion_spi_probe():

        host->num_chipselect = ORION_NUM_CHIPSELECTS;