From patchwork Tue Dec 17 12:16:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 11297461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4F30109A for ; Tue, 17 Dec 2019 12:17:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37AD321835 for ; Tue, 17 Dec 2019 12:17:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="iPrJz8Pg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p1fpn1wo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37AD321835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E32584F; Tue, 17 Dec 2019 13:17:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E32584F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576585075; bh=PoQGoiHpYSSacem05W65M5WuLETeFLY9FXxFTAln9pY=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=iPrJz8Pgx37vVwx0vnHmtlwHzRLHFZ4bnz2qsR0eV3E0yr+GPkBKPV0XUfCtH7fX6 R+rQ1d6sJPdzQLqfj0pVYWWpYpz++8wKWdoOAuFU+nrULm7aEKCvnod599TeBzNIjd gJBtxIlyGM7xgwxDTb3QBJIT29nBVFVQv86Q7s5c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BD5FAF8020B; Tue, 17 Dec 2019 13:17:04 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id A3C11F8020B; Tue, 17 Dec 2019 13:17:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 51DDDF80100 for ; Tue, 17 Dec 2019 13:16:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 51DDDF80100 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p1fpn1wo" Received: by mail-wm1-x344.google.com with SMTP id t14so2883838wmi.5 for ; Tue, 17 Dec 2019 04:16:59 -0800 (PST) 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=uvkcmzWWNz9+vvDl5lj9jSidtFGQN7sTpNsfRZj6iOc=; b=p1fpn1woHPX0xistfLZ2FIMnrxMkOwvBnFdqRaqUrUsBTdUGddlqaXaKDbVYA58saV zl4sFWG3x9FKyHmdSfAgHZmnMHwYTOqFKWgXE7npDUO++TaANqqJR5flItwqSW3BVsk+ NIb49F2bDT/Zgn7DjYYgTL90X/8JXIZE3IfTXG7sgltuT/ypstmEu8TPxCZ7ol/6jaYm /pubBnp85lw3s0/l89Ume7f/ZrdoXf6EKE7r1fHAzSaDdTm/A8qV5wbjuYb27WgyUSNo yXR3QckcV4o3dfR3LiTUfkvLb93D0WfClTushCMklkeaH2kulnoQlxiJhckYwASPk+6+ C2Cg== 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=uvkcmzWWNz9+vvDl5lj9jSidtFGQN7sTpNsfRZj6iOc=; b=DG4WRydCT/Bp2PvLLQ2eOBTd8TDR+Y13VikqfO4jjseOdTe3kWX7m311NXMMHxYXJC lIgZEssOzdNZKRea/TqsEk93HmqpeC/5RbpuTpfo9xhQxC1T220MCgYecUli0qm4qKVL E/BCNbaeZavCOglfO8bQ988y0XM/2MRzZisS6PRkn4Tp/l2on/ahEkE0EA6q94NcThug SxIAB1UWZg3mhdZMMH839FrxbpTz35FHKXZhYs2jxfLj6FEjpI8cVJuWkXmSZ+8z6zV7 Bn58SfC6w7LAy58qpuBENtgvbCHqcXxeEiFXuZDVsPzNcnMi9Bh3mHEIsqTf0MzEn0FL qqug== X-Gm-Message-State: APjAAAX2gRF+rJ0VWHpKKN88REQDT5uA85R5TdxIKUdgGRvqXIT2fJGT 7ZZDIe/bHm+ZjbTCer9imRwdlw== X-Google-Smtp-Source: APXvYqy0Y+iBxxIqL2VTzMcQpKB1C0uzPqguqaHBeN0RjsFa/n7TfiB/n92Yqnot3rrj/anxAG05Wg== X-Received: by 2002:a1c:7508:: with SMTP id o8mr5038469wmc.74.1576585019035; Tue, 17 Dec 2019 04:16:59 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id f1sm25087270wru.6.2019.12.17.04.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 04:16:58 -0800 (PST) From: Srinivas Kandagatla To: robh@kernel.org, broonie@kernel.org, lee.jones@linaro.org, linus.walleij@linaro.org Date: Tue, 17 Dec 2019 12:16:31 +0000 Message-Id: <20191217121642.28534-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, vinod.koul@linaro.org, spapothi@codeaurora.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v5 00/11] ASoC: Add support to WCD9340/WCD9341 codec X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" This patchset adds support to Qualcomm WCD9340/WCD9341 Codec which is a standalone Hi-Fi audio codec IC. This codec supports both I2S/I2C and SLIMbus audio interfaces. On slimbus interface it supports two data lanes; 16 Tx ports and 8 Rx ports. It has Five DACs and seven dedicated interpolators, Multibutton headset control (MBHC), Active noise cancellation, Sidetone paths, MAD (mic activity detection) and codec processing engine. It supports Class-H differential earpiece out and stereo single ended headphones out. This codec also has integrated SoundWire controller. Patchset for this is already sent for review at https://patchwork.kernel.org/cover/11185769/ This patchset has been tested on SDM845 based DragonBoard DB845c and Lenovo Yoga C630 laptop with WSA881x smart speaker amplifiers via soundwire and 4 DMICs. gpio controller patch does not have any link dependency, it can go by its own. Most of the code in this driver is rework of Qualcomm downstream drivers used in Andriod. Credits to Banajit Goswami and Patrick Lai's Team. Thanks, srini Changes since v4: - updated microvolt bindings as suggested by Rob. - slimbus optional property patch already applied. Srinivas Kandagatla (11): ASoC: dt-bindings: add dt bindings for WCD9340/WCD9341 audio codec mfd: wcd934x: add support to wcd9340/wcd9341 codec ASoC: wcd934x: add support to wcd9340/wcd9341 codec ASoC: wcd934x: add basic controls ASoC: wcd934x: add playback dapm widgets ASoC: wcd934x: add capture dapm widgets ASoC: wcd934x: add audio routings dt-bindings: gpio: wcd934x: Add bindings for gpio gpio: wcd934x: Add support to wcd934x gpio controller ASoC: qcom: dt-bindings: Add compatible for DB845c and Lenovo Yoga ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga .../bindings/gpio/qcom,wcd934x-gpio.yaml | 47 + .../devicetree/bindings/sound/qcom,sdm845.txt | 5 +- .../bindings/sound/qcom,wcd934x.yaml | 175 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-wcd934x.c | 104 + drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/wcd934x.c | 306 + include/linux/mfd/wcd934x/registers.h | 531 ++ include/linux/mfd/wcd934x/wcd934x.h | 31 + sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd934x.c | 5084 +++++++++++++++++ sound/soc/qcom/sdm845.c | 86 +- 15 files changed, 6401 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml create mode 100644 drivers/gpio/gpio-wcd934x.c create mode 100644 drivers/mfd/wcd934x.c create mode 100644 include/linux/mfd/wcd934x/registers.h create mode 100644 include/linux/mfd/wcd934x/wcd934x.h create mode 100644 sound/soc/codecs/wcd934x.c