Skip to content

Commit

Permalink
Merge tag 'spi-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/broonie/spi

Pull spi updates from Mark Brown:
 "This has mostly been a quiet release for the SPI subsystem, almost all
  cleanups and fixes to existing drivers.

  A couple of changes that stand out:

   - Cleanups and support for version specific features in the
     DesignWare controller.

   - Removal of support for Netlogic devices from the XLP driver, the
     platform had previously been removed by MIPS so the support
     couldn't be used.

   - Conversion of several DT bindings to YAML format"

* tag 'spi-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (53 commits)
  spi: don't include ptp_clock_kernel.h in spi.h
  spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe
  spi: atmel: Fix typo
  spi: dt-bindings: mediatek,spi-mtk-nor: Fix example 'interrupts' property
  spi: qcom: geni: handle timeout for gpi mode
  spi: qcom: geni: set the error code for gpi transfer
  spi: spi-mux: Add reference to spi-peripheral-props.yaml schema
  spi: ar934x: fix transfer size
  spi: pxa2xx: Propagate firmware node
  spi: dw: Propagate firmware node
  spi: dln2: Propagate firmware node
  spi: ar934x: fix transfer and word delays
  spi: uniphier: Fix a bug that doesn't point to private data correctly
  spi: spi-mtk-nor: add new clock name 'axi' for spi nor
  spi: atmel,quadspi: Define sama7g5 QSPI
  spi: atmel,quadspi: Convert to json-schema
  spi: Fix incorrect cs_setup delay handling
  dt-bindings: mtd: spi-nor: Add a reference to spi-peripheral-props.yaml
  spi: dt-bindings: cdns,qspi-nor: Move peripheral-specific properties out
  spi: dt-bindings: add schema listing peripheral-specific properties
  ...
  • Loading branch information
torvalds committed Jan 11, 2022
2 parents fef8dfa + 19629ae commit 282aa44
Show file tree
Hide file tree
Showing 42 changed files with 853 additions and 688 deletions.
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: "mtd.yaml#"
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
Expand Down Expand Up @@ -88,7 +89,7 @@ patternProperties:
"^otp(-[0-9]+)?$":
type: object

additionalProperties: false
unevaluatedProperties: false

examples:
- |
Expand Down
99 changes: 99 additions & 0 deletions Documentation/devicetree/bindings/spi/atmel,quadspi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/atmel,quadspi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Quad Serial Peripheral Interface (QSPI)

maintainers:
- Tudor Ambarus <[email protected]>

allOf:
- $ref: spi-controller.yaml#

properties:
compatible:
enum:
- atmel,sama5d2-qspi
- microchip,sam9x60-qspi
- microchip,sama7g5-qspi
- microchip,sama7g5-ospi

reg:
items:
- description: base registers
- description: mapped memory

reg-names:
items:
- const: qspi_base
- const: qspi_mmap

clocks:
minItems: 1
items:
- description: peripheral clock
- description: system clock or generic clock, if available

clock-names:
minItems: 1
items:
- const: pclk
- enum: [ qspick, gclk ]

interrupts:
maxItems: 1

dmas:
items:
- description: tx DMA channel
- description: rx DMA channel

dma-names:
items:
- const: tx
- const: rx

'#address-cells':
const: 1

'#size-cells':
const: 0

required:
- compatible
- reg
- reg-names
- interrupts
- clocks
- clock-names
- '#address-cells'
- '#size-cells'

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/at91.h>
spi@f0020000 {
compatible = "atmel,sama5d2-qspi";
reg = <0xf0020000 0x100>, <0xd0000000 0x8000000>;
reg-names = "qspi_base", "qspi_mmap";
interrupts = <52 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 52>;
clock-names = "pclk";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0_default>;
flash@0 {
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
reg = <0>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
};
};
37 changes: 0 additions & 37 deletions Documentation/devicetree/bindings/spi/atmel-quadspi.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/cdns,qspi-nor-peripheral-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Peripheral-specific properties for the Cadence QSPI controller.

description:
See spi-peripheral-props.yaml for more info.

maintainers:
- Pratyush Yadav <[email protected]>

properties:
# cdns,qspi-nor.yaml
cdns,read-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Delay for read capture logic, in clock cycles.

cdns,tshsl-ns:
description:
Delay in nanoseconds for the length that the master mode chip select
outputs are de-asserted between transactions.

cdns,tsd2d-ns:
description:
Delay in nanoseconds between one chip select being de-activated
and the activation of another.

cdns,tchsh-ns:
description:
Delay in nanoseconds between last bit of current transaction and
deasserting the device chip select (qspi_n_ss_out).

cdns,tslch-ns:
description:
Delay in nanoseconds between setting qspi_n_ss_out low and
first bit transfer.

additionalProperties: true
33 changes: 0 additions & 33 deletions Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,39 +87,6 @@ properties:
items:
enum: [ qspi, qspi-ocp ]

# subnode's properties
patternProperties:
"@[0-9a-f]+$":
type: object
description:
Flash device uses the below defined properties in the subnode.

properties:
cdns,read-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Delay for read capture logic, in clock cycles.

cdns,tshsl-ns:
description:
Delay in nanoseconds for the length that the master mode chip select
outputs are de-asserted between transactions.

cdns,tsd2d-ns:
description:
Delay in nanoseconds between one chip select being de-activated
and the activation of another.

cdns,tchsh-ns:
description:
Delay in nanoseconds between last bit of current transaction and
deasserting the device chip select (qspi_n_ss_out).

cdns,tslch-ns:
description:
Delay in nanoseconds between setting qspi_n_ss_out low and
first bit transfer.

required:
- compatible
- reg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,19 @@ properties:
maxItems: 1

clocks:
minItems: 2
items:
- description: clock used for spi bus
- description: clock used for controller
- description: clock used for nor dma bus. this depends on hardware
design, so this is optional.

clock-names:
minItems: 2
items:
- const: spi
- const: sf
- const: axi

required:
- compatible
Expand All @@ -72,7 +77,7 @@ examples:
nor_flash: spi@1100d000 {
compatible = "mediatek,mt8173-nor";
reg = <0 0x1100d000 0 0xe0>;
interrupts = <&spi_flash_irq>;
interrupts = <1>;
clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
clock-names = "spi", "sf";
#address-cells = <1>;
Expand All @@ -84,4 +89,3 @@ examples:
};
};
};
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/spi/renesas,rspi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ properties:
- enum:
- renesas,rspi-r7s72100 # RZ/A1H
- renesas,rspi-r7s9210 # RZ/A2
- const: renesas,rspi-rz # RZ/A
- renesas,r9a07g044-rspi # RZ/G2{L,LC}
- const: renesas,rspi-rz # RZ/A and RZ/G2{L,LC}

- items:
- enum:
Expand Down Expand Up @@ -122,6 +123,7 @@ allOf:
contains:
enum:
- renesas,qspi
- renesas,r9a07g044-rspi
then:
required:
- resets
Expand Down
69 changes: 2 additions & 67 deletions Documentation/devicetree/bindings/spi/spi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,73 +94,8 @@ patternProperties:
"^.*@[0-9a-f]+$":
type: object

properties:
compatible:
description:
Compatible of the SPI device.

reg:
minItems: 1
maxItems: 256
items:
minimum: 0
maximum: 256
description:
Chip select used by the device.

spi-3wire:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires 3-wire mode.

spi-cpha:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires shifted clock phase (CPHA) mode.

spi-cpol:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires inverse clock polarity (CPOL) mode.

spi-cs-high:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires the chip select active high.

spi-lsb-first:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires the LSB first mode.

spi-max-frequency:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Maximum SPI clocking speed of the device in Hz.

spi-rx-bus-width:
description:
Bus width to the SPI bus used for read transfers.
If 0 is provided, then no RX will be possible on this device.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 4, 8]
default: 1

spi-rx-delay-us:
description:
Delay, in microseconds, after a read transfer.

spi-tx-bus-width:
description:
Bus width to the SPI bus used for write transfers.
If 0 is provided, then no TX will be possible on this device.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 4, 8]
default: 1

spi-tx-delay-us:
description:
Delay, in microseconds, after a write transfer.
allOf:
- $ref: spi-peripheral-props.yaml

required:
- compatible
Expand Down
11 changes: 7 additions & 4 deletions Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ allOf:

properties:
compatible:
enum:
- fsl,imx7ulp-spi
- fsl,imx8qxp-spi

oneOf:
- enum:
- fsl,imx7ulp-spi
- fsl,imx8qxp-spi
- items:
- const: fsl,imx8ulp-spi
- const: fsl,imx7ulp-spi
reg:
maxItems: 1

Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/spi/spi-mux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ description: |
allOf:
- $ref: "/schemas/spi/spi-controller.yaml#"
- $ref: "/schemas/spi/spi-peripheral-props.yaml#"

maintainers:
- Chris Packham <[email protected]>
Expand Down
Loading

0 comments on commit 282aa44

Please sign in to comment.