Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c05db375 authored by Raja Mallik's avatar Raja Mallik Committed by Sundara Vinayagam
Browse files

ARM: dts: msm: Add audio support for msm8909w



Add device nodes for BG codec audio to work on msm8909w target.

Adapt existing pinctrl changes as per 4.9 kernel.

Add common audio support file with BG and external codec for
msm8909 targets.

Change-Id: Ia700d0f29c3e481e60cad4b2d792f52b453fd269
Signed-off-by: default avatarRaja Mallik <rmallik@codeaurora.org>
Signed-off-by: default avatarChinkit Kumar,Kirti Kumar Parmar <parma@codeaurora.org>
Signed-off-by: default avatarSundara Vinayagam <sundvi@codeaurora.org>
parent 202aa1fb
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -434,6 +434,9 @@ Required properties:
Required properties:

 - compatible :                            "qcom,wcd-dsp-glink"
 - qcom,msm-codec-glink-edge:              Name of the glink edge which is used
                                           for IPC.
                                           If no name is set, it defaults to "wdsp"

* msm_ext_disp_audio_codec_rx

@@ -722,6 +725,7 @@ Example:

	wcd_dsp_glink {
		compatible = "qcom,wcd-dsp-glink";
		qcom,msm-codec-glink-edge = "bg";
	};

	msm_ext_disp_audio_codec_rx {
@@ -1180,6 +1184,18 @@ Required properties:
				When clock rate is set to zero,
				then external clock is assumed.

 - qcom,msm-cpudai-tdm-afe-ebit-unsupported: Notify if ebit
				setting is needed.When this is
				set, along with clock rate as
				zero, then afe is not configured
				for clock.

 - qcom,msm-cpudai-tdm-sec-port-enable: For chipsets with the
				limitation where we need to enable
				both RX and TX AFE ports, this flag
				is used to enable TX/RX port for
				RX/TX streams.

 - qcom,msm-cpudai-tdm-clk-internal: Clock Source.
				0 - EBIT clock from clk tree
				1 - IBIT clock from clk tree
+152 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, 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.
 */

&soc {
	pcm0: qcom,msm-pcm {
		compatible = "qcom,msm-pcm-dsp";
		qcom,msm-pcm-dsp-id = <0>;
	};

	routing: qcom,msm-pcm-routing {
		compatible = "qcom,msm-pcm-routing";
	};

	compr: qcom,msm-compr-dsp {
		compatible = "qcom,msm-compr-dsp";
	};

	pcm1: qcom,msm-pcm-low-latency {
		compatible = "qcom,msm-pcm-dsp";
		qcom,msm-pcm-dsp-id = <1>;
		qcom,msm-pcm-low-latency;
		qcom,latency-level = "regular";
	};

	pcm2: qcom,msm-ultra-low-latency {
		compatible = "qcom,msm-pcm-dsp";
		qcom,msm-pcm-dsp-id = <2>;
		qcom,msm-pcm-low-latency;
		qcom,latency-level = "ultra";
	};

	compress: qcom,msm-compress-dsp {
		compatible = "qcom,msm-compress-dsp";
	};

	voip: qcom,msm-voip-dsp {
		compatible = "qcom,msm-voip-dsp";
	};

	voice: qcom,msm-pcm-voice {
		compatible = "qcom,msm-pcm-voice";
		qcom,destroy-cvd;
	};

	stub_codec: qcom,msm-stub-codec {
		compatible = "qcom,msm-stub-codec";
	};

	qcom,msm-dai-fe {
		compatible = "qcom,msm-dai-fe";
	};

	afe: qcom,msm-pcm-afe {
		compatible = "qcom,msm-pcm-afe";
	};

	loopback: qcom,msm-pcm-loopback {
		compatible = "qcom,msm-pcm-loopback";
	};

	lsm: qcom,msm-lsm-client {
		compatible = "qcom,msm-lsm-client";
	};

	qcom,msm-dai-q6 {
		compatible = "qcom,msm-dai-q6";
		bt_sco_rx: qcom,msm-dai-q6-bt-sco-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <12288>;
		};

		bt_sco_tx: qcom,msm-dai-q6-bt-sco-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <12289>;
		};

		int_fm_rx: qcom,msm-dai-q6-int-fm-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <12292>;
		};

		int_fm_tx: qcom,msm-dai-q6-int-fm-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <12293>;
		};

		afe_pcm_rx: qcom,msm-dai-q6-be-afe-pcm-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <224>;
		};

		afe_pcm_tx: qcom,msm-dai-q6-be-afe-pcm-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <225>;
		};

		afe_proxy_rx: qcom,msm-dai-q6-afe-proxy-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <241>;
		};

		afe_proxy_tx: qcom,msm-dai-q6-afe-proxy-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <240>;
		};

		incall_record_rx: qcom,msm-dai-q6-incall-record-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <32771>;
		};

		incall_record_tx: qcom,msm-dai-q6-incall-record-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <32772>;
		};

		incall_music_rx: qcom,msm-dai-q6-incall-music-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <32773>;
		};

		incall_music_2_rx: qcom,msm-dai-q6-incall-music-2-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <32770>;
		};

		usb_audio_rx: qcom,msm-dai-q6-usb-audio-rx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <28672>;
		};

		usb_audio_tx: qcom,msm-dai-q6-usb-audio-tx {
			compatible = "qcom,msm-dai-q6-dev";
			qcom,msm-dai-q6-dev-id = <28673>;
		};
	};

	hostless: qcom,msm-pcm-hostless {
		compatible = "qcom,msm-pcm-hostless";
	};

};
+28 −47
Original line number Diff line number Diff line
@@ -9,8 +9,15 @@
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
#include "msm-audio-lpass-msm8909.dtsi"

&soc {
	qcom,msm-audio-apr {
		compatible = "qcom,msm-audio-apr";
		msm_audio_apr_dummy {
			compatible = "qcom,msm-audio-apr-dummy";
		};
	};
	audio_codec_bg: sound {
		status = "disabled";
		compatible = "qcom,msm-bg-audio-codec";
@@ -28,6 +35,8 @@
		qcom,msm-ext-pa = "primary";
		qcom,tdm-audio-intf;
		qcom,msm-afe-clk-ver = <1>;
		qcom,split-a2dp;
		qcom,pri-mi2s-gpios = <&cdc_dmic_gpios>;
		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&lpa>,
@@ -69,7 +78,12 @@
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
	};

	cdc_dmic_gpios: cdc_dmic_pinctrl {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&quat_mi2s_active &quat_mi2s_din_active>;
		pinctrl-1 = <&quat_mi2s_sleep &quat_mi2s_din_sleep>;
	};
	pri_tdm_rx: qcom,msm-dai-tdm-pri-rx {
		compatible = "qcom,msm-dai-tdm";
		qcom,msm-cpudai-tdm-group-id = <37120>;
@@ -77,49 +91,32 @@
		qcom,msm-cpudai-tdm-group-port-id = <36864 36866 36868 36870>;
		qcom,msm-cpudai-tdm-clk-rate = <0>;
		qcom,msm-cpudai-tdm-afe-ebit-unsupported;
		qcom,msm-cpudai-tdm-sec-port-enable;
		qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>;
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&quat_mi2s_active &quat_mi2s_din_active>;
		pinctrl-1 = <&quat_mi2s_sleep &quat_mi2s_din_sleep>;
		dai_pri_tdm_rx_0: qcom,msm-dai-q6-tdm-pri-rx-0 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36864>;
		qcom,msm-cpudai-tdm-clk-internal = <0>;
		qcom,msm-cpudai-tdm-sync-mode = <0>;
		qcom,msm-cpudai-tdm-sync-src = <0>;
		qcom,msm-cpudai-tdm-data-out = <0>;
		qcom,msm-cpudai-tdm-invert-sync = <0>;
		qcom,msm-cpudai-tdm-data-delay = <0>;
		qcom,msm-cpudai-tdm-sec-port-enable;
		qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>;
		dai_pri_tdm_rx_0: qcom,msm-dai-q6-tdm-pri-rx-0 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36864>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_rx_1: qcom,msm-dai-q6-tdm-pri-rx-1 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36866>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_rx_2: qcom,msm-dai-q6-tdm-pri-rx-2 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36868>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_rx_3: qcom,msm-dai-q6-tdm-pri-rx-3 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36870>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
	};
@@ -131,49 +128,32 @@
		qcom,msm-cpudai-tdm-group-port-id = <36865 36867 36869 36871>;
		qcom,msm-cpudai-tdm-clk-rate = <0>;
		qcom,msm-cpudai-tdm-afe-ebit-unsupported;
		qcom,msm-cpudai-tdm-sec-port-enable;
		qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>;
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&quat_mi2s_active &quat_mi2s_din_active>;
		pinctrl-1 = <&quat_mi2s_sleep &quat_mi2s_din_sleep>;
		dai_pri_tdm_tx_0: qcom,msm-dai-q6-tdm-pri-tx-0 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36865>;
		qcom,msm-cpudai-tdm-clk-internal = <0>;
		qcom,msm-cpudai-tdm-sync-mode = <0>;
		qcom,msm-cpudai-tdm-sync-src = <0>;
		qcom,msm-cpudai-tdm-data-out = <0>;
		qcom,msm-cpudai-tdm-invert-sync = <0>;
		qcom,msm-cpudai-tdm-data-delay = <0>;
		qcom,msm-cpudai-tdm-sec-port-enable;
		qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>;
		dai_pri_tdm_tx_0: qcom,msm-dai-q6-tdm-pri-tx-0 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36865>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_tx_1: qcom,msm-dai-q6-tdm-pri-tx-1 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36867>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_tx_2: qcom,msm-dai-q6-tdm-pri-tx-2 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36869>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
		dai_pri_tdm_tx_3: qcom,msm-dai-q6-tdm-pri-tx-3 {
			compatible = "qcom,msm-dai-q6-tdm";
			qcom,msm-cpudai-tdm-dev-id = <36871>;
			qcom,msm-cpudai-tdm-sync-mode = <0>;
			qcom,msm-cpudai-tdm-sync-src = <0>;
			qcom,msm-cpudai-tdm-data-out = <0>;
			qcom,msm-cpudai-tdm-invert-sync = <0>;
			qcom,msm-cpudai-tdm-data-delay = <0>;
			qcom,msm-cpudai-tdm-data-align = <0>;
		};
	};
@@ -187,6 +167,7 @@
		status = "disabled";
		compatible = "qcom,bg-codec";
		qcom,subsys-name = "modem";
		qcom,bg-speaker-connected;
		qcom,bg-glink {
			compatible = "qcom,bg-cdc-glink";
			qcom,msm-glink-channels = <4>;