Skip to content

Commit fc2e58b

Browse files
committed
Merge tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "A fairly standard release for SPI with the exception of a change to the API for specifying chip selects done in preparation for supporting devices with more than one chip select, this required some mechanical changes throughout the tree which have been cooking in -next happily for a while. There's also a new API to allow us to support TPM chips on half duplex controllers. Summary: - Refactoring in preparation for supporting multiple chip selects for a single device, needed by some flash devices, which required a change in the SPI device API visible throughout the tree - Support for hardware assisted interaction with SPI TPMs on half duplex controllers, implemented on nVidia Tedra210 QuadSPI - Optimisation for large transfers on fsl-cpm devices - Cleanups around device property use which fix some sisues with fwnode - Use of both void remove() and devm_platform_.*ioremap_resource() - Support for AMD Pensando Elba, Amlogic A1, Cadence device mode, Intel MetorLake-S and StarFive J7110 QuadSPI" * tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (185 commits) spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: tegra210-quad: Enable TPM wait polling spi: Add TPM HW flow flag spi: bcm63xx: remove PM_SLEEP based conditional compilation spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: spi-cadence: Add support for Slave mode spi: spi-cadence: Switch to spi_controller structure spi: cadence-quadspi: fix suspend-resume implementations spi: dw: Add support for AMD Pensando Elba SoC spi: dw: Add AMD Pensando Elba SoC SPI Controller spi: cadence-quadspi: Disable the SPI before reconfiguring spi: cadence-quadspi: Update the read timeout based on the length spi: spi-loopback-test: Add module param for iteration length spi: add support for Amlogic A1 SPI Flash Controller dt-bindings: spi: add Amlogic A1 SPI controller spi: fsl-spi: No need to check transfer length versus word size spi: fsl-spi: Change mspi_apply_cpu_mode_quirks() to void spi: fsl-cpm: Use 16 bit mode for large transfers with even size spi: fsl-spi: Re-organise transfer bits_per_word adaptation spi: fsl-spi: Fix CPM/QE mode Litte Endian ...
2 parents 1c15ca4 + cc5f6fa commit fc2e58b

File tree

149 files changed

+1845
-1288
lines changed

Some content is hidden

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

149 files changed

+1845
-1288
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/amlogic,a1-spifc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Amlogic A1 SPI Flash Controller
8+
9+
maintainers:
10+
- Martin Kurbanov <[email protected]>
11+
12+
allOf:
13+
- $ref: spi-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- amlogic,a1-spifc
19+
20+
reg:
21+
maxItems: 1
22+
23+
clocks:
24+
maxItems: 1
25+
26+
required:
27+
- compatible
28+
- reg
29+
- clocks
30+
31+
unevaluatedProperties: false
32+
33+
examples:
34+
- |
35+
spi@fd000400 {
36+
compatible = "amlogic,a1-spifc";
37+
reg = <0xfd000400 0x290>;
38+
clocks = <&clkc_clkid_spifc>;
39+
#address-cells = <1>;
40+
#size-cells = <0>;
41+
};

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ allOf:
1919
then:
2020
required:
2121
- power-domains
22+
- if:
23+
properties:
24+
compatible:
25+
contains:
26+
const: starfive,jh7110-qspi
27+
then:
28+
properties:
29+
resets:
30+
minItems: 2
31+
maxItems: 3
32+
33+
reset-names:
34+
minItems: 2
35+
maxItems: 3
36+
items:
37+
enum: [ qspi, qspi-ocp, rstc_ref ]
38+
39+
else:
40+
properties:
41+
resets:
42+
maxItems: 2
43+
44+
reset-names:
45+
minItems: 1
46+
maxItems: 2
47+
items:
48+
enum: [ qspi, qspi-ocp ]
2249

2350
properties:
2451
compatible:
@@ -30,6 +57,7 @@ properties:
3057
- intel,lgm-qspi
3158
- xlnx,versal-ospi-1.0
3259
- intel,socfpga-qspi
60+
- starfive,jh7110-qspi
3361
- const: cdns,qspi-nor
3462
- const: cdns,qspi-nor
3563

@@ -79,13 +107,14 @@ properties:
79107
maxItems: 1
80108

81109
resets:
82-
maxItems: 2
110+
minItems: 2
111+
maxItems: 3
83112

84113
reset-names:
85-
minItems: 1
86-
maxItems: 2
114+
minItems: 2
115+
maxItems: 3
87116
items:
88-
enum: [ qspi, qspi-ocp ]
117+
enum: [ qspi, qspi-ocp, rstc_ref ]
89118

90119
required:
91120
- compatible

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,38 @@ required:
149149
- compatible
150150
- reg
151151
- interrupts
152+
- clocks
153+
- power-domains
152154
- '#address-cells'
153155
- '#size-cells'
154156

157+
if:
158+
not:
159+
properties:
160+
compatible:
161+
contains:
162+
const: renesas,sh-mobile-msiof
163+
then:
164+
required:
165+
- resets
166+
155167
unevaluatedProperties: false
156168

157169
examples:
158170
- |
159-
#include <dt-bindings/clock/r8a7791-clock.h>
160-
#include <dt-bindings/interrupt-controller/irq.h>
171+
#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
172+
#include <dt-bindings/interrupt-controller/arm-gic.h>
173+
#include <dt-bindings/power/r8a7791-sysc.h>
161174
162175
msiof0: spi@e6e20000 {
163176
compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
164177
reg = <0xe6e20000 0x0064>;
165-
interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
166-
clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
178+
interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
179+
clocks = <&cpg CPG_MOD 000>;
167180
dmas = <&dmac0 0x51>, <&dmac0 0x52>;
168181
dma-names = "tx", "rx";
182+
power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
183+
resets = <&cpg 0>;
169184
#address-cells = <1>;
170185
#size-cells = <0>;
171186
};

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ allOf:
3737
else:
3838
required:
3939
- interrupts
40+
- if:
41+
properties:
42+
compatible:
43+
contains:
44+
const: amd,pensando-elba-spi
45+
then:
46+
required:
47+
- amd,pensando-elba-syscon
48+
else:
49+
properties:
50+
amd,pensando-elba-syscon: false
4051

4152
properties:
4253
compatible:
@@ -63,6 +74,8 @@ properties:
6374
const: intel,keembay-ssi
6475
- description: Intel Thunder Bay SPI Controller
6576
const: intel,thunderbay-ssi
77+
- description: AMD Pensando Elba SoC SPI Controller
78+
const: amd,pensando-elba-spi
6679
- description: Baikal-T1 SPI Controller
6780
const: baikal,bt1-ssi
6881
- description: Baikal-T1 System Boot SPI Controller
@@ -136,6 +149,12 @@ properties:
136149
of the designware controller, and the upper limit is also subject to
137150
controller configuration.
138151
152+
amd,pensando-elba-syscon:
153+
$ref: /schemas/types.yaml#/definitions/phandle-array
154+
description:
155+
Block address to control SPI chip-selects. The Elba SoC system controller
156+
provides an interface to override the native DWC SSI CS control.
157+
139158
patternProperties:
140159
"^.*@[0-9a-f]+$":
141160
type: object

Documentation/spi/spi-summary.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ shows up in sysfs in several locations::
178178

179179
/sys/bus/spi/drivers/D ... driver for one or more spi*.* devices
180180

181-
/sys/class/spi_master/spiB ... symlink (or actual device node) to
182-
a logical node which could hold class related state for the SPI
183-
master controller managing bus "B". All spiB.* devices share one
184-
physical SPI bus segment, with SCLK, MOSI, and MISO.
181+
/sys/class/spi_master/spiB ... symlink to a logical node which could hold
182+
class related state for the SPI master controller managing bus "B".
183+
All spiB.* devices share one physical SPI bus segment, with SCLK,
184+
MOSI, and MISO.
185185

186186
/sys/devices/.../CTLR/slave ... virtual file for (un)registering the
187187
slave device for an SPI slave controller.
@@ -191,16 +191,13 @@ shows up in sysfs in several locations::
191191
Reading from this file shows the name of the slave device ("(null)"
192192
if not registered).
193193

194-
/sys/class/spi_slave/spiB ... symlink (or actual device node) to
195-
a logical node which could hold class related state for the SPI
196-
slave controller on bus "B". When registered, a single spiB.*
197-
device is present here, possible sharing the physical SPI bus
198-
segment with other SPI slave devices.
194+
/sys/class/spi_slave/spiB ... symlink to a logical node which could hold
195+
class related state for the SPI slave controller on bus "B". When
196+
registered, a single spiB.* device is present here, possible sharing
197+
the physical SPI bus segment with other SPI slave devices.
199198

200-
Note that the actual location of the controller's class state depends
201-
on whether you enabled CONFIG_SYSFS_DEPRECATED or not. At this time,
202-
the only class-specific state is the bus number ("B" in "spiB"), so
203-
those /sys/class entries are only useful to quickly identify busses.
199+
At this time, the only class-specific state is the bus number ("B" in "spiB"),
200+
so those /sys/class entries are only useful to quickly identify busses.
204201

205202

206203
How does board-specific init code declare SPI devices?

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18658,7 +18658,7 @@ F: include/linux/clk/samsung.h
1865818658

1865918659
SAMSUNG SPI DRIVERS
1866018660
M: Krzysztof Kozlowski <[email protected]>
18661-
M: Andi Shyti <andi@etezian.org>
18661+
M: Andi Shyti <andi.shyti@kernel.org>
1866218662
1866318663
1866418664
S: Maintained

arch/powerpc/platforms/83xx/mpc832x_rdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int __init fsl_spi_init(struct spi_board_info *board_infos,
144144

145145
static void mpc83xx_spi_cs_control(struct spi_device *spi, bool on)
146146
{
147-
pr_debug("%s %d %d\n", __func__, spi->chip_select, on);
147+
pr_debug("%s %d %d\n", __func__, spi_get_chipselect(spi, 0), on);
148148
par_io_data_set(3, 13, on);
149149
}
150150

drivers/iio/imu/adis16400.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev)
466466

467467
dev_info(&indio_dev->dev, "%s: prod_id 0x%04x at CS%d (irq %d)\n",
468468
indio_dev->name, prod_id,
469-
st->adis.spi->chip_select, st->adis.spi->irq);
469+
spi_get_chipselect(st->adis.spi, 0), st->adis.spi->irq);
470470
}
471471
/* use high spi speed if possible */
472472
if (st->variant->flags & ADIS16400_HAS_SLOW_MODE) {

drivers/mtd/devices/mtd_dataflash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
639639

640640
/* name must be usable with cmdlinepart */
641641
sprintf(priv->name, "spi%d.%d-%s",
642-
spi->master->bus_num, spi->chip_select,
642+
spi->master->bus_num, spi_get_chipselect(spi, 0),
643643
name);
644644

645645
device = &priv->mtd;

drivers/net/ethernet/adi/adin1110.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ static int adin1110_register_mdiobus(struct adin1110_priv *priv,
515515
return -ENOMEM;
516516

517517
snprintf(priv->mii_bus_name, MII_BUS_ID_SIZE, "%s-%u",
518-
priv->cfg->name, priv->spidev->chip_select);
518+
priv->cfg->name, spi_get_chipselect(priv->spidev, 0));
519519

520520
mii_bus->name = priv->mii_bus_name;
521521
mii_bus->read = adin1110_mdio_read;

0 commit comments

Comments
 (0)