Message ID | 20231221033223.73201-2-xingyu.wu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp162949dyi; Wed, 20 Dec 2023 19:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT5ND1OlPonNXjn5GzI1FWvEiddd5Z/7bLuKZuZUycpd/GA3gpOw5Sg+YV3wZMSz2OgRh1 X-Received: by 2002:a05:620a:1181:b0:781:1b1a:1fef with SMTP id b1-20020a05620a118100b007811b1a1fefmr860477qkk.113.1703129608240; Wed, 20 Dec 2023 19:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129608; cv=none; d=google.com; s=arc-20160816; b=meg8buz2WLldPh3c+lpRB0c7p3jvWtbIgZPsiH/qPV4KBc6cH7sIS3X7xKppg5v3T7 LNjwJxbpsuvHoByiibJz7jfgswV5KBMcpN3VUNPeCFvgQnWjcptm0sIGeS0oFh9HliTy /7v5x1TDey+EKR8Lkt/6HZo/L7NkYLdIAgcwzXrvnQtU4ocdKX9gYukktCmmEmvT4Jvz 70bHcA95zv3TiKzBC/abjv7MsBpkL1wdcAwZ2Rvz72glHXRX+Rmu2lK0Blr6RT/0cSYg VtRs4M0Hd5nYPbiq8/CWAkmEgzaVHFCasuotLncwn8BIVfhPK+/b0ZaGM80yP3f4ohwz bw+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8s5cSJCo4P5LKTdwFHi7APbQgqdBWEkvHVsKzKqmsbs=; fh=rAwFsLMDdsiM3awWCOp+CHYbsVXjUmX08xz551L9WFQ=; b=YuT/9ghcPAN0d9hH+r81jyvvsbUiqGEE+EhwoFw8Szvu1vBwP7spVvWrPJwdbyVz6H lsBOvfKoqfN+B7BfkZawgCTSu6oyewFDjp4+7GPpf77TQliDyIxfdaJJamRbYLFItn7X jGL/wkK6A/7uO09ltfw6F9YxVCjm/1y9RYYMm1+KXAhUFmEJIjdINDHgZ0dhU0Jx6PjR eGmLu0Nm9F6uk876diQVYDNmIt8uqM9mGzT+5XtFxABERMk1q2G7a593kgv4yX0OA2bq yLLKFc2iiYlEA/K5sMkOQbJQgoaaPEqVcFTP/SiPvdaRdv0eQFhZJLrFVI1E1TKUXkRP XXOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s13-20020a05620a29cd00b0077fa8701eacsi1326126qkp.395.2023.12.20.19.33.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7813-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0EF401C225AD for <ouuuleilei@gmail.com>; Thu, 21 Dec 2023 03:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47834B670; Thu, 21 Dec 2023 03:32:41 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADF8FAD2C; Thu, 21 Dec 2023 03:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 59C7B24E280; Thu, 21 Dec 2023 11:32:25 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 21 Dec 2023 11:32:25 +0800 Received: from localhost.localdomain (113.72.145.47) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 21 Dec 2023 11:32:24 +0800 From: Xingyu Wu <xingyu.wu@starfivetech.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Claudiu Beznea <Claudiu.Beznea@microchip.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor.dooley@microchip.com> CC: Walker Chen <walker.chen@starfivetech.com>, Xingyu Wu <xingyu.wu@starfivetech.com>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org> Subject: [PATCH v1 1/2] dt-bindings: ASoC: Add Cadence I2S controller for StarFive JH8100 SoC Date: Thu, 21 Dec 2023 11:32:22 +0800 Message-ID: <20231221033223.73201-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231221033223.73201-1-xingyu.wu@starfivetech.com> References: <20231221033223.73201-1-xingyu.wu@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: EXCAS061.cuchost.com (172.16.6.21) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: quoted-printable X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785860832221621482 X-GMAIL-MSGID: 1785860832221621482 |
Series |
Add Cadence I2S controller driver for the
|
|
Commit Message
Xingyu Wu
Dec. 21, 2023, 3:32 a.m. UTC
Add bindings for the Multi-Channel I2S controller of Cadence
on the StarFive JH8100 SoC.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
---
.../bindings/sound/cdns,jh8100-i2s.yaml | 100 ++++++++++++++++++
1 file changed, 100 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml
Comments
Xingyu, Mark, On Thu, Dec 21, 2023 at 11:32:22AM +0800, Xingyu Wu wrote: > Add bindings for the Multi-Channel I2S controller of Cadence > on the StarFive JH8100 SoC. > > Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> > --- > .../bindings/sound/cdns,jh8100-i2s.yaml | 100 ++++++++++++++++++ > 1 file changed, 100 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml > > diff --git a/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml > new file mode 100644 > index 000000000000..5d95d9ab3e45 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml > @@ -0,0 +1,100 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/cdns,jh8100-i2s.yaml# Filename matching the compatible please. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cadence multi-channel I2S controller for StarFive JH8100 SoC > + > +description: | You only need the | if there is formatting to preserve. > + The Cadence I2S Controller implements a function of the multi-channel > + (up to 8-channel) bus. It combines functions of a transmitter and a receiver. > + It is used in the StarFive JH8100 SoC. > + > +maintainers: > + - Xingyu Wu <xingyu.wu@starfivetech.com> > + - Walker Chen <walker.chen@starfivetech.com> > + > +properties: > + compatible: > + const: starfive,jh8100-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. You've got one i2s controller here, you should know if it supports DMA or not. > + maxItems: 1 > + > + clocks: > + items: > + - description: Bit clock > + - description: Main ICG clock > + - description: Inner master clock > + > + clock-names: > + items: > + - const: bclk > + - const: icg > + - const: mclk_inner > + > + resets: > + maxItems: 1 > + > + dmas: > + items: > + - description: TX DMA Channel > + - description: RX DMA Channel > + minItems: 1 > + > + dma-names: > + items: > + - const: tx > + - const: rx > + minItems: 1 > + > + cdns,i2s-max-channels: > + description: | > + Number of I2S max stereo channels supported by the hardware. > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 1 > + maximum: 8 Mark, is there no common property for this kind of thing? That said, there's one device here so the number is known at present. Another note, this property is not required, so it should have a default. It's kinda hard to know with this binding - it is touted as being for a particular Cadence IP, and some aspects are pretty generic, but at the same time there's only one device here so it's hard to tell what is variable between implementations and what is not. Are there no other implementations of this controller? Unless it is brand new, I find that hard to believe. Cheers, Conor. > + > + "#sound-dai-cells": > + const: 0 > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - resets > + > +oneOf: > + - required: > + - dmas > + - dma-names > + - required: > + - interrupts > + > +unevaluatedProperties: false > + > +examples: > + - | > + i2s@122b0000 { > + compatible = "starfive,jh8100-i2s"; > + reg = <0x122b0000 0x1000>; > + clocks = <&syscrg_ne 133>, > + <&syscrg_ne 170>, > + <&syscrg 50>; > + clock-names = "bclk", "icg", > + "mclk_inner"; > + resets = <&syscrg_ne 43>; > + dmas = <&dma 7>, <&dma 6>; > + dma-names = "tx", "rx"; > + cdns,i2s-max-channels = <2>; > + #sound-dai-cells = <0>; > + }; > -- > 2.25.1 > >
On Thu, Dec 21, 2023 at 01:53:00PM +0000, Conor Dooley wrote: > On Thu, Dec 21, 2023 at 11:32:22AM +0800, Xingyu Wu wrote: > > + cdns,i2s-max-channels: > > + description: | > > + Number of I2S max stereo channels supported by the hardware. > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + minimum: 1 > > + maximum: 8 > Mark, is there no common property for this kind of thing? That said, > there's one device here so the number is known at present. > Another note, this property is not required, so it should have a > default. I wouldn't expect this to be a property in the first place, as currently presented this is specific to a single instance of the IP in a single SoC. In general this is something that is obvious from the compatible and doesn't need a property, it's only plausibly useful for Cadence and Designware which is a very short list of vendors.
On 21/12/2023 04:32, Xingyu Wu wrote: > + dma-names: > + items: > + - const: tx > + - const: rx > + minItems: 1 > + > + cdns,i2s-max-channels: Custom properties after generic, so after sound-dai-cells. The coding style now mentions this. > + description: | > + Number of I2S max stereo channels supported by the hardware. > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 1 > + maximum: 8 > + > + "#sound-dai-cells": > + const: 0 > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - resets > + > +oneOf: > + - required: > + - dmas > + - dma-names > + - required: > + - interrupts > + > +unevaluatedProperties: false This is not correct without allOf: which should point you to missing $ref to dai-common. Best regards, Krzysztof
On 2023/12/21 21:53, Conor Dooley wrote: > Xingyu, Mark, > > On Thu, Dec 21, 2023 at 11:32:22AM +0800, Xingyu Wu wrote: >> Add bindings for the Multi-Channel I2S controller of Cadence >> on the StarFive JH8100 SoC. >> >> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >> --- >> .../bindings/sound/cdns,jh8100-i2s.yaml | 100 ++++++++++++++++++ >> 1 file changed, 100 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml >> >> diff --git a/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml >> new file mode 100644 >> index 000000000000..5d95d9ab3e45 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml >> @@ -0,0 +1,100 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/sound/cdns,jh8100-i2s.yaml# > > Filename matching the compatible please. Noted. > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Cadence multi-channel I2S controller for StarFive JH8100 SoC >> + >> +description: | > > You only need the | if there is formatting to preserve. Will drop. > >> + The Cadence I2S Controller implements a function of the multi-channel >> + (up to 8-channel) bus. It combines functions of a transmitter and a receiver. >> + It is used in the StarFive JH8100 SoC. >> + >> +maintainers: >> + - Xingyu Wu <xingyu.wu@starfivetech.com> >> + - Walker Chen <walker.chen@starfivetech.com> >> + >> +properties: >> + compatible: >> + const: starfive,jh8100-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. > > You've got one i2s controller here, you should know if it supports DMA > or not. The I2S already supports interrupt handler, but if the SoC supports DMA controller to be use, it can optionally use DMA. > >> + maxItems: 1 >> + >> + clocks: >> + items: >> + - description: Bit clock >> + - description: Main ICG clock >> + - description: Inner master clock >> + >> + clock-names: >> + items: >> + - const: bclk >> + - const: icg >> + - const: mclk_inner >> + >> + resets: >> + maxItems: 1 >> + >> + dmas: >> + items: >> + - description: TX DMA Channel >> + - description: RX DMA Channel >> + minItems: 1 >> + >> + dma-names: >> + items: >> + - const: tx >> + - const: rx >> + minItems: 1 >> + >> + cdns,i2s-max-channels: >> + description: | >> + Number of I2S max stereo channels supported by the hardware. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + minimum: 1 >> + maximum: 8 > > Mark, is there no common property for this kind of thing? That said, > there's one device here so the number is known at present. > Another note, this property is not required, so it should have a > default. > > It's kinda hard to know with this binding - it is touted as being for a > particular Cadence IP, and some aspects are pretty generic, but at the > same time there's only one device here so it's hard to tell what is > variable between implementations and what is not. > Are there no other implementations of this controller? Unless it is > brand new, I find that hard to believe. > > Cheers, > Conor. > Sorry, It does not seem to be common property. The Cadence I2S supports 8 channels. There are four I2S controllers on the JH8100 SoC, and two of them just provide 4 channels to use, one of them just provide 2 channels. It seems to depend on the SoC. Thanks, Xingyu Wu >> + >> + "#sound-dai-cells": >> + const: 0 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - resets >> + >> +oneOf: >> + - required: >> + - dmas >> + - dma-names >> + - required: >> + - interrupts >> + >> +unevaluatedProperties: false >> + >> +examples: >> + - | >> + i2s@122b0000 { >> + compatible = "starfive,jh8100-i2s"; >> + reg = <0x122b0000 0x1000>; >> + clocks = <&syscrg_ne 133>, >> + <&syscrg_ne 170>, >> + <&syscrg 50>; >> + clock-names = "bclk", "icg", >> + "mclk_inner"; >> + resets = <&syscrg_ne 43>; >> + dmas = <&dma 7>, <&dma 6>; >> + dma-names = "tx", "rx"; >> + cdns,i2s-max-channels = <2>; >> + #sound-dai-cells = <0>; >> + }; >> -- >> 2.25.1 >> >>
On 2023/12/21 21:58, Mark Brown wrote: > On Thu, Dec 21, 2023 at 01:53:00PM +0000, Conor Dooley wrote: >> On Thu, Dec 21, 2023 at 11:32:22AM +0800, Xingyu Wu wrote: > >> > + cdns,i2s-max-channels: >> > + description: | >> > + Number of I2S max stereo channels supported by the hardware. >> > + $ref: /schemas/types.yaml#/definitions/uint32 >> > + minimum: 1 >> > + maximum: 8 > >> Mark, is there no common property for this kind of thing? That said, >> there's one device here so the number is known at present. >> Another note, this property is not required, so it should have a >> default. > > I wouldn't expect this to be a property in the first place, as currently > presented this is specific to a single instance of the IP in a single > SoC. In general this is something that is obvious from the compatible > and doesn't need a property, it's only plausibly useful for Cadence and > Designware which is a very short list of vendors. The Cadence I2S can support 8 channels. But on the JH8100 SoC, two instances of this just provide 4 channels to use, one just provides 2 channels, and the other one can provide 8 channels. Should I use the property name of 'jh8100,i2s-max-channels' instead for some special instances on the JH8100 SoC? Best regards, Xingyu Wu
On 2023/12/22 0:07, Krzysztof Kozlowski wrote: > On 21/12/2023 04:32, Xingyu Wu wrote: >> + dma-names: >> + items: >> + - const: tx >> + - const: rx >> + minItems: 1 >> + >> + cdns,i2s-max-channels: > > Custom properties after generic, so after sound-dai-cells. The coding > style now mentions this. > Noted. > >> + description: | >> + Number of I2S max stereo channels supported by the hardware. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + minimum: 1 >> + maximum: 8 >> + >> + "#sound-dai-cells": >> + const: 0 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - resets >> + >> +oneOf: >> + - required: >> + - dmas >> + - dma-names >> + - required: >> + - interrupts >> + >> +unevaluatedProperties: false > > This is not correct without allOf: which should point you to missing > $ref to dai-common. Will fix. > > > Best regards, > Krzysztof > Thanks, Xingyu Wu
On Fri, Dec 22, 2023 at 05:55:14PM +0800, Xingyu Wu wrote: > The Cadence I2S can support 8 channels. But on the JH8100 SoC, two > instances of this just provide 4 channels to use, one just provides 2 > channels, and the other one can provide 8 channels. Should I use the > property name of 'jh8100,i2s-max-channels' instead for some special > instances on the JH8100 SoC? No, your current name is fine if the binding is generic for all Cadence users. I do think it would be good to have a separate compatible for these two channel instances, if there's been one customisation there may well have been others. Please fix your mail client to word wrap within paragraphs at something substantially less than 80 columns. Doing this makes your messages much easier to read and reply to.
On 2023/12/22 21:03, Mark Brown wrote: > On Fri, Dec 22, 2023 at 05:55:14PM +0800, Xingyu Wu wrote: > >> The Cadence I2S can support 8 channels. But on the JH8100 SoC, two >> instances of this just provide 4 channels to use, one just provides 2 >> channels, and the other one can provide 8 channels. Should I use the >> property name of 'jh8100,i2s-max-channels' instead for some special >> instances on the JH8100 SoC? > > No, your current name is fine if the binding is generic for all Cadence > users. I do think it would be good to have a separate compatible for > these two channel instances, if there's been one customisation there may > well have been others. > > Please fix your mail client to word wrap within paragraphs at something > substantially less than 80 columns. Doing this makes your messages much > easier to read and reply to. Great, thank you for your support. Best regards, Xingyu Wu
diff --git a/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml new file mode 100644 index 000000000000..5d95d9ab3e45 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cdns,jh8100-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cadence multi-channel I2S controller for StarFive JH8100 SoC + +description: | + The Cadence I2S Controller implements a function of the multi-channel + (up to 8-channel) bus. It combines functions of a transmitter and a receiver. + It is used in the StarFive JH8100 SoC. + +maintainers: + - Xingyu Wu <xingyu.wu@starfivetech.com> + - Walker Chen <walker.chen@starfivetech.com> + +properties: + compatible: + const: starfive,jh8100-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: + items: + - description: Bit clock + - description: Main ICG clock + - description: Inner master clock + + clock-names: + items: + - const: bclk + - const: icg + - const: mclk_inner + + resets: + maxItems: 1 + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + minItems: 1 + + dma-names: + items: + - const: tx + - const: rx + minItems: 1 + + cdns,i2s-max-channels: + description: | + Number of I2S max stereo channels supported by the hardware. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 8 + + "#sound-dai-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + +oneOf: + - required: + - dmas + - dma-names + - required: + - interrupts + +unevaluatedProperties: false + +examples: + - | + i2s@122b0000 { + compatible = "starfive,jh8100-i2s"; + reg = <0x122b0000 0x1000>; + clocks = <&syscrg_ne 133>, + <&syscrg_ne 170>, + <&syscrg 50>; + clock-names = "bclk", "icg", + "mclk_inner"; + resets = <&syscrg_ne 43>; + dmas = <&dma 7>, <&dma 6>; + dma-names = "tx", "rx"; + cdns,i2s-max-channels = <2>; + #sound-dai-cells = <0>; + };