From patchwork Sat Jan 15 09:35:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12714356 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4890FC433F5 for ; Sat, 15 Jan 2022 09:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PxwfAFNEXo+rEbuy3NGBM4Z1FsoO/VZcN49nLU0BUNs=; b=lv16LFUBVXvXje 92QiLsTY8bGWv6k6aEU2QygmJtl1RliOYagCckn+dQ3EaPR9QqwjyxkcNh08fwVtbe788TlCTB8ht Piv2OYR4UOi4kM8KbQYekAY3b7eTvzh56ewVZOctmKYdKdRltKRA82AKcV1S0YjTXOJPo0qLIhtMN 9MThlGpO//WPXXbW+1Mw6Go0c2SHsTVMc4fyEVkJq40xQkeELIDHaxn+S/FRBNkdk6P6t6ibWnsgY tyQZjMOGxmDHKYI2WUQ0Ei4XbFh1ck6yk6UTJCoFjjJ2lCM7wLVjKkW2A4GHO0nmPUZshQf94T/86 451YHOn4NlxFOO63JPGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8fU3-00ArTZ-OH; Sat, 15 Jan 2022 09:36:27 +0000 Received: from mout-p-101.mailbox.org ([2001:67c:2050::465:101]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8fTz-00ArSr-NV for linux-amlogic@lists.infradead.org; Sat, 15 Jan 2022 09:36:25 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:105:465:1:4:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4JbY2T69MHzQl7d; Sat, 15 Jan 2022 10:36:17 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1642239375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JGeD3QzFPU1pjEdT6qw89+d4qhCqqcOr7Z2VTDU4NIM=; b=KDFU3Xt5IiZMDkdiKLD8VOg+qWol9MwHYmx6rchApxPk86UmyKGeYMn685PXe2YFkhOa6D v7JeD/z38ZPH1XzwLFeUbVM1QgWokLDRVgx2P0S6QIq3SvuRVKwySV4EiUNcLQTDWSlflS zc3/WLFzOVeQmQfuzvAS0tXw+816lUKMb4NYep/zhJrkOr299ZGD66rNRjHlZA4WzJoaNs qpfxTgbD0HZ3lC6XxabF0kgaY3hb51EYUveDlZESBIPXSkVSDo1UNpgv5DY6CjwqAsnATJ IPBvgoJPLIqORiqtvRNLngBO8QKw37JSKP+smiRu5wxIBYGu52QCFilZnZTFbA== From: Alexander Stein To: Jerome Brunet , Liam Girdwood , Mark Brown , Rob Herring , Neil Armstrong , Kevin Hilman , Martin Blumenstingl Cc: Alexander Stein , devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 2/2] ASoC: meson: axg-fifo: convert Amlogic FIFO controller to yaml Date: Sat, 15 Jan 2022 10:35:57 +0100 Message-Id: <20220115093557.30498-2-alexander.stein@mailbox.org> In-Reply-To: <20220115093557.30498-1-alexander.stein@mailbox.org> References: <20220115093557.30498-1-alexander.stein@mailbox.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220115_013624_010385_EB9EB22B X-CRM114-Status: GOOD ( 18.67 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert Amlogic FIFO controller documentation to yaml format. Signed-off-by: Alexander Stein --- Things to note: First of, Jerome, sorry for adding you as maintainer, but 1) it's mandatory 2) your are the (only) author of amlogic,axg-fifo.txt Please add your Signed-off-by if that is okay with you. License is mandated by checkpath, not my choice. I'm not so sure about the compatible check. Essentially it is either * 'amlogic,axg-frddr' OR * 'amlogic,g12a-frddr' + 'amlogic,axg-frddr' (or 'sm1' instead of 'g12a') Same goes for *-toddr. Is this schema correct in that regard? At least I got no warnings on existing device trees. .../bindings/sound/amlogic,axg-fifo.txt | 34 ------- .../bindings/sound/amlogic,axg-fifo.yaml | 97 +++++++++++++++++++ 2 files changed, 97 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..54bc073591f4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml @@ -0,0 +1,97 @@ +# 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 Audio FIFO controllers + +maintainers: + - Jerome Brunet + +allOf: + - $ref: name-prefix.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + "#sound-dai-cells": + const: 0 + + compatible: + oneOf: + - items: + - enum: + - amlogic,g12a-frddr + - amlogic,sm1-frddr + - const: amlogic,axg-frddr + - const: amlogic,axg-frddr + - items: + - enum: + - amlogic,g12a-toddr + - amlogic,sm1-toddr + - const: amlogic,axg-toddr + - const: amlogic,axg-toddr + + reg: + items: + - description: physical base address of the controller + + interrupts: + items: + - description: FIFO interrupt + + clocks: + items: + - description: FIFO peripheral clock provided by the audio clock controller + + resets: + minItems: 1 + items: + - description: memory ARB line + - description: optional device reset line + + reset-names: + minItems: 1 + items: + - const: arb + - const: rst + + amlogic,fifo-depth: + description: > + The size of the controller's fifo in bytes. This + is useful for determining certain configuration such + as the flush threshold of the fifo + $ref: /schemas/types.yaml#/definitions/uint32 + + sound-name-prefix: true + +required: + - compatible + - reg + - interrupts + - clocks + - resets + - reset-names + - '#sound-dai-cells' + - amlogic,fifo-depth + +additionalProperties: false + +examples: + - | + #include + #include + #include + + frddr_a: audio-controller@1c0 { + compatible = "amlogic,axg-frddr"; + reg = <0x1c0 0x1c>; + #sound-dai-cells = <0>; + interrupts = <88 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; + resets = <&arb AXG_ARB_FRDDR_A>; + reset-names = "arb"; + amlogic,fifo-depth = <512>; + };