Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2054554lqo; Sun, 19 May 2024 11:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnI/yUCB9wVL7hH4uL7gO2gHgLsZa/TG3DbqIVEPxfbVQJs5vZWDI8KXXWKlWInUpTNkElDHBKtNyJk5tHf8h2Tc8J+MihQvvsf1o0oQ== X-Google-Smtp-Source: AGHT+IH14FedqUk10pxtwG2qgjy0RNFADooZLKnu3dIzbBBxD8ZimLnLT+INqX0pXg2JLJIZCAvV X-Received: by 2002:a05:6808:1241:b0:3c6:e8d:3ef0 with SMTP id 5614622812f47-3c9970d1892mr33660142b6e.49.1716141631890; Sun, 19 May 2024 11:00:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716141631; cv=pass; d=google.com; s=arc-20160816; b=PXVKVBTLLtOvTrqdHZBO7I32Upxc7VYwuPt8+a3jdhOgmr9Uk+xEL8CcfDKLb4UO02 R1dUJhBeVnk5oR3zFb3pw+0Ok4Jq1dZF/WKzV9aajOuq+khW6bXWlhikxNJravJjTjeJ CjoCy6wiHw1i0C8PyZTjj3jTpfaSZqV2qcJpOHpt67s6AvZvt4MCZbAOn/+HhNJ6Nboa T1O0KUKQ5rcBP1wYDUMR5NWtUthrtuGTGjTQJ9XryxrLU6H++GACwqDiK0WfthYp55AS sc5gQ2iJeI5+VKJQkcVWG7mt+QMGHi5E6dZKnfbCIVC3sxLMJy7NjbQRVQ68IMXUhuJZ OaJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=apls1qKFMND5NEtTeFsrIN06QfxdZiE4X+CYfgAM7CA=; fh=RYke0ut8ZIeVSZKN/WAjvnlnch6CC3K5X1J40BSRdmw=; b=LByYTQQBKvpFZ8oZ5VGUjQjCcWPJEyOKCMstKaWwoBLqZn106m4ThZWD4MKklCs5qg dEFq/GBfykiYSmhzlwTDxHbJp0O7IHlsCqIJ1bMUwkMkgTryrVNms8GoUOPy+LN5gPgj /M8RLT9eaKzbVJNYg4yYcNoYAep2lIl1MP344ZMRkPVaIN9wj+922DcaijBCnfLXCkoE NYp4qaM0GH5M93tgNgdWs9RzR0jHtuf+PzzleCyKYnpuk9TORxg/fZhXX/h3uf5e0zLv 0yHy+kEKvHOXgnBCFJl/YjuKKuFD/AO25k0BvVlJAD+ftVaxRBjDJqHK9o1GkmYsAerD nxrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A686X+ci; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792cf65c157si910251985a.765.2024.05.19.11.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 11:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A686X+ci; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 35EBB1C20FDC for ; Sun, 19 May 2024 18:00:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 219B8535D0; Sun, 19 May 2024 18:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A686X+ci" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D99FE1F5FD; Sun, 19 May 2024 18:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716141615; cv=none; b=oCVyqywLgSBuQccRVZzyCGoVx/5IVYqQ8Bz3H8x0RjxY5VogYGlsRK4f3oF2sGusDZR9FY8iTedOUJGuokbzbScLeJs7ghpcsnN3HmtWHgAsV1/jlPJP0yp/zjT+1bWcEzIAVelwGK+1ve5m08orQhCDZDor3Ic/rLnjp1FSFNs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716141615; c=relaxed/simple; bh=IDSiFykW0taZ632l5viikw7AmB4aSHraGMUKEA3Fehw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gs/RKRCGEIkgQM8WZmQ+Ew40IDlDeMXhavcBbKS4lZ7g0MdohMXfOQiGvX2+JP58R4K3uCbE3T3n2xNHWy1XOpvx423PrE2H3cUE5Et8GVziAUFxYluD2BGi/22iXxjczMS4uPnpRYv2QFb9unXAnZYfQgmx6YDwsNhYkfcPSc0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A686X+ci; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77A46C32781; Sun, 19 May 2024 18:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716141614; bh=IDSiFykW0taZ632l5viikw7AmB4aSHraGMUKEA3Fehw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=A686X+cizeZiLE+4JI83E7j/BvF61nmJ6EnC05sRPeeGtWTVDmj993e3011RvijEd MD1DzjQ9sf75bv+I6i5SqjLe+UejCKpYZeGH2NJ5QRRC5D91/FIAI21Blc1wYKfCWW CHuhAjpVG4C7Mj8f5VpmM3QeKrfeMZRxfCIdPdHRxV1qI8u97ZGzkpsoMlRzX3fTS4 xx3RBY/ZfJJuv8hYu02fWBDuzg4pqEqOwUwQnS7uoWvFgNlolvtbqK3fA0T3EoM5Sx K6uekFyC0yIHfpMQvJGTjFfMpjsPPVrOaWrKnocUnspFUo6v1KK/9EsLE2cTXnmHTF ya0TlYluPKsqQ== Message-ID: Date: Sun, 19 May 2024 20:00:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/7] ASoC: dt-bindings: document wcd937x Audio Codec To: Mohammad Rafi Shaik , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_rohkumar@quicinc.com, quic_pkumpatl@quicinc.com References: <20240516044801.1061838-1-quic_mohs@quicinc.com> <20240516044801.1061838-2-quic_mohs@quicinc.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl7pDs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r+CLMdnRBY fv0= In-Reply-To: <20240516044801.1061838-2-quic_mohs@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 16/05/2024 06:47, Mohammad Rafi Shaik wrote: > From: Prasad Kumpatla > > Document the Qualcomm WCD9370/WCD9375 Audio Codec and the > Soundwire devices than can be found on Qualcomm QCM6490 based platforms. > > The Qualcomm WCD9370/WCD9375 Audio Codec communicates Thank you for your patch. There is something to discuss/improve. > + > + qcom,tx-port-mapping: > + description: | > + Specifies static port mapping between device and host tx ports. > + In the order of the device port index which are adc1_port, adc23_port, > + dmic03_mbhc_port, dmic46_port. > + Supports maximum 4 tx soundwire ports. > + > + WCD9370 TX Port 1 (ADC1) <=> SWR2 Port 2 > + WCD9370 TX Port 2 (ADC2, 3) <=> SWR2 Port 2 > + WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3 > + WCD9370 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4 > + > + $ref: /schemas/types.yaml#/definitions/uint32-array > + minItems: 4 > + maxItems: 4 > + items: > + oneOf: oneOf here is not needed. Previously used enum should be fine. > + - minimum: 1 > + maximum: 4 > + > + qcom,rx-port-mapping: > + description: | > + Specifies static port mapping between device and host rx ports. > + In the order of device port index which are hph_port, clsh_port, > + comp_port, lo_port, dsd port. > + Supports maximum 5 rx soundwire ports. > + > + WCD9370 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R) > + WCD9370 RX Port 2 (CLSH) <==> SWR1 Port 2 (CLSH) > + WCD9370 RX Port 3 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R) > + WCD9370 RX Port 4 (LO) <==> SWR1 Port 4 (LO) > + WCD9370 RX Port 5 (DSD_L/R) <==> SWR1 Port 5 (DSD) > + > + $ref: /schemas/types.yaml#/definitions/uint32-array > + minItems: 5 > + maxItems: 5 > + items: > + oneOf: Again, no need for oneof. > + - minimum: 1 > + maximum: 5 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + soundwire@3210000 { > + reg = <0x03210000 0x2000>; > + #address-cells = <2>; > + #size-cells = <0>; > + wcd937x_rx: codec@0,4 { > + compatible = "sdw20217010a00"; > + reg = <0 4>; > + qcom,rx-port-mapping = <1 2 3 4 5>; > + }; > + }; > + > + soundwire@3230000 { > + reg = <0x03230000 0x2000>; > + #address-cells = <2>; > + #size-cells = <0>; > + wcd937x_tx: codec@0,3 { > + compatible = "sdw20217010a00"; > + reg = <0 3>; > + qcom,tx-port-mapping = <2 2 3 4>; > + }; > + }; > + > +... > diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml > new file mode 100644 > index 000000000000..5c76083691ea > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/qcom,wcd937x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm WCD9370/WCD9375 Audio Codec > + > +maintainers: > + - Srinivas Kandagatla > + > +description: > + Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC. > + It has RX and TX Soundwire slave devices. > + > +allOf: > + - $ref: dai-common.yaml# > + - $ref: qcom,wcd93xx-common.yaml# > + > +properties: > + compatible: > + oneOf: > + - const: qcom,wcd9370-codec > + - items: > + - const: qcom,wcd9375-codec > + - const: qcom,wcd9370-codec > + > + vdd-px-supply: > + description: A reference to the 1.8V I/O supply > + > +required: > + - compatible I guess VDDPX is not really optional in the hardware is it? > + > +unevaluatedProperties: false > + > +examples: > + - | > + codec { > + compatible = "qcom,wcd9370-codec"; > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&wcd_reset_n>; > + pinctrl-1 = <&wcd_reset_n_sleep>; > + reset-gpios = <&tlmm 83 0>; Use defines for common/known flags, like GPIO flags. > + vdd-buck-supply = <&vreg_l17b_1p8>; > + vdd-rxtx-supply = <&vreg_l18b_1p8>; > + vdd-px-supply = <&vreg_l18b_1p8>; > + vdd-mic-bias-supply = <&vreg_bob>; > + qcom,micbias1-microvolt = <1800000>; > + qcom,micbias2-microvolt = <1800000>; > + qcom,micbias3-microvolt = <1800000>; > + qcom,micbias4-microvolt = <1800000>; > + qcom,rx-device = <&wcd937x_rx>; > + qcom,tx-device = <&wcd937x_tx>; > + #sound-dai-cells = <1>; > + }; > + > + /* ... */ > + > + soundwire@3210000 { > + reg = <0x03210000 0x2000>; > + #address-cells = <2>; > + #size-cells = <0>; > + wcd937x_rx: codec@0,4 { > + compatible = "sdw20217010a00"; > + reg = <0 4>; Just one space goes before = This applies to all places. > + qcom,rx-port-mapping = <1 2 3 4 5>; > + }; > + }; > + > + soundwire@3230000 { > + reg = <0x03230000 0x2000>; > + #address-cells = <2>; > + #size-cells = <0>; > + wcd937x_tx: codec@0,3 { > + compatible = "sdw20217010a00"; > + reg = <0 3>; Best regards, Krzysztof