Commit graph

91 commits

Author SHA1 Message Date
Ulf Magnusson 378d6b137a kconfig: Replace non-defconfig single-symbol 'if's with 'depends on'
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.

Will do the defconfigs separately in case there are any complaints
there.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:34 -06:00
Christian Taedcke 6da94af847 drivers: spi: Add Gecko SPI driver
This commit adds SPI driver and its bindings using the USART peripheral
for Silicon Labs EFM32 and EFR32 MCUs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2020-01-10 07:14:35 -06:00
Maureen Helm a63676761b drivers: spi: Add mcux flexcomm driver
Adds a shim layer around the mcux lpc flexcomm driver to adapt it to the
zephyr spi interface. It leverages heavily from the existing mcux dspi
shim driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:48:56 -06:00
Maureen Helm d55d532ebd drivers: spi: Add configs for instances 7 and 8
Adds configs for spi instances 7 and 8.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:48:56 -06:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Karsten Koenig ee2dd7322f drivers: spi: rv32m1: Add driver for RV32M1 LPSPI
Add SPI driver and bindings for LPSPI peripheral for the RV32M1 SOC.
Based heavily on the existing mcux LPSPI driver.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Ulf Magnusson 975de21858 kconfig: Global whitespace/consistency cleanup
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).

Go for the most common style:

 - Indent properties with a single tab, including for choices.

   Properties on choices work exactly the same syntactically as
   properties on symbols, so not sure how the no-indentation thing
   happened.

 - Indent help texts with a tab followed by two spaces

 - Put a space between 'config' and the symbol name, not a tab. This
   also helps when grepping for definitions.

 - Do '# A comment' instead of '#A comment'

I tweaked Kconfiglib a bit to find most of the stuff.

Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-01 15:53:23 +01:00
Scott Worley c8b1eb79a1 drivers : spi : mec1501 : XEC SPI driver
SPI driver for MEC1501 QMSPI supporting synchronous only.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-10-23 19:18:32 -07:00
Olof Kindgren d09614ab59 drivers: spi: Add simple_spi driver
Add support for the OpenCores simple_spi controller

Signed-off-by: Olof Kindgren <olof.kindgren@gmail.com>
2019-10-22 15:54:03 -05:00
Daniel Craviee 256c5c4e17 drivers: spi: Add LiteX SPI driver
This commit adds LiteX SPI drivers and its bindings.

Signed-off-by: Daniel Craviee <dcraviee@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Erwan Gouriou 555936f771 dts/Kconfig: Remove unused HAS_DTS_SPI
Symbol is always "and'ed" with the symbol that
selects it, so no effect. Clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Charles E. Youse 34ffdd0aab drivers/spi/spi_intel.c: remove Quark SPI support
This was only used on Quark SoCs. It is no longer used, can no
longer be tested, and it's reliant upon the deprecated legacy PCI
subsystem. Remove it to prevent bitrot.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-08 22:09:10 -04:00
Brett Witherspoon f2eea2ef85 drivers: add CC13xx / CC26xx SPI driver
Add driver for the SPI peripheral on the TI CC13xx / CC26xx series SoCs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Erwan Gouriou b0245d4240 drivers: spi: Define SPI_6 symbol
Add SPI_6 Kconfig symbol as this is the higher supported instance on
STM32.
This makes symbol CONFIG_SPI_6, used in stm32 driver a valid symbol.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-06 18:59:00 -06:00
Nathaniel Graff 9e2ef8db6d drivers/spi: SPI driver for SiFive Freedom
A driver for the sifive,spi0 SPI device on SiFive Freedom platforms

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-06 09:00:00 -06:00
Kumar Gala 1634cf2248 drivers/spi: Always selecet HAS_DTS_SPI once SPI is enabled
All drivers require DTS for their primary SPI settings.

Removing SPI_[0-9]_NAME config option added some more samples changes.
Usage of these options there was anyway not relevant.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Tomasz Bursztyka d658e03488 drivers/spi: Remove unused legacy options
These have been osbolete for some time already.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Tomasz Bursztyka aa6a951c5a drivers/spi: Enable HAS_DTS_SPI for Intel SPI driver
All primary settings should be set via DTS.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
qianfan Zhao 6e4963b978 drivers: add spi support for atmel sam series soc
This driver is based on spi_sam0

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-10-10 11:29:49 -05:00
Anas Nashif 88aa2ca49f driver: spi: use new logger
move SPI drivers to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Maureen Helm 45d3d8e441 spi: Introduce mcux lpspi shim driver
Introduces a new mcux lpspi shim driver to be used on the imxrt soc.
This shim driver leverages heavily from the mcux dspi shim driver
because the MCUXpresso SDK provides similar APIs for the lpspi and dspi
peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-19 09:15:29 -04:00
Ulf Magnusson d77663ac05 drivers: spi: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though, and is
inconsistent.

This will make the auto-generated Kconfig documentation have "No
defaults. Implicitly defaults to n." as well, which is clearer than
'default n if ...'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-03 17:11:31 -04:00
Maureen Helm d749feb698 spi: Fix missing "depends on !HAS_DTS_SPI"
Spi configs like irq priority and device name should not exist if the
spi driver supports device tree. Fixes a few configs that were missing
the necessary "depends on !HAS_DTS_SPI".

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Maureen Helm 3fbc7c5853 spi: Wrap instance configs consistently with ifdefs
Some spi instance configs were wrapped with ifdefs, while others used
depends. Make them consistent by wrapping them all with ifdefs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Håkon Øye Amundsen c26fdc1b55 drivers/spi: Fixed incorrect prompt.
The prompt for SPI1 IRQ priority stated SPI0 incorrectly.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-04-24 08:23:30 -05:00
Tomasz Bursztyka 3f4cffc302 spi: Remove SPI legacy API
No drivers nor samples are using it anymore.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 13dba12b9a drivers/spi: Remove legacy NRF5 master and slave drivers
As legacy SPI API is being removed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Andrzej Głąbek 00397c65bc drivers: spi: Add shim for nrfx SPI driver
This adds a translation layer to make the nrfx driver for the legacy
(i.e. without EasyDMA) nRF SPI peripheral accessible via the updated
Zephyr's API of the SPI driver.
Configuration files are already prepared for adding support for SPIM
(Master with EasyDMA) and SPIS (Slave with EasyDMA) peripherals.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 09dd5e9b22 drivers/spi: Remove legacy API support from mcux dspi driver
Now that MCR20A supports the new API, legacy support from mcux dspi
driver can be safely removed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Maureen Helm ef5152ab22 spi: Implement new spi api in the mcux dspi driver
Adds support for the new spi api to the mcux dspi shim driver. Does not
remove support for the legacy spi api since there are still consumers of
that api, particularly the mcr20a 802.15.4 driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 65f6c96736 drivers/spi: Switch Intel driver to new SPI API
Ditch any legacy API support altogether.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 0a43cac3bb drivers/spi: Removing QMSI driver as it does not support new API
Native DW driver is relevantly used instead.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 29a68cd7a5 drivers/spi: Adapt Kconfig and generic context to enable slave support
Adding Kconfig options to set supported modes by the controller
(master, slave or both)

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka da42c0077c api/spi: Add a dedicated Kconfig option for asynchronous mode enablement
Instead of using CONFIG_POLL, which is not directly related to SPI and
is a kernel option, let's have SPI_ASYNC instead. When enabled, it will
select POLL automatically.

Fixes #5839

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 324265420b api/spi: Disable legacy API by default
Let's start deprecation work of the SPI legacy API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka d89e8e6a79 drivers/spi: Cleanup the Kconfig files
Split QMSI relevant part into its own file. Some config where using
prompt, some not: normalizing it by removing the prompt keyword where
relevant.

Reducing the file by using if/endif when relevant.

However, it still not fully clean default: cfg and default baudrate
should disappear. There is no default configuration to apply as long
as the controller is not configured to run from any part using spi API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Ulf Magnusson af1ad986b9 drivers: spi: Format SYS_LOG_SPI_LEVEL help nicer
The previous help text rendered as a single paragraph in the Kconfig RST
reference. The new help text renders as a bullet list and matches the
format of SYS_LOG_CRYPTO_LEVEL.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 14:25:24 -04:00
Yannis Damigos af0c9fc349 drivers: spi_ll_stm32: Enable SPI driver for F1 family
Enables SPI driver for STM32F1 SoCs

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-02-01 08:19:49 -06:00
Erwin Rol 23bb4e6101 drivers: spi: stm32: use Kconfig to select HAL/LL sources
Use "select USE_STM32_LL_SPI" to select the needed STM32 LL files,
instead of editing ext/hal/st/stm32cube/CMakeLists.txt

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2018-01-23 08:46:16 -06:00
Yannis Damigos 3a03b28f87 drivers: spi_ll_stm32: Get SPI configuration from DT
Get SPI_*_BASE_ADDRESS, SPI_*_NAME, SPI_*_IRQ and
SPI_*_IRQ_PRI from DT.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Michael Hope 73d045e281 spi: add a SPI driver for the SAM0 series.
Impleentation is master only and uses polling to read and write.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-13 07:39:05 -05:00
Michael Hope af0718dc3a spi: add Kconfig entries for SPI4 and SPI5.
The SAM0 series has up to 6 SPI ports.  Add Kconfig options to match.

Similar to the 9033fb2f01, this patch
only defines the fields that are currently used and skips ones like
GPIO and IRQ priority that aren't.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-13 07:39:05 -05:00
Neil Armstrong 7caa56f608 spi: spi_ll_stm32: Add support for STM32F0
Add support for STM32F0 similar to STM32F3 and STM32L4

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Marti Bolivar 1f244a7b1e drivers: spi: fix SPI_QMSI_SS typo
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-16 11:58:50 -04:00
Michał Kruszewski afa90859e9 nrf5: spi: Mark SPI drivers as conforming to legacy SPI API
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
2017-07-31 10:05:19 -05:00
Neil Armstrong 9033fb2f01 spi: add SPI driver for STM32 family
Add a SPI master and slave driver for the L4, F4 and F3 STM32
SoCs families.

Change-Id: I1faf5c97f992c91eba852fd126e7d3b83158993d
Origin: Original
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Tested-by: Lee Jones <lee.jones@linaro.org>
2017-07-01 08:36:51 -04:00
Savinay Dharmappa 114db109ef samples: drivers/net: apps: Resolve Kconfig dependency
as config SPI_CS_GPIO was selecting GPIO instead it
should just depend on it. This patch is a fix for
ZEP-2071 jira.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-06-22 19:51:05 -04:00
Tomasz Bursztyka dd0c35919b api: New SPI API
Such API improves many aspects of the former API by reducing the number
of function, allowing more buffer flexibility etc... This leads in
better memory usag and performance as well.

However, as this will take sometime to get into use, the former API is
still present and is the one enabled by default.

Jira: ZEP-852
Jira: ZEP-287
Jira: ZEP-1725

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
David B. Kinder 93e4d7258d spell: fix Kconfig help typos: /boards /drivers
Fix misspellings in Kconfig help text

Change-Id: I3ae28a5d23d8e266612114bc0eb8a6e158129dc7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-21 21:31:30 +00:00
Roger Lendenmann 5bcc8fa832 arm: spi: spi master support for nrf52 family
* SPIMx support for nrf52 spi interface with easy dma

Change-Id: I3221b14867924b91a9d809faf689090574f5dc1c
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2017-04-04 17:55:13 -05:00