From patchwork Wed Apr 14 15:48:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 421108 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp3667692jaj; Wed, 14 Apr 2021 08:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt7sAZo+hLtY1FGIcgLQi2WoIbaqrMH9L9i2nVclFeaemJ8fos4mRhM7a2cuR4nCCGEzgU X-Received: by 2002:a17:906:d789:: with SMTP id pj9mr16333336ejb.128.1618415443953; Wed, 14 Apr 2021 08:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618415443; cv=none; d=google.com; s=arc-20160816; b=awfkqX7XSvvzKXfosk97tmlx5t1+eOnkSH9Z3lkFy13XTtU4TDgelnD8xrVhiWOuuQ ldKIXSiWWobRbS+D6vVxM1Zza1AyoveZXeF9yD31zvspxImRx5E+CYH04GTKMsj7Ln9k i8HKoJ8IDHi7R3Lyh0uXhU7vve2DXSgNvb+6FzL/kxC79+2b2OFx9jgOtvUvauc0cGA9 E4ziWGdgRcyO/Kv80RM6LyLWGHaDKFuDNRxi1vJV0EH3biDgpyWE0sX1Rp95xAG56Myr zWt8//RHSrdWkCQh/Rn78NP2wzLzd3OCZE2kg5McZ256w2uwMUZShInHwpaV2O4zocN3 jq/g== 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=aqR7BlF4HSnnBDnstX8+p5EmjKpi9oGoXkglRwnfXtQ=; b=Aelgn7laGaqyBt4D3dVP3EBmPomaLrQL+wCxWklblrd7Fn3LYhdskljxCuHhOQLK8V Op+IuKK+UlFsHAvIHu+VfChhZ/4T5JW5NTdL3cVXgQ27L7mjvBuLd3hcZeBF3paeeGid Csou163UMS8UcRR9HFHT+Iqjsge8VD5wy/hr2hZj2m6dR2tlBt4L/9DT8mggq4I9/2co 8Q270kU+vgPj7HeFkm5hIqXAoOkNIhV3ZNxWYbSHaLy4RD0pIIlYyF1OhWuv7fySWTOn yPbrGu9zNV4wM8yQiGJLE+nfJAsK83y14BxcNy5URmPNlY7o+snkVyShWVKYScrnlOsd L+6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Il2kAK6D; 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 c5si2227342eds.46.2021.04.14.08.50.29; Wed, 14 Apr 2021 08:50:43 -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=Il2kAK6D; 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 S1352266AbhDNPuE (ORCPT + 6 others); Wed, 14 Apr 2021 11:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352141AbhDNPtv (ORCPT ); Wed, 14 Apr 2021 11:49:51 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2476AC06138C for ; Wed, 14 Apr 2021 08:49:26 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id r9so32150830ejj.3 for ; Wed, 14 Apr 2021 08:49:26 -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=aqR7BlF4HSnnBDnstX8+p5EmjKpi9oGoXkglRwnfXtQ=; b=Il2kAK6DaEhXk+Qu28VBaiON0vWv1u/STSJGWLYoCZQo86bwM/AkbYBHlq3XXu/uYy AX5uN7c/OBVfvb+tei4O5wbQkaZ77VhCfd8qHxqzA4lHJx5KFVouATL5e8vI850X23or +Tdt9nLraopIL8QvLgifNX9y7GxjD0fuJsJtcUUcBZBWAeCFqXL5cBn0rGBNYiBRPBuI e1y7zSEiPSgPSp5T718r35LzOPabgcrf4Uhq3omH8KpVpUUxjZ/TSBd4Xwh2u5x1URlG HNy5u2bt65Q9kBNw950LI1detP/eJl55k76NZgkNg4fCN4o2IUesYji3AYJgtF/r0nHi THoQ== 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=aqR7BlF4HSnnBDnstX8+p5EmjKpi9oGoXkglRwnfXtQ=; b=JOzHOk2YPgS0O3VklbBBEctMw8M2itpObX9Zqg5ckFcqX37kxRmm3vsJTxUsiFG0pw f1aG1WvPsEtCQolUbY4mFRV760Ws4I/ns6GxxQwmUUbCuakc0EepMFXTULXD81zuRgSB 6z2EF8uDHit8zWIrs85jao/NOCnU4EbwIsoZ69xztmQL4OsBLQQ2h3MzzNu2S7c4uLAR kU0IOhq7KtWjMXzyKn+Z6UsHHKksNsSvXqXnW0fHFeZt7S1o93wEJTdhF4AwK6wSZogi zViKpvnc3xVTaZKiGl+vJgHjjL2PVk1+mruqE4DJIKrjPjnYkKntCli4KEvGrNnKsVLC fWkg== X-Gm-Message-State: AOAM532taCflEJlkJiftWl/NvsgtxBQVq4Opz2PrPRUiVVkmGMlBlkT+ E2AtVpUxWasM990sYUkU/4gUBJNZoHlSJg== X-Received: by 2002:a17:906:d8c:: with SMTP id m12mr15958347eji.347.1618415364624; Wed, 14 Apr 2021 08:49:24 -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 q12sm10495540ejy.91.2021.04.14.08.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 08:49:24 -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 v4 1/9] ASoC: dt-bindings: wcd938x: add bindings for wcd938x Date: Wed, 14 Apr 2021 16:48:37 +0100 Message-Id: <20210414154845.21964-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210414154845.21964-1-srinivas.kandagatla@linaro.org> References: <20210414154845.21964-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 --- .../bindings/sound/qcom,wcd938x.yaml | 176 ++++++++++++++++++ 1 file changed, 176 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..4c8fa8290af0 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml @@ -0,0 +1,176 @@ +# 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,mbhc-hphl-switch: + description: Indicates that HPHL switch type is normally closed + type: boolean + + qcom,mbhc-ground-switch: + description: Indicates that Headset Ground switch type is normally closed + type: boolean + + qcom,mbhc-button0-vthreshold-microvolt: + description: Voltage threshold value headset button0 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button1-vthreshold-microvolt: + description: Voltage threshold value headset button1 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button2-vthreshold-microvolt: + description: Voltage threshold value headset button2 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button3-vthreshold-microvolt: + description: Voltage threshold value headset button3 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button4-vthreshold-microvolt: + description: Voltage threshold value headset button4 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button5-vthreshold-microvolt: + description: Voltage threshold value headset button5 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button6-vthreshold-microvolt: + description: Voltage threshold value headset button6 + minimum: 0 + maximum: 500000 + + qcom,mbhc-button7-vthreshold-microvolt: + description: Voltage threshold value headset button7 + minimum: 0 + maximum: 500000 + + '#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 + - qcom,mbhc-hphl-switch + - qcom,mbhc-ground-switch + - "#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,mbhc-hphl-switch; + qcom,mbhc-ground-switch; + qcom,mbhc-button0-vthreshold-microvolt = <75000>; + qcom,mbhc-button1-vthreshold-microvolt = <150000>; + qcom,mbhc-button2-vthreshold-microvolt = <237000>; + qcom,mbhc-button3-vthreshold-microvolt = <500000>; + qcom,mbhc-button5-vthreshold-microvolt = <500000>; + qcom,mbhc-button6-vthreshold-microvolt = <500000>; + qcom,mbhc-button7-vthreshold-microvolt = <500000>; + }; + + /* ... */ + + soundwire@3230000 { + #address-cells = <2>; + #size-cells = <0>; + reg = <0x03230000 0x2000>; + wcd938x_tx: codec@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,direction = "tx"; + qcom,port-mapping = <2 3 4 5>; + }; + + wcd938x_rx: codec@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,direction = "rx"; + qcom,port-mapping = <1 2 3 4 5>; + }; + + }; + +...