From patchwork Tue Feb 16 17:32:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 62059 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1798793lbl; Tue, 16 Feb 2016 09:32:43 -0800 (PST) X-Received: by 10.66.102.104 with SMTP id fn8mr33048557pab.129.1455643963522; Tue, 16 Feb 2016 09:32:43 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n23si52429871pfj.17.2016.02.16.09.32.43; Tue, 16 Feb 2016 09:32:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755595AbcBPRcl (ORCPT + 30 others); Tue, 16 Feb 2016 12:32:41 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34417 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755553AbcBPRcj (ORCPT ); Tue, 16 Feb 2016 12:32:39 -0500 Received: by mail-wm0-f44.google.com with SMTP id b205so120569283wmb.1 for ; Tue, 16 Feb 2016 09:32:38 -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:in-reply-to:references; bh=EtBunSVvGLACPTVDUaSOlmwjKqC8jT2GusDzif1ly1o=; b=ZWy3EO3qPYxHTUOVx1nN4eHJ1s9h6V4pLHgiuF6/WYBT9xZZWGIl1MJj3aY5NK/mku qawCpCE8aHrJxgCnSOZTl5JiQOGurARqAh1C3zoSRz3SLXhHojTqQredOok6hotCcwYg w0Yj5lblS7Ag2M+0EJ7Vzukihg5rcuAF4zojk= 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=EtBunSVvGLACPTVDUaSOlmwjKqC8jT2GusDzif1ly1o=; b=UumtEZxPHHqqQLQv+CAq9gVBBwWcf9lQqV62Um4QYCyvTWmuubAOPZyOStdTnXKWes jmqUeATJKGXbQ6IbG/T2cxFkFEWjAixy7fTajiGbaATE67VySNpV41IzU/bfb2JYnwhm Z4/c6W825ywCXUV1nTroFpOZfW+2rtIgpz6IPToTRP7DAPgRUxPO1d3MQScNEkOrxwli uluXzOjI1bUDRxkz7WCnTLneysawvaBq0g5TYUP2RfC6kl3/8Y79TA3TopRYOld3MtXl jW45i8U5qk5T1u4PWb5xpB2F+QduN6Hd9W5Nldi6d+yVBwpgOXEr8fWLUh6d+nmPhMfg qNJQ== X-Gm-Message-State: AG10YORe0HzXjhJ0hQ/G/lJ8CkNkwVlsc2YGjRjlLGcQbnXZIgcHlun2AaNKikOwrOi7UQiE X-Received: by 10.28.218.145 with SMTP id r139mr22071416wmg.52.1455643957556; Tue, 16 Feb 2016 09:32:37 -0800 (PST) Received: from localhost.localdomain (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.gmail.com with ESMTPSA id bg1sm31202134wjc.27.2016.02.16.09.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 09:32:36 -0800 (PST) From: Srinivas Kandagatla To: alsa-devel@alsa-project.org, Mark Brown Cc: Rob Herring , Mark Rutland , Pawel Moll , Patrick Lai , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kwestfie@codeaurora.org, Srinivas Kandagatla Subject: [RFC v1 1/9] ASoC: msm8x176: Add Device Tree bindings. Date: Tue, 16 Feb 2016 17:32:30 +0000 Message-Id: <1455643950-1657-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455643880-1611-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1455643880-1611-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds DT bindings required for msm8x16 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,msm8x16-wcd.txt | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,msm8x16-wcd.txt -- 1.9.1 diff --git a/Documentation/devicetree/bindings/sound/qcom,msm8x16-wcd.txt b/Documentation/devicetree/bindings/sound/qcom,msm8x16-wcd.txt new file mode 100644 index 0000000..42d3f66 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,msm8x16-wcd.txt @@ -0,0 +1,91 @@ +msm8x16 audio CODEC aka Tombak 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,msm8x16-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 + - 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. + - vdda-cp-supply: phandle of VDD_CP charge pump supply's regulator device tree node. + - vdda-hph-supply: phandle of VDD_HPH supply's 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 "syscon" follwed by "qcom,msm8x16-lpass-codec" + - reg: represents the lpass codec core register map. + +Example: + +spmi_bus { + ... + msm8x16_wcd_codec@f000{ + compatible = "qcom,msm8x16-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-cp-supply = <&pm8916_s4>; + vdd-hph-supply = <&pm8916_s4>; + vdd-tx-rx-supply = <&pm8916_l5> + vdd-micbias-supply = <&pm8916_l13>; + qcom,lpass-codec-core = <&lpass_codec>; + #sound-dai-cells = <1>; + }; +}; + +soc { + ... + lpass_codec_core: lpass-codec{ + compatible = "syscon", "qcom,msm8x16-lpass-codec"; + reg = <0x0771c000 0x400>; + }; + +};