Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3401439pxj; Tue, 1 Jun 2021 04:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvdmUXnZuUXIljLXZyj3aK4S4QVt/gQHx+PJYIha9X8HZJ4N/I+V+/2CwKh5phS/4s/IhA X-Received: by 2002:a17:907:c06:: with SMTP id ga6mr28868836ejc.229.1622547354162; Tue, 01 Jun 2021 04:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622547354; cv=none; d=google.com; s=arc-20160816; b=ByWLjIi1Wd/9uQSxItOMip1t1lRWOIVY6RHwRNGhHofA18vBpefEE3R34U0OjnURPY U18psWYnzk0TH+t3XVjAkUOjU7pyojIJQTE2xn56IHz4yGpwM7EvSGxr2MqUkFdQJR99 mo4AcnEUrhyxyr2GeHJ1OA8zLNKq/8QQk+atvUdNF5eyOj5+7BLltioUUnEcTrCPAd9+ IF0hxwsqZZPF8733+ZpCrTW4bW17KH7PXyq0ta+TMltCmgDFLXTK8nqDZZMqmXkmYBOe GV0ypcqQN1M2lcav01PBuPhwSTRguWYdKHunLSyDh1VN+f3ljVqGkSklWkpZGYnv6B8L Ygsg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3z4f9OtSIbuNbOfZKzA5/qCGi7jD1UUm7qfZnJAs7+c=; b=TwleeHa9jMZ39WM+dJGWQB+6VUagDb6VpcbcQvfsxbnNa8qlks7xtB40UIzmlGzjYO tgNs02ftDgFh28tq8kfigTFq/qgpjE/pVZpLTasDJ+/ZfxTkEU4hhDd2bRJH853xnrZx Zhv6vikykVFvATWa91cyhHnHeqY3ZUy6/kU+6NlHH1U8k8+xAgjmxCUlKcD1pYBKWAQr JhvUDomDWpObqiKWDYKkhe6/ucJdFkuQW1imdwdH08gnOorcPUuP7IyuoVBJ8xZh8ka/ A/an+d1FC8CVrZRXzblQDO7/NX0kvITxD/ZxAU+98Xye8BPSE89eDomrlI7HgSWtK0cP ow1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aBxtyGNN; 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 bj9si16091224ejb.518.2021.06.01.04.35.31; Tue, 01 Jun 2021 04:35:54 -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=aBxtyGNN; 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 S231576AbhFALgT (ORCPT + 99 others); Tue, 1 Jun 2021 07:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbhFALgT (ORCPT ); Tue, 1 Jun 2021 07:36:19 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABBCC061574 for ; Tue, 1 Jun 2021 04:34:37 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id i13so16843375edb.9 for ; Tue, 01 Jun 2021 04:34:36 -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:mime-version :content-transfer-encoding; bh=3z4f9OtSIbuNbOfZKzA5/qCGi7jD1UUm7qfZnJAs7+c=; b=aBxtyGNNDN2VF/9oG4s3CHhiR1NgayvyPXk61RGSRhhhcL22f9AchZhQKM7LjfQnpr ud7eaXUeLcfh3Mp8/XzfAboSobak4+iTzl7xSUjoChJopx0hbEtMBwF29H1CiqzqQH2x K+LFcKliXCNxosLn/RKZy9vIh0VzQTZzAhz/mIgPb5WCF7TPg1BIo0ravY9zCKN3I7lp 1hoGXNJzRy7GJFl4rPRd/LXWxwlZK7FenE329G4ZIakdiOoXImygc3VbioeFdegT0i1W KwU1ioC/ldaGl9M0vCwfxdSc+LZIDUCDBlY7f9yOrp9zYMUiGiNYq0yPVnWTrN1eQW8U f3sw== 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:mime-version :content-transfer-encoding; bh=3z4f9OtSIbuNbOfZKzA5/qCGi7jD1UUm7qfZnJAs7+c=; b=rMdHf0Or2qx3NdPxD1Hw4qztBKrYN+kKWCadf/zEUNxn/zLqhqANlLEGF6CX0rMa0f s3TjGqewM0mni/RCkHt/bjQH0AePJpVUsYCRkR699S0/P/DYKbAKSxPuWsjvLlN/m0Ci 52t02TVkWElx5RSGTzxcx8VoeDAbAIXvAubSET6jvqI/vbnSGnbfHgJ3my8eG/lUHfHK c5SFSMrugyfHTz6W3gvwtxgsUY9Qv0JuZoXNLpG4kQnl1O/G+DZJY4kb5EWe7AHgyCZD E1t1b3RVaDvrNH0om2pCTNiV09E7mSsUeDJao0oqzlgsHdbmUaaiaPXq7892mYcg+s1s caBQ== X-Gm-Message-State: AOAM5310Mdq8SRuBwydv2IpZ+V4HxaOphyjO2twDZbSPPWnMuKR046xn BjoTTYkBQdsCdNfE6TVniMIN6g== X-Received: by 2002:a05:6402:543:: with SMTP id i3mr15827295edx.173.1622547275613; Tue, 01 Jun 2021 04:34:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 04:34:35 -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 0/9] ASoC: codecs: add wcd938x support Date: Tue, 1 Jun 2021 12:31:49 +0100 Message-Id: <20210601113158.16085-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for Qualcomm WCD938X codec. Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs and MBHC. Eventhough this device has two SoundWire devices, only tx device has access to main codec Control/Status Registers! For codec driver to be functional it would need both tx and rx Soundwire devices to be up and this is taken care by using device component framework and device-links are used to ensure proper pm dependencies. Ex tx does not enter suspend before rx or codec is suspended. This patchset along with other SoundWire patches on the list have been tested on SM8250 MTP device. Thanks, srini Changes since v7: - Fixed errors reported by kernel test robot by moving SoundWire specific bits to sdw driver. Srinivas Kandagatla (9): ASoC: dt-bindings: wcd938x: add bindings for wcd938x ASoC: codecs: wcd-clsh: add new version support ASoC: codecs: wcd938x: add basic driver ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw ASoC: codecs: wcd938x-sdw: add SoundWire driver ASoC: codecs: wcd938x: add basic controls ASoC: codecs: wcd938x: add playback dapm widgets ASoC: codecs: wcd938x: add capture dapm widgets ASoC: codecs: wcd938x: add audio routing .../bindings/sound/qcom,wcd938x-sdw.yaml | 70 + .../bindings/sound/qcom,wcd938x.yaml | 146 + sound/soc/codecs/Kconfig | 13 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/wcd-clsh-v2.c | 348 +- sound/soc/codecs/wcd-clsh-v2.h | 16 + sound/soc/codecs/wcd938x-sdw.c | 315 ++ sound/soc/codecs/wcd938x.c | 3743 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 720 ++++ 9 files changed, 5365 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml create mode 100644 sound/soc/codecs/wcd938x-sdw.c create mode 100644 sound/soc/codecs/wcd938x.c create mode 100644 sound/soc/codecs/wcd938x.h -- 2.21.0