Skip to content

Commit d290106

Browse files
committed
Merge tag 'spi-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "A quiet release for SPI, mainly driver updates and not too many of them: - Support for dummy transfers (for delays on startup) in drivers using transfer_one(). - Lots of enhancements to the Designware driver to support new Intel SoCs. - Support for newer Renesas chips. - DMA support for the i.MX driver. - One new driver for Broadcom BCM53xx chips" * tag 'spi-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (64 commits) spi: spi-mxs: fix a tiny typo in a comment spi: dw-mid: follow new DMAengine workflow spi: dw-mid: convert to use DMAengine wrappers spi: dw-mid: change magic numbers to the constants spi: orion: support armada extended baud rates spi: fsl: Sort include headers alphabetically spi: bcm53xx: Add missing module information spi: bcm53xx: Fix module dependency spi/rockchip: fix bug that cause the failure to read data in DMA mode spi: fsl-dspi: Remove probe info message spi: pl022: Add support for chip select extension spi: Fix possible ZERO_SIZE_PTR pointer dereferencing error. spi: dw: fix style of code in few places spi: dw: introduce support of loopback mode spi: dw-mid: terminate ongoing transfers at exit spi: dw-mid: respect 8 bit mode spi: clps711x: Migrate to the new clk subsystem spi: pl022: Add missing error check for devm_kzalloc spi: spi-imx: add DMA support spi: davinci: add support for adding delay between word's transmissions ...
2 parents 81e29b7 + a2285b8 commit d290106

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1282
-371
lines changed

Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Required properties:
77
- interrupts : Should contain CSPI/eCSPI interrupt
88
- fsl,spi-num-chipselects : Contains the number of the chipselect
99
- cs-gpios : Specifies the gpio pins to be used for chipselects.
10+
- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
11+
Documentation/devicetree/bindings/dma/dma.txt
12+
- dma-names: DMA request names should include "tx" and "rx" if present.
1013

1114
Example:
1215

@@ -19,4 +22,6 @@ ecspi@70010000 {
1922
fsl,spi-num-chipselects = <2>;
2023
cs-gpios = <&gpio3 24 0>, /* GPIO3_24 */
2124
<&gpio3 25 0>; /* GPIO3_25 */
25+
dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
26+
dma-names = "rx", "tx";
2227
};

Documentation/devicetree/bindings/spi/sh-msiof.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@ Required properties:
66
"renesas,sh-mobile-msiof" for SH Mobile series.
77
Examples with soctypes are:
88
"renesas,msiof-r8a7790" (R-Car H2)
9-
"renesas,msiof-r8a7791" (R-Car M2)
10-
- reg : Offset and length of the register set for the device
9+
"renesas,msiof-r8a7791" (R-Car M2-W)
10+
"renesas,msiof-r8a7792" (R-Car V2H)
11+
"renesas,msiof-r8a7793" (R-Car M2-N)
12+
"renesas,msiof-r8a7794" (R-Car E2)
13+
- reg : A list of offsets and lengths of the register sets for
14+
the device.
15+
If only one register set is present, it is to be used
16+
by both the CPU and the DMA engine.
17+
If two register sets are present, the first is to be
18+
used by the CPU, and the second is to be used by the
19+
DMA engine.
1120
- interrupt-parent : The phandle for the interrupt controller that
1221
services interrupts for this device
1322
- interrupts : Interrupt specifier
@@ -17,12 +26,16 @@ Required properties:
1726
Optional properties:
1827
- clocks : Must contain a reference to the functional clock.
1928
- num-cs : Total number of chip-selects (default is 1)
29+
- dmas : Must contain a list of two references to DMA
30+
specifiers, one for transmission, and one for
31+
reception.
32+
- dma-names : Must contain a list of two DMA names, "tx" and "rx".
2033

2134
Optional properties, deprecated for soctype-specific bindings:
2235
- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
2336
(default is 64)
2437
- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
25-
(default is 64, or 256 on R-Car H2 and M2)
38+
(default is 64, or 256 on R-Car Gen2)
2639

2740
Pinctrl properties might be needed, too. See
2841
Documentation/devicetree/bindings/pinctrl/renesas,*.
@@ -31,9 +44,11 @@ Example:
3144

3245
msiof0: spi@e6e20000 {
3346
compatible = "renesas,msiof-r8a7791";
34-
reg = <0 0xe6e20000 0 0x0064>;
47+
reg = <0 0xe6e20000 0 0x0064>, <0 0xe7e20000 0 0x0064>;
3548
interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
3649
clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
50+
dmas = <&dmac0 0x51>, <&dmac0 0x52>;
51+
dma-names = "tx", "rx";
3752
#address-cells = <1>;
3853
#size-cells = <0>;
3954
status = "disabled";

Documentation/devicetree/bindings/spi/spi-davinci.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Davinci SPI controller device bindings
22

3+
Links on DM:
4+
Keystone 2 - http://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf
5+
dm644x - http://www.ti.com/lit/ug/sprue32a/sprue32a.pdf
6+
OMAP-L138/da830 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
7+
38
Required properties:
49
- #address-cells: number of cells required to define a chip select
510
address on the SPI bus. Should be set to 1.
@@ -24,6 +29,30 @@ Optional:
2429
cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
2530
where first three are internal CS and last two are GPIO CS.
2631

32+
Optional properties for slave devices:
33+
SPI slave nodes can contain the following properties.
34+
Not all SPI Peripherals from Texas Instruments support this.
35+
Please check SPI peripheral documentation for a device before using these.
36+
37+
- ti,spi-wdelay : delay between transmission of words
38+
(SPIFMTn.WDELAY, SPIDAT1.WDEL) must be specified in number of SPI module
39+
clock periods.
40+
41+
delay = WDELAY * SPI_module_clock_period + 2 * SPI_module_clock_period
42+
43+
Below is timing diagram which shows functional meaning of
44+
"ti,spi-wdelay" parameter.
45+
46+
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
47+
SPI_CLK | | | | | | | | | | | | | | | |
48+
+----------+ +-+ +-+ +-+ +-+ +---------------------------+ +-+ +-+ +-
49+
50+
SPI_SOMI/SIMO+-----------------+ +-----------
51+
+----------+ word1 +---------------------------+word2
52+
+-----------------+ +-----------
53+
WDELAY
54+
<-------------------------->
55+
2756
Example of a NOR flash slave device (n25q032) connected to DaVinci
2857
SPI controller device over the SPI bus.
2958

@@ -43,6 +72,7 @@ spi0:spi@20BF0000 {
4372
compatible = "st,m25p32";
4473
spi-max-frequency = <25000000>;
4574
reg = <0>;
75+
ti,spi-wdelay = <8>;
4676

4777
partition@0 {
4878
label = "u-boot-spl";

Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ Required properties:
1010
- pinctrl-names: must contain a "default" entry.
1111
- spi-num-chipselects : the number of the chipselect signals.
1212
- bus-num : the slave chip chipselect signal number.
13-
- big-endian : if DSPI modudle is big endian, the bool will be set in node.
13+
14+
Optional property:
15+
- big-endian: If present the dspi device's registers are implemented
16+
in big endian mode, otherwise in native mode(same with CPU), for more
17+
detail please see: Documentation/devicetree/bindings/regmap/regmap.txt.
18+
1419
Example:
1520

1621
dspi0@4002c000 {

Documentation/devicetree/bindings/spi/spi-orion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Marvell Orion SPI device
22

33
Required properties:
4-
- compatible : should be "marvell,orion-spi".
4+
- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
55
- reg : offset and length of the register set for the device
66
- cell-index : Which of multiple SPI controllers is this.
77
Optional properties:

Documentation/devicetree/bindings/spi/spi-rspi.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Required properties:
1111
- "renesas,rspi-sh7757" (SH)
1212
- "renesas,rspi-r7s72100" (RZ/A1H)
1313
- "renesas,qspi-r8a7790" (R-Car H2)
14-
- "renesas,qspi-r8a7791" (R-Car M2)
14+
- "renesas,qspi-r8a7791" (R-Car M2-W)
15+
- "renesas,qspi-r8a7792" (R-Car V2H)
16+
- "renesas,qspi-r8a7793" (R-Car M2-N)
17+
- "renesas,qspi-r8a7794" (R-Car E2)
1518
- reg : Address start and address range size of the device
1619
- interrupts : A list of interrupt-specifiers, one for each entry in
1720
interrupt-names.
@@ -30,6 +33,9 @@ Required properties:
3033

3134
Optional properties:
3235
- clocks : Must contain a reference to the functional clock.
36+
- dmas : Must contain a list of two references to DMA specifiers,
37+
one for transmission, and one for reception.
38+
- dma-names : Must contain a list of two DMA names, "tx" and "rx".
3339

3440
Pinctrl properties might be needed, too. See
3541
Documentation/devicetree/bindings/pinctrl/renesas,*.
@@ -58,4 +64,6 @@ Examples:
5864
num-cs = <1>;
5965
#address-cells = <1>;
6066
#size-cells = <0>;
67+
dmas = <&dmac0 0x17>, <&dmac0 0x18>;
68+
dma-names = "tx", "rx";
6169
};

Documentation/spi/spi-summary

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,13 @@ THANKS TO
601601
Contributors to Linux-SPI discussions include (in alphabetical order,
602602
by last name):
603603

604+
Mark Brown
604605
David Brownell
605606
Russell King
607+
Grant Likely
606608
Dmitry Pervushin
607609
Stephen Street
608610
Mark Underwood
609611
Andrew Victor
610-
Vitaly Wool
611-
Grant Likely
612-
Mark Brown
613612
Linus Walleij
613+
Vitaly Wool

drivers/spi/Kconfig

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ config SPI_ATH79
6969

7070
config SPI_ATMEL
7171
tristate "Atmel SPI Controller"
72+
depends on HAS_DMA
7273
depends on (ARCH_AT91 || AVR32 || COMPILE_TEST)
7374
help
7475
This selects a driver for the Atmel SPI Controller, present on
@@ -112,6 +113,14 @@ config SPI_AU1550
112113
If you say yes to this option, support will be included for the
113114
PSC SPI controller found on Au1550, Au1200 and Au1300 series.
114115

116+
config SPI_BCM53XX
117+
tristate "Broadcom BCM53xx SPI controller"
118+
depends on ARCH_BCM_5301X
119+
depends on BCMA_POSSIBLE
120+
select BCMA
121+
help
122+
Enable support for the SPI controller on Broadcom BCM53xx ARM SoCs.
123+
115124
config SPI_BCM63XX
116125
tristate "Broadcom BCM63xx SPI controller"
117126
depends on BCM63XX
@@ -185,6 +194,7 @@ config SPI_EFM32
185194

186195
config SPI_EP93XX
187196
tristate "Cirrus Logic EP93xx SPI controller"
197+
depends on HAS_DMA
188198
depends on ARCH_EP93XX || COMPILE_TEST
189199
help
190200
This enables using the Cirrus EP93xx SPI controller in master
@@ -314,6 +324,7 @@ config SPI_OMAP_UWIRE
314324

315325
config SPI_OMAP24XX
316326
tristate "McSPI driver for OMAP"
327+
depends on HAS_DMA
317328
depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SUPERH
318329
depends on ARCH_OMAP2PLUS || COMPILE_TEST
319330
help
@@ -380,7 +391,7 @@ config SPI_PXA2XX
380391
additional documentation can be found a Documentation/spi/pxa2xx.
381392

382393
config SPI_PXA2XX_PCI
383-
def_tristate SPI_PXA2XX && PCI
394+
def_tristate SPI_PXA2XX && PCI && COMMON_CLK
384395

385396
config SPI_ROCKCHIP
386397
tristate "Rockchip SPI controller driver"
@@ -500,7 +511,7 @@ config SPI_MXS
500511
config SPI_TEGRA114
501512
tristate "NVIDIA Tegra114 SPI Controller"
502513
depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST
503-
depends on RESET_CONTROLLER
514+
depends on RESET_CONTROLLER && HAS_DMA
504515
help
505516
SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller
506517
is different than the older SoCs SPI controller and also register interface
@@ -518,7 +529,7 @@ config SPI_TEGRA20_SFLASH
518529
config SPI_TEGRA20_SLINK
519530
tristate "Nvidia Tegra20/Tegra30 SLINK Controller"
520531
depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST
521-
depends on RESET_CONTROLLER
532+
depends on RESET_CONTROLLER && HAS_DMA
522533
help
523534
SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface.
524535

@@ -591,7 +602,7 @@ config SPI_DW_PCI
591602
depends on SPI_DESIGNWARE && PCI
592603

593604
config SPI_DW_MID_DMA
594-
bool "DMA support for DW SPI controller on Intel Moorestown platform"
605+
bool "DMA support for DW SPI controller on Intel MID platform"
595606
depends on SPI_DW_PCI && INTEL_MID_DMAC
596607

597608
config SPI_DW_MMIO

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o
1515
obj-$(CONFIG_SPI_ATH79) += spi-ath79.o
1616
obj-$(CONFIG_SPI_AU1550) += spi-au1550.o
1717
obj-$(CONFIG_SPI_BCM2835) += spi-bcm2835.o
18+
obj-$(CONFIG_SPI_BCM53XX) += spi-bcm53xx.o
1819
obj-$(CONFIG_SPI_BCM63XX) += spi-bcm63xx.o
1920
obj-$(CONFIG_SPI_BCM63XX_HSSPI) += spi-bcm63xx-hsspi.o
2021
obj-$(CONFIG_SPI_BFIN5XX) += spi-bfin5xx.o

0 commit comments

Comments
 (0)