Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5149519pxj; Wed, 9 Jun 2021 10:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg4HG8qSUpzB0FGE0BBwTXasz3AyBw4L8vBRJhaVeWOflWhx8BTDP1SEPgE2mKI9OJv7Z2 X-Received: by 2002:a05:6402:1c83:: with SMTP id cy3mr490825edb.108.1623258841808; Wed, 09 Jun 2021 10:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258841; cv=none; d=google.com; s=arc-20160816; b=hG5UFbG6f5L5Tb7rJZUSemS0uYe6ZZBKA7ZE9xU9Q+zm+ljmAsADsLhTnHs1GctnII PVrW78f58LYq22XOppkGXNoh9IX3TM9sMnq/UxWOI7ovNsLeGicOe8kbu1Gp0dn6omC8 fu0uQZ6Z+4fJNeIVzz1c6A6PHfLzfc9XfeAjpLNaHr91V8q37CmbapcIBdMjgyNkfvKE alwYndGuXBOfJtc3ZFAX3DN8h3lNMxxUit11nvJIUkYTsepQOsexRu5IKNuRWQabeiv5 nYJdEG4d0TJpLm5xq3c2CQLO7r8ihOE4MKOtRNTkBEoTMCz0/WyZr4oLdm7gYiv4TyGJ xrMQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iQ2z9ZGal8v2nmHqBZXofvg2D10jxLfiFOLsbiZ2ZJQ=; b=V5oZDJVgma9YkJKCs8dcEAbuIcYl3bTLTytPsfgoENCz1lSqbcZGaS3p1zb2vjHZ/3 4CVpCcxOj4QZBvbRKMjzsrnTlBvrud2rkATv1QihEU1XyVMbyO02IJTQZknSy5AkmaaZ Bc4sSEI7NrT5TME+YGPIJvRSp/0ALWpCC4UA/eA1K4wTwLXVA61JOh7MNgESwSv+SYMY EudvPjrovX++d7uKE7+S2m3nUltSudJBCzEVH6bGjm0UF7yl7/yLW82sUx4GJPJD4Wf3 AaNC64iFBmmBTSz4zI5BjL/oIRgaDNDHp+u5NGef7mR9hh3lvkFS7exOaAbY8dii2waQ 8gWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HIwTbNLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si251928edj.328.2021.06.09.10.13.37; Wed, 09 Jun 2021 10:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HIwTbNLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237885AbhFIJMz (ORCPT + 99 others); Wed, 9 Jun 2021 05:12:55 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:43665 "EHLO mail-wm1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237789AbhFIJMz (ORCPT ); Wed, 9 Jun 2021 05:12:55 -0400 Received: by mail-wm1-f48.google.com with SMTP id 3-20020a05600c0243b029019f2f9b2b8aso3692398wmj.2 for ; Wed, 09 Jun 2021 02:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iQ2z9ZGal8v2nmHqBZXofvg2D10jxLfiFOLsbiZ2ZJQ=; b=HIwTbNLp8nukA39m64b158FSxY0cMGZ3x43lq6bQpH8Rlgsl0AP83is/ymuSYFFprE v3Z6FrWcteO672+3T5WweQvre7rngffllUL6WJNiOdYyDYxQE0SPdXS1kibSdP6TucU/ e/UX1KDeODpDto/ghvwyBGhW7XFQei48+f3OtAFwpg0MniY5ciTlNJ+NunrUphPQPJ6h cyY8IMP0fXBT95bJQWOrkJ63qo9oZ9HtXxpihCmPXC4aB7MeC8rNz/W6mTc/pX2ZTZgz 7YnyBgjKVKtnWfPTWdo6iqO2AlKhCiJpukpOvcIfxLUPDrVFLf0v6e7P1FnkBqee406A zvlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iQ2z9ZGal8v2nmHqBZXofvg2D10jxLfiFOLsbiZ2ZJQ=; b=qL1rwUiRL2BK/l226dCdVsSPEbQxfOUrrr+u++RYZwZiJiQqd/tMIFThoBAr+SOc4E 8r5lX+/zAC2Vt4NHMtWvrZRnNXL473CDEb1C1RqFJalPKfZtdNh6s/PK2VDVAg+0graM 74Zvun0zM6WUmPC+8K+Fq4V3MDMAbv9p4xxyTaNHkIS0AkGswh7VHp5Il4tD5/GsP4tr bWErGo/kVeXFimxFG2ohTeBZhpa+fQl2SN9WIefvs/klqSsI1nCv50Kck4yYyLJYA05Z TOu9xWV30tztndW+FFrAMRPkSqOf2P8q01WvEEiUEXfkgMNDklr6qy9/g+CLHXFwFgsH S/WQ== X-Gm-Message-State: AOAM533IJmpOxQUPna6DLMktLQaUzSMSxm8DpPuo67c0Sk6nDm089F7+ aZV+FRd0J620THrDXkkPMeX+5AKWKN5ZLQ== X-Received: by 2002:a7b:c002:: with SMTP id c2mr26576297wmb.118.1623229800233; Wed, 09 Jun 2021 02:10:00 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id v18sm25165385wrb.10.2021.06.09.02.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 02:09:59 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh@kernel.org, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, Srinivas Kandagatla Subject: [PATCH v9 1/9] ASoC: dt-bindings: wcd938x: add bindings for wcd938x Date: Wed, 9 Jun 2021 10:09:35 +0100 Message-Id: <20210609090943.7896-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210609090943.7896-1-srinivas.kandagatla@linaro.org> References: <20210609090943.7896-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire device RX and TX respectively, supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs, MBHC. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring --- .../bindings/sound/qcom,wcd938x.yaml | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml new file mode 100644 index 000000000000..cb74ce40c2e6 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml @@ -0,0 +1,146 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,wcd938x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Qualcomm WCD9380/WCD9385 Audio Codec + +maintainers: + - Srinivas Kandagatla + +description: | + Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC. + It has RX and TX Soundwire slave devices. + +properties: + compatible: + enum: + - qcom,wcd9380-codec + - qcom,wcd9385-codec + + reset-gpios: + description: GPIO spec for reset line to use + maxItems: 1 + + vdd-buck-supply: + description: A reference to the 1.8V buck supply + + vdd-rxtx-supply: + description: A reference to the 1.8V rx supply + + vdd-io-supply: + description: A reference to the 1.8V I/O supply + + qcom,tx-device: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: A reference to Soundwire tx device phandle + + qcom,rx-device: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: A reference to Soundwire rx device phandle + + qcom,micbias1-microvolt: + description: micbias1 voltage + minimum: 1800000 + maximum: 2850000 + + qcom,micbias2-microvolt: + description: micbias2 voltage + minimum: 1800000 + maximum: 2850000 + + qcom,micbias3-microvolt: + description: micbias3 voltage + minimum: 1800000 + maximum: 2850000 + + qcom,micbias4-microvolt: + description: micbias4 voltage + minimum: 1800000 + maximum: 2850000 + + qcom,hphl-jack-type-normally-closed: + description: Indicates that HPHL jack switch type is normally closed + type: boolean + + qcom,ground-jack-type-normally-closed: + description: Indicates that Headset Ground switch type is normally closed + type: boolean + + qcom,mbhc-headset-vthreshold-microvolt: + description: Voltage threshold value for headset detection + minimum: 0 + maximum: 2850000 + + qcom,mbhc-headphone-vthreshold-microvolt: + description: Voltage threshold value for headphone detection + minimum: 0 + maximum: 2850000 + + qcom,mbhc-buttons-vthreshold-microvolt: + description: + Array of 8 Voltage threshold values corresponding to headset + button0 - button7 + minItems: 8 + maxItems: 8 + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reset-gpios + - qcom,tx-device + - qcom,rx-device + - qcom,micbias1-microvolt + - qcom,micbias2-microvolt + - qcom,micbias3-microvolt + - qcom,micbias4-microvolt + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + codec { + compatible = "qcom,wcd9380-codec"; + reset-gpios = <&tlmm 32 0>; + #sound-dai-cells = <1>; + qcom,tx-device = <&wcd938x_tx>; + qcom,rx-device = <&wcd938x_rx>; + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + qcom,hphl-jack-type-normally-closed; + qcom,ground-jack-type-normally-closed; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + }; + + /* ... */ + + soundwire@3210000 { + #address-cells = <2>; + #size-cells = <0>; + reg = <0x03210000 0x2000>; + wcd938x_rx: codec@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5>; + }; + }; + + soundwire@3230000 { + #address-cells = <2>; + #size-cells = <0>; + reg = <0x03230000 0x2000>; + wcd938x_tx: codec@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,tx-port-mapping = <2 3 4 5>; + }; + }; + +... -- 2.21.0