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