Message ID | 20220618123035.563070-4-mail@conchuod.ie |
---|---|
State | Superseded |
Headers | show |
Series | Canaan devicetree fixes | expand |
On Sat, Jun 18, 2022 at 01:30:25PM +0100, Conor Dooley wrote: > From: Conor Dooley <conor.dooley@microchip.com> > > 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: Conor Dooley <conor.dooley@microchip.com> > --- > .../bindings/sound/designware-i2s.txt | 35 ------- > .../bindings/sound/snps,designware-i2s.yaml | 93 +++++++++++++++++++ > 2 files changed, 93 insertions(+), 35 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/sound/designware-i2s.txt > create mode 100644 Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml > > diff --git a/Documentation/devicetree/bindings/sound/designware-i2s.txt b/Documentation/devicetree/bindings/sound/designware-i2s.txt > deleted file mode 100644 > index 6a536d570e29..000000000000 > --- a/Documentation/devicetree/bindings/sound/designware-i2s.txt > +++ /dev/null > @@ -1,35 +0,0 @@ > -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"; > - }; > diff --git a/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml > new file mode 100644 > index 000000000000..5ac9c00157bf > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml > @@ -0,0 +1,93 @@ > +# 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 How many? > + > + 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"; > + }; > -- > 2.36.1 > >
diff --git a/Documentation/devicetree/bindings/sound/designware-i2s.txt b/Documentation/devicetree/bindings/sound/designware-i2s.txt deleted file mode 100644 index 6a536d570e29..000000000000 --- a/Documentation/devicetree/bindings/sound/designware-i2s.txt +++ /dev/null @@ -1,35 +0,0 @@ -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"; - }; diff --git a/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml new file mode 100644 index 000000000000..5ac9c00157bf --- /dev/null +++ b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml @@ -0,0 +1,93 @@ +# 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 + + 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"; + };