From patchwork Mon Feb 6 15:34:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53399 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2309621wrn; Mon, 6 Feb 2023 07:54:34 -0800 (PST) X-Google-Smtp-Source: AK7set9rGUeo2X79g3ehWkP5CBUX9ixhTEf7lb4nfFfuiCqcWq9QopAcb3fqBo6PVBqgqe3xw4W5 X-Received: by 2002:a05:6a21:918c:b0:bc:b98c:a8a0 with SMTP id tp12-20020a056a21918c00b000bcb98ca8a0mr20602415pzb.62.1675698874432; Mon, 06 Feb 2023 07:54:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675698874; cv=none; d=google.com; s=arc-20160816; b=uDK/rWXQp5Iv9HIz/iSQrSVkZo3kK+jITeRW0nO/I/RzTk5RBSJuC+daDr+aRzDiP6 rzfubh/Zsv+SF2gWB32WkKwsFbmJfMYTv6sOYZls/aswJx4GSWFJw8vESkc844TkfcJi OkHM3fviwjUc0Po2S2gugLHmjg81Xy0IALANiLs0y5bs1aEbgWrBjlHEyotJGeLD25Mi knwJ6ahzca+TcvQKH3rIJHi5JsWKgPW4pLA4j5p0w+sjFKsPy1o74hto9LT53C1fyjDm OOirR3CCDhizExawcI9b6EkFPEa90ISulqW6NyeeFxiamqd0VwXLAoMlTJy8g9i6rAuZ DUgQ== 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=DSZ+ZWDmXDYcYtmIhvFtKPtRA07CwGN6CEZ0BnS9Htc=; b=EJOJiNJccWjvIdAX6sJtlYCyLFYtas64dvw4sPOb8hblqEQJgGOce8x0wECEVZAlQn asKMu2js6DNOLANT5ljscd60Bw0XMjTlPkDV2Cv2lr1WevoWYznc72rhmJsZct9CtOLF tmxFD5gN2OwT6hY3s0uriLoj78O+ZQMXeIURLLazDxYy6paa78NGJTejlE2A5grRyl1q cY1v4J6yloyf9BUvoR6TQ0XQPdihH5wGDbg24tHMBAbAomsi5G/bb/T4Vfo7my1h3U6y FDQqXUYDAjvejRX+KiPgr1w6T16up4ESXzvvP/RXORgy9TTiBP3qPq9AykAGn31jwZor oeDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=1ymZ4wa9; 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 r12-20020a638f4c000000b00477e302ee63si11568083pgn.552.2023.02.06.07.54.21; Mon, 06 Feb 2023 07:54:34 -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=1ymZ4wa9; 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 S229879AbjBFPok (ORCPT + 99 others); Mon, 6 Feb 2023 10:44:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbjBFPod (ORCPT ); Mon, 6 Feb 2023 10:44:33 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C528C7DAA for ; Mon, 6 Feb 2023 07:43:58 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id m2so35370123ejb.8 for ; Mon, 06 Feb 2023 07:43:58 -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=DSZ+ZWDmXDYcYtmIhvFtKPtRA07CwGN6CEZ0BnS9Htc=; b=1ymZ4wa9X9VmsnI7dKrwIS7KOHJdftr5rwTlNYrUztYky9zyZPKXb4Q874IsFemt8j J30/3nK1SZU0AoHog8FMSurppxgjLSdfkDupT8lTCW6661B5X5lXhRUwfjsKduM64PnD NXNTlFyDvsgpaTRqZX126jetYhntw5pEwi25tqexCd4oAyDa3u7dACkn+K1z8zVGZffr k0raxVkCqzwmmjZQrnz6ELj8YpQ7A1BtMCKqruw6NL9CsTs4yAcH987G3T7lOk9jndLm 2vJWg5M1GB1f0U3a08ljzOMaPeWqXaqOEtfrmIu1ItrbgbTpO4OIIx93Oyzg9eOaeJzO PTew== 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=DSZ+ZWDmXDYcYtmIhvFtKPtRA07CwGN6CEZ0BnS9Htc=; b=dSN1FYGPmNp6Wbcf2WLaRGPAglVXufubV7h+AWO4DqPvAyd8uWIzF6ZHl7668I51dp /WfyO1hD1Ej22L3wB1rhbnGINaJcqZ0hF00bjG4kF4ilivmohpvKwVHFyMUeNGDIyphD zF1fFywEQ5ErRMUhXkwKAUpqrffii+mWRYZG40BEaUxpPEWPuxRojpXtCkF6F6Z/1lqb OUcdIL8LlzYASzscaPc7B31Pf7uDTXg2RQPapgbig8ZkjrZGexpXI6TKUEk5oxXXMyvS s+d+guJreaIeyFNPIGcsz9PInxZ688IkzP3/TwBWxY1F9Ip6h5vrpXgJ8Ioj58nVGu3l j6yQ== X-Gm-Message-State: AO0yUKWhmtcdarUAxIqJILufR5VZSNLv/WHau84nJJEKadrY4KKvki7Q 8ubP4mFergoo5ot2mJVT9Q9Squj/wgixoVtV X-Received: by 2002:adf:f992:0:b0:242:5563:c3b with SMTP id f18-20020adff992000000b0024255630c3bmr16518118wrr.59.1675697698201; Mon, 06 Feb 2023 07:34:58 -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.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:34:57 -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 1/7] ASoC: dt-bindings: meson: convert axg tdm interface to schema Date: Mon, 6 Feb 2023 16:34:43 +0100 Message-Id: <20230206153449.596326-2-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=unavailable 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?1757097623101416144?= X-GMAIL-MSGID: =?utf-8?q?1757097623101416144?= Convert the DT binding documentation for the Amlogic tdm interface to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/amlogic,axg-tdm-iface.txt | 22 -------- .../bindings/sound/amlogic,axg-tdm-iface.yaml | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 22 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt deleted file mode 100644 index cabfb26a5f22..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt +++ /dev/null @@ -1,22 +0,0 @@ -* Amlogic Audio TDM Interfaces - -Required properties: -- compatible: 'amlogic,axg-tdm-iface' -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "sclk" : bit clock. - * "lrclk": sample clock - * "mclk" : master clock - -> optional if the interface is in clock slave mode. -- #sound-dai-cells: must be 0. - -Example of TDM_A on the A113 SoC: - -tdmif_a: audio-controller@0 { - compatible = "amlogic,axg-tdm-iface"; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>, - <&clkc_audio AUD_CLKID_MST_A_SCLK>, - <&clkc_audio AUD_CLKID_MST_A_LRCLK>; - clock-names = "mclk", "sclk", "lrclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml new file mode 100644 index 000000000000..320f0002649d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio TDM Interfaces + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: amlogic,axg-tdm-iface + + "#sound-dai-cells": + const: 0 + + clocks: + minItems: 2 + items: + - description: Bit clock + - description: Sample clock + - description: Master clock #optional + + clock-names: + minItems: 2 + items: + - const: sclk + - const: lrclk + - const: mclk + +required: + - compatible + - "#sound-dai-cells" + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + + audio-controller { + compatible = "amlogic,axg-tdm-iface"; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>, + <&clkc_audio AUD_CLKID_MST_A_LRCLK>, + <&clkc_audio AUD_CLKID_MST_A_MCLK>; + clock-names = "sclk", "lrclk", "mclk"; + }; From patchwork Mon Feb 6 15:34:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2302629wrn; Mon, 6 Feb 2023 07:39:08 -0800 (PST) X-Google-Smtp-Source: AK7set9gyLvrddJr5pPgC4xqJtJle1WsuoyxAozsJOujjW7iP6wWy83wut+EZ1Z4BeOmG39WbB03 X-Received: by 2002:a17:906:5a4c:b0:87d:ed60:cb7e with SMTP id my12-20020a1709065a4c00b0087ded60cb7emr17007250ejc.68.1675697948053; Mon, 06 Feb 2023 07:39:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697948; cv=none; d=google.com; s=arc-20160816; b=DAP88rB3xMzjsGKyU0rUkKa7kjiyEzHDA+cuKMetlsM8RFG2sDq0+MmxRxWmYmqkQp QHuXMI8NzMIVs3DDK8CbI+i7wAGY5ys5KrCXaqH3j+gDOWhWefJ8TTMJskXdPWsnmSpo 6Cjrrp0aTBF0mR1kVF3VKtoKLaOL1fS0t2xIAi1zG3R2/Ujm0B86vaLHJNoffSjmqLN0 uooAR6TqrqJvtLH3xlwAXj6TC6oeK+3h11e4U3GLRy7nFxlyXxLwAHRYVG0gwBTT4YP4 iQUwksF+bygvqtP/wuNHKNRTix0m/e+umtCo+ltUPXisdUG8zGXyJo8JPjOkUdk08EOK SCqQ== 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=dE4PzawJ8Ivz1Xkrb1ainxw3MHkOCZBpNlDJteLfhvQ=; b=eRY9qCgM70j7EsFS//tBbiGBaYhjAzJR+wuL1C4WKcawbgWQg+f6YlV2Upgd1oGUmc eArFIiiuBAlv0HagumMM+fOD6cH85YVtoM13n2RfQtq7VBic7EfJQEzCtJiOUqP7OuO6 GbilxZNwhSotW3VTjqQ+o/+Mrk9n/sNbeypyPRfCPPN94P9e49HbPrOj9nZQ2/bfPLJr FaF60Arg4TGNsUdylo8953eofjsmq/bdbsDfJe/3cRcQavEVENS5xyPnwJG+zHJqK2IZ ZuvIZQQCi7tEd2dhUwuIP1n8Q2m2N6n2WnIMVZt6z+04iLqt9jQ+B3OBJ6Yf2lWHWgPe ENqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=7+0Oo1DV; 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 gc8-20020a1709072b0800b00889794debc5si12029730ejc.980.2023.02.06.07.38.44; Mon, 06 Feb 2023 07:39:08 -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=7+0Oo1DV; 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 S231688AbjBFPhu (ORCPT + 99 others); Mon, 6 Feb 2023 10:37:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbjBFPhW (ORCPT ); Mon, 6 Feb 2023 10:37:22 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D702C650 for ; Mon, 6 Feb 2023 07:36:17 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id y1so10777660wru.2 for ; Mon, 06 Feb 2023 07:36:17 -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=dE4PzawJ8Ivz1Xkrb1ainxw3MHkOCZBpNlDJteLfhvQ=; b=7+0Oo1DVaqD7naQ+tMMYeuBowi/hiXS2Pth67RgSbzizIqJCJUg91R28kFILkD38nm OW1Xpyp6KIBZhnCdiQok71iMY/Bn5tV3amkYRfb/6DeGwaBaCJJLlUJWhiUtmAaR/VQf +w7cNV6/oG8nPnlySxo+KIWUT9IfR/s5N7Xm4UpDemXPzr/+mAwXl99X2m0FimpJpTwL mEM1h4wzIEpayxRIUbK9mwOXPc5D9JOkHvfRjwaH6oaZCNjhpB0yoFqaETseakuwffoP cUEd+FaJVNgXGpLVPFXCOXuI8bxrcWl2sdURbnW9SxhM+FaKlM2h0nJ/KKfZrVFpN7L8 bKvA== 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=dE4PzawJ8Ivz1Xkrb1ainxw3MHkOCZBpNlDJteLfhvQ=; b=Mfvf0E2ejU5VAcf8tiVq1/dCUXUT6wn+sX2Kc/2MIi+cv00ILgiivP5ctcPXpOsPMW chhUgCmoTISY+s1ToPdcpIDdHgwzhsDbYOeBylxS2ZL69AdTYODtJqLin4lNTSf+Kq6D hluz8KOUyutW9ih+bdf0JY2PgQzg9W9JJq/+9lmgUfMqXBVwlRvdYqnxKkc0ZeNrfSHS 7MUyePG/nTpsljgMp6n1hDAUV/E2cFMO0zk4wcUQfdrsq8A2FpoKHSQwRdSa1NmixpAd VWkISuzuY8mNh5NywoR96uGGgE+ba3hha4/P1Q7pKmAlnpqx6sXrZTyR2Qe2YX5oaoKZ 18lg== X-Gm-Message-State: AO0yUKUWWuFb511m+MQdi4FeK1VOOzphv8/AsJBChQV9QFp6EYTugxg0 bghwhkQLPYHrJqrV5DG+f5uyuw== X-Received: by 2002:a5d:6d8b:0:b0:2bf:dcfb:b58a with SMTP id l11-20020a5d6d8b000000b002bfdcfbb58amr26988602wrs.68.1675697699115; Mon, 06 Feb 2023 07:34:59 -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.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:34:58 -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 2/7] ASoC: dt-bindings: meson: convert axg tdm formatters to schema Date: Mon, 6 Feb 2023 16:34:44 +0100 Message-Id: <20230206153449.596326-3-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?1757096651174933433?= X-GMAIL-MSGID: =?utf-8?q?1757096651174933433?= Convert the DT binding documentation for the Amlogic tdm formatters to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../sound/amlogic,axg-tdm-formatters.txt | 36 -------- .../sound/amlogic,axg-tdm-formatters.yaml | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt deleted file mode 100644 index 5996c0cd89c2..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt +++ /dev/null @@ -1,36 +0,0 @@ -* Amlogic Audio TDM formatters - -Required properties: -- compatible: 'amlogic,axg-tdmin' or - 'amlogic,axg-tdmout' or - 'amlogic,g12a-tdmin' or - 'amlogic,g12a-tdmout' or - 'amlogic,sm1-tdmin' or - 'amlogic,sm1-tdmout -- reg: physical base address of the controller and length of memory - mapped region. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "sclk" : bit clock. - * "sclk_sel" : bit clock input multiplexer. - * "lrclk" : sample clock - * "lrclk_sel": sample clock input multiplexer - -Optional property: -- resets: phandle to the dedicated reset line of the tdm formatter. - -Example of TDMOUT_A on the S905X2 SoC: - -tdmout_a: audio-controller@500 { - compatible = "amlogic,axg-tdmout"; - reg = <0x0 0x500 0x0 0x40>; - resets = <&clkc_audio AUD_RESET_TDMOUT_A>; - clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, - <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, - <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, - <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, - <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; - clock-names = "pclk", "sclk", "sclk_sel", - "lrclk", "lrclk_sel"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml new file mode 100644 index 000000000000..719ca8fc98c7 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG TDM formatters + +maintainers: + - Jerome Brunet + +properties: + compatible: + enum: + - amlogic,g12a-tdmout + - amlogic,sm1-tdmout + - amlogic,axg-tdmout + - amlogic,g12a-tdmin + - amlogic,sm1-tdmin + - amlogic,axg-tdmin + + clocks: + items: + - description: Peripheral clock + - description: Bit clock + - description: Bit clock input multiplexer + - description: Sample clock + - description: Sample clock input multiplexer + + clock-names: + items: + - const: pclk + - const: sclk + - const: sclk_sel + - const: lrclk + - const: lrclk_sel + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + +allOf: + - $ref: component-common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-tdmin + - amlogic,sm1-tdmin + - amlogic,g12a-tdmout + - amlogic,sm1-tdmout + then: + required: + - resets + + else: + properties: + resets: false + +unevaluatedProperties: false + +examples: + - | + #include + #include + + audio-controller@500 { + compatible = "amlogic,g12a-tdmout"; + reg = <0x500 0x40>; + resets = <&clkc_audio AUD_RESET_TDMOUT_A>; + clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + }; From patchwork Mon Feb 6 15:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2302115wrn; Mon, 6 Feb 2023 07:38:04 -0800 (PST) X-Google-Smtp-Source: AK7set8uy6Qr1IH113qwk/daPU0VQAGajiHHDVPOrk6pkIJS8tUpkPiPqA/lJxUW2pR7tqS+lHNc X-Received: by 2002:a17:902:ce10:b0:196:8db5:fd67 with SMTP id k16-20020a170902ce1000b001968db5fd67mr21055968plg.2.1675697883861; Mon, 06 Feb 2023 07:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697883; cv=none; d=google.com; s=arc-20160816; b=uKRYzde9hJ+xsqRpKhtSmguHIT2kIoTjMT9TPcNIp+0IEauXZ8X4FOHy6Y45LBLoa5 iGr+bJm6Q6DbKhd95e+VOzkc3ha7xDuFcvB50nmcyyu/oKfX7FyQG+GeR/BA0mLPv1lt m5zeJ2dUU16dwMpyazZDRWN36CbNdGBEm+fve1nnYoRI+HSFLADR0pCMJtqVhSEnT4Q5 QQ2fX6DVpQWXPGtb0l0d5MWv/9c3AWlvxsUiej813M5ozsMh+e37RWoQp9HrU4R5/blN WczDhB10obALzhk8/02DXyEjG0NNnmcPGNvK6EvusmIKZKVrg8b7hjAtI7p2wsjVAR+e m3gQ== 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=kfu3jmputrK/og1fqi3qU6ALj7vxKy6rZ0t8pc/sq40=; b=A4naWdRpyrw0sDDK3XRAjANgz2e2MMdDQ1s/wqlg2OqVSKt18A+k71WVIWM7p2atOj pCCqXLC+yKq5uZOqPkuDbxVupA/v+7Z7BhR1sqNfxe2SvMBR46sOVPAeqytEvEtJQhMA 76xUmu8nxcQshv1P1oxsVI0jzsyudBJda9Rzu96qH7w9sw5f2WEIWn/GExsx2MrLv1HU 3Qgw4l2Id50A6bjbGLjSNcNvjoUYcS6L+qdkERTZVpd9BvOkAwge0YvVXRbabw5bDTNH MBDgXCLK1UKctcqK1HNGijbSWolXEbC2nje0nIdhYn6ObNBAS3QxNmI5nikccgXJlrMx Rp3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=ZHnYuiRL; 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 b7-20020a170902d88700b00194c49857acsi10741360plz.226.2023.02.06.07.37.51; Mon, 06 Feb 2023 07:38:03 -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=ZHnYuiRL; 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 S231624AbjBFPhb (ORCPT + 99 others); Mon, 6 Feb 2023 10:37:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbjBFPhP (ORCPT ); Mon, 6 Feb 2023 10:37:15 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AF4C2A99F for ; Mon, 6 Feb 2023 07:36:02 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id m14so10726677wrg.13 for ; Mon, 06 Feb 2023 07:36:02 -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=kfu3jmputrK/og1fqi3qU6ALj7vxKy6rZ0t8pc/sq40=; b=ZHnYuiRL3ENEjIwA8CHehxzcMS0zC4kw5Iza3g804QEPASmtOWIjX26AeoJOl8d6ik CQ4vNjYSK1/ctcPjXRAW3ajeN84Je2bt9qKHOgAPXcD2fkD+xFr3Krn+KJS46jS4m5NZ VuttM8+gNd3D4ZkBdhY3HpEAfvY3W35RB0p3m3Y9tOp3+61Yr9PBdwnnlc0I4P8IPgc8 DsJseBI1jG8lZo1gAJm4TOzqFzlag06ATAsw6I6dYJM1Zzl6wf2eJSqWwVltMou7RPBz TbCbBtRmkUL0NbCVsTDmO8siTV+CQch7/CzrbYhrJsXgwS2Sk9s/0wcC4uabLVKEwsIt kigA== 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=kfu3jmputrK/og1fqi3qU6ALj7vxKy6rZ0t8pc/sq40=; b=Jhyxe3KKNo0GxA1RKT23WWBhES0sBESGE2UbC9iixDP7afpJg1izyRwR4yUb4Ibcki gpjqgVg6pkJFF1wwmex3PRI7VrsMUCB599CuVaXqOITUGowG7cOEe1s6xv52yA3oNVv7 1qQT05y4eXchJwR5JDNkoavJa9DclkiTPFRptFL66jHWW6O7Tr5lzEfZo/T+OhqdNHjl 4WuBiEkCxCCgeEFqqdpvK2wl8XaSss4SbPCA6W2SHuy7B9CTWEnnVcZycJDbCaKqhSpu zmgKivjn67Y8naXlA/+fWJaTZUXtaaZxZuVH1UmbTXeKw3xQQ8s+wrRwDVdpNgVy08n6 ikuQ== X-Gm-Message-State: AO0yUKUtiyxSO9+0/6JnK+m0/vJ7/n3C9aSkO67b1U1Q4Ot9sbvmuJje JesKff7z8Qn/t9d384bFUEUEfQ== X-Received: by 2002:adf:9c8e:0:b0:2c1:2a15:9dd3 with SMTP id d14-20020adf9c8e000000b002c12a159dd3mr18450773wre.48.1675697699902; Mon, 06 Feb 2023 07:34:59 -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.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:34:59 -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 3/7] ASoC: dt-bindings: meson: convert axg pdm to schema Date: Mon, 6 Feb 2023 16:34:45 +0100 Message-Id: <20230206153449.596326-4-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=unavailable 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?1757096584479715228?= X-GMAIL-MSGID: =?utf-8?q?1757096584479715228?= Convert the DT binding documentation for the Amlogic axg PDM device to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/amlogic,axg-pdm.txt | 29 ------- .../bindings/sound/amlogic,axg-pdm.yaml | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt deleted file mode 100644 index 716878107a24..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt +++ /dev/null @@ -1,29 +0,0 @@ -* Amlogic Audio PDM input - -Required properties: -- compatible: 'amlogic,axg-pdm' or - 'amlogic,g12a-pdm' or - 'amlogic,sm1-pdm' -- reg: physical base address of the controller and length of memory - mapped region. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "dclk" : pdm digital clock - * "sysclk" : dsp system clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the pdm input. - -Example of PDM on the A113 SoC: - -pdm: audio-controller@ff632000 { - compatible = "amlogic,axg-pdm"; - reg = <0x0 0xff632000 0x0 0x34>; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_PDM>, - <&clkc_audio AUD_CLKID_PDM_DCLK>, - <&clkc_audio AUD_CLKID_PDM_SYSCLK>; - clock-names = "pclk", "dclk", "sysclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml new file mode 100644 index 000000000000..df21dd72fc65 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-pdm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG PDM input + +maintainers: + - Jerome Brunet + +properties: + compatible: + oneOf: + - items: + - enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm + - const: amlogic,axg-pdm + - const: amlogic,axg-pdm + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: PDM digital clock + - description: DSP system clock + + clock-names: + items: + - const: pclk + - const: dclk + - const: sysclk + + resets: + maxItems: 1 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +allOf: + - $ref: dai-common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm + then: + required: + - resets + + else: + properties: + resets: false + +unevaluatedProperties: false + +examples: + - | + #include + + audio-controller@ff632000 { + compatible = "amlogic,axg-pdm"; + reg = <0xff632000 0x34>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_PDM>, + <&clkc_audio AUD_CLKID_PDM_DCLK>, + <&clkc_audio AUD_CLKID_PDM_SYSCLK>; + clock-names = "pclk", "dclk", "sysclk"; + }; 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>; + }; From patchwork Mon Feb 6 15:34:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2302754wrn; Mon, 6 Feb 2023 07:39:26 -0800 (PST) X-Google-Smtp-Source: AK7set+DLmoZabUyN5QmW28e0als+P6XyshVt/u82nt9eWVWiBmZbFfCUxqY7EZEfPBuc18If7RV X-Received: by 2002:a50:ab15:0:b0:4aa:abdf:405a with SMTP id s21-20020a50ab15000000b004aaabdf405amr6288705edc.33.1675697966788; Mon, 06 Feb 2023 07:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697966; cv=none; d=google.com; s=arc-20160816; b=XPWteWUZJ+BuwTbnxrj9xGbr1F5h4I+fVxtclUblNPli4QeXEgkhU7WD431EYIEOFC baQWfGTDEtpdBQIPEXLe3NWjgUnGYBpcZYFjI2iqpNlQ0cGTEnvuJ+DUh7/PHHTiGV2G zr/ODp3jmDhChWssRIqUNLFJEMXBfsxl8R/AfKLcse78tWJkns9YGfqLcegp6sPWQbXp rCnD8P8fwOXkIPzHB0P58GRpqd1zRn2U98bLstOcZ0stweItqAdHlvoYdNkkzaM3/0Hf Z9gBIx4Q26PZlgXHCY8QnYnYZ3/M6g15iJVgPX4kMKPfo0Z28qr+WvRjwT5x3qvlgZxR 5LOg== 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=0lBSrvjf3cyT4RRbBVK5enJ7REZCr1oSf4WB5Ql0EWc=; b=v+IQO7Gg0ogSzpCbHJ4DA6aWVxqBgcab3SFZVhsvARtg15MBHsz9uNzB8zWsrtj2xk dvjiDVs/n/4qdyZjhHxsTcuBaseQD9sL3w+zdUyQXxt0OCargOk3VgKDK1MKY+OJ2LQo tqLOKIPswKFJhXS2jZvxxVcmBrZfQ+OqXxMsJpQliUVqu4wHY+VT4AOwUWBT7gZn81dT k26IC3UEhzQcTb7+KAL5EFYmstR/jJ34oOqgWCa4nR20Bd2jTsfM1XGZCevYNmB0IvKg xu56hescqWapfB3wuqR0tiO9xehyWjEMm4ByqRu0Xwf/HxrjaR2iWY0pl3aS2K/dbRUb xzUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=YHvM+plL; 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 es19-20020a056402381300b004a24475fdd4si11967826edb.376.2023.02.06.07.39.03; Mon, 06 Feb 2023 07:39:26 -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=YHvM+plL; 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 S231492AbjBFPh7 (ORCPT + 99 others); Mon, 6 Feb 2023 10:37:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231660AbjBFPhZ (ORCPT ); Mon, 6 Feb 2023 10:37:25 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9772B080 for ; Mon, 6 Feb 2023 07:36:24 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id a2so10485950wrd.6 for ; Mon, 06 Feb 2023 07:36:24 -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=0lBSrvjf3cyT4RRbBVK5enJ7REZCr1oSf4WB5Ql0EWc=; b=YHvM+plLw381A2A2MT7QOvNVDR0HQtu8RETa2oQ7H8qE4X5SYfWUsxIfeXOHA1SRqq cC8yUyxnxWXOidoy3NlBMk4umQobfq6DVuwwpme1AzMnToLU7Xd/jScj4TMaPEklhG+6 Pux1PK+aFU3FsF5r5Q8j0LE32477kwTGDUTJVHB8eKX2jaiB6IqZG5mUiWXbxbxAfPbz 7F4ozXCCf9wkyda2wtXAzYS8NiTSfCiT8wYi/gLCbPwAaaCmEZvaEOHrEwgZYcNBpZTY asRqhVRd5dp+6uuis/eFdTVAHU1qDmoTAwzmbYVj9bwWCy8otdl55Kzv7IQs9xlqhNj0 Q9Nw== 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=0lBSrvjf3cyT4RRbBVK5enJ7REZCr1oSf4WB5Ql0EWc=; b=Zi4DbhZiFBGyWQDR2tVQ0fCgb3kEp/JlI10W9XvmnFNqSM/0JkQtCi4AlYx8eYBSza ReTGJCR5+CTy77so8rY8hYI1xKNVyk96Ur5PPK4DUzTvanzqvXZ9yShwracbiOd8k317 fbz2znAjx5cWllS1E3TLHjgz7GWeHw58BqFGQJqx12ByeFCHzsIiPU1OgeVhldtWVC4A OXDVzfc/+dNAxG8BwRWmbwwg6WjFWNWfGdQ8qLRNktqhGKt7puThdKoDYPeWjc9LtHVJ UecmgaTJKQs9BGDVRJFkYTiL8HOLMozm2aIDpfssZPiiYHKSZq4ROy6TaytJ6DWS96v5 pF+Q== X-Gm-Message-State: AO0yUKVnf0a90EBC8yCZqbVCfaCG19r8H3MVYWJ8FhOOcXYfOwPfmFHB F6l2qQBM4yivTEtpD/+dQfnbyw== X-Received: by 2002:adf:f1cc:0:b0:2c3:ea64:425c with SMTP id z12-20020adff1cc000000b002c3ea64425cmr3475028wro.17.1675697701479; Mon, 06 Feb 2023 07:35:01 -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:01 -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 5/7] ASoC: dt-bindings: meson: convert axg spdif input to schema Date: Mon, 6 Feb 2023 16:34:47 +0100 Message-Id: <20230206153449.596326-6-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=unavailable 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?1757096671490755559?= X-GMAIL-MSGID: =?utf-8?q?1757096671490755559?= Convert the DT binding documentation for the Amlogic axg spdif input to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/amlogic,axg-spdifin.txt | 27 ------ .../bindings/sound/amlogic,axg-spdifin.yaml | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt deleted file mode 100644 index df92a4ecf288..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt +++ /dev/null @@ -1,27 +0,0 @@ -* Amlogic Audio SPDIF Input - -Required properties: -- compatible: 'amlogic,axg-spdifin' or - 'amlogic,g12a-spdifin' or - 'amlogic,sm1-spdifin' -- interrupts: interrupt specifier for the spdif input. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "refclk" : spdif input reference clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the spdif input. - -Example on the A113 SoC: - -spdifin: audio-controller@400 { - compatible = "amlogic,axg-spdifin"; - reg = <0x0 0x400 0x0 0x30>; - #sound-dai-cells = <0>; - interrupts = ; - clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, - <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; - clock-names = "pclk", "refclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml new file mode 100644 index 000000000000..a0bd7a5fb9b3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifin.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG SPDIF Input + +maintainers: + - Jerome Brunet + +properties: + compatible: + oneOf: + - const: amlogic,axg-spdifin + - items: + - enum: + - amlogic,g12a-spdifin + - amlogic,sm1-spdifin + - const: amlogic,axg-spdifin + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: SPDIF input reference clock + + clock-names: + items: + - const: pclk + - const: refclk + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + - interrupts + +allOf: + - $ref: dai-common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-spdifin + - amlogic,sm1-spdifin + then: + required: + - resets + + else: + properties: + resets: false + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + audio-controller@400 { + compatible = "amlogic,axg-spdifin"; + reg = <0x400 0x30>; + #sound-dai-cells = <0>; + interrupts = ; + clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, + <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; + clock-names = "pclk", "refclk"; + }; From patchwork Mon Feb 6 15:34:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2302281wrn; Mon, 6 Feb 2023 07:38:23 -0800 (PST) X-Google-Smtp-Source: AK7set94VUgxDIH3s8AWCMnCaMcIcqNIxxhGt2BjmyZFe8DYETVHjsdemBIPai5J8HyOVbVaSlrY X-Received: by 2002:a17:906:9610:b0:878:5e84:e1d6 with SMTP id s16-20020a170906961000b008785e84e1d6mr23937436ejx.75.1675697903628; Mon, 06 Feb 2023 07:38:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697903; cv=none; d=google.com; s=arc-20160816; b=jXzQnob857INXhIBoAdYSaNKdkloQRilh2zvJHZdneM+OAmMFJVLBPsHS3ygjWSanb DQfgYNw21xAzavwIu2g+5QMZuqZnQ0C8dHF0tyvpUgYCRc1HX9SgvNJtlE3VLdypZWp2 tTRLU+HoBWec6RJhe8rQptna6k2NIGG2bpDusZ0Co4gTKyOk7t0eNSDY+3q3wYlGldL8 Yitk+EGTbl5Kbjz4fk/m2iZ4i5I6Jrp3Xy+/ycpxp9iEKFXwtv3grJT+RCOqPL0ecqmo Jl115KTCYY5Alq7vt6Ph/jV7CUumNTLuYSuPEEXSntk2CTTOVO7STIUwUQLuY7Xz5rGF p81Q== 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=W8FN4EvykAI4IHl4CftNphEVB0wNAxrQh05VKdmQXhI=; b=aWHcnAkd+fmxNzlP+gYjmi3/1pGQhWhAOqKblz6cOjSkIVFZEEWRCaOMRmMdDwEViY xqhA8FvmecFETM+Hf+zNNNPgyzdG9vgD4960yIh+/+9lOACFOR3rjHxBSTiMlcNO+7mh xHL3Kd6RTaxzSTtGqNWI6n5t7fsdOR/IncCHXzy2JoqV2vL2AcsZByTu2qWOEF7XqOON MzaQum2OIkZLz85RnKofqtWPsuhH2vyEWanjfyEhJ1wJ0a2izTnI3aWIFJSQLHOtKfTd PKAcsSRTyStPgAGtIMLFMs7wPwkAkUY6SrCsxjO1EoXKFN3eW1VErmJPS7yJ+tsJS11g M2IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=uITFYSqU; 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 vf8-20020a170907238800b0087880aa5e39si9325828ejb.505.2023.02.06.07.37.59; Mon, 06 Feb 2023 07:38:23 -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=uITFYSqU; 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 S231646AbjBFPhg (ORCPT + 99 others); Mon, 6 Feb 2023 10:37:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbjBFPhR (ORCPT ); Mon, 6 Feb 2023 10:37:17 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DD172B0A0 for ; Mon, 6 Feb 2023 07:36:08 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id h16so10735278wrz.12 for ; Mon, 06 Feb 2023 07:36:08 -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=W8FN4EvykAI4IHl4CftNphEVB0wNAxrQh05VKdmQXhI=; b=uITFYSqUqgTIidcd8LPSMOTw2ZmKXAI7KBgKeOsy2BerfLW0io7swQkw+HoDvo6eq5 Dw8M9NeSttjleVMYaHHFzDuWQozgyw/dW3zVGer/ABF7wwLFgZVKR61ZXnlN+qlRG6Zy pI8CpKEhgrHmzF9n354GduIygtpF+6064V20DuNIntgczh9xPtOP55HGJY4tEYWrMLtT gqKkN8mdGu/uldfgydcvg24BqU4MIJ433HNUH+ghKJSCi71d+5sTfIQzuwynE6YPq5MD cVSrF7er8jx5U9QUkE9+Ssf6lSaFsc79zSAoyCT4ycIBBDqFmVH028QrXI+bfCFl/Q8o rVLg== 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=W8FN4EvykAI4IHl4CftNphEVB0wNAxrQh05VKdmQXhI=; b=Kl78Y2t0ayycurYtbv2NDGqL8Sw5XKHfMrjlM1BiRiNK1aHWJQTClZ0QMJddQ50xlU U8ZLOrRYJ/zxUYCyqRdJ1QIrKIpRJ74GHCb7rQVWqGBgzZ2ADhji3Sk2yo4TPu6qFcgJ nr/by4538kQN4dNVCUw+3bYWGMYo2pkK2cTjBd+s42kWrpOaRMsqrhr2t9HQARcJ6jm8 E0mdRzyZzMHZw/5UGmXBGMC9AcgT2k0sqYPzS8aIRzpBc7IgQpwnwMlkPDnMiXxz8BMg aWNod7jkmR5DdFcROfrXuykyJB2RB+DfYRfPWzyATQEfhgwTxdE/TDCNzMSmopilIuHC Nfrg== X-Gm-Message-State: AO0yUKUkJX054vKt58C3RcVmFpvghpg/WOhaGQNt1KMwCok8mybN0qXp EFpbR13eBEwsqm64dWwJ9j92Qw== X-Received: by 2002:adf:e0c3:0:b0:2c3:d808:e82f with SMTP id m3-20020adfe0c3000000b002c3d808e82fmr11851675wri.17.1675697702228; Mon, 06 Feb 2023 07:35:02 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:35:01 -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 6/7] ASoC: dt-bindings: meson: convert axg spdif output to schema Date: Mon, 6 Feb 2023 16:34:48 +0100 Message-Id: <20230206153449.596326-7-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?1757096604678896951?= X-GMAIL-MSGID: =?utf-8?q?1757096604678896951?= Convert the DT binding documentation for the Amlogic axg spdif output to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/amlogic,axg-spdifout.txt | 25 ------ .../bindings/sound/amlogic,axg-spdifout.yaml | 79 +++++++++++++++++++ 2 files changed, 79 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt deleted file mode 100644 index 28381dd1f633..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Amlogic Audio SPDIF Output - -Required properties: -- compatible: 'amlogic,axg-spdifout' or - 'amlogic,g12a-spdifout' or - 'amlogic,sm1-spdifout' -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "mclk" : master clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the spdif output. - -Example on the A113 SoC: - -spdifout: audio-controller@480 { - compatible = "amlogic,axg-spdifout"; - reg = <0x0 0x480 0x0 0x50>; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, - <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; - clock-names = "pclk", "mclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml new file mode 100644 index 000000000000..15be8dae9398 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifout.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG SPDIF Output + +maintainers: + - Jerome Brunet + +properties: + compatible: + oneOf: + - const: amlogic,axg-spdifout + - items: + - enum: + - amlogic,g12a-spdifout + - amlogic,sm1-spdifout + - const: amlogic,axg-spdifout + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: SPDIF output master clock + + clock-names: + items: + - const: pclk + - const: mclk + + resets: + maxItems: 1 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +allOf: + - $ref: dai-common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-spdifout + - amlogic,sm1-spdifout + then: + required: + - resets + + else: + properties: + resets: false + +unevaluatedProperties: false + +examples: + - | + #include + + audio-controller@480 { + compatible = "amlogic,axg-spdifout"; + reg = <0x480 0x50>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, + <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; + clock-names = "pclk", "mclk"; + }; From patchwork Mon Feb 6 15:34:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 53394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2302446wrn; Mon, 6 Feb 2023 07:38:44 -0800 (PST) X-Google-Smtp-Source: AK7set+b1D/A7cBfD6GBuLMoy7IdJqpJWUtdOIPIVVtKmsfIAqip7OZi5dW1X+nlYAZntpGqipVo X-Received: by 2002:a17:907:8b91:b0:88c:24f0:2db2 with SMTP id tb17-20020a1709078b9100b0088c24f02db2mr21572399ejc.4.1675697924129; Mon, 06 Feb 2023 07:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697924; cv=none; d=google.com; s=arc-20160816; b=V5tRMrz+4xVwyjJupzWH9zHFCnKvPChmMzKfjeoF0SYUVNrq2z+4twZ3ffuxXl+YVH 45um9Vl4LsEr/nMNHeShSH4UEXLRn9fgPFLqWEnVERWPU02iQlbR9fTo0HYELOVvq8Do PkCC6hcjq228OCOHbyqIadIYSFVz+ElFD8Ce6wf6mm893dBL4R0QW02+4pUJmCUAmabX YPX9gGRBqc3MHIjap1Asmw60vpFtdVHd2Ds1syCUttLQJK8S1zCxoGLTSHaiVX8qUk7a r3d+KMMxBvKsDyayzdUcr5/L/2eWtXsANTPzjmMmVeb0C8JQ/OQlhhKja00OvCkzy6cE 3I7w== 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=TSetshJjjOCUEIKAC3y6Jd2w3OFuVdwQxsqwKM0nNPk=; b=OurQGK98rVO7cIl3Lpy9cLeoATLtEwwG9Rz9JIkSCD4D0mg0SpokYVlTNmTK8oJT0x gJLIDWGJdFXblqcFKYGEa4ErJHn5q9wOtRciru0GrBJPXWysb48ySPGh3UMRE3PNMK8x KMffXg7/ofWZEvRYK37TRwCRZKUInlXC4R0LiKyfTPQ7aaaozMdMkzXVcVTogcQcKjCD Fioe/8r95xAU6HH4NaYDocNa9dnzI969Vh9jOkEhdVqU7JnxYfVlvsZ3GmsrDqTUJ7hE fjS8coymwdOWVY6R+boj4QeYK1kvO5TaF16AGHDD0pllZz1Xkj8CKwI5XxY98wFDaTnN oYCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="DF2kl/z4"; 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 jr21-20020a170906515500b008879a229030si11752450ejc.292.2023.02.06.07.38.21; Mon, 06 Feb 2023 07:38:44 -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="DF2kl/z4"; 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 S230470AbjBFPhm (ORCPT + 99 others); Mon, 6 Feb 2023 10:37:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbjBFPhS (ORCPT ); Mon, 6 Feb 2023 10:37:18 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4FE22B0B7 for ; Mon, 6 Feb 2023 07:36:08 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id h3so2924309wrp.10 for ; Mon, 06 Feb 2023 07:36:08 -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=TSetshJjjOCUEIKAC3y6Jd2w3OFuVdwQxsqwKM0nNPk=; b=DF2kl/z4u0Sf4GSrWNz7iII+vAY/9yZbW9EGuA/Y7QCb4I2P6BuqVruEXU6FllIkqr WRQWVp0XisQCu4yeSvlJ3WIeon4DNVRfx31I110Ta/d+BWCBrVF3h47eLMuJWGPzYCkW JSDmie+fzeirMCfn60qEyj02s9XmnAfyLPDQUdqjxM7btnUnU9V7IXRbZB1hrRrEQJSA CW/ONGkFid9kVY/swtYfrDEdt4fGATKh4t4jQ3ewM3Nb6X9yFW6uyEteNOCvJwV4yDhR UEFDJSAfiSQOI68jntVNZTGYyZm13Jh9HnVsUEf9+DyOyTLYpqBXXII1uJ9s36a5KI+d w18g== 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=TSetshJjjOCUEIKAC3y6Jd2w3OFuVdwQxsqwKM0nNPk=; b=LtVVkAzH2wSOi3Nd83leVQoP5LX1mkU2jaS9ezVXPoY2lMEz5T3yslhEw1BazHtQeM TfDT+BcKcHQ7QyPJkO8x00z2na5G6D0RoQjiAXBsp0UldoRX+AxRY7+gtcGEp5o+zdhX 9VnORI3AEfE5WTwvlPv0Vicydx7zWniL5epPioLNYExVV3B/Je33HLf1OvUcrx4nGUwQ AAyhWK7ollXB1KiYK3ARxd28T1rvVkGVEzfmTpGft3OzSkjdE4FKgj3wXZaySEGm9nDX YnM6tErdg+qIAfLtuoiX3S6v16L4jwojfLnKnKyHkJHJ6Z6iZOqkVC2xNHb7qJslmbap q42g== X-Gm-Message-State: AO0yUKUsvj6ij1cRhFumouirsejAB9+4y9Gmp0ATYuUr/EyQC7637amj YiBz714mgJItcH412rASJnAU0XB4ledWNJFK X-Received: by 2002:a5d:6d05:0:b0:2bf:dd84:adf6 with SMTP id e5-20020a5d6d05000000b002bfdd84adf6mr21966221wrq.60.1675697702967; Mon, 06 Feb 2023 07:35:02 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:35:02 -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 7/7] ASoC: dt-bindings: meson: convert axg sound card control to schema Date: Mon, 6 Feb 2023 16:34:49 +0100 Message-Id: <20230206153449.596326-8-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=unavailable 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?1757096626877775237?= X-GMAIL-MSGID: =?utf-8?q?1757096626877775237?= Convert the DT binding documentation for the Amlogic axg sound card to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-sound-card.txt | 124 ------------ .../sound/amlogic,axg-sound-card.yaml | 183 ++++++++++++++++++ 2 files changed, 183 insertions(+), 124 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt deleted file mode 100644 index 80b411296480..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt +++ /dev/null @@ -1,124 +0,0 @@ -Amlogic AXG sound card: - -Required properties: - -- compatible: "amlogic,axg-sound-card" -- model : User specified audio sound card name, one string - -Optional properties: - -- audio-aux-devs : List of phandles pointing to auxiliary devices -- audio-widgets : Please refer to widgets.txt. -- audio-routing : A list of the connections between audio components. - -Subnodes: - -- dai-link: Container for dai-link level properties and the CODEC - sub-nodes. There should be at least one (and probably more) - subnode of this type. - -Required dai-link properties: - -- sound-dai: phandle and port of the CPU DAI. - -Required TDM Backend dai-link properties: -- dai-format : CPU/CODEC common audio format - -Optional TDM Backend dai-link properties: -- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks -- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks - When omitted, mask is assumed to have to no - slots. A valid must have at one slot, so at - least one these mask should be provided with - an enabled slot. -- dai-tdm-slot-num : Please refer to tdm-slot.txt. - If omitted, slot number is set to accommodate the largest - mask provided. -- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted. -- mclk-fs : Multiplication factor between stream rate and mclk - -Backend dai-link subnodes: - -- codec: dai-link representing backend links should have at least one subnode. - One subnode for each codec of the dai-link. - dai-link representing frontend links have no codec, therefore have no - subnodes - -Required codec subnodes properties: - -- sound-dai: phandle and port of the CODEC DAI. - -Optional codec subnodes properties: - -- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt. -- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt. - -Example: - -sound { - compatible = "amlogic,axg-sound-card"; - model = "AXG-S420"; - audio-aux-devs = <&tdmin_a>, <&tdmout_c>; - audio-widgets = "Line", "Lineout", - "Line", "Linein", - "Speaker", "Speaker1 Left", - "Speaker", "Speaker1 Right"; - "Speaker", "Speaker2 Left", - "Speaker", "Speaker2 Right"; - audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", - "SPDIFOUT IN 0", "FRDDR_A OUT 3", - "TDM_C Playback", "TDMOUT_C OUT", - "TDMIN_A IN 2", "TDM_C Capture", - "TDMIN_A IN 5", "TDM_C Loopback", - "TODDR_A IN 0", "TDMIN_A OUT", - "Lineout", "Lineout AOUTL", - "Lineout", "Lineout AOUTR", - "Speaker1 Left", "SPK1 OUT_A", - "Speaker2 Left", "SPK2 OUT_A", - "Speaker1 Right", "SPK1 OUT_B", - "Speaker2 Right", "SPK2 OUT_B", - "Linein AINL", "Linein", - "Linein AINR", "Linein"; - - dai-link@0 { - sound-dai = <&frddr_a>; - }; - - dai-link@1 { - sound-dai = <&toddr_a>; - }; - - dai-link@2 { - sound-dai = <&tdmif_c>; - dai-format = "i2s"; - dai-tdm-slot-tx-mask-2 = <1 1>; - dai-tdm-slot-tx-mask-3 = <1 1>; - dai-tdm-slot-rx-mask-1 = <1 1>; - mclk-fs = <256>; - - codec@0 { - sound-dai = <&lineout>; - }; - - codec@1 { - sound-dai = <&speaker_amp1>; - }; - - codec@2 { - sound-dai = <&speaker_amp2>; - }; - - codec@3 { - sound-dai = <&linein>; - }; - - }; - - dai-link@3 { - sound-dai = <&spdifout>; - - codec { - sound-dai = <&spdif_dit>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml new file mode 100644 index 000000000000..b7459fad0e7f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml @@ -0,0 +1,183 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AXG sound card + +maintainers: + - Jerome Brunet + +properties: + compatible: + const: amlogic,axg-sound-card + + audio-aux-devs: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: list of auxiliary devices + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. + + audio-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + A list off component DAPM widget. Each entry is a pair of strings, + the first being the widget type, the second being the widget name + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + +patternProperties: + "^dai-link-[0-9]+$": + type: object + additionalProperties: false + description: | + Container for dai-link level properties and the CODEC sub-nodes. + There should be at least one (and probably more) subnode of this type + + properties: + dai-format: + $ref: /schemas/types.yaml#/definitions/string + enum: [ i2s, left-j, dsp_a ] + + dai-tdm-slot-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Number of slots in use. If omitted, slot number is set to + accommodate the largest mask provided. + maximum: 32 + + dai-tdm-slot-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Width in bits for each slot + enum: [ 8, 16, 20, 24, 32 ] + default: 32 + + mclk-fs: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Multiplication factor between the frame rate and master clock + rate + + sound-dai: + maxItems: 1 + description: phandle of the CPU DAI + + patternProperties: + "^dai-tdm-slot-(t|r)x-mask-[0-3]$": + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 32 + description: | + Transmit and receive cpu slot masks of each TDM lane + When omitted, mask is assumed to have to no slots. A valid + interface must have at least one slot, so at least one these + mask should be provided with an enabled slot. + + "^codec(-[0-9]+)?$": + type: object + additionalProperties: false + description: | + dai-link representing backend links should have at least one subnode. + One subnode for each codec of the dai-link. dai-link representing + frontend links have no codec, therefore have no subnodes + + properties: + sound-dai: + maxItems: 1 + description: phandle of the codec DAI + + patternProperties: + "^dai-tdm-slot-(t|r)x-mask$": + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 32 + description: Transmit and receive codec slot masks + + required: + - sound-dai + + required: + - sound-dai + +required: + - model + - dai-link-0 + +unevaluatedProperties: false + +examples: + - | + sound { + compatible = "amlogic,axg-sound-card"; + model = "AXG-S420"; + audio-aux-devs = <&tdmin_a>, <&tdmout_c>; + audio-widgets = "Line", "Lineout", + "Line", "Linein", + "Speaker", "Speaker1 Left", + "Speaker", "Speaker1 Right", + "Speaker", "Speaker2 Left", + "Speaker", "Speaker2 Right"; + audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "TDM_C Playback", "TDMOUT_C OUT", + "TDMIN_A IN 2", "TDM_C Capture", + "TDMIN_A IN 5", "TDM_C Loopback", + "TODDR_A IN 0", "TDMIN_A OUT", + "Lineout", "Lineout AOUTL", + "Lineout", "Lineout AOUTR", + "Speaker1 Left", "SPK1 OUT_A", + "Speaker2 Left", "SPK2 OUT_A", + "Speaker1 Right", "SPK1 OUT_B", + "Speaker2 Right", "SPK2 OUT_B", + "Linein AINL", "Linein", + "Linein AINR", "Linein"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&toddr_a>; + }; + + dai-link-2 { + sound-dai = <&tdmif_c>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + dai-tdm-slot-rx-mask-1 = <1 1>; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&lineout>; + }; + + codec-1 { + sound-dai = <&speaker_amp1>; + }; + + codec-2 { + sound-dai = <&speaker_amp2>; + }; + + codec-3 { + sound-dai = <&linein>; + }; + }; + + dai-link-3 { + sound-dai = <&spdifout>; + + codec { + sound-dai = <&spdif_dit>; + }; + }; + };