From patchwork Wed Jun 29 18:43:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12900596 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27FC2C43334 for ; Wed, 29 Jun 2022 18:45:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41DB610E882; Wed, 29 Jun 2022 18:44:57 +0000 (UTC) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8BCD210E3E9 for ; Wed, 29 Jun 2022 18:44:42 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id c130-20020a1c3588000000b0039c6fd897b4so166498wma.4 for ; Wed, 29 Jun 2022 11:44:42 -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=lrMawgZzQlWfxvBPxcN2X1PdlhBSF2KCk9YZdZ5lbYA=; b=UZFE16ya+AhstVdc8+8PMjE1GOjuS02LHwYmtTTvWlnaw0JNzT8UivtB0HUSn2Fehs UcO/Kh8301nI9Y236WXJxSTARpOq9aANariOPe4TPKATPB706htP3/Hm8gLciQ6UUFto ZkfbHRvMtF6PrR8hyQ8v/olYBu0GD8fKKimD7yS7a/YvhUyrh/0svjksmlGJqrAcRCkj zI1gYBorCLXs9cJyTjmOhRaEHYhEM9zJQWx/dxjB3LUZk9Q/1bfk28AF94NfENY9bUQ9 bHoitafl7IPZo20bQoU6rZfgzGh3/7bSGBIryzeQg9yuXosCnzERLniwu/VmzUrE7u47 aYrA== 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=lrMawgZzQlWfxvBPxcN2X1PdlhBSF2KCk9YZdZ5lbYA=; b=ov9J8B/rFRWHHFYLPQaXKZ5wfK02o7YmxOfR9h3HcHw/0Pbp3PGQ3Mv6/nfze2HsgD 6UrIQ9KHvq3deJHPUx9jjwpBHNyRyvdXBstZj4QNW6WAydyRhrjAVGNudVp/OMQVle/I bDQjL17YVX8J1zxJb+erPFNDKpUZuH5GP0vQipwQ3Yn978JU3qZhLu0DzoLOYMF7BvBl RCd2iTrGMK8hA6e29d+FisB4c/J0f4KaTxxfxOMrkHd8dASs4W/5Vwbwp8HepYjAnYmn 8Fflnr+ku59AfxWZxr9kzDFCrvEgND9K3ye19h7LeGZulNXlEiGFZXdhgQLjtMpFI+Xe KKLQ== X-Gm-Message-State: AJIora886gmFlIxbEFiVGj+m6NFpo/b/IEhWNwnY1HX9p4nOVyX8QyX1 H8if3I7GnKPYyutlNwYryh+5Cw== X-Google-Smtp-Source: AGRyM1spM09NZGEglzK2GcCvBNzf6+IwTXB36BnCjHt1M/6JzCPwKo0eKihFk+O4Q05Ie7dCQ7fFbg== X-Received: by 2002:a7b:c242:0:b0:3a0:3ba5:81fd with SMTP id b2-20020a7bc242000000b003a03ba581fdmr7196335wmj.47.1656528281039; Wed, 29 Jun 2022 11:44:41 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id u23-20020a7bcb17000000b0039aef592ca0sm3834371wmj.35.2022.06.29.11.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 11:44:40 -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 Subject: [PATCH v3 03/15] ASoC: dt-bindings: convert designware-i2s to dt-schema Date: Wed, 29 Jun 2022 19:43:32 +0100 Message-Id: <20220629184343.3438856-4-mail@conchuod.ie> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629184343.3438856-1-mail@conchuod.ie> References: <20220629184343.3438856-1-mail@conchuod.ie> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-riscv@lists.infradead.org, Niklas Cassel , alsa-devel@alsa-project.org, Albert Ou , devicetree@vger.kernel.org, Damien Le Moal , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-spi@vger.kernel.org, Conor Dooley , Jose Abreu , Geert Uytterhoeven , Paul Walmsley , dmaengine@vger.kernel.org, Thomas Gleixner , Dillon Min , Masahiro Yamada Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Rob Herring --- .../bindings/sound/designware-i2s.txt | 35 ------- .../bindings/sound/snps,designware-i2s.yaml | 94 +++++++++++++++++++ 2 files changed, 94 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..4b0795819064 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml @@ -0,0 +1,94 @@ +# 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 + 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"; + };