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"; + };