Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3577091iog; Mon, 27 Jun 2022 20:38:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzOK1pjAC86vGlWTQyPSFetqQJhB4iWnFvU2dBO5gbvlYfiMZ9wPwKK+zgXtlMDMsfxPaS X-Received: by 2002:a50:fb9a:0:b0:435:6c0e:3342 with SMTP id e26-20020a50fb9a000000b004356c0e3342mr21256304edq.337.1656387538379; Mon, 27 Jun 2022 20:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656387538; cv=none; d=google.com; s=arc-20160816; b=lMFT5eJlxU+SMPlHCi+ljPlNpamiaPcrJT0XzEUVGlO6ePks6+bA9CWa9x/iWm4c6X EIu2qfkD3Zj10a+uclVeooKf3+qQZRNDxmnbq8nI7fc+39MKyjwZBCq5Tb3anLi11FGc l5G145njC9nymoTiCHk5X4AphfHCmMpaxJoDz2RNEEhjJkDiWabNUprz3jCxJMn7LT5I 8Va0SoL/FZqzIu9xsdr1wqLTxIBpfqt3K5fDscWrochFeR6UxhEGhdhzIOEQTteLmPQD zS2djhdKdnw1zWvSQjSxyT/OGSPrUSkPL1INu2YLsychx1JqwBVYAxKu/Z94s2FxlnHo YpKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=K7UgSIUdVkAuiGJBqLF/gA4kMeDuyZ3ZmcUKyKrbr3Y=; b=ok7+ub0HDzyuhP1jg0RknJ8QitTSJvGOooJigU0pYndkqPNvTGx6CZrp373veeYtcE BqqkB8rI4f5naupfLUFwfalFPAlMWXHxs74N10XkGPzTneQ5YWjAsJ/tq5KuEY3eroAn b7tAw8D8lSxjzMjZqQfeOd6yfMLsRCW9ZxGawThjGwWISgaF2BbTqSkztWoaR1pHrCfb 2Sd2xXYLqUoo8vjedW2LzaoQ//mwwIWQg0wXgzTjh0DuZz5LC55n02vXlpiO/tEbR6J6 FWWIdalM4VuDTXc6ylaGVTU9EKvPPn0dGQL1Z8esvjSQT23Wn+JT6SpZuPxA0ql9WKcg rpoQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a056402359300b004358b1a8fabsi16282289edc.154.2022.06.27.20.38.31; Mon, 27 Jun 2022 20:38:58 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233521AbiF1D2S (ORCPT + 99 others); Mon, 27 Jun 2022 23:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbiF1D2B (ORCPT ); Mon, 27 Jun 2022 23:28:01 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDF1E2529E; Mon, 27 Jun 2022 20:27:57 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 21E522025A6; Tue, 28 Jun 2022 05:27:56 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B257B2025A1; Tue, 28 Jun 2022 05:27:55 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id C1C101820F45; Tue, 28 Jun 2022 11:27:54 +0800 (+08) From: Shengjiu Wang To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: shengjiu.wang@gmail.com Subject: [PATCH v3] ASoC: dt-bindings: fsl,micfil: Convert format to json-schema Date: Tue, 28 Jun 2022 11:13:25 +0800 Message-Id: <1656386005-29376-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Convert the NXP MICFIL binding to DT schema format using json-schema. Signed-off-by: Shengjiu Wang --- changes in v3 - fix the issue with make dtbs_check changes in v2 - add decription of interrupts. .../devicetree/bindings/sound/fsl,micfil.txt | 33 ------- .../devicetree/bindings/sound/fsl,micfil.yaml | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 33 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.txt create mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.yaml diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.txt b/Documentation/devicetree/bindings/sound/fsl,micfil.txt deleted file mode 100644 index 1ea05d4996c7..000000000000 --- a/Documentation/devicetree/bindings/sound/fsl,micfil.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP MICFIL Digital Audio Interface (MICFIL). - -The MICFIL digital interface provides a 16-bit audio signal from a PDM -microphone bitstream in a configurable output sampling rate. - -Required properties: - - - compatible : Compatible list, contains "fsl,imx8mm-micfil" - or "fsl,imx8mp-micfil" - - - reg : Offset and length of the register set for the device. - - - interrupts : Contains the micfil interrupts. - - - clocks : Must contain an entry for each entry in clock-names. - - - clock-names : Must include the "ipg_clk" for register access and - "ipg_clk_app" for internal micfil clock. - - - dmas : Generic dma devicetree binding as described in - Documentation/devicetree/bindings/dma/dma.txt. - -Example: -micfil: micfil@30080000 { - compatible = "fsl,imx8mm-micfil"; - reg = <0x0 0x30080000 0x0 0x10000>; - interrupts = , - ; - clocks = <&clk IMX8MM_CLK_PDM_IPG>, - <&clk IMX8MM_CLK_PDM_ROOT>; - clock-names = "ipg_clk", "ipg_clk_app"; - dmas = <&sdma2 24 26 0x80000000>; -}; diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml new file mode 100644 index 000000000000..64d57758ee67 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,micfil.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP MICFIL Digital Audio Interface (MICFIL) + +maintainers: + - Shengjiu Wang + +description: | + The MICFIL digital interface provides a 16-bit or 24-bit audio signal + from a PDM microphone bitstream in a configurable output sampling rate. + +properties: + compatible: + enum: + - fsl,imx8mm-micfil + - fsl,imx8mp-micfil + + reg: + maxItems: 1 + + interrupts: + items: + - description: Digital Microphone interface interrupt + - description: Digital Microphone interface error interrupt + - description: voice activity detector event interrupt + - description: voice activity detector error interrupt + + dmas: + items: + - description: DMA controller phandle and request line for RX + + dma-names: + items: + - const: rx + + clocks: + items: + - description: The ipg clock for register access + - description: internal micfil clock + - description: PLL clock source for 8kHz series + - description: PLL clock source for 11kHz series + - description: External clock 3 + minItems: 2 + + clock-names: + items: + - const: ipg_clk + - const: ipg_clk_app + - const: pll8k + - const: pll11k + - const: clkext3 + minItems: 2 + +required: + - compatible + - reg + - interrupts + - dmas + - dma-names + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + micfil: audio-controller@30080000 { + compatible = "fsl,imx8mm-micfil"; + reg = <0x30080000 0x10000>; + interrupts = , + , + , + ; + clocks = <&clk IMX8MM_CLK_PDM_IPG>, + <&clk IMX8MM_CLK_PDM_ROOT>; + clock-names = "ipg_clk", "ipg_clk_app"; + dmas = <&sdma2 24 25 0>; + dma-names = "rx"; + }; -- 2.17.1