From patchwork Fri Jun 10 18:18:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 69814 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp424426qgf; Fri, 10 Jun 2016 11:19:51 -0700 (PDT) X-Received: by 10.66.84.74 with SMTP id w10mr3618965pay.140.1465582791497; Fri, 10 Jun 2016 11:19:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r26si14163063pfa.108.2016.06.10.11.19.51; Fri, 10 Jun 2016 11:19:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932412AbcFJSTu (ORCPT + 7 others); Fri, 10 Jun 2016 14:19:50 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36008 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752901AbcFJSTs (ORCPT ); Fri, 10 Jun 2016 14:19:48 -0400 Received: by mail-wm0-f43.google.com with SMTP id n184so2851365wmn.1 for ; Fri, 10 Jun 2016 11:19:48 -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:in-reply-to:references; bh=jx76nS6RdAO4ue1ZLPabyVFIaTWpw4AuWKr4i8f/Ooo=; b=buB0B/SYVFiRH/cg+YW03GuYceL+Z1YVOgFomKmw+li58KeJ4jjE+tRNKxNmoVxz4H Jjip5u484iuQGQFyCcTUHB/AQAJaQHb7PTbzlwMyKN0bk3548qgxTLZWOrskAlDktwxa H2FHJXLaZqIbsRIXgU9wNWYFY9WijK3msPISQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jx76nS6RdAO4ue1ZLPabyVFIaTWpw4AuWKr4i8f/Ooo=; b=FTeD4Q1/R9GEOv8B6REsu7vKEBsZMrAPzjCtBD0cNvQKyT49nqjHiKrvUViyHEBW9a xsqjVWU54i9jB/+Y3YUd/b6Nxqdpvh+xsn7FyI8BH5uQ/ud0n1dTwzz541dBBtn3U8Gy 3xJn1z0ruYy10H+T6TgxxS7D3Y2BGB6Cjc7AChbJHRomx/ZcUjfze7PivofPDWMQ3w73 yjeJ4HDHaR/H1TBCBdt4bj5EvsQNMCfh9auvPhW9RHPHbAqoOI2MDHdXvZD98L0JfsQz d2n7y6Us21Z/flKhdbRxUbdbTwrfId3sjvleLJ3bwv3tKpX0O0XWetfBizeX/JzCXVSH WZbw== X-Gm-Message-State: ALyK8tLjFe6mz4WZ795co3uVCMf8r7oyJDJJ50R3rmYEeVvBeMUtDb69LX96Yww+FW+mUOuL X-Received: by 10.28.154.10 with SMTP id c10mr326142wme.63.1465582787055; Fri, 10 Jun 2016 11:19:47 -0700 (PDT) Received: from localhost.localdomain (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.gmail.com with ESMTPSA id f186sm326318wma.13.2016.06.10.11.19.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Jun 2016 11:19:46 -0700 (PDT) From: Srinivas Kandagatla To: Mark Brown , alsa-devel@alsa-project.org Cc: Rob Herring , Mark Rutland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kwestfie@codeaurora.org, plai@codeaurora.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v3 1/2] ASoC: msm8916: Add codec Device Tree bindings. Date: Fri, 10 Jun 2016 19:18:44 +0100 Message-Id: <1465582725-30183-2-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1465582725-30183-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1465582725-30183-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds DT bindings required for msm8916 codec which is integrated in msm8916 and apq8016 SOCs. Codec IP is divided into two parts, first analog which is integrated in pmic pm8916 and secondly digital part which is integrated into application processor. Codec register controls are also split across pmic an lpass. Analog part is controlled via spmi bus to pmic, registers on the Application processor are memory mapped. Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/sound/qcom,msm8916-wcd.txt | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt -- 2.8.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt b/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt new file mode 100644 index 0000000..0559c1f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt @@ -0,0 +1,103 @@ +msm8916 audio CODEC audio CODEC + +Codec IP is divided into two parts, first analog which is integrated in pmic pm8916 +and secondly digital part which is integrated into application processor. Codec register +controls are also split across pmic an lpass. Analog part is controlled via spmi bus to pmic. + +## Bindings for codec core on pmic: + +Required properties + - compatible = "qcom,msm8916-pmic-wcd-codec"; + - reg: represents the slave base address provided to the peripheral. + - interrupt-parent : The parent interrupt controller. + - interrupts: List of interrupts in given SPMI peripheral. + - interrupt-names: Names specified to above list of interrupts in same + order. List of supported interrupt names are: + "spk_cnp_int" - Speaker click and pop interrupt + "spk_clip_int" - Speaker clip interrupt + "spk_ocp_int" - Speaker over current protect interrupt. + "ins_rem_det1" - jack insert removal detect interrupt 1. + "but_rel_det" - button release interrupt + "but_press_det" - button press event + "ins_rem_det" - jack insert removal detect interrup + "mbhc_int" - multi button headset interrupt. + "ear_ocp_int" - Earphone over current protect interrupt. + "hphr_ocp_int" - Headphone R over current protect interrupt. + "hphl_ocp_det" - Headphone L over current protect interrupt + "ear_cnp_int" - earphone cnp interrupt. + "hphr_cnp_int" - hphr click and pop interrupt. + "hphl_cnp_int" - hphl click and pop interrupt + + - clocks: Handle to mclk. + - clock-names: should be "mclk". + - vddio-supply: phandle to VDD_CDC_IO regulator device tree node. + - vdd-tx-rx-supply: phandle to VDD_CDC_TX/RX/CX regulator device tree node. + - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator device tree + node. +- qcom,lpass-codec-core: phandle to syscon node of lpass code core. + +Optional Properties: +- qcom,micbias1-ext-cap: present if micbias1 has external capacitor connected. +- qcom,micbias2-ext-cap: present if micbias2 has external capacitor connected. + +## Bindings codec core on lpass: + +Required properties + - compatible: should be "qcom,msm8916-lpass-codec" followed by "syscon". + - reg: represents the lpass codec core register map. + +Example: + +spmi_bus { + ... + msm8916_wcd_codec@f000{ + compatible = "qcom,msm8916-pmic-wcd-codec"; + reg = <0xf000 0x200>; + reg-names = "pmic-codec-core"; + clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; + clock-names = "mclk"; + interrupt-parent = <&spmi_bus>; + interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, + <0x1 0xf0 0x1 IRQ_TYPE_NONE>, + <0x1 0xf0 0x2 IRQ_TYPE_NONE>, + <0x1 0xf0 0x3 IRQ_TYPE_NONE>, + <0x1 0xf0 0x4 IRQ_TYPE_NONE>, + <0x1 0xf0 0x5 IRQ_TYPE_NONE>, + <0x1 0xf0 0x6 IRQ_TYPE_NONE>, + <0x1 0xf0 0x7 IRQ_TYPE_NONE>, + <0x1 0xf1 0x0 IRQ_TYPE_NONE>, + <0x1 0xf1 0x1 IRQ_TYPE_NONE>, + <0x1 0xf1 0x2 IRQ_TYPE_NONE>, + <0x1 0xf1 0x3 IRQ_TYPE_NONE>, + <0x1 0xf1 0x4 IRQ_TYPE_NONE>, + <0x1 0xf1 0x5 IRQ_TYPE_NONE>; + interrupt-names = "spk_cnp_int", + "spk_clip_int", + "spk_ocp_int", + "ins_rem_det1", + "but_rel_det", + "but_press_det", + "ins_rem_det", + "mbhc_int", + "ear_ocp_int", + "hphr_ocp_int", + "hphl_ocp_det", + "ear_cnp_int", + "hphr_cnp_int", + "hphl_cnp_int"; + vddio-supply = <&pm8916_l5>; + vdd-tx-rx-supply = <&pm8916_l5>; + vdd-micbias-supply = <&pm8916_l13>; + qcom,lpass-codec-core = <&lpass_codec_core>; + #sound-dai-cells = <1>; + }; +}; + +soc { + ... + lpass_codec_core: lpass-codec{ + compatible = "qcom,msm8916-lpass-codec", "syscon"; + reg = <0x0771c000 0x400>; + }; + +};