Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1679741pxj; Wed, 19 May 2021 11:17:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmZUC9yK6oGVu5GRGIa9CJPu8jtyXxKIDvJMCX2WlP6xuJCPnlm8BozBVEs6IANcC8tet4 X-Received: by 2002:a05:6e02:1aa9:: with SMTP id l9mr365088ilv.24.1621448267134; Wed, 19 May 2021 11:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448267; cv=none; d=google.com; s=arc-20160816; b=MAH7wc+/Z81dyvTSlsSkiKjZueSAXSm1uolWe6LoFLyw3eFGLT4LBOsqvcz3e/DD68 y0hnTqsqSNNjeGr6/RUrJMCHCxorPpDkEbsJ4R7gmTAXTV+IUkSnb2EoiZhrbnjvyVIV HgD5zky1HZw3oDpOxRj2242plfnD4QcGNr/6uAbXGcQwEScdr4zvGGdwdzO5sZNZKKQO //mr4oBtVBXa4ze/wUsDTiPCLN4Q+ge0xuJK7j7OIGw4gqHWE2nm9gmv5SvQcsB3SbyU QmxtFRKALe9woK0Sqey5gVpEVLp3H2s8ys7iaAnsKy4H/UCboJQ5vivwt7NZ782pkg56 f99A== 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=mE2MENBP8OHhxc2QEqxv5MmkAUk1hcdbV87e9Jg3ziM=; b=hkTFvvpo2zNFOG/VJcEutZL5hGBX0Oe36EDMdTChPBVuUz2Ji+IHjrfoejq+wSP4mY JgGmdyQj2+f/r4sjFV/nf8t2Bb6xc857wmc7WrzQgKdhiBotaMhmgbzsd9KMVbrKi+Fl 5tzH81BoSRMoAZ9B4OneiG/40q4puLYL6/NdY5UC7tc5srRUFgPB0vMdjcNKwwEkB6dZ faBzjYkE/pv1swwGrs+fsH1YM/3nz+oEGnJLguGp0LIpIp6Bt2Q0b9u+MY0D39/oLh2q oVyt9ds/auz0ldE/tidV+CpIC1Q+33B7v+tWZBMk2XOW9JVZ1UJZi+QkvOntkefJ0isw em+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U9PbCXaP; 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 4si288891iln.143.2021.05.19.11.17.34; Wed, 19 May 2021 11:17:47 -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=U9PbCXaP; 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 S233606AbhEROj0 (ORCPT + 99 others); Tue, 18 May 2021 10:39:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233018AbhEROjY (ORCPT ); Tue, 18 May 2021 10:39:24 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80851C061756 for ; Tue, 18 May 2021 07:38:05 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id o127so5556697wmo.4 for ; Tue, 18 May 2021 07:38:05 -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=mE2MENBP8OHhxc2QEqxv5MmkAUk1hcdbV87e9Jg3ziM=; b=U9PbCXaPBtKPTQBynkPy5/aESRYE6eNapGtHSu4pYxv5aULFyUWY8AZ7qWFQD5qo/V zsGgfz7GoOzcnSB2BS7+2KbhyE5aYi6soJGsGlERG4kfNjJ5RX65tOY2NFJOXxcOepDW vsQdpv5l5zcL1HISRFIMmvGlJLIDYvYyzWxS8lR//PgOqdrNpTmJ2aJD75uDfYLxEv34 9V8wQU5F5jdI3bF9wp0PBJv9yYj7UUGz1/ClQphuMqXbDFNOG02quhAvF7DwbHfFd59l 0KP7V+vJf53X0ORg7zSz9nIjY2Jq4zy6wJ6sJ6Nh4Bj/pQ1E/qfACEnHVQ8af7XzloFW k2QQ== 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=mE2MENBP8OHhxc2QEqxv5MmkAUk1hcdbV87e9Jg3ziM=; b=CmqjcNZRfe46oDgisw66jekA5bYT6iSacBh2hisK0JEOQpYulz3xQrxfp1/Pu+AYZP N/4pb+ssDON67GzRxIQOm9n8L+yPIXT4IquEyxbOfsWYSNPIxG3DrUIaWgceDH6qUiKF QURhrKbIMbiE0/2IMOYza8nivq5tAaGnjubEUsUuirZzJMETACPot+HsIHvt3CKSpjjR FjGtHWm+kojh5XW09K7EbWsdR9uQ2mnRTcN5R57FJieHatKg373yA513d8/tubCL8Gu7 qE6uPwcbvI8qsULTlygXvPrvxmwmMJWP4gk9dFou9Zp+q/gfu/UgdWKGQpFPSbBLE45V 7uQw== X-Gm-Message-State: AOAM530wPiO5AwvSAk0A6KrRrQeTzltAiMBmPylU9yod4ZmucAvJrR/2 wFpd3R584n/94SX3PvFdL/iYmg== X-Received: by 2002:a1c:b384:: with SMTP id c126mr5889386wmf.110.1621348684125; Tue, 18 May 2021 07:38:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:38:03 -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 0/9] ASoC: codecs: add wcd938x support Date: Tue, 18 May 2021 15:37:50 +0100 Message-Id: <20210518143759.16837-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 v5: - removed ref in qcom,mbhc-buttons-vthreshold-microvolt bindings to fix dt_bindings_check warning 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 | 148 + 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 | 298 ++ sound/soc/codecs/wcd938x.c | 3753 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 705 ++++ 9 files changed, 5345 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