From patchwork Mon Jun 27 19:39:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12897072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32423CCA487 for ; Mon, 27 Jun 2022 19:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240467AbiF0TlZ (ORCPT ); Mon, 27 Jun 2022 15:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240438AbiF0TlX (ORCPT ); Mon, 27 Jun 2022 15:41:23 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0494D17070 for ; Mon, 27 Jun 2022 12:41:21 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id w17so14484836wrg.7 for ; Mon, 27 Jun 2022 12:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L+tGP5Kq7UIoKfqvhhTL1feo63GGQB6sV6O4YA0h7fw=; b=TY3zxo6VkLsIUdTKjBItn+/z8AdzcodR3qzEG//3XMYrcKS1k9ne/bka4gXxqXaQnp 2A7+CWc2r5jHxfXLCYbs1PZlU4HHPOUgQ1rseP1dGYAxgMuz3QBtCgscrP20WA5683HF 7DkBrqQ3cTdsOlJMk8LlpZ1sL4rLpwtH5c+0J1NR5w6oUFO9qMV2hs2XXgqe3IcaGcfj 8r05RuxtHhutZ2YZG6ECMl6/y9ahK5t/H0x7DgLIqJyfuVdALl46lW0xRlvkJ20t3Vcl ZMUSRO1erAmX6lUgkQPLaSV9s+0p93XNH7HN5iFsEhgotSM/ZV3rJgj9Q45PHW2rpdNw hH5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L+tGP5Kq7UIoKfqvhhTL1feo63GGQB6sV6O4YA0h7fw=; b=wV5ULujImprPJZSI3jdhMj7v0X5IGGt3XYKO/vUghsX8v+CX8GFSPvmZYTY4PDpkP7 EBGoeZkt+x+lQzRktSgjwlhKkrKkG8eqs8dP42x0fwIgtubSVBYcHsVzDr1H4PDbjsIl trKx9LVlg3uqXxTWryRtriz23CXRfw+JR44Go1BVILKITZVyp3DF87mxfB7ETD5aO5BY PBOQfY4RVyRSm2sBF8J2Oscr9kDHW0+tRF98TQLE+3gXJdQuO2Q+dTPaOLRA1bVlT9yn AQ19JVyk6UszuVMqjdTxw0B8Ie8px6tlFeJjuYbJhg6ilqlCVMsg4y9GO5losF8tM3GV gT6w== X-Gm-Message-State: AJIora9nPgiGmQ49I/pzGfzAEHjD+SIBY1VB/khlkdIAUn1gVx658CR7 5NyGVdkB5e5Ofz5U3MtsXsgzSQ== X-Google-Smtp-Source: AGRyM1vJuw4zmcv+tO3VLNG3qwSgFi4f30I8dOa3KRcph1tZdQYK/eqiVVbCh1Yv7auGf7Z85mjobg== X-Received: by 2002:a5d:644a:0:b0:21a:75f3:ac7c with SMTP id d10-20020a5d644a000000b0021a75f3ac7cmr13433488wrw.506.1656358880472; Mon, 27 Jun 2022 12:41:20 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id e9-20020a5d4e89000000b0021a3a87fda9sm11428047wru.47.2022.06.27.12.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 12:41:19 -0700 (PDT) From: Conor Dooley To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Serge Semin , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt Cc: Thomas Gleixner , Paul Walmsley , Albert Ou , Conor Dooley , Masahiro Yamada , Damien Le Moal , Geert Uytterhoeven , Niklas Cassel , Dillon Min , Heng Sia , Jose Abreu , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 03/16] ASoC: dt-bindings: convert designware-i2s to dt-schema Date: Mon, 27 Jun 2022 20:39:51 +0100 Message-Id: <20220627194003.2395484-4-mail@conchuod.ie> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627194003.2395484-1-mail@conchuod.ie> References: <20220627194003.2395484-1-mail@conchuod.ie> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Conor Dooley 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 --- .../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 + +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"; + };