1. 18 Nov, 2022 3 commits
    • Tudor Ambarus's avatar
      spi: Reintroduce spi_set_cs_timing() · 684a4784
      Tudor Ambarus authored
      commit 4ccf3598 ("spi: remove spi_set_cs_timing()"), removed the
      method as noboby used it. Nobody used it probably because some SPI
      controllers use some default large cs-setup time that covers the usual
      cs-setup time required by the spi devices. There are though SPI controllers
      that have a smaller granularity for the cs-setup time and their default
      value can't fulfill the spi device requirements. That's the case for the
      at91 QSPI IPs where the default cs-setup time is half of the QSPI clock
      period. This was observed when using an sst26vf064b SPI NOR flash which
      needs a spi-cs-setup-ns = <7>; in order to be operated close to its maximum
      104 MHz frequency.
      
      Call spi_set_cs_timing() in spi_setup() just before calling spi_set_cs(),
      as the latter needs the CS timings already set.
      If spi->controller->set_cs_timing is not set, the method will return 0.
      There's no functional impact expected for the existing drivers. Even if the
      spi-mt65xx.c and spi-tegra114.c drivers set the set_cs_timing method,
      there's no user for them as of now. The only tested user of this support
      will be a SPI NOR flash that comunicates with the Atmel QSPI controller for
      which the support follows in the next patches.
      
      One will notice that this support is a bit different from the one that was
      removed in commit 4ccf3598 ("spi: remove spi_set_cs_timing()"),
      because this patch adapts to the changes done after the removal: the move
      of the cs delays to the spi device, the retirement of the lelgacy GPIO
      handling. The mutex handling was removed from spi_set_cs_timing() because
      we now always call spi_set_cs_timing() in spi_setup(), which already
      handles the spi->controller->io_mutex, so use the mutex handling from
      spi_setup().
      Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
      Link: https://lore.kernel.org/r/20221117105249.115649-4-tudor.ambarus@microchip.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      684a4784
    • Tudor Ambarus's avatar
      spi: Introduce spi-cs-setup-ns property · 33a2fde5
      Tudor Ambarus authored
      SPI NOR flashes have specific cs-setup time requirements without which
      they can't work at frequencies close to their maximum supported frequency,
      as they miss the first bits of the instruction command. Unrecognized
      commands are ignored, thus the flash will be unresponsive. Introduce the
      spi-cs-setup-ns property to allow spi devices to specify their cs setup
      time.
      Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
      Link: https://lore.kernel.org/r/20221117105249.115649-3-tudor.ambarus@microchip.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      33a2fde5
    • Tudor Ambarus's avatar
      spi: dt-bindings: Introduce spi-cs-setup-ns property · f6c911f3
      Tudor Ambarus authored
      SPI NOR flashes have specific cs-setup time requirements without which
      they can't work at frequencies close to their maximum supported frequency,
      as they miss the first bits of the instruction command. Unrecognized
      commands are ignored, thus the flash will be unresponsive. Introduce the
      spi-cs-setup-ns property to allow spi devices to specify their cs setup
      time.
      Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
      Link: https://lore.kernel.org/r/20221117105249.115649-2-tudor.ambarus@microchip.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      f6c911f3
  2. 16 Nov, 2022 1 commit
  3. 14 Nov, 2022 1 commit
  4. 04 Nov, 2022 1 commit
  5. 03 Nov, 2022 1 commit
  6. 02 Nov, 2022 1 commit
  7. 01 Nov, 2022 3 commits
  8. 31 Oct, 2022 2 commits
  9. 26 Oct, 2022 1 commit
  10. 24 Oct, 2022 6 commits
  11. 21 Oct, 2022 8 commits
  12. 19 Oct, 2022 10 commits
  13. 18 Oct, 2022 2 commits