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: 54480 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3540356wrn; Wed, 8 Feb 2023 08:07:29 -0800 (PST) X-Google-Smtp-Source: AK7set8Hxpo2B/GDlejrTMbtwvOOsW71zIyitl6MEkx0decdieBY7lFWpbVY1YUs/frFllfUVwNB X-Received: by 2002:a05:6402:268b:b0:4a2:2e9e:c2ec with SMTP id w11-20020a056402268b00b004a22e9ec2ecmr9327422edd.4.1675872449633; Wed, 08 Feb 2023 08:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675872449; cv=none; d=google.com; s=arc-20160816; b=h8ZCdoxq+xVATrK38Ytzh1ZXk1JIAqhkU+syMTTNdedGe8XfOVHOIEljTHWybr+2w0 gQv/rl0tvszKAl7oySwUXe74W1LEEVCh7+ZA43lMBUs1Y98bGcUTmULkwGrX/GT1fHdK uBsJSLX9233byXW8wzC46ouI18/8swmD6omLxh5oY5erdw0gK3+a1upij51NLcpraj+N YQnru+dEdzjUZD5NwUvYJmt7bSSZ+0/wo8uTMx+tQ+3e1agVSXa+ttLM2t7Fx9fUrnyF s17z2daXIIA7Gz5Z8+IYfgamIVqDLHbuOKxQyrjFFVEC9Iq9rwFTqcHYnp29oHpPRGAW OGNg== 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:dkim-signature; bh=b3CDLhH74FCeSUPTOHzbalK9eb79PCH4NRsNL5rLPMM=; b=vRSUdHU3UzV2YuFuJyO58+0O1Dn1YTnVZWwaI84XpYX65WquNzzJ5hSsS/Ou6K/M+/ NfMq9vOp1XMVO0+iRzfJG+pPV1L96HHWkOkHTrTcC5UhG3//lGCUQM6n+9Acd2QwvsBY DkwiQaMvH2/2UlDz5fiSqGuj8a39xG9J2c5e1lS4YagIFAwmSfp/IeFtbVmQ9RT//4qa 59r8SG0NujnskEES/lJNqpzeRgJ7jepx49mDjjrL9ZZHG5JsisRGQfDcuulUN3pe83/0 mI79KbaSzsOIhJc8WpoucaVJr7J3VkurpERiGaSvU71QhjMmcr1MFkUiPEODRUXMW1jJ nr3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Edc74Fsg; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020a05640205d500b0049eeaaa3f27si2172146edx.433.2023.02.08.08.07.05; Wed, 08 Feb 2023 08:07:29 -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=@linaro.org header.s=google header.b=Edc74Fsg; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbjBHQEj (ORCPT + 99 others); Wed, 8 Feb 2023 11:04:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbjBHQEi (ORCPT ); Wed, 8 Feb 2023 11:04:38 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA63A4C6C5 for ; Wed, 8 Feb 2023 08:04:14 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so1873020wms.0 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=BqzlEl3TzsAN7JprViGiNuZstv2jeAfnzowYkT2H8bCBr/EkPVTo433+GZofCdYbLE QHt3cEqccnjnIlzmYl4gfNGB6uMpa31MwsqBc2zJoxavO75TCfNWTj4vC2adQ8wPFlPo GVDlQXx82s/fb86tFSoSljBCTn5ju7xIqxxFiOnf7RfxUdMRImll4xQnELTM4IA1UP3B vHeec8ZY+74by5O4y+AduJscxn5vh3P23SepICz9SsrvOLVWuS78ntyllmI2NO43hWWI ymgNUpA8Xf/5bRX2MNBvzCBiqxSmPJQiB8eVHU9FevKrLSUMhm6fx4C3e4tsbd8mxr0X 77EQ== X-Gm-Message-State: AO0yUKU/NBJSv1mdSsgcvhu9lbPZRYNU1Dir5j6zeMZ14qzzpGqycqTs sBJKtR83vDEYVSWrYii26yNHug== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757279629797381125?= X-GMAIL-MSGID: =?utf-8?q?1757279629797381125?= 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>; + }; + };