From patchwork Fri Oct 18 00:18:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 176744 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp98389ill; Thu, 17 Oct 2019 17:19:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5GvBpH7N/dolRfhBiS6qDja3mW0nF1s+Cmkc8n+wWgUxmdDnh2YxwXfIoagZGgyeGtC56 X-Received: by 2002:a05:6402:b17:: with SMTP id bm23mr6770767edb.6.1571357999282; Thu, 17 Oct 2019 17:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571357999; cv=none; d=google.com; s=arc-20160816; b=UppmLw5zUAJKMcuC/seQjbBEbM0Xb2YW/Kj1BLLlNbaaUDFghOspeV9Q548Zsc426g iHDVIH06qwP2xsnuVQS0XgzJWdog/tmYdFi5CoKGpwZcpt2zGgQXfoO3ste1kMGbFTDi 2fbnDlGYnzKHIlbtpCvg6xZQh4A4U/Pcs9gGPjejCVTADCfs3OKiKEmLzIp2QgU2ERTO lUEUn33/oS5XBClPly0yMLRccbiQkooTuAn1/giKteg20SkIEadRDOrEbrADRpXxjdXL 23tHkjIXTWYxxuPByA1g34MONH0kPqJwBoYdWSg+OjPABg+6b00XX/m1UjeVwwsDodvd yUrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/QAhBLGy3kJwx9AVjnikoQwMK78+wDfkG0Z+oCWFsgc=; b=JdzMOgKg0cba9Lr0fYxSGFt2mDOeTgLTEdsCdGPTJ4FYZBVL+bT4PMs3clLqOD2LOW WQPUi4+j+9v6jFPIZiW/JGyniQAvLbgenWCPv0ppErOenMtLo41s2NkjAmEuSmFOlsvD 6xqe+5nzvHnLL0mpEcrw07ITGL+0Q2XlD8sWQshIJYnG8fIU7/cc3+hk0zRTH3gB0FHE iknmXXtkRbjDczPE+OsqPYNkj9V3yXXqdrMnakjaZ4NMINbzOsv+vpJbgd7Ddx3bhI1b UHwy2bvo8ddGsTBEsfQO5PXW0H0QiasWlPTr9YegWogaEDo6nbVX0mQJBXvbGh5lJ464 3D5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMvfUq56; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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. [209.132.180.67]) by mx.google.com with ESMTP id c12si2709048edb.394.2019.10.17.17.19.58; Thu, 17 Oct 2019 17:19:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMvfUq56; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S2503823AbfJRAT6 (ORCPT + 5 others); Thu, 17 Oct 2019 20:19:58 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54139 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503821AbfJRAT5 (ORCPT ); Thu, 17 Oct 2019 20:19:57 -0400 Received: by mail-wm1-f65.google.com with SMTP id i16so4301648wmd.3 for ; Thu, 17 Oct 2019 17:19:56 -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=/QAhBLGy3kJwx9AVjnikoQwMK78+wDfkG0Z+oCWFsgc=; b=iMvfUq56WMjSs6BbLFNNjBqk4R/wA7XWiEqQ5cOoA5jxbcoXhfFQzScHibNauAjSWt vh7jyvGFEwk4+A3kZ8DRk7o+dl4KexvSALP2OuqduSs5hobn3C3fLqKz+xr4NEFaYnTY hIl2XGSrJC0TdMPqJm5+jJ5CPFzZ0d9nEYQaaPXfxf6PxYoeKHaE91yJBMBacMwqysc1 nO5Mk/ZqTq235Rp2qG5WrkXLcfLBfiCNWIwIj+NtG9IvhUjTRONgo3UFTYYjgi6nQ/jd oO5YkCHmVkEyZovZgc9WkbFYmSSqQonesPomVRhwoU3nEwO86woGSE8KHwWr2ATwbUr4 lWuA== 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=/QAhBLGy3kJwx9AVjnikoQwMK78+wDfkG0Z+oCWFsgc=; b=otl644bwLK8gxwoPRMI2pVELKYczcPE+KT8iRjbn08TiKGET7725ILNR+xemGi+ae6 3RrHKkfe10tPHf8NxMsphTvoCGkeTVo0eZco1LM9GlPwTpYG7TcMOCMvXpfvfQDIUSqZ qeyduRrVof+z3XGCSo5KWyaNaj7++fiG/Qj9kcnZtqJN8X5WUWIzrCGv17mYMaNs7/WI kYzKFcNS9qoWYkHZwUV2ofGJ6xcKejKClKq7dbzoybQ1q26135hH6DJC1pvqAIfVCHVw zhC3xc4cLSa4K64hNRusB9xixunvCYeO5Hgwf9NymAHXiKPTeq7+RMGMK/JeLFe09iO4 sJLg== X-Gm-Message-State: APjAAAX8Z5yF1yNRrChS1hN8c4LnrbDym0ycYb9CcFUW+oPuIU00L3i1 HYxmk1EbBttAY8vJRg5U4QwvKA== X-Received: by 2002:a7b:c652:: with SMTP id q18mr760429wmk.148.1571357996011; Thu, 17 Oct 2019 17:19:56 -0700 (PDT) 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 z189sm4851248wmc.25.2019.10.17.17.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 17:19:55 -0700 (PDT) From: Srinivas Kandagatla To: robh@kernel.org, broonie@kernel.org, linus.walleij@linaro.org, lee.jones@linaro.org Cc: vinod.koul@linaro.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org, bgoswami@codeaurora.org, linux-gpio@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 00/11] ASoC: Add support to WCD9340/WCD9341 codec Date: Fri, 18 Oct 2019 01:18:38 +0100 Message-Id: <20191018001849.27205-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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. Pin 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. If anyone is interested to try, here are working set of patches on top of rc3. https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=audio/v5.4-rc3-YOGA-C630 alsa ucm files: https://git.linaro.org/people/srinivas.kandagatla/alsa-lib.git/log/?h=DB845c Thanks, srini Changes since v1: - Code cleanup and convert to proper dpcm widgets where possible. - converted to mfd driver. - added pinctrl driver to this series - added dts changes in this series - bindings converted to yaml. Srinivas Kandagatla (10): 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: pinctrl: qcom-wcd934x: Add bindings for gpio ASoC: dt-bindings: Add compatible for DB845c and Lenovo Yoga ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga Yeleswarapu Nagaradhesh (1): pinctrl: qcom-wcd934x: Add support to wcd934x pinctrl driver. .../pinctrl/qcom,wcd934x-pinctrl.yaml | 51 + .../devicetree/bindings/sound/qcom,sdm845.txt | 5 +- .../bindings/sound/qcom,wcd934x.yaml | 169 + drivers/mfd/Kconfig | 8 + drivers/mfd/Makefile | 1 + drivers/mfd/wcd934x.c | 330 ++ drivers/pinctrl/qcom/Kconfig | 7 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.c | 365 ++ include/linux/mfd/wcd934x/registers.h | 529 ++ include/linux/mfd/wcd934x/wcd934x.h | 24 + sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd934x.c | 5218 +++++++++++++++++ sound/soc/qcom/sdm845.c | 71 +- 15 files changed, 6789 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml create mode 100644 drivers/mfd/wcd934x.c create mode 100644 drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.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 -- 2.21.0