From patchwork Mon May 24 08:48:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 446419 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp3152819jac; Mon, 24 May 2021 01:48:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+3W2aVZQ8kRl8ASCLZ5suvYKy9AkXRzwLCyaBaLbMTiK7yMtD5VjFFzmVo1EYom3Moy/X X-Received: by 2002:a92:d307:: with SMTP id x7mr6895227ila.55.1621846124039; Mon, 24 May 2021 01:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621846124; cv=none; d=google.com; s=arc-20160816; b=DjZD738qsY4PsGggv2R76iVQWCFGQA/Wn5uKpBEQ7fqFKAN+UMjnvzIhiyBs7+1DeR lZN7oeQK5L5H6tF5oOzAJ4AilyGKbp61879ehbeoBxyRbx785qbYf1EeV2UvyV1qzvEL NISMP6aEjVvxl2ijAG66Bs9Lq1oPVJNCwE4p4WlGu0Yj22vlUv1mhb6UvOI6NWD5KGTx Qm2Qf87MWMcxvFdD6q0Ezukzngebk+/q4Kjdct9FQ0Z2wqdB773xsJgCKZsXIE3JUodL tUlPJlMUgBbgWSUrOTSo36VtlHr9T+Ko6dZEH7LQehDFGBZhDt40VwpLeYVBbs7zvwGD XSHQ== 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=T0Klvg/FSrb8SCc53K65JSRhutNFINCGv3YACvznWOY=; b=W4tGE8IfiABwGVGJDql6tlIhg1NhMp+mjlE5r/8B8+p0Kd3rYNTDZb+jmY/ww1cZ7l YxJIorkIyaXTLfr42mDbRxyuxTZCSBFfGAIbWxntIohhdTQiddt4K2Pk9ayp46D6npsG Jp3xnH0eQjehrKF5Os62TKZS+fdSl2lVbR462Gfl1J6bE6nyzrHU0W0rSavVCfCmMtIh ufjLLsN+lZAdZst2Erzlu7j1+QAk+pJ90vPqa0bY5vLe4eXzEQcSxTWO+hJekyNSxc+z SMjkH2FYgAawpJNIhW+NOL0iD+G5LnxZnV1xm1PEDVsJIYrJVvjPL5QdNeWArAdG9mur MDqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h8z0eUTG; 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 p10si13503247ilq.156.2021.05.24.01.48.43; Mon, 24 May 2021 01:48:44 -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=h8z0eUTG; 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 S232362AbhEXIuK (ORCPT + 7 others); Mon, 24 May 2021 04:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232433AbhEXIuK (ORCPT ); Mon, 24 May 2021 04:50:10 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80A98C061756 for ; Mon, 24 May 2021 01:48:42 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id p7so23943120wru.10 for ; Mon, 24 May 2021 01:48:42 -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=T0Klvg/FSrb8SCc53K65JSRhutNFINCGv3YACvznWOY=; b=h8z0eUTGOInpV5Ca67KyakhslJZT0QJQ5BZP6cvAmlwttykRnVKloIXoqpQjQbs+Xr poV0N6H//49KgGH9WIx90WwtlI6pP+mqcZq4yYlTvrb5HlnJpa47/EqVnd1YjgaOOctv ygr738zsR54dyRezCJsw17zqZ1Du0rSY6lZvCkthefn8t2jOy6nCK6NfKgN3gpndTGNS drqzD2bBBfzuPPJHoNQf145KzhEa/IYd4QKf/iJX+TU21LwbHb6utsK9e5+QLJbNaTUR X8y2yLeZ/7shLB9rJKGXKU/+2ERN4JFlAnQ8Z/IXcoYEOOU22agfWXSsy0iOjO4xQc0a HweA== 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=T0Klvg/FSrb8SCc53K65JSRhutNFINCGv3YACvznWOY=; b=hJkSccTutWvebvJiw2HVtf/tN4jobmSmGbkiL84W8FhYneNe1U/Tuxt48SvFPZs239 WnBU9WIyz0aXsj0F6Q/kn3Zn5VaHRHS0q2Go+M1vaxKhoQYu9BHo6i6TA5S8ZnZAeQW6 lsEMNFews5OQH2WKDeXp+8AXMaQpdcFs19JD4qdcB8i/oPxwjMqN7eg5QepB8lKER2GX LVE+fZ6TzJ+HdJbf2eGR2l/R37aklAasapRFvr0yByB0UYUWIq4qvPRS+07Lb5TguHA4 nxsCTJcr0VhmCgWwarJOuBTUYpkX+i8r0pVwhhhnJBFWJGAxF8po/Xb6ul6Hc651PhRc ntUw== X-Gm-Message-State: AOAM532GCSzVoDyMqE9e6jVNUuD6wxn09+FoS/z3z6yKDB+rnoPlNHDF 2BVo8NDYPOVR9IFwnNvvJJo8Iw== X-Received: by 2002:a5d:45c6:: with SMTP id b6mr20964972wrs.333.1621846121134; Mon, 24 May 2021 01:48:41 -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 x206sm4034548wmx.47.2021.05.24.01.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 01:48:40 -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 v7 0/9] ASoC: codecs: add wcd938x support Date: Mon, 24 May 2021 09:48:19 +0100 Message-Id: <20210524084828.12787-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 v6: - Removed unnecessary maxItems from qcom,tx/rx-device property as suggested by RobH. 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 | 298 ++ sound/soc/codecs/wcd938x.c | 3753 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 705 ++++ 9 files changed, 5343 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