Skip to content

Commit a996b9c

Browse files
committed
Merge tag 'spi-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "There's quite a lot of changes for SPI in this release but none in the core, they're all mostly small driver updates and additions. Some of the more notable changes include: - A huge set of cleanups, optimizations and improvements for the DesignWare driver from Serge Semin finishing up the work started last release. - Conversion of the Zynq gqspi driver to spi-mem. - Support for Baikal T1, Broadcom BCMSTB 7445, and Renesas R8A7742" * tag 'spi-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (137 commits) spi: cadence: Add SPI transfer delays spi: dw: Add Baikal-T1 SPI Controller bindings spi: dw: Add Baikal-T1 SPI Controller glue driver spi: dw: Add poll-based SPI transfers support spi: dw: Introduce max mem-ops SPI bus frequency setting spi: dw: Add memory operations support spi: dw: Add generic DW SSI status-check method spi: dw: Move num-of retries parameter to the header file spi: dw: Explicitly de-assert CS on SPI transfer completion spi: dw: De-assert chip-select on reset spi: dw: Discard chip enabling on DMA setup error spi: dw: Unmask IRQs after enabling the chip spi: dw: Perform IRQ setup in a dedicated function spi: dw: Refactor IRQ-based SPI transfer procedure spi: dw: Refactor data IO procedure spi: dw: Add DW SPI controller config structure spi: dw: Update Rx sample delay in the config function spi: dw: Simplify the SPI bus speed config procedure spi: dw: Update SPI bus speed in a config function spi: dw: Detach SPI device specific CR0 config method ...
2 parents 1724e02 + 9887311 commit a996b9c

51 files changed

Lines changed: 2913 additions & 1277 deletions

Some content is hidden

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

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties:
1919
compatible:
2020
enum:
2121
- ibm,fsi2spi
22+
- ibm,fsi2spi-restricted
2223

2324
reg:
2425
items:

Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Required properties:
3232
BRCMSTB SoCs
3333
"brcm,spi-bcm7435-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
3434
BRCMSTB SoCs
35+
"brcm,spi-bcm7445-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
36+
BRCMSTB SoCs
3537
"brcm,spi-bcm7216-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
3638
BRCMSTB SoCs
3739
"brcm,spi-bcm7278-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Serial NOR flash controller for MediaTek ARM SoCs
8+
9+
maintainers:
10+
- Bayi Cheng <bayi.cheng@mediatek.com>
11+
- Chuanhong Guo <gch981213@gmail.com>
12+
13+
description: |
14+
This spi controller support single, dual, or quad mode transfer for
15+
SPI NOR flash. There should be only one spi slave device following
16+
generic spi bindings. It's not recommended to use this controller
17+
for devices other than SPI NOR flash due to limited transfer
18+
capability of this controller.
19+
20+
allOf:
21+
- $ref: /spi/spi-controller.yaml#
22+
23+
properties:
24+
compatible:
25+
oneOf:
26+
- items:
27+
- enum:
28+
- mediatek,mt2701-nor
29+
- mediatek,mt2712-nor
30+
- mediatek,mt7622-nor
31+
- mediatek,mt7623-nor
32+
- mediatek,mt7629-nor
33+
- mediatek,mt8192-nor
34+
- enum:
35+
- mediatek,mt8173-nor
36+
- items:
37+
- const: mediatek,mt8173-nor
38+
reg:
39+
maxItems: 1
40+
41+
interrupts:
42+
maxItems: 1
43+
44+
clocks:
45+
items:
46+
- description: clock used for spi bus
47+
- description: clock used for controller
48+
49+
clock-names:
50+
items:
51+
- const: spi
52+
- const: sf
53+
54+
required:
55+
- compatible
56+
- reg
57+
- interrupts
58+
- clocks
59+
- clock-names
60+
61+
unevaluatedProperties: false
62+
63+
examples:
64+
- |
65+
#include <dt-bindings/clock/mt8173-clk.h>
66+
67+
soc {
68+
#address-cells = <2>;
69+
#size-cells = <2>;
70+
71+
nor_flash: spi@1100d000 {
72+
compatible = "mediatek,mt8173-nor";
73+
reg = <0 0x1100d000 0 0xe0>;
74+
interrupts = <&spi_flash_irq>;
75+
clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
76+
clock-names = "spi", "sf";
77+
#address-cells = <1>;
78+
#size-cells = <0>;
79+
80+
flash@0 {
81+
compatible = "jedec,spi-nor";
82+
reg = <0>;
83+
};
84+
};
85+
};
86+

Documentation/devicetree/bindings/spi/renesas,rspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525

2626
- items:
2727
- enum:
28+
- renesas,qspi-r8a7742 # RZ/G1H
2829
- renesas,qspi-r8a7743 # RZ/G1M
2930
- renesas,qspi-r8a7744 # RZ/G1N
3031
- renesas,qspi-r8a7745 # RZ/G1E

Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ properties:
4141
- renesas,msiof-r8a774e1 # RZ/G2H
4242
- renesas,msiof-r8a7795 # R-Car H3
4343
- renesas,msiof-r8a7796 # R-Car M3-W
44+
- renesas,msiof-r8a77961 # R-Car M3-W+
4445
- renesas,msiof-r8a77965 # R-Car M3-N
4546
- renesas,msiof-r8a77970 # R-Car V3M
4647
- renesas,msiof-r8a77980 # R-Car V3H

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

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ allOf:
2222
properties:
2323
reg:
2424
minItems: 2
25+
- if:
26+
properties:
27+
compatible:
28+
contains:
29+
enum:
30+
- baikal,bt1-sys-ssi
31+
then:
32+
properties:
33+
mux-controls:
34+
maxItems: 1
35+
required:
36+
- mux-controls
37+
else:
38+
required:
39+
- interrupts
2540

2641
properties:
2742
compatible:
@@ -36,6 +51,8 @@ properties:
3651
- mscc,ocelot-spi
3752
- mscc,jaguar2-spi
3853
- const: snps,dw-apb-ssi
54+
- description: Microchip Sparx5 SoC SPI Controller
55+
const: microchip,sparx5-spi
3956
- description: Amazon Alpine SPI Controller
4057
const: amazon,alpine-dw-apb-ssi
4158
- description: Renesas RZ/N1 SPI Controller
@@ -44,12 +61,16 @@ properties:
4461
- const: snps,dw-apb-ssi
4562
- description: Intel Keem Bay SPI Controller
4663
const: intel,keembay-ssi
64+
- description: Baikal-T1 SPI Controller
65+
const: baikal,bt1-ssi
66+
- description: Baikal-T1 System Boot SPI Controller
67+
const: baikal,bt1-sys-ssi
4768

4869
reg:
4970
minItems: 1
5071
items:
5172
- description: DW APB SSI controller memory mapped registers
52-
- description: SPI MST region map
73+
- description: SPI MST region map or directly mapped SPI ROM
5374

5475
interrupts:
5576
maxItems: 1
@@ -93,6 +114,12 @@ properties:
93114
- const: tx
94115
- const: rx
95116

117+
rx-sample-delay-ns:
118+
default: 0
119+
description: Default value of the rx-sample-delay-ns property.
120+
This value will be used if the property is not explicitly defined
121+
for a SPI slave device. See below.
122+
96123
patternProperties:
97124
"^.*@[0-9a-f]+$":
98125
type: object
@@ -107,14 +134,20 @@ patternProperties:
107134
spi-tx-bus-width:
108135
const: 1
109136

137+
rx-sample-delay-ns:
138+
description: SPI Rx sample delay offset, unit is nanoseconds.
139+
The delay from the default sample time before the actual
140+
sample of the rxd input signal occurs. The "rx_sample_delay"
141+
is an optional feature of the designware controller, and the
142+
upper limit is also subject to controller configuration.
143+
110144
unevaluatedProperties: false
111145

112146
required:
113147
- compatible
114148
- reg
115149
- "#address-cells"
116150
- "#size-cells"
117-
- interrupts
118151
- clocks
119152

120153
examples:
@@ -129,5 +162,22 @@ examples:
129162
num-cs = <2>;
130163
cs-gpios = <&gpio0 13 0>,
131164
<&gpio0 14 0>;
165+
rx-sample-delay-ns = <3>;
166+
spi-flash@1 {
167+
compatible = "spi-nand";
168+
reg = <1>;
169+
rx-sample-delay-ns = <7>;
170+
};
171+
};
172+
- |
173+
spi@1f040100 {
174+
compatible = "baikal,bt1-sys-ssi";
175+
reg = <0x1f040100 0x900>,
176+
<0x1c000000 0x1000000>;
177+
#address-cells = <1>;
178+
#size-cells = <0>;
179+
mux-controls = <&boot_mux>;
180+
clocks = <&ccu_sys>;
181+
clock-names = "ssi_clk";
132182
};
133183
...

Documentation/devicetree/bindings/spi/spi-mtk-nor.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

drivers/spi/Kconfig

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ config SPI_DAVINCI
235235

236236
config SPI_DESIGNWARE
237237
tristate "DesignWare SPI controller core support"
238+
imply SPI_MEM
238239
help
239240
general driver for SPI controller core from DesignWare
240241

@@ -251,6 +252,34 @@ config SPI_DW_MMIO
251252
tristate "Memory-mapped io interface driver for DW SPI core"
252253
depends on HAS_IOMEM
253254

255+
config SPI_DW_BT1
256+
tristate "Baikal-T1 SPI driver for DW SPI core"
257+
depends on MIPS_BAIKAL_T1 || COMPILE_TEST
258+
help
259+
Baikal-T1 SoC is equipped with three DW APB SSI-based MMIO SPI
260+
controllers. Two of them are pretty much normal: with IRQ, DMA,
261+
FIFOs of 64 words depth, 4x CSs, but the third one as being a
262+
part of the Baikal-T1 System Boot Controller has got a very
263+
limited resources: no IRQ, no DMA, only a single native
264+
chip-select and Tx/Rx FIFO with just 8 words depth available.
265+
The later one is normally connected to an external SPI-nor flash
266+
of 128Mb (in general can be of bigger size).
267+
268+
config SPI_DW_BT1_DIRMAP
269+
bool "Directly mapped Baikal-T1 Boot SPI flash support"
270+
depends on SPI_DW_BT1
271+
select MULTIPLEXER
272+
select MUX_MMIO
273+
help
274+
Directly mapped SPI flash memory is an interface specific to the
275+
Baikal-T1 System Boot Controller. It is a 16MB MMIO region, which
276+
can be used to access a peripheral memory device just by
277+
reading/writing data from/to it. Note that the system APB bus
278+
will stall during each IO from/to the dirmap region until the
279+
operation is finished. So try not to use it concurrently with
280+
time-critical tasks (like the SPI memory operations implemented
281+
in this driver).
282+
254283
endif
255284

256285
config SPI_DLN2
@@ -637,7 +666,7 @@ config SPI_QCOM_QSPI
637666

638667
config SPI_QUP
639668
tristate "Qualcomm SPI controller with QUP interface"
640-
depends on ARCH_QCOM || (ARM && COMPILE_TEST)
669+
depends on ARCH_QCOM || COMPILE_TEST
641670
help
642671
Qualcomm Universal Peripheral (QUP) core is an AHB slave that
643672
provides a common data path (an output FIFO and an input FIFO)

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ obj-$(CONFIG_SPI_DLN2) += spi-dln2.o
3939
obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
4040
spi-dw-y := spi-dw-core.o
4141
spi-dw-$(CONFIG_SPI_DW_DMA) += spi-dw-dma.o
42+
obj-$(CONFIG_SPI_DW_BT1) += spi-dw-bt1.o
4243
obj-$(CONFIG_SPI_DW_MMIO) += spi-dw-mmio.o
4344
obj-$(CONFIG_SPI_DW_PCI) += spi-dw-pci.o
4445
obj-$(CONFIG_SPI_EFM32) += spi-efm32.o

drivers/spi/spi-armada-3700.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,6 @@ static int a3700_spi_probe(struct platform_device *pdev)
848848
platform_set_drvdata(pdev, master);
849849

850850
spi = spi_master_get_devdata(master);
851-
memset(spi, 0, sizeof(struct a3700_spi));
852851

853852
spi->master = master;
854853

0 commit comments

Comments
 (0)