From patchwork Thu Feb 2 18:36:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52140 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp410383wrn; Thu, 2 Feb 2023 10:50:24 -0800 (PST) X-Google-Smtp-Source: AK7set+8p2a5AwDELzzXYNzl0RnPlFJeUOXW49W3Z73/qIfFGpCyvYXdC7sLEM4diz9aTXyZYTSJ X-Received: by 2002:aa7:9618:0:b0:58b:c3b3:d3dd with SMTP id q24-20020aa79618000000b0058bc3b3d3ddmr6562215pfg.21.1675363824341; Thu, 02 Feb 2023 10:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675363824; cv=none; d=google.com; s=arc-20160816; b=guy6CkI4QuWQzv8TV6pfeDj9+DqAo1yMAh2MW6P5nQQ8z/kRK8T69paJax6sSP9mZh lAJAg4Zm/3RSpereWpXz9sQJjg1yb8DlSZr5tV8S+899AF6S2P17+ZmyzUs6oEAn9WXy Eq9onC5Kh74jw4Gh1u8xiq04XmpOy8gKneGmyRFxxs/B3ecmWo9gieZAdzEHCqxG40R8 MEH/vw4NEmiXaN0MKP1ddaHe2tDawSe3F7TBo7VWS7xN168Z8aUJ9ettwlOLuqyBsEhE HHsWmtuCl4uzLCBnVVbzoKXX58Xxt4KPiW3KJ7kmk4UAmhzVj8430AgRO4Idgo0oVV8r DRwg== 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=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=eJpttLy7rjFgmG/CUOi8zbX6sKiRxZsJlz5ZVKkUmwl7TC+pB/1qmf1w0oTfpm2ekJ ZU4w+cfDUYBGwqGufNDr4Dzx7teiCwx3QI07SqNPZ/WuD5yiOJPqV813Vcex3ZUTFf1a OvaEaIvWo7s8Xg2ZKBbjn8G0+uCfmjtEh7xkV7PyZfZip3BnRj85vYNPoDDpUN1nudyB QzBX6gFZD5V9rddBulQxv9mnTF8zKh3nf0oVlwDRldEdPNQkEkQXyBRUPR6PujP1a7kG Q6ctzsNlKGahjUG3GMoU+2Cvl+QL06JzENlf/6QXaRmkMeOYRI1T8wMaNMvPHnFBYt66 YJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Ol+dWYPU; 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 u17-20020a62d451000000b00593dd54be42si34439pfl.213.2023.02.02.10.50.11; Thu, 02 Feb 2023 10:50:24 -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=Ol+dWYPU; 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 S231954AbjBBSip (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232957AbjBBSi2 (ORCPT ); Thu, 2 Feb 2023 13:38:28 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662007ECB for ; Thu, 2 Feb 2023 10:37:58 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id d14so2545267wrr.9 for ; Thu, 02 Feb 2023 10:37: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=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=Ol+dWYPUCPY2dBcbd6w6cExLMsMOrobov9S0aUXQoGZ5H47VaMO+UiujxXMtAhNA+F IxHEFgfw3nkxmtX5CcE4YxDlelZCEEm7uLRwyEgPQ5uTZZdNAbPXNL6U33T89LJfxQ4O ZzPmQV9FaIdMksGzccnlyJs6l+clq9ECrJOcnYm5cRI0W7YVY4bpJKbRfO0xHXO6Wcwb YLlcXWsz2N4Bzm6JQnwII4mLiMnU+eCil6OYac7GW//Crrdid3R9mfeG3+Z6n6nuHcQZ 6WQVO4QASUJMJ+9dcz6TzfGzw2eE9H8xEbaTGDfiQmPevqZeNSHM7JKYq9Hc9c8Vh0Q6 W0ww== 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=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=y3ZuqMkJXpLhC+sgnN3k2YDZMbqgwbEGOotLxzPaU7CZTP3EybVpe74mHXdjKPTaml crIWU3pZoNdJc7VoxVeEe4SpHEhV4fOA7Dylzzko6EjWEe5O195jWmnnKphwK8NlZm2p 8lI651cxcofcGvdgq0Ujt7mfRV1R6tMqzyshcL4u4sEwdUXsaMbI9FPX9l69iOmxuewr IYa3aLJNx/2WRSQGB1TJcM4faONr8Y4mb7cLD0/lVANtx4FQpjWz7PmVXuyB38Khue2X sv1EdvhT/L43UgR/aqGDhE/ogjaOR89s8SJhW4RwJaF1JznvW8FpRp/x3mZXJXvJJIN7 JtoQ== X-Gm-Message-State: AO0yUKVPHWtxWzp5P8kukbkQwz7mW1SGKwqlCdq7J29rPsau7rlEikqo yE3g24VYSj/GsaWWJE3GOggLig== X-Received: by 2002:a5d:4bca:0:b0:242:800:9a7f with SMTP id l10-20020a5d4bca000000b0024208009a7fmr6275648wrt.65.1675363073190; Thu, 02 Feb 2023 10:37:53 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:52 -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 8/9] ASoC: dt-bindings: meson: convert axg spdif output to schema Date: Thu, 2 Feb 2023 19:36:52 +0100 Message-Id: <20230202183653.486216-9-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-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?1756746297712487375?= X-GMAIL-MSGID: =?utf-8?q?1756746297712487375?= Convert the DT binding documentation for the Amlogic axg spdif output to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-spdifout.txt | 25 ------ .../bindings/sound/amlogic,axg-spdifout.yaml | 83 +++++++++++++++++++ 2 files changed, 83 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..c661ce7f8b9d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml @@ -0,0 +1,83 @@ +# 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 + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - 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 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-spdifout + - amlogic,sm1-spdifout +then: + properties: + resets: + items: + - description: dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + + spdifout: 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"; + };