Skip to content

Commit 47618bc

Browse files
committed
Merge tag 'spi-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "The biggest change for SPI this release is the addition of offload support from David Lechner, allowing the hardware to trigger SPI transactions autonomously. The initial use case is for triggering IIO operations but there are other applications where having the hardware ready to go at a minimal signal is useful for synchronising with external inputs (eg, interrupt handling) or reducing latency (eg, CAN networking). Otherwise there's the usual fixes, improvements and cleanups, plus support for a bunch of new devices. - Support for offloading support from David Lechner - Support for GOcontrol1 Moduline modules, Mediatek MT7988, NXP i.MX94, Qualcomm SPI NAMD, Rockchip RK3562, Sophogo SG2044 and ST STM32 OSPI" * tag 'spi-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (59 commits) spi: spi-mem: Introduce a default ->exec_op() debug log spi: dt-bindings: cdns,qspi-nor: Require some peripheral properties spi: dt-bindings: cdns,qspi-nor: Deprecate the Cadence compatible alone spi: dt-bindings: cdns,qspi-nor: Be more descriptive regarding what this controller is spi: stm32-ospi: Include "gpio/consumer.h" MAINTAINERS: adjust the file entry in GOCONTROLL MODULINE MODULE SLOT spi: spi-qpic-snand: avoid memleak in qcom_spi_ecc_init_ctx_pipelined() spi: spi-mux: Fix coverity issue, unchecked return value spi: sophgo: fix incorrect type for ret in sg2044_spifmc_write() spi: sg2044-nor: fix uninitialized variable in probe spi: sg2044-nor: fix signedness bug in sg2044_spifmc_write() spi: sg2044-nor: Convert to dev_err_probe() spi: sg2044-nor: Fully convert to device managed resources dt-bindings: spi: add compatibles for mt7988 spi: spidev: Add an entry for the gocontroll moduline module slot MAINTAINERS: add maintainer for the GOcontroll Moduline module slot dt-bindings: connector: Add the GOcontroll Moduline module slot bindings dt-bindings: vendor-prefixes: add GOcontroll spi: Use inclusive language spi: cadence-qspi: Improve spi memory performance ...
2 parents e2ae6e1 + ee2ecf2 commit 47618bc

Some content is hidden

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

47 files changed

+5188
-307
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/connector/gocontroll,moduline-module-slot.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GOcontroll Moduline Module slot
8+
9+
maintainers:
10+
- Maud Spierings <maudspierings@gocontroll.com>
11+
12+
description:
13+
The GOcontroll Moduline module slot represents a connector that fullfills the
14+
Moduline slot specification, and can thus house any IO module that is also
15+
built to this spec.
16+
17+
properties:
18+
compatible:
19+
const: gocontroll,moduline-module-slot
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
description: indicates readiness, high means busy.
26+
maxItems: 1
27+
reset-gpios:
28+
description: resets the module, active low.
29+
maxItems: 1
30+
sync-gpios:
31+
description: sync line between all module slots.
32+
maxItems: 1
33+
34+
vdd-supply:
35+
description: low power 3v3 supply generally for the microcontroller.
36+
vddp-supply:
37+
description: medium power 5v0 supply for on module low power peripherals.
38+
vddhpp-supply:
39+
description: high power 6v-8v supply for on module high power peripherals.
40+
power-supply:
41+
description: high power 6v-30v supply for high power module circuits.
42+
43+
i2c-bus:
44+
description: i2c bus shared between module slots and the SoC
45+
$ref: /schemas/types.yaml#/definitions/phandle
46+
47+
slot-number:
48+
description:
49+
The number of the module slot representing the location of on the pcb.
50+
This enables access to the modules based on slot location.
51+
$ref: /schemas/types.yaml#/definitions/uint32
52+
53+
spi-max-frequency: true
54+
55+
required:
56+
- compatible
57+
- reg
58+
- reset-gpios
59+
- interrupts
60+
- sync-gpios
61+
- i2c-bus
62+
- slot-number
63+
64+
additionalProperties: false
65+
66+
examples:
67+
- |
68+
#include <dt-bindings/gpio/gpio.h>
69+
#include <dt-bindings/interrupt-controller/irq.h>
70+
71+
spi {
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
75+
connector@0 {
76+
reg = <0>;
77+
compatible = "gocontroll,moduline-module-slot";
78+
reset-gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
79+
sync-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
80+
interrupt-parent = <&gpio4>;
81+
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
82+
vdd-supply = <&reg_3v3_per>;
83+
vddp-supply = <&reg_5v0>;
84+
vddhpp-supply = <&reg_6v4>;
85+
i2c-bus = <&i2c2>;
86+
slot-number = <1>;
87+
};
88+
};

Documentation/devicetree/bindings/spi/adi,axi-spi-engine.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ properties:
4141
- const: s_axi_aclk
4242
- const: spi_clk
4343

44+
trigger-sources:
45+
description:
46+
An array of trigger source phandles for offload instances. The index in
47+
the array corresponds to the offload instance number.
48+
minItems: 1
49+
maxItems: 32
50+
51+
dmas:
52+
description:
53+
DMA channels connected to the input or output stream interface of an
54+
offload instance.
55+
minItems: 1
56+
maxItems: 32
57+
58+
dma-names:
59+
items:
60+
pattern: "^offload(?:[12]?[0-9]|3[01])-[tr]x$"
61+
minItems: 1
62+
maxItems: 32
63+
4464
required:
4565
- compatible
4666
- reg
@@ -59,6 +79,10 @@ examples:
5979
clocks = <&clkc 15>, <&clkc 15>;
6080
clock-names = "s_axi_aclk", "spi_clk";
6181
82+
trigger-sources = <&trigger_clock>;
83+
dmas = <&dma 0>;
84+
dma-names = "offload0-rx";
85+
6286
#address-cells = <1>;
6387
#size-cells = <0>;
6488

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Cadence Quad SPI controller
7+
title: Cadence Quad/Octal SPI controller
88

99
maintainers:
1010
- Vaishnav Achath <vaishnav.a@ti.com>
@@ -76,8 +76,12 @@ properties:
7676
- ti,am654-ospi
7777
- ti,k2g-qspi
7878
- xlnx,versal-ospi-1.0
79+
# The compatible is qspi-nor for historical reasons but such
80+
# controllers are meant to be used with flashes of all kinds,
81+
# ie. also NAND flashes, not only NOR flashes.
7982
- const: cdns,qspi-nor
8083
- const: cdns,qspi-nor
84+
deprecated: true
8185

8286
reg:
8387
items:
@@ -142,6 +146,18 @@ properties:
142146
items:
143147
enum: [ qspi, qspi-ocp, rstc_ref ]
144148

149+
patternProperties:
150+
"^flash@[0-9a-f]+$":
151+
type: object
152+
$ref: cdns,qspi-nor-peripheral-props.yaml
153+
additionalProperties: true
154+
required:
155+
- cdns,read-delay
156+
- cdns,tshsl-ns
157+
- cdns,tsd2d-ns
158+
- cdns,tchsh-ns
159+
- cdns,tslch-ns
160+
145161
required:
146162
- compatible
147163
- reg
@@ -157,7 +173,7 @@ unevaluatedProperties: false
157173
examples:
158174
- |
159175
qspi: spi@ff705000 {
160-
compatible = "cdns,qspi-nor";
176+
compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
161177
#address-cells = <1>;
162178
#size-cells = <0>;
163179
reg = <0xff705000 0x1000>,
@@ -173,5 +189,10 @@ examples:
173189
flash@0 {
174190
compatible = "jedec,spi-nor";
175191
reg = <0x0>;
192+
cdns,read-delay = <4>;
193+
cdns,tshsl-ns = <60>;
194+
cdns,tsd2d-ns = <60>;
195+
cdns,tchsh-ns = <60>;
196+
cdns,tslch-ns = <60>;
176197
};
177198
};
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/fsl,espi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller
8+
9+
maintainers:
10+
- J. Neuschäfer <j.ne@posteo.net>
11+
12+
properties:
13+
compatible:
14+
const: fsl,mpc8536-espi
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
fsl,espi-num-chipselects:
23+
$ref: /schemas/types.yaml#/definitions/uint32
24+
enum: [ 1, 4 ]
25+
description: The number of the chipselect signals.
26+
27+
fsl,csbef:
28+
$ref: /schemas/types.yaml#/definitions/uint32
29+
minimum: 0
30+
maximum: 15
31+
description: Chip select assertion time in bits before frame starts
32+
33+
fsl,csaft:
34+
$ref: /schemas/types.yaml#/definitions/uint32
35+
minimum: 0
36+
maximum: 15
37+
description: Chip select negation time in bits after frame ends
38+
39+
required:
40+
- compatible
41+
- reg
42+
- interrupts
43+
- fsl,espi-num-chipselects
44+
45+
allOf:
46+
- $ref: spi-controller.yaml#
47+
48+
unevaluatedProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/interrupt-controller/irq.h>
53+
54+
spi@110000 {
55+
compatible = "fsl,mpc8536-espi";
56+
reg = <0x110000 0x1000>;
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
interrupts = <53 IRQ_TYPE_EDGE_FALLING>;
60+
fsl,espi-num-chipselects = <4>;
61+
fsl,csbef = <1>;
62+
fsl,csaft = <1>;
63+
};
64+
65+
...
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/fsl,spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale SPI (Serial Peripheral Interface) controller
8+
9+
maintainers:
10+
- J. Neuschäfer <j.ne@posteo.net>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- fsl,spi
16+
- aeroflexgaisler,spictrl
17+
18+
reg:
19+
maxItems: 1
20+
21+
cell-index:
22+
$ref: /schemas/types.yaml#/definitions/uint32
23+
description: |
24+
QE SPI subblock index.
25+
0: QE subblock SPI1
26+
1: QE subblock SPI2
27+
28+
mode:
29+
description: SPI operation mode
30+
enum:
31+
- cpu
32+
- cpu-qe
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
clock-frequency:
38+
description: input clock frequency to non FSL_SOC cores
39+
40+
cs-gpios: true
41+
42+
fsl,spisel_boot:
43+
$ref: /schemas/types.yaml#/definitions/flag
44+
description:
45+
For the MPC8306 and MPC8309, specifies that the SPISEL_BOOT signal is used
46+
as chip select for a slave device. Use reg = <number of gpios> in the
47+
corresponding child node, i.e. 0 if the cs-gpios property is not present.
48+
49+
required:
50+
- compatible
51+
- reg
52+
- mode
53+
- interrupts
54+
55+
allOf:
56+
- $ref: spi-controller.yaml#
57+
58+
unevaluatedProperties: false
59+
60+
examples:
61+
- |
62+
#include <dt-bindings/interrupt-controller/irq.h>
63+
64+
spi@4c0 {
65+
compatible = "fsl,spi";
66+
reg = <0x4c0 0x40>;
67+
cell-index = <0>;
68+
interrupts = <82 0>;
69+
mode = "cpu";
70+
cs-gpios = <&gpio 18 IRQ_TYPE_EDGE_RISING // device reg=<0>
71+
&gpio 19 IRQ_TYPE_EDGE_RISING>; // device reg=<1>
72+
};
73+
74+
...

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

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

0 commit comments

Comments
 (0)