From patchwork Thu Feb 2 18:36: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: 52145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp415532wrn; Thu, 2 Feb 2023 11:01:18 -0800 (PST) X-Google-Smtp-Source: AK7set9IGvm8sZ9VY/M4W2nmVKbTTgNzfa6x/KtvZit/QIEGTNp3FB6+9uKnXgUk2rnpzwpV4EYg X-Received: by 2002:a05:6a00:290f:b0:593:903a:17fd with SMTP id cg15-20020a056a00290f00b00593903a17fdmr6592125pfb.0.1675364478180; Thu, 02 Feb 2023 11:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364478; cv=none; d=google.com; s=arc-20160816; b=hS61IP6QEm6SldBp1BeWo+f4x9e/Th7xn8ucqOEqNIqYznZyeOSgYgv7+ocWFeqWRL oIKN9okGHaaIjOLJ6TUrhIVJMJ1oM5+oMI7yyIMsNTnXRQ9tZH+WBNfprgNxP/1SwyKc x3D3kfhCnYgFzzvFUtL2yum857s1sAgzqUsndC/muhEiLQT2OCOgP41VbOZQnUYsZN8K cX7XQHnd3dgjIN2AVvqT7h28DAVn/RB/mY4YAYjzcJ+zuWVoqdxBnQGC4jueqSABCwfg smkg6dZoi1gEe1L2buGoik61xWBf+rkJIZviK7ggfTTxgr7OvGRXJPPtZdg0jfMHTG/F RDEw== 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=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=X/aggJZxs2jCoxeLS+t9JEMtZGOWIE1itxKDxuR7aZyO/jLnFlV1o33LZej9ARX7Wm 4JgW6AjqqQDVtdZZybAdUdXIsbGn0jhy/rvETrofDDIvXOkqvJw4AkK1YHw0U4y3HDvZ keQJhEXSY9LnSj/viCLeUsi6j/quwoRO44FffGbBlQIYXiV4ayttEiR7hKljf/lnZk9P 6q7kuQq0ZZvH5ZHwAgzE1T9iHxSVB74/SRNNHP3p+RotjOPDJ9g0P2CKkK6JchA8BXYK HqEI4FGAaCwsKT24+j73dpNO2eEXvh0WGXzJoyv09HXPHAgnpVmarB+cm/De54wfKEvO omMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=K6j+Xbgi; 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 64-20020a620543000000b0053e8d0c9909si42663pff.221.2023.02.02.11.01.03; Thu, 02 Feb 2023 11:01: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=K6j+Xbgi; 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 S232870AbjBBSib (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232815AbjBBSiV (ORCPT ); Thu, 2 Feb 2023 13:38:21 -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 1C3DEBBAA for ; Thu, 2 Feb 2023 10:37:44 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id q5so2606474wrv.0 for ; Thu, 02 Feb 2023 10:37:44 -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=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=K6j+XbgiXMKA4me6MPCQUDOi7uYQTQpYaO+uCV6lbFgsRH3NnCqmx/HSMYzBbP0FlP 1AX9OXdTocgEAi76fVpp4BCazKbE2kI5j8A9zZtINn7iOm1Wr92dIs0/JqCWUObBn5sv bP6wzmFdk6YVVQrNM7TkU2WBJHqrrL1tnaIzriIckujVTXHqidrL3x7Rn8iBX60PMHRj wSLX5jlAefjq8ul/YUxbNBo4htf15B6FmN0qBCKFK8Map+JQX7NXB1YP/OY0fHb/xwSh fSog8uAtx8A0RL5EPgPudL90JFs0XWQb+xQrc960qoLDq6frjJutDeJAmNXLbv8ft0Zm PZEw== 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=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=fUglRJpeXuphUFEkc8aM65/Mr3bv7jvfz9Q34KJ6z+5OkqLx0WjLbZSVqbYhdOYrkS mllAmwlnk+8e5Hwk4A9Ankq0ujmUJQdXHdUUbBtOUl5mP2f02XzkPFNpwHh0zwb6wDNa U0KWQIp+qSdpBAl1GyGEEYNvitgezgbHJg0wipXyeH6SwErD6aeDKFwT6KI1pqVHbYdy rBXkp90YVYqOPXbIUpVHYxKMRY/XXzY1H73Pk5NyjHC/cxLeKM/cZKZWu3qpAJaILpCc MOq4RIB33NTnWjzsRltRYnAeCOJNL4ok3sRrScctiIAKmgDpU5AkcrMYQmEzfdq17eyQ gDnA== X-Gm-Message-State: AO0yUKX/0JTqpW9/nhxlXZ6KitzhyKmhhYcjeM2B224/XK50tQWdujbd dSN8JYGlQWeNJrm89k/aDF8qCA== X-Received: by 2002:adf:c70b:0:b0:2bf:9478:a91d with SMTP id k11-20020adfc70b000000b002bf9478a91dmr6840276wrg.39.1675363061634; Thu, 02 Feb 2023 10:37:41 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:41 -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 5/9] ASoC: dt-bindings: meson: convert axg pdm to schema Date: Thu, 2 Feb 2023 19:36:49 +0100 Message-Id: <20230202183653.486216-6-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?1756746983364403300?= X-GMAIL-MSGID: =?utf-8?q?1756746983364403300?= Convert the DT binding documentation for the Amlogic axg PDM device to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-pdm.txt | 29 ------- .../bindings/sound/amlogic,axg-pdm.yaml | 86 +++++++++++++++++++ 2 files changed, 86 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..d3da2f8ba7b1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.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-pdm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG PDM input + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm + - const: + amlogic,axg-pdm + - items: + - 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 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm +then: + properties: + resets: + items: + - description: Dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + + pdm: 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"; + };