Unverified Commit 4c3ff31a authored by Mark Brown's avatar Mark Brown
Browse files

spi: axi-spi-engine improvements

Merge series from David Lechner <dlechner@baylibre.com>:

We are working towards adding support for the offload feature[1] of the
AXI SPI Engine IP core. Before we can do that, we want to make some
general fixes and improvements to the driver. In order to avoid a giant
series with 35+ patches, we are splitting this up into a few smaller
series.

This first series mostly doing some housekeeping:
* Convert device tree bindings to yaml.
* Add a MAINTAINERS entry.
* Clean up probe and remove using devm.
* Separate message state from driver state.
* Add support for cs_off and variable word size.

Once this series is applied, we will follow up with a second series of
general improvements, and then finally a 3rd series that implements the
offload support. The offload support will also involve the IIO
subsystem (a new IIO driver will depend on the new SPI offload feature),
so I'm mentioning this now in case we want to do anything ahead of time
to prepare for that (e.g. putting all of these changes on a separate
branch).

[1]: https://wiki.analog.com/resources/fpga/peripherals/spi_engine/offload
parents d3bb2cb0 d861b417
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
Analog Devices AXI SPI Engine controller Device Tree Bindings

Required properties:
- compatible		: Must be "adi,axi-spi-engine-1.00.a""
- reg			: Physical base address and size of the register map.
- interrupts		: Property with a value describing the interrupt
			  number.
- clock-names		: List of input clock names - "s_axi_aclk", "spi_clk"
- clocks		: Clock phandles and specifiers (See clock bindings for
			  details on clock-names and clocks).
- #address-cells	: Must be <1>
- #size-cells		: Must be <0>

Optional subnodes:
	Subnodes are use to represent the SPI slave devices connected to the SPI
	master. They follow the generic SPI bindings as outlined in spi-bus.txt.

Example:

    spi@@44a00000 {
		compatible = "adi,axi-spi-engine-1.00.a";
		reg = <0x44a00000 0x1000>;
		interrupts = <0 56 4>;
		clocks = <&clkc 15 &clkc 15>;
		clock-names = "s_axi_aclk", "spi_clk";

		#address-cells = <1>;
		#size-cells = <0>;

		/* SPI devices */
    };
+66 −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/adi,axi-spi-engine.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AXI SPI Engine Controller

description: |
  The AXI SPI Engine controller is part of the SPI Engine framework[1] and
  allows memory mapped access to the SPI Engine control bus. This allows it
  to be used as a general purpose software driven SPI controller as well as
  some optional advanced acceleration and offloading capabilities.

  [1] https://wiki.analog.com/resources/fpga/peripherals/spi_engine

maintainers:
  - Michael Hennerich <Michael.Hennerich@analog.com>
  - Nuno Sá <nuno.sa@analog.com>

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

properties:
  compatible:
    const: adi,axi-spi-engine-1.00.a

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: The AXI interconnect clock.
      - description: The SPI controller clock.

  clock-names:
    items:
      - const: s_axi_aclk
      - const: spi_clk

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

unevaluatedProperties: false

examples:
  - |
    spi@44a00000 {
        compatible = "adi,axi-spi-engine-1.00.a";
        reg = <0x44a00000 0x1000>;
        interrupts = <0 56 4>;
        clocks = <&clkc 15>, <&clkc 15>;
        clock-names = "s_axi_aclk", "spi_clk";

        #address-cells = <1>;
        #size-cells = <0>;

        /* SPI devices */
    };
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ properties:
          - qcom,sm8350-ufshc
          - qcom,sm8450-ufshc
          - qcom,sm8550-ufshc
          - qcom,sm8650-ufshc
      - const: qcom,ufshc
      - const: jedec,ufs-2.0

@@ -122,6 +123,7 @@ allOf:
              - qcom,sm8350-ufshc
              - qcom,sm8450-ufshc
              - qcom,sm8550-ufshc
              - qcom,sm8650-ufshc
    then:
      properties:
        clocks:
+37 −4
Original line number Diff line number Diff line
@@ -3415,6 +3415,16 @@ W: https://ez.analog.com/linux-software-drivers
F:	Documentation/devicetree/bindings/hwmon/adi,axi-fan-control.yaml
F:	drivers/hwmon/axi-fan-control.c
AXI SPI ENGINE
M:	Michael Hennerich <michael.hennerich@analog.com>
M:	Nuno Sá <nuno.sa@analog.com>
R:	David Lechner <dlechner@baylibre.com>
L:	linux-spi@vger.kernel.org
S:	Supported
W:	https://ez.analog.com/linux-software-drivers
F:	Documentation/devicetree/bindings/spi/adi,axi-spi-engine.yaml
F:	drivers/spi/spi-axi-spi-engine.c
AXXIA I2C CONTROLLER
M:	Krzysztof Adamski <krzysztof.adamski@nokia.com>
L:	linux-i2c@vger.kernel.org
@@ -8950,7 +8960,6 @@ S: Maintained
F:	scripts/get_maintainer.pl
GFS2 FILE SYSTEM
M:	Bob Peterson <rpeterso@redhat.com>
M:	Andreas Gruenbacher <agruenba@redhat.com>
L:	gfs2@lists.linux.dev
S:	Supported
@@ -21769,7 +21778,9 @@ F: Documentation/devicetree/bindings/counter/ti-eqep.yaml
F:	drivers/counter/ti-eqep.c
TI ETHERNET SWITCH DRIVER (CPSW)
R:	Grygorii Strashko <grygorii.strashko@ti.com>
R:	Siddharth Vadapalli <s-vadapalli@ti.com>
R:	Ravi Gunasekaran <r-gunasekaran@ti.com>
R:	Roger Quadros <rogerq@kernel.org>
L:	linux-omap@vger.kernel.org
L:	netdev@vger.kernel.org
S:	Maintained
@@ -21793,6 +21804,15 @@ F: Documentation/devicetree/bindings/media/i2c/ti,ds90*
F:	drivers/media/i2c/ds90*
F:	include/media/i2c/ds90*
TI ICSSG ETHERNET DRIVER (ICSSG)
R:	MD Danish Anwar <danishanwar@ti.com>
R:	Roger Quadros <rogerq@kernel.org>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L:	netdev@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/net/ti,icss*.yaml
F:	drivers/net/ethernet/ti/icssg/*
TI J721E CSI2RX DRIVER
M:	Jai Luthra <j-luthra@ti.com>
L:	linux-media@vger.kernel.org
@@ -23692,6 +23712,20 @@ F: arch/x86/kernel/dumpstack.c
F:	arch/x86/kernel/stacktrace.c
F:	arch/x86/kernel/unwind_*.c
X86 TRUST DOMAIN EXTENSIONS (TDX)
M:	Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
R:	Dave Hansen <dave.hansen@linux.intel.com>
L:	x86@kernel.org
L:	linux-coco@lists.linux.dev
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/tdx
F:	arch/x86/boot/compressed/tdx*
F:	arch/x86/coco/tdx/
F:	arch/x86/include/asm/shared/tdx.h
F:	arch/x86/include/asm/tdx.h
F:	arch/x86/virt/vmx/tdx/
F:	drivers/virt/coco/tdx-guest
X86 VDSO
M:	Andy Lutomirski <luto@kernel.org>
L:	linux-kernel@vger.kernel.org
@@ -23872,8 +23906,7 @@ T: git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
P:	Documentation/filesystems/xfs-maintainer-entry-profile.rst
F:	Documentation/ABI/testing/sysfs-fs-xfs
F:	Documentation/admin-guide/xfs.rst
F:	Documentation/filesystems/xfs-delayed-logging-design.rst
F:	Documentation/filesystems/xfs-self-describing-metadata.rst
F:	Documentation/filesystems/xfs-*
F:	fs/xfs/
F:	include/uapi/linux/dqblk_xfs.h
F:	include/uapi/linux/fsmap.h
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 7
SUBLEVEL = 0
EXTRAVERSION = -rc1
EXTRAVERSION = -rc2
NAME = Hurr durr I'ma ninja sloth

# *DOCUMENTATION*
Loading