Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3b43e12 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull SPI updates from Grant Likely:
 "Primarily SPI device driver bug fixes, one removal of an old driver,
  and some new tegra support.  There is some core code change too, but
  all in all pretty small stuff.

  The new features to note are:
   - Common code for describing GPIO CS lines in the device tree
   - Remove the SPI_BUFSIZ limitation on spi_write_the_read()
   - core spi ensures bits_per_word is set correctly
   - SPARC can now use SPI"

* tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6: (36 commits)
  spi/sparc: Allow of_register_spi_devices for sparc
  spi: Remove HOTPLUG section attributes
  spi: Add support for specifying 3-wire mode via device tree
  spi: Fix comparison of different integer types
  spi/orion: Add SPI_CHPA and SPI_CPOL support to kirkwood driver.
  spi/sh: Add SH Mobile series as dependency to MSIOF controller
  spi/sh-msiof: Remove unneeded clock name
  spi: Remove SPI_BUFSIZ restriction on spi_write_then_read()
  spi/stmp: remove obsolete driver
  spi/clps711x: New SPI master driver
  spi: omap2-mcspi: remove duplicate inclusion of linux/err.h
  spi: omap2-mcspi: Fix the redifine warning
  spi/sh-hspi: add CS manual control support
  of_spi: add generic binding support to specify cs gpio
  spi: omap2-mcspi: remove duplicated include from spi-omap2-mcspi.c
  spi/bitbang: (cosmetic) simplify list manipulation
  spi/bitbang: avoid needless loop flow manipulations
  spi/omap: fix D0/D1 direction confusion
  spi: tegra: add spi driver for sflash controller
  spi: Dont call master->setup if not populated
  ...
parents 15de0599 7cb94361
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
NVIDIA Tegra20 SFLASH controller.

Required properties:
- compatible : should be "nvidia,tegra20-sflash".
- reg: Should contain SFLASH registers location and length.
- interrupts: Should contain SFLASH interrupts.
- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
  request selector for this SFLASH controller.

Recommended properties:
- spi-max-frequency: Definition as per
                     Documentation/devicetree/bindings/spi/spi-bus.txt

Example:

spi@7000d600 {
	compatible = "nvidia,tegra20-sflash";
	reg = <0x7000c380 0x80>;
	interrupts = <0 39 0x04>;
	nvidia,dma-request-selector = <&apbdma 16>;
	spi-max-frequency = <25000000>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "disabled";
};
+26 −0
Original line number Diff line number Diff line
NVIDIA Tegra20/Tegra30 SLINK controller.

Required properties:
- compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink".
- reg: Should contain SLINK registers location and length.
- interrupts: Should contain SLINK interrupts.
- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
  request selector for this SLINK controller.

Recommended properties:
- spi-max-frequency: Definition as per
                     Documentation/devicetree/bindings/spi/spi-bus.txt

Example:

slink@7000d600 {
	compatible = "nvidia,tegra20-slink";
	reg = <0x7000d600 0x200>;
	interrupts = <0 82 0x04>;
	nvidia,dma-request-selector = <&apbdma 16>;
	spi-max-frequency = <25000000>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "disabled";
};
+3 −1
Original line number Diff line number Diff line
@@ -6,7 +6,9 @@ Required properties:
  - "ti,omap4-spi" for OMAP4+.
- ti,spi-num-cs : Number of chipselect supported  by the instance.
- ti,hwmods: Name of the hwmod associated to the McSPI

- ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as
			  input. The default is D0 as input and
			  D1 as output.

Example:

+22 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ The SPI master node requires the following properties:
- #size-cells     - should be zero.
- compatible      - name of SPI bus controller following generic names
    		recommended practice.
- cs-gpios	  - (optional) gpios chip select.
No other properties are required in the SPI bus node.  It is assumed
that a driver for an SPI bus device will understand that it is an SPI bus.
However, the binding does not attempt to define the specific method for
@@ -24,6 +25,22 @@ support describing the chip select layout.
Optional property:
- num-cs : total number of chipselects

If cs-gpios is used the number of chip select will automatically increased
with max(cs-gpios > hw cs)

So if for example the controller has 2 CS lines, and the cs-gpios
property looks like this:

cs-gpios = <&gpio1 0 0> <0> <&gpio1 1 0> <&gpio1 2 0>;

Then it should be configured so that num_chipselect = 4 with the
following mapping:

cs0 : &gpio1 0 0
cs1 : native
cs2 : &gpio1 1 0
cs3 : &gpio1 2 0

SPI slave nodes must be children of the SPI master node and can
contain the following properties.
- reg             - (required) chip select address of device.
@@ -36,6 +53,11 @@ contain the following properties.
    		shifted clock phase (CPHA) mode
- spi-cs-high     - (optional) Empty property indicating device requires
    		chip select active high
- spi-3wire       - (optional) Empty property indicating device requires
    		    3-wire mode.

If a gpio chipselect is used for the SPI slave the gpio number will be passed
via the cs_gpio

SPI example for an MPC5200 SPI bus:
	spi@f00 {
+23 −8
Original line number Diff line number Diff line
@@ -123,6 +123,13 @@ config SPI_BUTTERFLY
	  inexpensive battery powered microcontroller evaluation board.
	  This same cable can be used to flash new firmware.

config SPI_CLPS711X
	tristate "CLPS711X host SPI controller"
	depends on ARCH_CLPS711X
	help
	  This enables dedicated general purpose SPI/Microwire1-compatible
	  master mode interface (SSI1) for CLPS711X-based CPUs.

config SPI_COLDFIRE_QSPI
	tristate "Freescale Coldfire QSPI controller"
	depends on (M520x || M523x || M5249 || M525x || M527x || M528x || M532x)
@@ -341,10 +348,10 @@ config SPI_SC18IS602

config SPI_SH_MSIOF
	tristate "SuperH MSIOF SPI controller"
	depends on SUPERH && HAVE_CLK
	depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
	select SPI_BITBANG
	help
	  SPI driver for SuperH MSIOF blocks.
	  SPI driver for SuperH and SH Mobile MSIOF blocks.

config SPI_SH
	tristate "SuperH SPI controller"
@@ -372,12 +379,6 @@ config SPI_SIRF
	help
	  SPI driver for CSR SiRFprimaII SoCs

config SPI_STMP3XXX
	tristate "Freescale STMP37xx/378x SPI/SSP controller"
	depends on ARCH_STMP3XXX
	help
	  SPI driver for Freescale STMP37xx/378x SoC SSP interface

config SPI_MXS
	tristate "Freescale MXS SPI controller"
	depends on ARCH_MXS
@@ -385,6 +386,20 @@ config SPI_MXS
	help
	  SPI driver for Freescale MXS devices.

config SPI_TEGRA20_SFLASH
	tristate "Nvidia Tegra20 Serial flash Controller"
	depends on ARCH_TEGRA
	help
	  SPI driver for Nvidia Tegra20 Serial flash Controller interface.
	  The main usecase of this controller is to use spi flash as boot
	  device.

config SPI_TEGRA20_SLINK
	tristate "Nvidia Tegra20/Tegra30 SLINK Controller"
	depends on ARCH_TEGRA && TEGRA20_APB_DMA
	help
	  SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface.

config SPI_TI_SSP
	tristate "TI Sequencer Serial Port - SPI Support"
	depends on MFD_TI_SSP
Loading