Unverified Commit bc4c9d85 authored by Conor Dooley's avatar Conor Dooley Committed by Mark Brown
Browse files

ASoC: dt-bindings: convert designware-i2s to dt-schema



Convert the Synopsys DesignWare I2S controller binding to dt-schema.
There was no listed maintainer but Jose Abreu was the last editor of the
txt binding so add him as maintainer.

Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20220701192300.2293643-4-conor@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f507c0c6
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
DesignWare I2S controller

Required properties:
 - compatible : Must be "snps,designware-i2s"
 - reg : Must contain the I2S core's registers location and length
 - clocks : Pairs of phandle and specifier referencing the controller's
   clocks. The controller expects one clock: the clock used as the sampling
   rate reference clock sample.
 - clock-names : "i2sclk" for the sample rate reference clock.
 - dmas: Pairs of phandle and specifier for the DMA channels that are used by
   the core. The core expects one or two dma channels: one for transmit and
   one for receive.
 - dma-names : "tx" for the transmit channel, "rx" for the receive channel.

Optional properties:
 - interrupts: The interrupt line number for the I2S controller. Add this
   parameter if the I2S controller that you are using does not support DMA.

For more details on the 'dma', 'dma-names', 'clock' and 'clock-names'
properties please check:
	* resource-names.txt
	* clock/clock-bindings.txt
	* dma/dma.txt

Example:

	soc_i2s: i2s@7ff90000 {
		compatible = "snps,designware-i2s";
		reg = <0x0 0x7ff90000 0x0 0x1000>;
		clocks = <&scpi_i2sclk 0>;
		clock-names = "i2sclk";
		#sound-dai-cells = <0>;
		dmas = <&dma0 5>;
		dma-names = "tx";
	};
+94 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/snps,designware-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: DesignWare I2S controller

maintainers:
  - Jose Abreu <joabreu@synopsys.com>

properties:
  compatible:
    oneOf:
      - items:
          - const: canaan,k210-i2s
          - const: snps,designware-i2s
      - enum:
          - snps,designware-i2s

  reg:
    maxItems: 1

  interrupts:
    description: |
      The interrupt line number for the I2S controller. Add this
      parameter if the I2S controller that you are using does not
      support DMA.
    maxItems: 1

  clocks:
    description: Sampling rate reference clock
    maxItems: 1

  clock-names:
    const: i2sclk

  resets:
    maxItems: 1

  dmas:
    items:
      - description: TX DMA Channel
      - description: RX DMA Channel
    minItems: 1

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

if:
  properties:
    compatible:
      contains:
        const: canaan,k210-i2s

then:
  properties:
    "#sound-dai-cells":
      const: 1

else:
  properties:
    "#sound-dai-cells":
      const: 0

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

oneOf:
  - required:
      - dmas
      - dma-names
  - required:
      - interrupts

unevaluatedProperties: false

examples:
  - |
    soc_i2s: i2s@7ff90000 {
      compatible = "snps,designware-i2s";
      reg = <0x7ff90000 0x1000>;
      clocks = <&scpi_i2sclk 0>;
      clock-names = "i2sclk";
      #sound-dai-cells = <0>;
      dmas = <&dma0 5>;
      dma-names = "tx";
    };