OSDN Git Service

ARM: dts: msm: add gpio controller node for msmcobalt
authorYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Tue, 21 Jun 2016 22:34:54 +0000 (04:04 +0530)
committerYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Wed, 20 Jul 2016 07:07:23 +0000 (12:37 +0530)
WCD934X audio codec has GPIO controller and hence add
pinctrl node for WCD934X pinctrl driver. Change WSA GPIO's
to codec GPIO's.

CRs-Fixed: 1041199
Change-Id: I0f04c08587f080eb2df7341d41344ce2079de21b
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
arch/arm/boot/dts/qcom/msmcobalt-audio.dtsi
arch/arm/boot/dts/qcom/msmcobalt-wcd.dtsi [new file with mode: 0644]
arch/arm/boot/dts/qcom/msmcobalt-wsa881x.dtsi

index 25f3be5..1ef5e63 100644 (file)
                                "msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673";
                asoc-codec = <&stub_codec>;
                asoc-codec-names = "msm-stub-codec.1";
-               qcom,wsa-max-devs = <0>;
+               qcom,wsa-max-devs = <2>;
+               qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
+                               <&wsa881x_0213>, <&wsa881x_0214>;
+               qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
+                                         "SpkrLeft", "SpkrRight";
        };
 
        cpe: qcom,msm-cpe-lsm {
diff --git a/arch/arm/boot/dts/qcom/msmcobalt-wcd.dtsi b/arch/arm/boot/dts/qcom/msmcobalt-wcd.dtsi
new file mode 100644 (file)
index 0000000..7ae084d
--- /dev/null
@@ -0,0 +1,96 @@
+/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+&slim_aud {
+       tasha_codec {
+               wsa_spkr_sd1: msm_cdc_pinctrll {
+                     compatible = "qcom,msm-cdc-pinctrl";
+                     pinctrl-names = "aud_active", "aud_sleep";
+                     pinctrl-0 = <&spkr_1_sd_n_active>;
+                     pinctrl-1 = <&spkr_1_sd_n_sleep>;
+               };
+
+               wsa_spkr_sd2: msm_cdc_pinctrlr {
+                     compatible = "qcom,msm-cdc-pinctrl";
+                     pinctrl-names = "aud_active", "aud_sleep";
+                     pinctrl-0 = <&spkr_2_sd_n_active>;
+                     pinctrl-1 = <&spkr_2_sd_n_sleep>;
+               };
+       };
+
+       tavil_codec {
+               wcd: wcd_pinctrl@5 {
+                       compatible = "qcom,wcd-pinctrl";
+                       qcom,num-gpios = <5>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       spkr_1_wcd_en_active: spkr_1_wcd_en_active {
+                               mux {
+                                       pins = "gpio2";
+                               };
+
+                               config {
+                                       pins = "gpio2";
+                                       output-high;
+                               };
+                       };
+
+                       spkr_1_wcd_en_sleep: spkr_1_wcd_en_sleep {
+                               mux {
+                                       pins = "gpio2";
+                               };
+
+                               config {
+                                       pins = "gpio2";
+                                       input-enable;
+                               };
+                       };
+
+                       spkr_2_wcd_en_active: spkr_2_sd_n_active {
+                               mux {
+                                       pins = "gpio3";
+                               };
+
+                               config {
+                                       pins = "gpio3";
+                                       output-high;
+                               };
+                       };
+
+                       spkr_2_wcd_en_sleep: spkr_2_sd_n_sleep {
+                               mux {
+                                       pins = "gpio3";
+                               };
+
+                               config {
+                                       pins = "gpio3";
+                                       input-enable;
+                               };
+                       };
+               };
+
+               wsa_spkr_wcd_sd1: msm_cdc_pinctrll {
+                     compatible = "qcom,msm-cdc-pinctrl";
+                     pinctrl-names = "aud_active", "aud_sleep";
+                     pinctrl-0 = <&spkr_1_wcd_en_active>;
+                     pinctrl-1 = <&spkr_1_wcd_en_sleep>;
+               };
+
+               wsa_spkr_wcd_sd2: msm_cdc_pinctrlr {
+                     compatible = "qcom,msm-cdc-pinctrl";
+                     pinctrl-names = "aud_active", "aud_sleep";
+                     pinctrl-0 = <&spkr_2_wcd_en_active>;
+                     pinctrl-1 = <&spkr_2_wcd_en_sleep>;
+               };
+       };
+};
index f9bb0e0..baf05c1 100644 (file)
@@ -9,24 +9,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
-
-&soc {
-       wsa_spkr_sd1: msm_cdc_pinctrl@65 {
-               compatible = "qcom,msm-cdc-pinctrl";
-               qcom,cdc-rst-n-gpio = <&tlmm 65 0>;
-               pinctrl-names = "aud_active", "aud_sleep";
-               pinctrl-0 = <&spkr_1_sd_n_active>;
-               pinctrl-1 = <&spkr_1_sd_n_sleep>;
-       };
-
-       wsa_spkr_sd2: msm_cdc_pinctrl@66 {
-               compatible = "qcom,msm-cdc-pinctrl";
-               qcom,cdc-rst-n-gpio = <&tlmm 66 0>;
-               pinctrl-names = "aud_active", "aud_sleep";
-               pinctrl-0 = <&spkr_2_sd_n_active>;
-               pinctrl-1 = <&spkr_2_sd_n_sleep>;
-       };
-};
+#include "msmcobalt-wcd.dtsi"
 
 &slim_aud {
        tasha_codec {
                        wsa881x_0211: wsa881x@20170211 {
                                compatible = "qcom,wsa881x";
                                reg = <0x00 0x20170211>;
-                               qcom,spkr-sd-n-node = <&wsa_spkr_sd1>;
+                               qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd1>;
                        };
 
                        wsa881x_0212: wsa881x@20170212 {
                                compatible = "qcom,wsa881x";
                                reg = <0x00 0x20170212>;
-                               qcom,spkr-sd-n-node = <&wsa_spkr_sd2>;
+                               qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd2>;
                        };
 
                        wsa881x_0213: wsa881x@21170213 {
                                compatible = "qcom,wsa881x";
                                reg = <0x00 0x21170213>;
-                               qcom,spkr-sd-n-node = <&wsa_spkr_sd1>;
+                               qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd1>;
                        };
 
                        wsa881x_0214: wsa881x@21170214 {
                                compatible = "qcom,wsa881x";
                                reg = <0x00 0x21170214>;
-                               qcom,spkr-sd-n-node = <&wsa_spkr_sd2>;
+                               qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd2>;
                        };
                };
        };