linux/Documentation/devicetree/bindings/spi
Jean-Christophe PLAGNIOL-VILLARD 7431798490 of_spi: add generic binding support to specify cs gpio
This will allow to use gpio for chip select with no modification in the
driver binding

When use the cs-gpios, the gpio number will be passed via the cs_gpio field
and the number of chip select will automatically increased with max(hw cs, gpio 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

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: spi-devel-general@lists.sourceforge.net
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
[grant.likely: fixed up type of cs count so min() can do type checking]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-11-21 23:25:33 +00:00
..
fsl-imx-cspi.txt dt: fsl-imx-cspi.txt: Fix comment about GPIOs used for chip selects 2012-06-13 13:34:39 -05:00
fsl-spi.txt
mxs-spi.txt spi/mxs: Make the SPI block clock speed configurable via DT 2012-09-06 07:45:53 +08:00
nvidia,tegra20-spi.txt dt: name all Tegra binding docs consistently 2012-06-11 11:48:42 -06:00
omap-spi.txt spi/omap: Add DT support to McSPI driver 2012-02-15 12:57:00 -07:00
spi_altera.txt spi: New driver for Altera SPI 2011-02-22 14:59:53 -07:00
spi_oc_tiny.txt
spi_pl022.txt spi/pl022: Devicetree support w/o platform data 2012-09-25 07:06:16 -04:00
spi-bus.txt of_spi: add generic binding support to specify cs gpio 2012-11-21 23:25:33 +00:00
spi-gpio.txt spi: spi-gpio: Add DT bindings 2012-09-06 07:41:09 +08:00
spi-octeon.txt spi: Add SPI master controller for OCTEON SOCs. 2012-08-22 23:46:38 +02:00
spi-orion.txt spi/orion: add device tree binding 2012-07-23 11:43:39 +01:00
spi-samsung.txt ARM: EXYNOS: mark the DMA channel binding for SPI as preliminary 2012-07-17 23:13:06 +02:00
spi-sc18is602.txt spi: Master driver for NXP SC18IS602/603 2012-08-22 19:34:51 +01:00