From patchwork Fri May 27 13:45: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: 9138687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 040C96075A for ; Fri, 27 May 2016 15:45:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9CC62780C for ; Fri, 27 May 2016 15:45:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE7B728093; Fri, 27 May 2016 15:45:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F592780C for ; Fri, 27 May 2016 15:45:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A1DC3266686; Fri, 27 May 2016 17:45:27 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A721826669D; Fri, 27 May 2016 17:14:45 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BB70226668E; Fri, 27 May 2016 17:14:43 +0200 (CEST) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by alsa0.perex.cz (Postfix) with ESMTP id 0CF2B266BC5 for ; Fri, 27 May 2016 15:45:55 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id n129so138251695wmn.1 for ; Fri, 27 May 2016 06:45:55 -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=V2l0JJLoBc+eAIGN1WtmtDWW2g2Oc/UZYRhs2ya4DM4=; b=bymUsTFbROa0QOhYI2cgyo+6XAzxyJNZwc+gehW1fwKiC2pymlkZZ4+P52WM3NLPlH taBAfOZZknZbsPHSUNslNg95Xn//2uukHgh1PeBhMLSovMhVCKwrd9dmmqOeYt5V/qE0 4wm0tdsdmLF54qsjLHuWJTsPlYGNFrvT/SZ5I= 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=V2l0JJLoBc+eAIGN1WtmtDWW2g2Oc/UZYRhs2ya4DM4=; b=GbFY0xDenXfKC0op0WzhXwZMBZbLDL0QRpG68dOIJOs/tNqW9lIxSVnoDcSziFWnK0 kA2InSs5qYSQ5zx6RP0Afk/z5L6MkRGaK0E6CxGkBibvoTsJtABrmIqAGUTCzYMFzzSO bqgh3vyQLCCwSlrYdUvGxb71hmgljRORt2EApTp5uVlPwOu88DTp94e3w7f5eNKjklGr 4ro4H+hvJgwulKHXF3mL1Xmy5rnTIFMJU1KGoAzp0TrnVgiWORHPG3J7vUd/tncmBT+b eIDbH2nNmXohys8PIPPNNmEeZslMzXObv6KBCfd8Wa6qxaVto67AFbF1ivwvQcy2uzkL sWhw== X-Gm-Message-State: ALyK8tLc2jNfkE9gSpwQqi5uEK1VtvdJMaYr7k6f6b0l3O8EbhtofbLrPcr8CfpvEbFEcpOz X-Received: by 10.195.8.40 with SMTP id dh8mr13123057wjd.178.1464356754675; Fri, 27 May 2016 06:45:54 -0700 (PDT) Received: from localhost.localdomain (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.gmail.com with ESMTPSA id jq1sm19430323wjc.28.2016.05.27.06.45.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 May 2016 06:45:53 -0700 (PDT) From: Srinivas Kandagatla To: Mark Brown , alsa-devel@alsa-project.org Date: Fri, 27 May 2016 14:45:44 +0100 Message-Id: <1464356746-29610-2-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464356746-29610-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1464356746-29610-1-git-send-email-srinivas.kandagatla@linaro.org> Cc: Mark Rutland , devicetree@vger.kernel.org, kwestfie@codeaurora.org, linux-kernel@vger.kernel.org, plai@codeaurora.org, Takashi Iwai , Liam Girdwood , Rob Herring , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org Subject: [alsa-devel] [RFC v2 1/3] ASoC: msm8916: Add codec Device Tree bindings. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt 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..4e3826d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd.txt @@ -0,0 +1,101 @@ +msm8916 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,msm8916-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 + + - 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-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>; + }; + +};