Commit 0da9bc6d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull spi updates from Mark Brown:
 "A quiet release for SPI, some fixes and a couple of new drivers plus
  one small refactoring:

   - Move the chip select timing configuration from the controller to
     the device to allow a bit more flexibility

   - New drivers for Rockchip SFC and Spreadtrum ADI"

* tag 'spi-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (47 commits)
  spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible
  spi: add sprd ADI for sc9863 and ums512
  spi: Convert sprd ADI bindings to yaml
  spi: sprd: Add ADI r3 support
  spi: sprd: Fix the wrong WDG_LOAD_VAL
  spi: davinci: invoke chipselect callback
  spi: sprd: fill offset only to RD_CMD register for reading from slave device
  spi: sprd: Make sure offset not equal to slave address size
  spi: sprd: Pass offset instead of physical address to adi_read/_write()
  spi: rockchip-sfc: Fix assigned but never used return error codes
  spi: rockchip-sfc: Remove redundant IO operations
  spi: stm32: fix excluded_middle.cocci warnings
  spi: coldfire-qspi: Use clk_disable_unprepare in the remove function
  spi: tegra20-slink: remove spi_master_put() in tegra_slink_remove()
  spi: rockchip-sfc: add rockchip serial flash controller
  spi: rockchip-sfc: Bindings for Rockchip serial flash controller
  spi: orion: Prevent incorrect chip select behaviour
  spi: mxic: add missing braces
  spi: spi-pic32: Fix issue with uninitialized dma_slave_config
  spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
  ...
parents d46e0d33 6e9c846a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ properties:
  compatible:
    enum:
      - ibm,fsi2spi
      - ibm,fsi2spi-restricted

  reg:
    items:
+0 −48
Original line number Diff line number Diff line
OMAP2+ McSPI device

Required properties:
- compatible :
  - "ti,am654-mcspi" for AM654.
  - "ti,omap2-mcspi" for OMAP2 & OMAP3.
  - "ti,omap4-mcspi" for OMAP4+.
- ti,spi-num-cs : Number of chipselect supported  by the instance.
- ti,hwmods: Name of the hwmod associated to the McSPI
- ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as
			  input. The default is D0 as input and
			  D1 as output.

Optional properties:
- dmas: List of DMA specifiers with the controller specific format
	as described in the generic DMA client binding. A tx and rx
	specifier is required for each chip select.
- dma-names: List of DMA request names. These strings correspond
	1:1 with the DMA specifiers listed in dmas. The string naming
	is to be "rxN" and "txN" for RX and TX requests,
	respectively, where N equals the chip select number.

Examples:

[hwmod populated DMA resources]

mcspi1: mcspi@1 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "ti,omap4-mcspi";
    ti,hwmods = "mcspi1";
    ti,spi-num-cs = <4>;
};

[generic DMA request binding]

mcspi1: mcspi@1 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "ti,omap4-mcspi";
    ti,hwmods = "mcspi1";
    ti,spi-num-cs = <2>;
    dmas = <&edma 42
	    &edma 43
	    &edma 44
	    &edma 45>;
    dma-names = "tx0", "rx0", "tx1", "rx1";
};
+117 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/omap-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SPI controller bindings for OMAP and K3 SoCs

maintainers:
  - Aswath Govindraju <a-govindraju@ti.com>

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

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - ti,am654-mcspi
              - ti,am4372-mcspi
          - const: ti,omap4-mcspi
      - items:
          - enum:
              - ti,omap2-mcspi
              - ti,omap4-mcspi

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  ti,spi-num-cs:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Number of chipselect supported  by the instance.
    minimum: 1
    maximum: 4

  ti,hwmods:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      Must be "mcspi<n>", n being the instance number (1-based).
      This property is applicable only on legacy platforms mainly omap2/3
      and ti81xx and should not be used on other platforms.
    deprecated: true

  ti,pindir-d0-out-d1-in:
    description:
      Select the D0 pin as output and D1 as input. The default is D0
      as input and D1 as output.
    type: boolean

  dmas:
    description:
      List of DMA specifiers with the controller specific format as
      described in the generic DMA client binding. A tx and rx
      specifier is required for each chip select.
    minItems: 1
    maxItems: 8

  dma-names:
    description:
      List of DMA request names. These strings correspond 1:1 with
      the DMA sepecifiers listed in dmas. The string names is to be
      "rxN" and "txN" for RX and TX requests, respectively. Where N
      is the chip select number.
    minItems: 1
    maxItems: 8

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

if:
  properties:
    compatible:
      oneOf:
        - const: ti,omap2-mcspi
        - const: ti,omap4-mcspi

then:
  properties:
    ti,hwmods:
      items:
        - pattern: "^mcspi([1-9])$"

else:
  properties:
    ti,hwmods: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/soc/ti,sci_pm_domain.h>

    spi@2100000 {
      compatible = "ti,am654-mcspi","ti,omap4-mcspi";
      reg = <0x2100000 0x400>;
      interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
      clocks = <&k3_clks 137 1>;
      power-domains = <&k3_pds 137 TI_SCI_PD_EXCLUSIVE>;
      #address-cells = <1>;
      #size-cells = <0>;
      dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
      dma-names = "tx0", "rx0";
    };
+91 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/rockchip-sfc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip Serial Flash Controller (SFC)

maintainers:
  - Heiko Stuebner <heiko@sntech.de>
  - Chris Morgan <macromorgan@hotmail.com>

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

properties:
  compatible:
    const: rockchip,sfc
    description:
      The rockchip sfc controller is a standalone IP with version register,
      and the driver can handle all the feature difference inside the IP
      depending on the version register.

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Bus Clock
      - description: Module Clock

  clock-names:
    items:
      - const: clk_sfc
      - const: hclk_sfc

  power-domains:
    maxItems: 1

  rockchip,sfc-no-dma:
    description: Disable DMA and utilize FIFO mode only
    type: boolean

patternProperties:
  "^flash@[0-3]$":
    type: object
    properties:
      reg:
        minimum: 0
        maximum: 3

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/px30-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/px30-power.h>

    sfc: spi@ff3a0000 {
        compatible = "rockchip,sfc";
        reg = <0xff3a0000 0x4000>;
        interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
        clock-names = "clk_sfc", "hclk_sfc";
        pinctrl-0 = <&sfc_clk &sfc_cs &sfc_bus2>;
        pinctrl-names = "default";
        power-domains = <&power PX30_PD_MMC_NAND>;
        #address-cells = <1>;
        #size-cells = <0>;

        flash@0 {
            compatible = "jedec,spi-nor";
            reg = <0>;
            spi-max-frequency = <108000000>;
            spi-rx-bus-width = <2>;
            spi-tx-bus-width = <2>;
        };
    };

...
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Required properties:
    - mediatek,mt8135-spi: for mt8135 platforms
    - mediatek,mt8173-spi: for mt8173 platforms
    - mediatek,mt8183-spi: for mt8183 platforms
    - mediatek,mt6893-spi: for mt6893 platforms
    - "mediatek,mt8192-spi", "mediatek,mt6765-spi": for mt8192 platforms
    - "mediatek,mt8195-spi", "mediatek,mt6765-spi": for mt8195 platforms
    - "mediatek,mt8516-spi", "mediatek,mt2712-spi": for mt8516 platforms
Loading