OSDN Git Service

ARM: dts: msm: Add pinctrl device nodes for HiFi amplifier on MSM8998
authorSudheer Papothi <spapothi@codeaurora.org>
Fri, 4 Nov 2016 17:57:20 +0000 (23:27 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Mon, 5 Dec 2016 18:43:05 +0000 (10:43 -0800)
HiFi amplifier uses lineout path in the codec to be routed to
headphone amplifiers. This routing needs two gpios to be
toggled. Add pinctrl device nodes to control gpios for
HiFi amplifier usecase.

Change-Id: I8d34eecd562ab50a8ec89f241406092d1b763a9a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
arch/arm/boot/dts/qcom/msm8998-audio.dtsi
arch/arm/boot/dts/qcom/msm8998-pinctrl.dtsi

index 506e37c..a9aeab4 100644 (file)
@@ -53,6 +53,8 @@
                        "AIF4 VI", "MCLK",
                        "RX_BIAS", "MCLK",
                        "MADINPUT", "MCLK",
+                       "hifi amp", "LINEOUT1",
+                       "hifi amp", "LINEOUT2",
                        "AMIC2", "MIC BIAS2",
                        "MIC BIAS2", "Headset Mic",
                        "AMIC3", "MIC BIAS2",
@@ -81,6 +83,8 @@
                qcom,msm-mbhc-hphl-swh = <0>;
                qcom,msm-mbhc-gnd-swh = <0>;
                qcom,us-euro-gpios = <&wcd_us_euro_gpio>;
+               qcom,hph-en0-gpio = <&hph_en0_gpio>;
+               qcom,hph-en1-gpio = <&hph_en1_gpio>;
                qcom,tasha-mclk-clk-freq = <9600000>;
                asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
                                <&loopback>, <&compress>, <&hostless>,
                                <&wsa881x_213>, <&wsa881x_214>;
                qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
                                          "SpkrLeft", "SpkrRight";
+
+               hph_en0_gpio: msm_cdc_pinctrl@67 {
+                       compatible = "qcom,msm-cdc-pinctrl";
+                       pinctrl-names = "aud_active", "aud_sleep";
+                       pinctrl-0 = <&hph_en0_active>;
+                       pinctrl-1 = <&hph_en0_idle>;
+               };
+
+               hph_en1_gpio: msm_cdc_pinctrl@68 {
+                       compatible = "qcom,msm-cdc-pinctrl";
+                       pinctrl-names = "aud_active", "aud_sleep";
+                       pinctrl-0 = <&hph_en1_active>;
+                       pinctrl-1 = <&hph_en1_idle>;
+               };
        };
 
        sound-tavil {
                qcom,audio-routing =
                        "RX_BIAS", "MCLK",
                        "MADINPUT", "MCLK",
+                       "hifi amp", "LINEOUT1",
+                       "hifi amp", "LINEOUT2",
                        "AMIC2", "MIC BIAS2",
                        "MIC BIAS2", "Headset Mic",
                        "AMIC3", "MIC BIAS2",
index 5685e90..b48321a 100644 (file)
                        };
                };
 
+               hph_en0_ctrl {
+                       hph_en0_idle: hph_en0_idle {
+                               mux {
+                                       pins = "gpio67";
+                                       function = "gpio";
+                               };
+                               config {
+                                       pins = "gpio67";
+                                       drive-strength = <2>;
+                                       bias-pull-down;
+                                       output-low;
+                               };
+                       };
+                       hph_en0_active: hph_en0_active {
+                               mux {
+                                       pins = "gpio67";
+                                       function = "gpio";
+                               };
+                               config {
+                                       pins = "gpio67";
+                                       drive-strength = <2>;
+                                       bias-disable;
+                                       output-high;
+                               };
+                       };
+               };
+
+               hph_en1_ctrl {
+                       hph_en1_idle: hph_en1_idle {
+                               mux {
+                                       pins = "gpio68";
+                                       function = "gpio";
+                               };
+                               config {
+                                       pins = "gpio68";
+                                       drive-strength = <2>;
+                                       bias-pull-down;
+                                       output-low;
+                               };
+                       };
+                       hph_en1_active: hph_en1_active {
+                               mux {
+                                       pins = "gpio68";
+                                       function = "gpio";
+                               };
+                               config {
+                                       pins = "gpio68";
+                                       drive-strength = <2>;
+                                       bias-disable;
+                                       output-high;
+                               };
+                       };
+               };
+
                wcd_gnd_mic_swap {
                        wcd_gnd_mic_swap_idle: wcd_gnd_mic_swap_idle {
                                mux {