From patchwork Mon Feb 6 15:34:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2309467wrn; Mon, 6 Feb 2023 07:54:18 -0800 (PST) X-Google-Smtp-Source: AK7set+G0o6nucxSx128ui2FH/lo1lq+piupRDzNl+It533YhX/ahJUXrqDHjl/RdOk3f0Keh0AW X-Received: by 2002:a17:902:f681:b0:199:2ee:622d with SMTP id l1-20020a170902f68100b0019902ee622dmr9253324plg.3.1675698858531; Mon, 06 Feb 2023 07:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675698858; cv=none; d=google.com; s=arc-20160816; b=Xr528ccH224XJWFRunHPnwNbN646/zfnQE80qiYRzegR5XsZWl4EPUUrzDKGmD1iun P36e2OjM0lgSFa3HatTlKgdYJfaaN772+WtxIEJNR9M0ZzR0iaAWm3tVW5QUK21KRgMm kZHOcQDjjOEivSqF5GN5U/0t2lr6d0JYc9B7e7R4KRarKfiG0xLeGBcs1rAyBtMrPtq9 KcQHDxhoWBEkutXwKBVCezXY0bcoO7wPPNB6s6NrCIlCZ2c5qkJ1Q9VXwgVAilzed9In 3PGt3foU7Fw5TsabGVMzBTiek2+TW8U3N+LCN2Sa+9WCPq00/SuNapOne127MoSwl4Ra pgoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7uq9H1tcXk6HETzwlofFPzIzEQPctitFjzIM/SIe7Gs=; b=amX2BgNBUdVPi7kqfmE1rFPYUdcNm4cN/xxjsbVlOeJsNYMRbgJWfaiJ01UhZTrutc xMjVfsHbrYQgjc/nZtPbcdlTJmU3e/m5HE4zQGuvmJAqaQCWwXveYjr4nl8qfG+4Ta6t dyXQtz/PGMNHP38EPEOahrTiej5WGZvKgfdTB3n03nmHiqYHsBKcp1s5p33UkIqEvsLn k/Z1y8twCb28KGT4QpBcBa1G988G+V22LthICHLMYL0FZMcDCPrprEZHHilDp1Ypzmza 60dnQRvYtA1h86NkvLHcaUPrSRt0Xb9UV+/pyE4xVNpYfVKth5g1zXldvB+TBZTXWeoF q4gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=U6oXxdfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a17090311c300b00188a7401d89si13250098plh.481.2023.02.06.07.54.06; Mon, 06 Feb 2023 07:54:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=U6oXxdfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbjBFPnd (ORCPT + 99 others); Mon, 6 Feb 2023 10:43:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjBFPnO (ORCPT ); Mon, 6 Feb 2023 10:43:14 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89A3B126E2 for ; Mon, 6 Feb 2023 07:42:28 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id b3so18234746lfv.2 for ; Mon, 06 Feb 2023 07:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7uq9H1tcXk6HETzwlofFPzIzEQPctitFjzIM/SIe7Gs=; b=U6oXxdflVh5EjAdAf9l2pohgICfOD56RXCSxtpKDoY6tFpJdY/gtAZOnQMBC1hZLlZ ZLJk3wTnMot8h5o9wl6lf4NIlAOmMdFCtXnqHXuQH8kNmOUT4bw5+tiMxfqKgLJD2chS bmEPFvzK2/u99cpb97W8PbrplYKtbqSdY0KZxnijuhiKQ6tEdWiQyN9SGpFjaByD9zfI zUY1nBPeEbvWWZYEoEDAVWGZkZwj7myD+J+2Zk2KdR3jOBQrbR87rZnbJlEbOZWGN68v l+Z16QUCgqmtb8qbVP7N7PrHy36uks9vsqFg7sBqviYhqLu7ytBC96wwEarnGlO2J4M9 tA7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7uq9H1tcXk6HETzwlofFPzIzEQPctitFjzIM/SIe7Gs=; b=3pT429bGgt2+Q809MGO3SE6+kogWeqTGmcU6fS9xcKr/vSvSSQL9TqCMaxh4ikagRn Z2bdBbGP5T4wHJKBGJdlzmQVAwGdjWNIHrc5kz8iYpOOg7zDJwaGjMEsXwKwyw9v7Ipj d3RASVmmAVNj1PjBwA1tJsHNHfCO5jGVd3vnhV2SM/G2N6Xb6fXprFjcwHUVEL+Vrz3L sS4hBmQypeJtvs1ArJkAE3cNptJCqAZyWNSLjHf6zuhVA6lWpf+/eytiyUzsGmvXjbST FtH4uxAKxF7p6Vhh9nwfu1dxx9Hi+nUoZFNRLgpBBl/VmYQ29POWj4G0uBQunBVdLLdz t05g== X-Gm-Message-State: AO0yUKVq51CboITbX89UTWoQNefwwzPLI47TtgYc1xLlXzXUnRn4wx55 QZkrEdbRX+l8TwG9wBIUsu+I/6LbybscY3/4 X-Received: by 2002:a05:6000:118c:b0:2c3:eaff:aae8 with SMTP id g12-20020a056000118c00b002c3eaffaae8mr3587288wrx.18.1675697700681; Mon, 06 Feb 2023 07:35:00 -0800 (PST) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id e12-20020a5d500c000000b002c3ea9655easm2197317wrt.108.2023.02.06.07.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:35:00 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] ASoC: dt-bindings: meson: convert axg fifo to schema Date: Mon, 6 Feb 2023 16:34:46 +0100 Message-Id: <20230206153449.596326-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230206153449.596326-1-jbrunet@baylibre.com> References: <20230206153449.596326-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757097606450393065?= X-GMAIL-MSGID: =?utf-8?q?1757097606450393065?= Convert the DT binding documentation for the Amlogic axg audio FIFOs to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/amlogic,axg-fifo.txt | 34 ------ .../bindings/sound/amlogic,axg-fifo.yaml | 112 ++++++++++++++++++ 2 files changed, 112 insertions(+), 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt deleted file mode 100644 index fa4545ed81ca..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt +++ /dev/null @@ -1,34 +0,0 @@ -* Amlogic Audio FIFO controllers - -Required properties: -- compatible: 'amlogic,axg-toddr' or - 'amlogic,axg-toddr' or - 'amlogic,g12a-frddr' or - 'amlogic,g12a-toddr' or - 'amlogic,sm1-frddr' or - 'amlogic,sm1-toddr' -- reg: physical base address of the controller and length of memory - mapped region. -- interrupts: interrupt specifier for the fifo. -- clocks: phandle to the fifo peripheral clock provided by the audio - clock controller. -- resets: list of reset phandle, one for each entry reset-names. -- reset-names: should contain the following: - * "arb" : memory ARB line (required) - * "rst" : dedicated device reset line (optional) -- #sound-dai-cells: must be 0. -- amlogic,fifo-depth: The size of the controller's fifo in bytes. This - is useful for determining certain configuration such - as the flush threshold of the fifo - -Example of FRDDR A on the A113 SoC: - -frddr_a: audio-controller@1c0 { - compatible = "amlogic,axg-frddr"; - reg = <0x0 0x1c0 0x0 0x1c>; - #sound-dai-cells = <0>; - interrupts = ; - clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; - resets = <&arb AXG_ARB_FRDDR_A>; - fifo-depth = <512>; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml new file mode 100644 index 000000000000..b1b48d683101 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml @@ -0,0 +1,112 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-fifo.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AXG Audio FIFO controllers + +maintainers: + - Jerome Brunet + +properties: + compatible: + oneOf: + - enum: + - amlogic,axg-toddr + - amlogic,axg-frddr + - items: + - enum: + - amlogic,g12a-toddr + - amlogic,sm1-toddr + - const: amlogic,axg-toddr + - items: + - enum: + - amlogic,g12a-frddr + - amlogic,sm1-frddr + - const: amlogic,axg-frddr + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + + interrupts: + maxItems: 1 + + resets: + minItems: 1 + maxItems: 2 + + reset-names: + minItems: 1 + maxItems: 2 + + amlogic,fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Size of the controller's fifo in bytes + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - interrupts + - resets + - amlogic,fifo-depth + +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-toddr + - amlogic,sm1-toddr + - amlogic,g12a-frddr + - amlogic,sm1-frddr + + then: + properties: + resets: + minItems: 2 + reset-names: + items: + - const: arb + - const: rst + required: + - reset-names + + else: + properties: + resets: + maxItems: 1 + reset-names: + const: arb + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + audio-controller@1c0 { + compatible = "amlogic,g12a-frddr", "amlogic,axg-frddr"; + reg = <0x1c0 0x1c>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; + interrupts = ; + resets = <&arb>, <&clkc_audio AUD_RESET_FRDDR_A>; + reset-names = "arb", "rst"; + amlogic,fifo-depth = <512>; + };