From patchwork Tue Jun 1 11:31:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 451361 Delivered-To: patch@linaro.org Received: by 2002:a02:c735:0:0:0:0:0 with SMTP id h21csp1688644jao; Tue, 1 Jun 2021 04:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg16b6QjeecgvWLrwl8MT523x5hxdURUUeXt+tFEyzdUVJBM8ZeKUnAQpTGaOTY7QH9Vlh X-Received: by 2002:a6b:ec19:: with SMTP id c25mr20413610ioh.181.1622547286993; Tue, 01 Jun 2021 04:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622547286; cv=none; d=google.com; s=arc-20160816; b=FtdEl2mSWKYMvqKF2apMVAGgtpzo03GNsMbZFF9rLQU2HPlYqDYosT0QVRNU7fuSiO bkrbbrEeKhjNWG8DImTk7fqCn6qAThtv+Ea1YLJVLd28YMJc4HhoB5hrenz40+v+Tt9x M1dTGXevQjToA1BWh7hM08YETsh7UENeNmKxMN0r4FhGI3j/7vzQ4GLP29EyT56LtulN Cnb5rjl5YYvZlrjuW0yvL1E7y5bObLxW135EnyQMkqXtPIDXTHtdXSjjeZfapgNqLBIf 2s56IM/1e4J5Pi/zQAvlu6y6BsFJRbaR+tgYzvDJxmTNk+AmFmBwhlwvsGghMd3elPOs vTYw== 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=U/jxIZpAmGEoTHHFGlmEoIe239WigqhShRYhurrkineDntA8zACEqA7foBh3fZttz7 0ZtkWREDIZ5EiZIJoVGaX5J7uxFcURehFK6V6LWagaJzfJLyK0okE0gnT1sCCgoyXPg1 +Sb2jFbzj0zzUjDauKf+iAzaw9CdGBhrcG4R5V4MxCxOSSYJsbAXGTTm9+fCmcCGr6fe 4ceA0IdUZb1S7mubgyG/5/LTTHBF5jN8NzdVBeXFIDMMG9zY6bXhYuqZvH5mDBpXdxCQ CKnOIaqikh4fVb0NWKnSCME6Stcb1wphKhugpyQTPudXDXlYtntNigG65pAeIkuB9eNc WiQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hsz7JLp0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 x9si15839506ilo.119.2021.06.01.04.34.46; Tue, 01 Jun 2021 04:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=Hsz7JLp0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S233654AbhFALgV (ORCPT + 7 others); Tue, 1 Jun 2021 07:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233577AbhFALgU (ORCPT ); Tue, 1 Jun 2021 07:36:20 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A9ABC06175F for ; Tue, 1 Jun 2021 04:34:38 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id o5so16909063edc.5 for ; Tue, 01 Jun 2021 04:34:37 -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=Hsz7JLp0XTO5J2sf0A3sUA4C0yjv+vjmFW/tcV9ZWqFRTYnW5rlEzbjvEvXV+xSYyu XGopIJvP1Q8v2DXs5lBNMCHDaSNe+M6yerRSVJcJ6ModWjQN1JKwNh2gwP8nsRXmtF6A +0GS+P/irVvuJ9S0Sg7i+lgUnEUb4nluTjgstucy+Y6zv8qfe/bMLu0vLqPUiTKM+f+T 0zMOn+NBx6kHRi2O1Ouxv1FsUWhwvzCbkGAdqsgQjexIiiybNtaT5nu0Wh6DSR8640AK 0biwPCeqM2J2wMwrTu9pc1OZipZso1mUpKZcpVOyAhPwgWln07j9U8ZRlv2i7pAVxXky jfWg== 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=GWHgnv7JjYBX6fYc+rzL6ZBy00ZDunObLRjzLKYhDnGSzvWgJjGGLbYy1Jv0YGAZQV ytVxeTr4e5uEXudjG6bEsgJlLNXTijXJeuvnhLlS+vSeGrGt03eOJeWhux/fWSLdKGv9 1HnY/h2Xf/Rp9sraLcv4/N6t3eUnr8Y+ZpmiDAIpcT/+1KAbbS9ev7nHnAPugPP2IYO8 LwhGdszZxShDqEAA9UH5RLl017GZrYYq/KdqF0IWV7ltZ6WwjEsE1b5VFZfZyiixgB5F K5GNAykYB0IWq6CQyuNuPpKco6hp1Iy3WMDFlTF52On+ZJIZW0fwnAqF9NNIlFa8hPUG CnKw== X-Gm-Message-State: AOAM530+CQCxb0WQfe4/lYjE6RHUsD56xgKbv6OrL3qDfzzzVr4z4UqT +9kLmK5IpNL2ozyE5DdZkgEzug== X-Received: by 2002:a05:6402:2049:: with SMTP id bc9mr11958540edb.298.1622547276617; Tue, 01 Jun 2021 04:34:36 -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 f10sm4729487edx.60.2021.06.01.04.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 04:34:36 -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 v8 1/9] ASoC: dt-bindings: wcd938x: add bindings for wcd938x Date: Tue, 1 Jun 2021 12:31:50 +0100 Message-Id: <20210601113158.16085-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210601113158.16085-1-srinivas.kandagatla@linaro.org> References: <20210601113158.16085-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 -- 2.21.0 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>; + }; + }; + +...