From patchwork Wed Feb 8 16:04:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 651893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9922EC05027 for ; Wed, 8 Feb 2023 16:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbjBHQEi (ORCPT ); Wed, 8 Feb 2023 11:04:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbjBHQEi (ORCPT ); Wed, 8 Feb 2023 11:04:38 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE31B4C0F6 for ; Wed, 8 Feb 2023 08:04:14 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id j32-20020a05600c1c2000b003dc4fd6e61dso1811356wms.5 for ; Wed, 08 Feb 2023 08:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b3CDLhH74FCeSUPTOHzbalK9eb79PCH4NRsNL5rLPMM=; b=Edc74FsgmKXLOG0ZR6HQjwP9yftQcJizuP+WZlO9qUoJcFg7kg8qut22i1j8qOLwxu 1bTWi4XRAeDnOIps51NKqboATk3FGa+C7fy6JsQF294KpLb6OnWD65NoEdJ3I/WBPjSn yxSHzTnH+39143fhysMVHRwrQs07TeMJggyX5/ee9kp/hdpGGmnVjoLhkYgEOedfuRbC z0mAyCTkgnWrTom0VpzZHujQGrk4bZJCZ9PW8o8Myq4A16un3K5CN9B3e/hqsTccu1UX e2k+HjkrdQn9/S9OtbrhfAVes0as0stPG/LASwHdlu5k45Ptgj2Zs23K8LiCfBn2dxjT 8h5Q== 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=b3CDLhH74FCeSUPTOHzbalK9eb79PCH4NRsNL5rLPMM=; b=pPKgcxSpY/HolcHCFugySIyq6nyKdR+cT63Seog/AhYknasi+vgz5XC3VEE01icdmt 3XEJi0l/C9u8PKUhli2O6g7wtWvgEK54Q6AjHa6486W4XIJWiM6f8XyHJubZQaQ3lEQT L4Aq2jie+N4Q0GflGB/uNDwEGZLhZF7/v7RClbZOxwFJVL4rnVkVHl51YikcNPi83Pou txKTiMfm3MDS1hAL+Ki+XlE5gAfMVwCJr28SiaOvKUtngMX2VGKQdWu4ByQ55V4z6u2w WRb4PkRKYD0FYj86NlKcvMwAugBqpUN0XNgCJVXqMxxQpS3L2QGksMon8Pam2wU+mrVj GH/g== X-Gm-Message-State: AO0yUKVA9EthGg6F3tQx7zQZmkmdw/WJcv31IrcB/k4ZuV+QCYZMifYu Z6BHZ+S5xPwvdzKatXKCoiiNkw== X-Google-Smtp-Source: AK7set8rRNl5+WiwFKafSSJy9OG2By4H+IU1mLIA2v3InH/jpHuaUb65+tJa2NrGIG7RJ8JoJ4YQdw== X-Received: by 2002:a05:600c:328f:b0:3dc:5674:66e6 with SMTP id t15-20020a05600c328f00b003dc567466e6mr7093228wmp.25.1675872253263; Wed, 08 Feb 2023 08:04:13 -0800 (PST) Received: from krzk-bin.. ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id o18-20020a05600c2e1200b003dd1b00bd9asm2169890wmf.32.2023.02.08.08.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 08:04:12 -0800 (PST) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] ASoC: dt-bindings: maxim,max98090: Convert to dtschema Date: Wed, 8 Feb 2023 17:04:09 +0100 Message-Id: <20230208160410.371609-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the Maxim Integrated MAX98090/MAX98091 audio codecs bindings to DT schema. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/sound/max98090.txt | 59 ------------- .../bindings/sound/maxim,max98090.yaml | 84 +++++++++++++++++++ 2 files changed, 84 insertions(+), 59 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/max98090.txt create mode 100644 Documentation/devicetree/bindings/sound/maxim,max98090.yaml diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt deleted file mode 100644 index 39d640294c62..000000000000 --- a/Documentation/devicetree/bindings/sound/max98090.txt +++ /dev/null @@ -1,59 +0,0 @@ -MAX98090 audio CODEC - -This device supports I2C only. - -Required properties: - -- compatible : "maxim,max98090" or "maxim,max98091". - -- reg : The I2C address of the device. - -- interrupts : The CODEC's interrupt output. - -Optional properties: - -- clocks: The phandle of the master clock to the CODEC - -- clock-names: Should be "mclk" - -- #sound-dai-cells : should be 0. - -- maxim,dmic-freq: Frequency at which to clock DMIC - -- maxim,micbias: Micbias voltage applies to the analog mic, valid voltages value are: - 0 - 2.2v - 1 - 2.55v - 2 - 2.4v - 3 - 2.8v - -Pins on the device (for linking into audio routes): - - * MIC1 - * MIC2 - * DMICL - * DMICR - * IN1 - * IN2 - * IN3 - * IN4 - * IN5 - * IN6 - * IN12 - * IN34 - * IN56 - * HPL - * HPR - * SPKL - * SPKR - * RCVL - * RCVR - * MICBIAS - -Example: - -audio-codec@10 { - compatible = "maxim,max98090"; - reg = <0x10>; - interrupt-parent = <&gpio>; - interrupts = ; -}; diff --git a/Documentation/devicetree/bindings/sound/maxim,max98090.yaml b/Documentation/devicetree/bindings/sound/maxim,max98090.yaml new file mode 100644 index 000000000000..65e4c516912f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/maxim,max98090.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/maxim,max98090.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim Integrated MAX98090/MAX98091 audio codecs + +maintainers: + - Krzysztof Kozlowski + +description: | + Pins on the device (for linking into audio routes): + MIC1, MIC2, DMICL, DMICR, IN1, IN2, IN3, IN4, IN5, IN6, IN12, IN34, IN56, + HPL, HPR, SPKL, SPKR, RCVL, RCVR, MICBIAS + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - maxim,max98090 + - maxim,max98091 + + reg: + maxItems: 1 + + clocks: + items: + - description: master clock + + clock-names: + items: + - const: mclk + + interrupts: + maxItems: 1 + + maxim,dmic-freq: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 2500000 + description: + DMIC clock frequency + + maxim,micbias: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2, 3 ] + default: 3 + description: | + Micbias voltage applied to the analog mic, valid voltages value are: + 0 - 2.2v + 1 - 2.55v + 2 - 2.4v + 3 - 2.8v + + '#sound-dai-cells': + const: 0 + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + audio-codec@10 { + compatible = "maxim,max98090"; + reg = <0x10>; + interrupt-parent = <&gpx3>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + clocks = <&i2s0 0>; + clock-names = "mclk"; + #sound-dai-cells = <0>; + }; + };