From patchwork Fri Oct 21 17:57:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 6918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp837222wrr; Fri, 21 Oct 2022 11:10:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ePAZ6vA9VqCzbGIfV9JScYdXn4mMs2NjZMM8huKwAd5AwYHLcJ8r+OnVdq1B7QE+RZoBR X-Received: by 2002:a17:907:72d3:b0:791:a4fa:c4ac with SMTP id du19-20020a17090772d300b00791a4fac4acmr13921455ejc.391.1666375843690; Fri, 21 Oct 2022 11:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666375843; cv=none; d=google.com; s=arc-20160816; b=rNH9gPVT9NAQTxaEW3/Qqlntu0LmGRhOFRVaXPiM9RjM77S57ZyweRjYuKrTKp9BwS nNy0GCvpdAgOyLkRDWB8HF7+rmvg1YmVfADIlOlAxORPTK627qc4o4nAhXQrEDxntZF5 /fJs549o0BSExaO+9lauxmf5VNbJEI8112/rUYP9k9OL2vOQn3cIv7XVTajqj/F96RFS LfMKSqwDYaOooo98eU/SZVvgOQbJRcibVyfFjmt53MwZEasFvFp0DtYImh1IQsoAJMxe 2FPojnIbB5xZIKApj55osuzEAhtdEpBg75F+V4j975giSIzS5wijP+WUIN3m+BIS7djI 5Clw== 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 :message-id:date:subject:cc:to:from; bh=/jQjxq+e47XxVcvPy1+t9R+5G4XPCZM0x41PBT8twbU=; b=hjgIhcBFFdM77XmqIEnsy9SsAPwfi72D7TBYmmT5D4rPRT7SBtQJJsT1AkH/3YepNw FEWdK5geWjwRSKOwrLRSljwK1YCJFrS4ffQ6BS79CDQ8L+G+UzraIG2nCtXcYeHA5vTF p7/jq8Ho57ptLl4Yu0y82DilcnVey6xG4cfs5mDRrHGyOxvvoFh5A2J9Wa0ipSdU9q+H fEdPXlBI8mXzcZH9P/NzGjAABlXOnGgt9D1SW5hg6LT/1qOxQoBp8oKjATMbNRmJ1/5v cKIp+n70s6SNSMbdN2h+D1R++F5NqbT1vkTd/Hi2Wtn0fPEuBgrqgNFQZNMqqo424jvc xw3Q== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd10-20020a1709069b8a00b0078d90768fcdsi25179174ejc.754.2022.10.21.11.10.09; Fri, 21 Oct 2022 11:10:43 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230203AbiJUR52 (ORCPT + 99 others); Fri, 21 Oct 2022 13:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbiJUR50 (ORCPT ); Fri, 21 Oct 2022 13:57:26 -0400 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3938D26551F; Fri, 21 Oct 2022 10:57:26 -0700 (PDT) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-13ae8117023so4463786fac.9; Fri, 21 Oct 2022 10:57:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/jQjxq+e47XxVcvPy1+t9R+5G4XPCZM0x41PBT8twbU=; b=FXmJyVX2v9mxG5ne3kvzqhgZfBBlVF4c6gAtrOrdCdoInbzzYfwrou9Fxao7cuv/EL v/yCjyus1xMusb6VF4XVp+hNJ3UgcW0msF/phlbXUk53QvtvVmglnHc5MUvRSz8Cryo3 slBOtTbFnocGmd7R+e7Ie8KI5hfSxiW5WG+Bms2HXSzh7wthE4knxvKV0hMieLH0sGFo MZsmQpSqkU8mdI40svj/6xoKnKNvCx5aTOjDv/B8ZgaqJdTUHtvWRqBmejxe6ckCWCuQ PuHemLuu9D0rMrPRaER0/TftYFAbpMeHHTjeCbh67RYu4UYoDHTIxq43KrBcelgxvcZV kmyw== X-Gm-Message-State: ACrzQf2jN6Vt61sFr7xHy9tgzljgczsOuacA+yYIYN07GUcpyxn5otw/ 6dxoqe4JaJwau+ukFs31T+qZc5ZJ3w== X-Received: by 2002:a05:6870:9a1f:b0:133:599:9555 with SMTP id fo31-20020a0568709a1f00b0013305999555mr30129688oab.201.1666375045361; Fri, 21 Oct 2022 10:57:25 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id db10-20020a0568306b0a00b00661a80d555fsm1389748otb.40.2022.10.21.10.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 10:57:24 -0700 (PDT) Received: (nullmailer pid 4005712 invoked by uid 1000); Fri, 21 Oct 2022 17:57:26 -0000 From: Rob Herring To: Liam Girdwood , Mark Brown , Krzysztof Kozlowski , Arnaud Pouliquen Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: dt-bindings: Convert dmic-codec to DT schema Date: Fri, 21 Oct 2022 12:57:21 -0500 Message-Id: <20221021175721.4005601-1-robh@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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?1747321716462892678?= X-GMAIL-MSGID: =?utf-8?q?1747321716462892678?= Convert the dmic-codec binding to DT schema format. The '#sound-dai-cells' and 'sound-name-prefix' properties were not documented, but are in use, so add them. Reviewed-by: Arnaud Pouliquen Signed-off-by: Rob Herring --- v2: - Fix example include and syntax errors - Update Arnaud's email --- .../devicetree/bindings/sound/dmic-codec.yaml | 55 +++++++++++++++++++ .../devicetree/bindings/sound/dmic.txt | 22 -------- 2 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/dmic-codec.yaml delete mode 100644 Documentation/devicetree/bindings/sound/dmic.txt diff --git a/Documentation/devicetree/bindings/sound/dmic-codec.yaml b/Documentation/devicetree/bindings/sound/dmic-codec.yaml new file mode 100644 index 000000000000..bba27c985996 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/dmic-codec.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/dmic-codec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic PDM Digital microphone (DMIC) codec + +maintainers: + - Arnaud Pouliquen + +allOf: + - $ref: name-prefix.yaml# + +properties: + compatible: + const: dmic-codec + + '#sound-dai-cells': + const: 0 + + dmicen-gpios: + description: GPIO specifier for DMIC to control start and stop + maxItems: 1 + + num-channels: + description: Number of microphones on this DAI + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 8 + default: 8 + + modeswitch-delay-ms: + description: Delay (in ms) to complete DMIC mode switch + + wakeup-delay-ms: + description: Delay (in ms) after enabling the DMIC + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include + + dmic { + compatible = "dmic-codec"; + dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; + num-channels = <1>; + wakeup-delay-ms = <50>; + modeswitch-delay-ms = <35>; + }; +... diff --git a/Documentation/devicetree/bindings/sound/dmic.txt b/Documentation/devicetree/bindings/sound/dmic.txt deleted file mode 100644 index 32e871037269..000000000000 --- a/Documentation/devicetree/bindings/sound/dmic.txt +++ /dev/null @@ -1,22 +0,0 @@ -Device-Tree bindings for Digital microphone (DMIC) codec - -This device support generic PDM digital microphone. - -Required properties: - - compatible: should be "dmic-codec". - -Optional properties: - - dmicen-gpios: GPIO specifier for dmic to control start and stop - - num-channels: Number of microphones on this DAI - - wakeup-delay-ms: Delay (in ms) after enabling the DMIC - - modeswitch-delay-ms: Delay (in ms) to complete DMIC mode switch - -Example node: - - dmic_codec: dmic@0 { - compatible = "dmic-codec"; - dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; - num-channels = <1>; - wakeup-delay-ms <50>; - modeswitch-delay-ms <35>; - };