Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1679165pxj; Wed, 19 May 2021 11:16:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygrNpGPh4jZsXp99dLLLZu3mVzapv6oxokQJGcsBhJq25xJZJxjRKtrSSiZiHf7JHQDU/m X-Received: by 2002:a02:c912:: with SMTP id t18mr266141jao.100.1621448219727; Wed, 19 May 2021 11:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448219; cv=none; d=google.com; s=arc-20160816; b=d11X4FjkvqZ79uTD/rWYZk0fWgjwVWdJc/Lchy+TQk5vhpEY9vDNTAnq1jfZJ57Hmu mJCSLxoOYNmZk+53dNuNVOZiUONFBcbuoo/r3f1G1Qi2AxLWVpnE9yTHVAWGEu4nwn1I Ilx/UPXSFFyP/ArMIkyWYjetCYHLuycGtYvNQLHL0xh7SsM78G0RztPxjf5935CT0LA/ Hk1KfubywCLHiGrxO+7bdIDftwpRqa0BnD0/E5h90FtvEvxJ7tr204VwwNiIoYJtFvIM F9JA7Mens5UK/nUcA/z0MGy1OKLV7a/TNRuSuSmj4jJGJ4/1T/+0gHrgpxr4f0G3eE49 AgPg== 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=A2TFqzHBaZkkRb33kJbTh70Ty/wD+dN9eg6evbbyIu8=; b=SbOnaMKWb+qJHE76WP1MWpLBu657NOWlcfVR5CfjIxI3Stzu0zSIXBubrMGMrfK+Dp 6k4UXjb2P8/G3pdPqbCrBpv4KiLdjfXarqsxyskYRtRuH5i2tWeebUv9pQ0kY8tz3lCn rmj3JCzgHuVWBud8oDwPXojAgWhPAim/ZsRoY//F+0Ne227fuCVx40o276B0fKpsjVbM Md1txLwVKxKTtCvcRsmzLIeT6Zwg2OtYvQ33Ry+C2txjeju15FBe4swh7O6t2v2I8clC gnHyCpGqQdZb7New2kztpK3f8JyX93iKyAdfFpSrQFc/K/5diayyJqVnAZmxtV8lDJ5n RT4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M/0bkSGx"; 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 s8si25140317iop.88.2021.05.19.11.16.46; Wed, 19 May 2021 11:16:59 -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="M/0bkSGx"; 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 S233715AbhEROja (ORCPT + 99 others); Tue, 18 May 2021 10:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbhEROjY (ORCPT ); Tue, 18 May 2021 10:39:24 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD074C06175F for ; Tue, 18 May 2021 07:38:06 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id f19-20020a05600c1553b02901794fafcfefso1043205wmg.2 for ; Tue, 18 May 2021 07:38:06 -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=A2TFqzHBaZkkRb33kJbTh70Ty/wD+dN9eg6evbbyIu8=; b=M/0bkSGxOqn2ePnlmHOfVFQ0QcQRoS2mEkFQ5zGvTh6Bvc2t3mrDVI9+divkWCazbp gS/5yi/c/mwjgCGVxp1O3K0kYURdIiUe3y35GaeTmtZDutBaYLBz0VOunbHxlbZnvnxp 0H6E7bgntXH+ALugFFZHuEVO71B6WevBRJh1rcVb5lZauDCzvatp0Tn0db79Q450/gr+ 8EYN2DTpg5j2qDGDZkxrnW4rDJEg0DlyrEG4xTav041Xa/r4nlJW8D4EGGI2fb48zIyK +puiuY5plFqMy2CelH7LfxlKaAo6IoKItns1lVlqfFZSVnF7vwS9vk/T7AYzvRBytKkW +0UA== 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=A2TFqzHBaZkkRb33kJbTh70Ty/wD+dN9eg6evbbyIu8=; b=nXP4bc1drcMSt7pvWwOqa2MU8oNByGqG6AKSsFQikeaVfLGx8eNYo3pTW2QDRguN7i IsPFr0giMq4DlKck6f5od36OXH+LuAHb7oKTROeTAH6qxSPqC0O3KSohLsob6fOmL5+l kudMTeo7ku62Oik0XOiSi1XuRhPr9IeDd9N0+Ru/chLqZCJ7n4UE2zXp6miPkWg7sYN5 Wp93oUWWCO2pYTX5GLt+kOoAHw2/Q1+yX3Z2OQZngZoDGq5X78yE1Ku2SkYjtk6BNdE8 xxODstbA0bOpWwFeQmcYKdB7bVk9VysONj+jRKNfbNhfzLMw9jOOaoNJ+nlFQ/CWHkkU p0uA== X-Gm-Message-State: AOAM532WvOKs1dVG1x1s8FmZ/AwpSOhkUMkKf3WgcmvgBV25G8pdfi8u ot9FUEMydmFW1cW3ivkYzzr8Zw== X-Received: by 2002:a1c:df41:: with SMTP id w62mr5242716wmg.113.1621348685362; Tue, 18 May 2021 07:38:05 -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 m6sm21329087wrp.29.2021.05.18.07.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:38:04 -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 v6 1/9] ASoC: dt-bindings: wcd938x: add bindings for wcd938x Date: Tue, 18 May 2021 15:37:51 +0100 Message-Id: <20210518143759.16837-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210518143759.16837-1-srinivas.kandagatla@linaro.org> References: <20210518143759.16837-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 --- .../bindings/sound/qcom,wcd938x.yaml | 148 ++++++++++++++++++ 1 file changed, 148 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..b04c5e90e283 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml @@ -0,0 +1,148 @@ +# 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 + maxItems: 1 + description: A reference to Soundwire tx device phandle + + qcom,rx-device: + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + 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