From patchwork Thu Feb 2 18:36: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: 52142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp414119wrn; Thu, 2 Feb 2023 10:58:55 -0800 (PST) X-Google-Smtp-Source: AK7set8aMFPiYhWuCdzx2gqgcST8EE0qx0gyMmHXsYqYeyJtuZBZhBB9nYpoEcAY7iBetdDHAc9S X-Received: by 2002:a05:6a00:2181:b0:593:407b:11f0 with SMTP id h1-20020a056a00218100b00593407b11f0mr7999145pfi.34.1675364335075; Thu, 02 Feb 2023 10:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364335; cv=none; d=google.com; s=arc-20160816; b=A2bi0FEGcGfmBldajDz457pq18ED64iBEwH98P+x+KfQr//9hJTl7B69p3/sj4gUED GYQbu+k2ZFNf5l+NM1cF/NgwTVOP+6y97/xRnBvogDrtsyRa4tGxPvlKQc7afgzFbUEv cfPnusA5sQOdYu7PRmU6P4PBbV2PXsMfypDsLxeyHBmVTlPkq2bckVMYvCCH8ZI8NU8O 0LLlS1/uMWQNv/SBmZRxgxM4O8iVOUtitGo7BjZUL/TsfI9Bo4OcaxTgbZh9OrDmbnQs bAGovNPwDUCmW7oItqMDKOAYzPoy3xN+DO/QhQapWi+la9U9FEr/xBtwtLNmqcmr5D+V E4fw== 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=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=cqEihm6W4Z4YbmcYdjslZ4fNA3QbAVCs2CjuJnWE8oQI1p0nQr6aNmsxpaRVPgeU4/ TYVitvvNGy0lcBaE3mkImER3PpJsAhN4xFKXF28p0g4+U5o0r4QqkSMSKiURP/NFP8uD ywpwM5MopLPWVY30ik2IzSqrQvK+ZJEOKyKwdz3+b7bm+7JruoQ8SbIk7AAq8sETRzWg Qtbtx/Pv1vpYmeUtFjl+R0mGC2Ja2TWUWBCO2Fmp9KXCqQgUVcuIVlnwLsfw4XfKfw8F 5tD5+4FsagFG9h4pHtiR5M5p9mbTSkGB25RTAt7efasm6LQhezeubErcQZtO4XRZ9vmV xK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=FMUtGEoR; 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 k6-20020aa78206000000b00593ad652779si15343pfi.361.2023.02.02.10.58.42; Thu, 02 Feb 2023 10:58:54 -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=FMUtGEoR; 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 S232931AbjBBSiZ (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232712AbjBBSiQ (ORCPT ); Thu, 2 Feb 2023 13:38:16 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C9EFBBA7 for ; Thu, 2 Feb 2023 10:37:41 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id y1so2575521wru.2 for ; Thu, 02 Feb 2023 10:37:41 -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=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=FMUtGEoR5wyvukeWTuN6esPODhE46k/rhSExRP7aKN1Ra7+p49TL2Ncnhq5W86gmyh YOKEodOntnVZyvdzh9rcLgnpcIb7hY/g8lFQoZ0PvE7j2+HxcLJmVewOtx3zMdj45Guc M2U7S+V4Mgjf2GkFNqh3JsxXuLqBQBY9MmCDJGn9NkOJkVZkWBVTgMNUc8H1dIg4IHA/ UCISsTW6FGVWUALFZpSZDBd6bZLzYlmM+h7Oam7TBz+T+2KcA3RTey4LdwPO9kthzgyo QBWLtHXn64XSfGpkNz21INQYWpm33vvWlutGKdXAYs2B3Abfl70vmWdqin4zd3sV/PMZ P/UA== 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=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=fgfcp9Kc2Y53/SooHMUoVyq/AEWy+OyoaG9Gjkmbw/KIc3c+KOTQlDH0bE0F0X12Wr UlZmAsyUSjS4fJDSsrU8p0ej7lHBzM2BKcv4AQxCt380/VVaS5ZaC0n48j4YThGuqMQ4 SDhEON6hMckjaFncuNKGfD1b9Ios+4c23F1H2a6p9nJyioML0ZRPgzLohBe38aypqCh9 n4TlEsw4e1YtZewaskFRYj7XAhepxuTzwq+Q1Gl0ZPLR8Py23kKmZ4lEjH38SsgVkGdC SnZ7aqgySBtXRVNGu8PrO3p5Ms8mV/kQ8V84tmWvqUA8TymeTKKmerk0t42tvuYQ0AmN Qguw== X-Gm-Message-State: AO0yUKV/+vXwLL/KPXoYrdB8tnz5a+AuB20DkKCPgDZo/bwr05MR5I2b H4mJKO/+ygvZrxj5y+O6271FWw== X-Received: by 2002:a05:6000:1843:b0:2bf:e7a0:8b63 with SMTP id c3-20020a056000184300b002bfe7a08b63mr8342067wri.5.1675363057949; Thu, 02 Feb 2023 10:37:37 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:37 -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 4/9] ASoC: dt-bindings: meson: convert axg tdm formatters to schema Date: Thu, 2 Feb 2023 19:36:48 +0100 Message-Id: <20230202183653.486216-5-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?1756746832640951793?= X-GMAIL-MSGID: =?utf-8?q?1756746832640951793?= Convert the DT binding documentation for the Amlogic tdm formatters to schema. Signed-off-by: Jerome Brunet --- .../sound/amlogic,axg-tdm-formatters.txt | 36 -------- .../sound/amlogic,axg-tdm-formatters.yaml | 90 +++++++++++++++++++ 2 files changed, 90 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..f618724411de --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml @@ -0,0 +1,90 @@ +# 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 + +allOf: + - $ref: component-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - 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 + +required: + - compatible + - reg + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-tdmin + - amlogic,sm1-tdmin + - amlogic,g12a-tdmout + - amlogic,sm1-tdmout +then: + properties: + resets: + items: + - description: Dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + #include + + tdmout_a: 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"; + };