From patchwork Sat Jan 15 09:35:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12714355 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 62F73C433EF 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: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:In-Reply-To:References: List-Owner; bh=Sa9NVnzP4qE8mB3jVe9UM1RTdQXM9xxTUs/g0CM7uco=; b=KjMcwFagVuNuqZ AeWIe8+bf3TlGoNTzdIGYYpFK9o0pfVt2l1j1i2CdjyzZCB3VKunoJkWIUV1rGd5wVU4kMEKbP9qj lP16RBWgolLpuVNTtq1TUn0/C5F4w2SjRBkdIsVowkkzpsvzbApIUg7DSfbU+XMlESYfX+HyCsE5I E/IID56HaWG5SypG9tP7yyYCY+TIrtMQO+MiCIL2AeDc9lQ1axXo5nSs03QUitOLH9vgpEAoT0aM6 G++iS9ZqdUZaTplm8c7eHke1nbd2NlsdwLyo5Ml8t5jAknQSlCmhuOkjlX2pCzichInRccoX4C0o3 kiwedJQGujfpF2zke6hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8fU2-00ArTR-R0; Sat, 15 Jan 2022 09:36:26 +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-00ArSs-T2 for linux-amlogic@lists.infradead.org; Sat, 15 Jan 2022 09:36:25 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (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 4JbY2V1fmvzQlBW; Sat, 15 Jan 2022 10:36:18 +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=1642239373; 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; bh=Ji1zixuudGwd0KFQ/Ox3LSNxpnb2w/YqY4LhAEAcapM=; b=aQcslm0SvP8RxgX/5WtFtwQ5CDhUqa4u2npXd0DbJocvpmqMwMipKcwBLjlEYKx+2U9OM/ ceYHyMhOXFyFETNVzuqYSSzKC5ffXxp1MwRXxcj8ORFq3RG+JsVHMFU1wZSKciP+kCOdRw z4lIgzsBihg55ox7ARcTuH2UU0X0r5vghRhGUOtPqufQ9Iwl4lR51VI1WYStNG8BehPhRE 8stuLcSDt6oo8+FKYNJZ9hvfP0kGZeQ4hJPwWwHBEG+zQBvYQ4QZh89q44eIZgPqnJqAbm kvNGUaHptrwc56l8+F8nH20pciY2msjaDgRxLmj5ggGnee1JowmHz72ZKA3PoQ== 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 1/2] arm64: dts: meson-axg: add missing reset-names property Date: Sat, 15 Jan 2022 10:35:56 +0100 Message-Id: <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_128962_BB9E9B93 X-CRM114-Status: UNSURE ( 7.14 ) X-CRM114-Notice: Please train this message. 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 Bindings amlogic,axg-fifo.txt mandates that reset-names is a required property. Add it. Signed-off-by: Alexander Stein --- This is essentially a preparation for YAML conversion to fix the warnings. arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 3f5254eeb47b..b14175e2f1d6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -1333,6 +1333,7 @@ toddr_a: audio-controller@100 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_TODDR_A>; resets = <&arb AXG_ARB_TODDR_A>; + reset-names = "arb"; amlogic,fifo-depth = <512>; status = "disabled"; }; @@ -1345,6 +1346,7 @@ toddr_b: audio-controller@140 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_TODDR_B>; resets = <&arb AXG_ARB_TODDR_B>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1357,6 +1359,7 @@ toddr_c: audio-controller@180 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_TODDR_C>; resets = <&arb AXG_ARB_TODDR_C>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1369,6 +1372,7 @@ frddr_a: audio-controller@1c0 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; resets = <&arb AXG_ARB_FRDDR_A>; + reset-names = "arb"; amlogic,fifo-depth = <512>; status = "disabled"; }; @@ -1381,6 +1385,7 @@ frddr_b: audio-controller@200 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_FRDDR_B>; resets = <&arb AXG_ARB_FRDDR_B>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1393,6 +1398,7 @@ frddr_c: audio-controller@240 { interrupts = ; clocks = <&clkc_audio AUD_CLKID_FRDDR_C>; resets = <&arb AXG_ARB_FRDDR_C>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; 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>; + };