Skip to content

Commit 2e5f081

Browse files
committed
Merge branch 'spi-5.2' into spi-next
2 parents 58b860e + d61ad23 commit 2e5f081

Some content is hidden

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

55 files changed

+2408
-649
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Optional properties:
1818
- gpios : specifies the gpio pins to be used for chipselects.
1919
The gpios will be referred to as reg = <index> in the SPI child nodes.
2020
If unspecified, a single SPI device without a chip select can be used.
21+
- fsl,spisel_boot : for the MPC8306 and MPC8309, specifies that the
22+
SPISEL_BOOT signal is used as chip select for a slave device. Use
23+
reg = <number of gpios> in the corresponding child node, i.e. 0 if
24+
the gpios property is not present.
2125

2226
Example:
2327
spi@4c0 {

Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ Required properties:
2323
Recommended properties:
2424
- spi-max-frequency: Definition as per
2525
Documentation/devicetree/bindings/spi/spi-bus.txt
26+
Optional properties:
27+
- nvidia,tx-clk-tap-delay: Delays the clock going out to the external device
28+
with this tap value. This property is used to tune the outgoing data from
29+
Tegra SPI master with respect to outgoing Tegra SPI master clock.
30+
Tap values vary based on the platform design trace lengths from Tegra SPI
31+
to corresponding slave devices. Valid tap values are from 0 thru 63.
32+
- nvidia,rx-clk-tap-delay: Delays the clock coming in from the external device
33+
with this tap value. This property is used to adjust the Tegra SPI master
34+
clock with respect to the data from the SPI slave device.
35+
Tap values vary based on the platform design trace lengths from Tegra SPI
36+
to corresponding slave devices. Valid tap values are from 0 thru 63.
37+
2638
Example:
2739

2840
spi@7000d600 {
@@ -38,4 +50,12 @@ spi@7000d600 {
3850
reset-names = "spi";
3951
dmas = <&apbdma 16>, <&apbdma 16>;
4052
dma-names = "rx", "tx";
53+
<spi-client>@<bus_num> {
54+
...
55+
...
56+
nvidia,rx-clk-tap-delay = <0>;
57+
nvidia,tx-clk-tap-delay = <16>;
58+
...
59+
};
60+
4161
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Required properties:
44
- compatible : "renesas,msiof-r8a7743" (RZ/G1M)
55
"renesas,msiof-r8a7744" (RZ/G1N)
66
"renesas,msiof-r8a7745" (RZ/G1E)
7+
"renesas,msiof-r8a77470" (RZ/G1C)
78
"renesas,msiof-r8a774a1" (RZ/G2M)
89
"renesas,msiof-r8a774c0" (RZ/G2E)
910
"renesas,msiof-r8a7790" (R-Car H2)

Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@ Required properties:
88
- interrupts : One interrupt, used by the controller.
99
- #address-cells : <1>, as required by generic SPI binding.
1010
- #size-cells : <0>, also as required by generic SPI binding.
11+
- clocks : phandles for the clocks, see the description of clock-names below.
12+
The phandle for the "ssi_clk" is required. The phandle for the "pclk" clock
13+
is optional. If a single clock is specified but no clock-name, it is the
14+
"ssi_clk" clock. If both clocks are listed, the "ssi_clk" must be first.
1115

1216
Optional properties:
13-
- cs-gpios : Specifies the gpio pis to be used for chipselects.
17+
- clock-names : Contains the names of the clocks:
18+
"ssi_clk", for the core clock used to generate the external SPI clock.
19+
"pclk", the interface clock, required for register access.
20+
- cs-gpios : Specifies the gpio pins to be used for chipselects.
1421
- num-cs : The number of chipselects. If omitted, this will default to 4.
1522
- reg-io-width : The I/O register width (in bytes) implemented by this
1623
device. Supported values are 2 or 4 (the default).
@@ -25,6 +32,7 @@ Example:
2532
interrupts = <0 154 4>;
2633
#address-cells = <1>;
2734
#size-cells = <0>;
35+
clocks = <&spi_m_clk>;
2836
num-cs = <2>;
2937
cs-gpios = <&gpio0 13 0>,
3038
<&gpio0 14 0>;

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Required properties:
77
- reg : address and length of the lpspi master registers
88
- interrupt-parent : core interrupt controller
99
- interrupts : lpspi interrupt
10-
- clocks : lpspi clock specifier
10+
- clocks : lpspi clock specifier. Its number and order need to correspond to the
11+
value in clock-names.
12+
- clock-names : Corresponding to per clock and ipg clock in "clocks"
13+
respectively. In i.MX7ULP, it only has per clk, so use CLK_DUMMY
14+
to fill the "ipg" blank.
1115
- spi-slave : spi slave mode support. In slave mode, add this attribute without
1216
value. In master mode, remove it.
1317

@@ -18,6 +22,8 @@ lpspi2: lpspi@40290000 {
1822
reg = <0x40290000 0x10000>;
1923
interrupt-parent = <&intc>;
2024
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
21-
clocks = <&clks IMX7ULP_CLK_LPSPI2>;
25+
clocks = <&clks IMX7ULP_CLK_LPSPI2>,
26+
<&clks IMX7ULP_CLK_DUMMY>;
27+
clock-names = "per", "ipg";
2228
spi-slave;
2329
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Required properties:
1010
- mediatek,mt8135-spi: for mt8135 platforms
1111
- mediatek,mt8173-spi: for mt8173 platforms
1212
- mediatek,mt8183-spi: for mt8183 platforms
13+
- "mediatek,mt8516-spi", "mediatek,mt2712-spi": for mt8516 platforms
1314

1415
- #address-cells: should be 1.
1516

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Binding for MTK SPI controller (MT7621 MIPS)
2+
3+
Required properties:
4+
- compatible: Should be one of the following:
5+
- "ralink,mt7621-spi": for mt7621/mt7628/mt7688 platforms
6+
- #address-cells: should be 1.
7+
- #size-cells: should be 0.
8+
- reg: Address and length of the register set for the device
9+
- resets: phandle to the reset controller asserting this device in
10+
reset
11+
See ../reset/reset.txt for details.
12+
13+
Optional properties:
14+
- cs-gpios: see spi-bus.txt.
15+
16+
Example:
17+
18+
- SoC Specific Portion:
19+
spi0: spi@b00 {
20+
compatible = "ralink,mt7621-spi";
21+
reg = <0xb00 0x100>;
22+
#address-cells = <1>;
23+
#size-cells = <0>;
24+
resets = <&rstctrl 18>;
25+
reset-names = "spi";
26+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Xilinx Zynq QSPI controller Device Tree Bindings
2+
-------------------------------------------------------------------
3+
4+
Required properties:
5+
- compatible : Should be "xlnx,zynq-qspi-1.0".
6+
- reg : Physical base address and size of QSPI registers map.
7+
- interrupts : Property with a value describing the interrupt
8+
number.
9+
- clock-names : List of input clock names - "ref_clk", "pclk"
10+
(See clock bindings for details).
11+
- clocks : Clock phandles (see clock bindings for details).
12+
13+
Optional properties:
14+
- num-cs : Number of chip selects used.
15+
16+
Example:
17+
qspi: spi@e000d000 {
18+
compatible = "xlnx,zynq-qspi-1.0";
19+
reg = <0xe000d000 0x1000>;
20+
interrupt-parent = <&intc>;
21+
interrupts = <0 19 4>;
22+
clock-names = "ref_clk", "pclk";
23+
clocks = <&clkc 10>, <&clkc 43>;
24+
num-cs = <1>;
25+
};

Documentation/spi/spi-summary

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,12 @@ SPI MASTER METHODS
572572
0: transfer is finished
573573
1: transfer is still in progress
574574

575+
master->set_cs_timing(struct spi_device *spi, u8 setup_clk_cycles,
576+
u8 hold_clk_cycles, u8 inactive_clk_cycles)
577+
This method allows SPI client drivers to request SPI master controller
578+
for configuring device specific CS setup, hold and inactive timing
579+
requirements.
580+
575581
DEPRECATED METHODS
576582

577583
master->transfer(struct spi_device *spi, struct spi_message *message)

arch/arm/mach-ep93xx/edb93xx.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/platform_device.h>
3030
#include <linux/i2c.h>
3131
#include <linux/spi/spi.h>
32+
#include <linux/gpio/machine.h>
3233

3334
#include <sound/cs4271.h>
3435

@@ -105,13 +106,16 @@ static struct spi_board_info edb93xx_spi_board_info[] __initdata = {
105106
},
106107
};
107108

108-
static int edb93xx_spi_chipselects[] __initdata = {
109-
EP93XX_GPIO_LINE_EGPIO6,
109+
static struct gpiod_lookup_table edb93xx_spi_cs_gpio_table = {
110+
.dev_id = "ep93xx-spi.0",
111+
.table = {
112+
GPIO_LOOKUP("A", 6, "cs", GPIO_ACTIVE_LOW),
113+
{ },
114+
},
110115
};
111116

112117
static struct ep93xx_spi_info edb93xx_spi_info __initdata = {
113-
.chipselect = edb93xx_spi_chipselects,
114-
.num_chipselect = ARRAY_SIZE(edb93xx_spi_chipselects),
118+
/* Intentionally left blank */
115119
};
116120

117121
static void __init edb93xx_register_spi(void)
@@ -123,6 +127,7 @@ static void __init edb93xx_register_spi(void)
123127
else if (machine_is_edb9315a())
124128
edb93xx_cs4271_data.gpio_nreset = EP93XX_GPIO_LINE_EGPIO14;
125129

130+
gpiod_add_lookup_table(&edb93xx_spi_cs_gpio_table);
126131
ep93xx_register_spi(&edb93xx_spi_info, edb93xx_spi_board_info,
127132
ARRAY_SIZE(edb93xx_spi_board_info));
128133
}

0 commit comments

Comments
 (0)