MSM8953 audio dts 代码跟踪

跟一下msm8953音频的dts。

msm8953-audio-mtp.dtsi

&int_codec {
    status = "okay";
    qcom,model = "msm8953-snd-card-mtp";
    qcom,msm-hs-micbias-type = "internal";  // 具有内部MICBIAS
    qcom,msm-spk-ext-pa = <&tlmm 96 0>;
    action,enable-aw8738;
    qcom,audio-routing =
        "RX_BIAS", "MCLK",
        "SPK_RX_BIAS", "MCLK",                  
        "INT_LDO_H", "MCLK",
        "MIC BIAS Internal1", "Handset Mic",    // 听筒采用内部MICBIAS
        "MIC BIAS Internal2", "Headset Mic",    // 耳机采用内部MICBIAS
        "MIC BIAS Internal3", "Secondary Mic",
        "AMIC1", "MIC BIAS Internal1",
        "AMIC2", "MIC BIAS Internal2",
        "AMIC3", "MIC BIAS Internal3";
};

msm-audio.dtsi

    int_codec: sound {
        status = "disabled";
        compatible = "qcom,msm8952-audio-codec";
        qcom,model = "msm8952-snd-card-mtp";
        reg = <0xc051000 0x4>,
              <0xc051004 0x4>,
              <0xc055000 0x4>,
              <0xc052000 0x4>;
        reg-names = "csr_gp_io_mux_mic_ctl",
                "csr_gp_io_mux_spkr_ctl",
                "csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel",
                "csr_gp_io_mux_quin_ctl";

        qcom,msm-ext-pa = "primary";
        qcom,msm-mclk-freq = <9600000>;     // 驱动编解码器的所需的时钟
        qcom,msm-mbhc-hphl-swh = <0>;
        qcom,msm-mbhc-gnd-swh = <0>;
        qcom,msm-hs-micbias-type = "external";
        qcom,msm-micbias1-ext-cap;      // 听筒具有外部电容
        qcom,audio-routing =
            "RX_BIAS", "MCLK",
            "SPK_RX_BIAS", "MCLK",
            "INT_LDO_H", "MCLK",
            "MIC BIAS External", "Handset Mic",
            "MIC BIAS External2", "Headset Mic",
            "MIC BIAS External", "Secondary Mic",
            "AMIC1", "MIC BIAS External",
            "AMIC2", "MIC BIAS External2",
            "AMIC3", "MIC BIAS External",
            "WSA_SPK OUT", "VDD_WSA_SWITCH",
            "SpkrMono WSA_IN", "WSA_SPK OUT";   // 扬声器

        qcom,hdmi-dba-codec-rx;

        qcom,msm-gpios =
            "pri_i2s",
            "us_eu_gpio",
            "quin_i2s";
        qcom,pinctrl-names =
            "all_off",
            "pri_i2s_act",
            "us_eu_gpio_act",
            "pri_i2s_us_eu_gpio_act",
            "quin_act",
            "quin_pri_i2s_act",
            "quin_us_eu_gpio_act",
            "quin_us_eu_gpio_pri_i2s_act";
        // 8种功能,不同的功能使用的引脚见pinctrl-x
        pinctrl-names =
            "all_off",
            "pri_i2s_act",
            "us_eu_gpio_act",
            "pri_i2s_us_eu_gpio_act",
            "quin_act",
            "quin_pri_i2s_act",
            "quin_us_eu_gpio_act",
            "quin_us_eu_gpio_pri_i2s_act";
        // 对应all_off功能, 使用3组pin,总共7个引脚
        pinctrl-0 = <&cdc_pdm_lines_sus
                &cdc_pdm_lines_2_sus &cross_conn_det_sus>;
        // pri_i2s_act, 7个引脚
        pinctrl-1 = <&cdc_pdm_lines_act
                &cdc_pdm_lines_2_act &cross_conn_det_sus>;
        // "us_eu_gpio_act",
        pinctrl-2 = <&cdc_pdm_lines_sus
                &cdc_pdm_lines_2_sus &cross_conn_det_act>;
        // "pri_i2s_us_eu_gpio_act",
        pinctrl-3 = <&cdc_pdm_lines_act
                &cdc_pdm_lines_2_act &cross_conn_det_act>;
        // "quin_act",
        pinctrl-4 = <&cdc_pdm_lines_sus
                &cdc_pdm_lines_2_sus &cross_conn_det_sus>;
        // "quin_pri_i2s_act",
        pinctrl-5 = <&cdc_pdm_lines_act
                &cdc_pdm_lines_2_act &cross_conn_det_sus>;
        // "quin_us_eu_gpio_act",
        pinctrl-6 = <&cdc_pdm_lines_sus
                &cdc_pdm_lines_2_sus &cross_conn_det_act>;
        // "quin_us_eu_gpio_pri_i2s_act";
        pinctrl-7 = <&cdc_pdm_lines_act
                &cdc_pdm_lines_2_act &cross_conn_det_act>;

        asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
                <&loopback>, <&compress>, <&hostless>,
                <&afe>, <&lsm>, <&routing>, <&lpa>;
        asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
                "msm-pcm-dsp.2", "msm-voip-dsp",
                "msm-pcm-voice", "msm-pcm-loopback",
                "msm-compress-dsp", "msm-pcm-hostless",
                "msm-pcm-afe", "msm-lsm-client",
                "msm-pcm-routing", "msm-pcm-lpa";
        asoc-cpu = <&dai_pri_auxpcm>,
                <&dai_mi2s0>, <&dai_mi2s1>,
                <&dai_mi2s2>, <&dai_mi2s3>,
                <&dai_mi2s5>, <&dai_mi2s6>,
                <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
                <&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>,
                <&bt_sco_rx>, <&bt_sco_tx>,
                <&int_fm_rx>, <&int_fm_tx>,
                <&afe_pcm_rx>, <&afe_pcm_tx>,
                <&afe_proxy_rx>, <&afe_proxy_tx>,
                <&incall_record_rx>, <&incall_record_tx>,
                <&incall_music_rx>, <&incall_music_2_rx>;
        asoc-cpu-names = "msm-dai-q6-auxpcm.1",
                "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
                "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
                "msm-dai-q6-mi2s.5", "msm-dai-q6-mi2s.6",
                "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
                "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
                "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
                "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
                "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
                "msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293",
                "msm-dai-q6-dev.224", "msm-dai-q6-dev.225",
                "msm-dai-q6-dev.241", "msm-dai-q6-dev.240",
                "msm-dai-q6-dev.32771", "msm-dai-q6-dev.32772",
                "msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770";
    };

msm8953-pinctrl.dtsi

        cdc_reset_ctrl {
            cdc_reset_sleep: cdc_reset_sleep {
                mux {
                    pins = "gpio67";
                    function = "gpio";
                };
                config {
                    pins = "gpio67";
                    drive-strength = <16>;
                    bias-disable;
                    output-low;
                };
            };
            cdc_reset_active:cdc_reset_active {
                mux {
                    pins = "gpio67";
                    function = "gpio";
                };
                config {
                    pins = "gpio67";
                    drive-strength = <16>;
                    bias-pull-down;
                    output-high;
                };
            };
        };

        cdc_mclk2_pin {
            cdc_mclk2_sleep: cdc_mclk2_sleep {
                mux {
                    pins = "gpio66";
                    function = "pri_mi2s";
                };
                config {
                    pins = "gpio66";
                    drive-strength = <2>; /* 2 mA */
                    bias-pull-down;       /* PULL DOWN */
                };
            };
            cdc_mclk2_active: cdc_mclk2_active {
                mux {
                    pins = "gpio66";
                    function = "pri_mi2s";
                };
                config {
                    pins = "gpio66";
                    drive-strength = <8>; /* 8 mA */
                    bias-disable;         /* NO PULL */
                };
            };
        };
        cdc-pdm-2-lines {
            cdc_pdm_lines_2_act: pdm_lines_2_on {
                mux {
                    pins = "gpio70", "gpio71", "gpio72";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio70", "gpio71", "gpio72";
                    drive-strength = <8>;
                };
            };

            cdc_pdm_lines_2_sus: pdm_lines_2_off {
                mux {
                    pins = "gpio70", "gpio71", "gpio72";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio70", "gpio71", "gpio72";
                    drive-strength = <2>;
                    bias-disable;
                };
            };
        };

        cdc-pdm-lines {
            cdc_pdm_lines_act: pdm_lines_on {
                mux {
                    pins = "gpio69", "gpio73", "gpio74";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio69", "gpio73", "gpio74";
                    drive-strength = <8>;
                };
            };
            cdc_pdm_lines_sus: pdm_lines_off {
                mux {
                    pins = "gpio69", "gpio73", "gpio74";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio69", "gpio73", "gpio74";
                    drive-strength = <2>;
                    bias-disable;
                };
            };
        };

        cdc-pdm-comp-lines {
            cdc_pdm_comp_lines_act: pdm_comp_lines_on {
                mux {
                    pins = "gpio67", "gpio68";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio67", "gpio68";
                    drive-strength = <8>;
                };
            };

            cdc_pdm_comp_lines_sus: pdm_comp_lines_off {
                mux {
                    pins = "gpio67", "gpio68";
                    function = "cdc_pdm0";
                };

                config {
                    pins = "gpio67", "gpio68";
                    drive-strength = <2>;
                    bias-disable;
                };
            };
        };

        cross-conn-det {
            cross_conn_det_act: lines_on {
                mux {
                    pins = "gpio63";
                    function = "gpio";
                };

                config {
                    pins = "gpio63";
                    drive-strength = <8>;
                    output-low;
                    bias-pull-down;
                };
            };

            cross_conn_det_sus: lines_off {
                mux {
                    pins = "gpio63";
                    function = "gpio";
                };

                config {
                    pins = "gpio63";
                    drive-strength = <2>;
                    bias-pull-down;
                };
            };
        };

Liu Tao

2019-3-5

上一篇:apache2的配置指令


下一篇:button按钮文字超出范围后省略号位置设置