From patchwork Thu Dec 19 10:31:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 11303027 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 C6CDF6C1 for ; Thu, 19 Dec 2019 10:33:59 +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 E3E1E2467E for ; Thu, 19 Dec 2019 10:33:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Dc7Jlcfw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X9osVpQ0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3E1E2467E 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 CFE7D82A; Thu, 19 Dec 2019 11:33:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CFE7D82A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576751636; bh=pWjuwHnaR50Zn09N+WiJehs1YsHQ6Dt0nc+/DoNpYjI=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Dc7JlcfwrzoTM+MJ/0FZsczNC4WbuprEICY+Dnyfp0QJsxD7s0Fsh9REZ8Jd5Bwxk LKF+3OaoZp3a763ZqTx3bxzLu5vVa4+sB7XvPCsU2AzqJHqoY7LbQFdFVHMQiwhtXU rE9hZFggV9BEHSR6hen9EHiYebVnFuIfl/YymQgk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 31981F80234; Thu, 19 Dec 2019 11:33:06 +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 DA3CDF80234; Thu, 19 Dec 2019 11:33:04 +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, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 01645F8013E for ; Thu, 19 Dec 2019 11:33:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 01645F8013E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X9osVpQ0" Received: by mail-wm1-x343.google.com with SMTP id f129so5052525wmf.2 for ; Thu, 19 Dec 2019 02:33:01 -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=9IU6iI2PMO8JogASt6ZUpvqvc9+EPfynpc2LWZABp/Y=; b=X9osVpQ0OkinTYh3s178FgRq339JnFDDUFr1az/q1iaDBFMsakJgttrpiRS4Ql+GxC tw1ObLYPaGTKLznlK6Uz/vGsBNY+uYl1zs/wbc0XvuuNbvSpJ60jlgLzB3yows4TyobM 4xxESxwN9Mvfa5sji6iN5VCOJ5+zR9qbWXgrhLTB61H+UXJLNBBnw53t1ziNkPCPUlbb 35jNuBJSBPoFdRfJvhewNtN2m+jv8FnTnf8ZhXmQirzqO2x/omMZobq06rK2wFIoD0aV r4o0RrfPJil5ZHJ8YyHaDuPqLRZtf4ghc9VKwO0Vr9m+pYH5wAFEqU3b7Gr/kEiArW26 7fpA== 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=9IU6iI2PMO8JogASt6ZUpvqvc9+EPfynpc2LWZABp/Y=; b=lN0hi62Gh0Nb2Jwo1zFlSbxepDw5ZV8r0ceMc5qSyDIOLaD95u7CWl/J47kTBUuJgR 0axbgAtrbORSLw1H0l/77qRKoic/oANxQngeMu12EEbNGiDfzBAlYuz2sHoSs1x0WWRt 5K5pirN+WQvjOTL2rfgtkKOgqZD/ZwFOx6QsuTWgPHXlcuhzg3vEyg9D19AL8CEa8cz1 fk8irBwDTWkw9JRppQoqZuuWrF/+1MnT6x36RxWYvqk2LaiU0Y65Ulisftxp8D3LS0OX 2wb07Io4RIYd1P6sUGSOZUWs2zHA68+Ie9+poGkSkj0UhK5rYOGGbWRw/6BnHOkMsJ0R Ax5g== X-Gm-Message-State: APjAAAVadbkRr+dX3V1XIhrBYMGE/J3XnEWnOENvOvVjVl46Z8udF0by cl8ce6R6p5VLK7E9uT7YK0YCBA== X-Google-Smtp-Source: APXvYqy+JwRWUQgmpm9nw8G5BBEcn38dMvSGvV3I2wHLJptK09xWxa3G/M1vSLRdfkKOOz28xNAaaA== X-Received: by 2002:a1c:f303:: with SMTP id q3mr8602199wmq.98.1576751581042; Thu, 19 Dec 2019 02:33:01 -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 i11sm5962942wrs.10.2019.12.19.02.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 02:32:59 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org, lee.jones@linaro.org, linus.walleij@linaro.org Date: Thu, 19 Dec 2019 10:31:42 +0000 Message-Id: <20191219103153.14875-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: robh@kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, vinod.koul@linaro.org, devicetree@vger.kernel.org, spapothi@codeaurora.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v6 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. 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 v5: - added correct MFD dependency to codec driver 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 | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd934x.c | 5084 +++++++++++++++++ sound/soc/qcom/sdm845.c | 86 +- 15 files changed, 6399 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