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

Commit c8b878b4 authored by Josh Kirsch's avatar Josh Kirsch Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Fix for GPIO conflict issue on MSM8996 and APQ8096



Create individual node for MI2S tert SD1 so that it will only be
included in the APQ8096 MDM9x55 I2S targets and not conflict with
MSM8996. Also, add fix for pinctrl GPIO issue that was causing
the codec read and writes to fail. Add support for QUAT SD1 GPIO.

CRs-fixed: 1024729
Change-Id: Ib687057c1a72d0b707eab711d17571bf8b1ff474
Signed-off-by: default avatarJosh Kirsch <jkirsch@codeaurora.org>
parent beb1eeec
Loading
Loading
Loading
Loading
+164 −0
Original line number Diff line number Diff line
@@ -111,3 +111,167 @@
		status = "okay";
	};
};

&soc {
	sound {
		status = "disabled";
	};

	sound-9335 {
		status = "disabled";
	};

	slim_msm: slim@91c0000 {
		status = "disabled";
	};

	clock_audio: audio_ext_clk {
		compatible = "qcom,audio-ref-clk";
		qcom,codec-mclk-clk-freq = <12288000>;
		pinctrl-names = "sleep", "active";
		pinctrl-0 = <&spkr_i2s_clk_sleep &ap_mclk_sleep
			     &mdm_mclk_sleep>;
		pinctrl-1 = <&spkr_i2s_clk_active &ap_mclk_active
			     &mdm_mclk_sleep>;
	};

	i2c_7: i2c@75b5000 {
		wcd9xxx_codec@d {
			compatible = "qcom,tasha-i2c-pgd";
			reg = <0x0d>;

			interrupt-parent = <&wcd9xxx_intc>;
			interrupts = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
				      17 18 19 20 21 22 23 24 25 26 27 28 29
				      30>;

			qcom,cdc-reset-gpio = <&tlmm 64 0>;
			pinctrl-names = "default", "idle";
			pinctrl-0 = <&cdc_reset_active>;
			pinctrl-1 = <&cdc_reset_sleep>;

			clock-names = "wcd_clk";
			clocks = <&clock_audio clk_audio_lpass_mclk2>;

			cdc-vdd-buck-supply = <&pm8994_s4>;
			qcom,cdc-vdd-buck-voltage = <1800000 1800000>;
			qcom,cdc-vdd-buck-current = <650000>;

			cdc-buck-sido-supply = <&pm8994_s4>;
			qcom,cdc-buck-sido-voltage = <1800000 1800000>;
			qcom,cdc-buck-sido-current = <250000>;

			cdc-vdd-tx-h-supply = <&pm8994_s4>;
			qcom,cdc-vdd-tx-h-voltage = <1800000 1800000>;
			qcom,cdc-vdd-tx-h-current = <25000>;

			cdc-vdd-rx-h-supply = <&pm8994_s4>;
			qcom,cdc-vdd-rx-h-voltage = <1800000 1800000>;
			qcom,cdc-vdd-rx-h-current = <25000>;

			cdc-vddpx-1-supply = <&pm8994_s4>;
			qcom,cdc-vddpx-1-voltage = <1800000 1800000>;
			qcom,cdc-vddpx-1-current = <10000>;

			qcom,cdc-static-supplies = "cdc-vdd-buck",
						   "cdc-buck-sido",
						   "cdc-vdd-tx-h",
						   "cdc-vdd-rx-h",
						   "cdc-vddpx-1";

			qcom,cdc-micbias1-mv = <1800>;
			qcom,cdc-micbias2-mv = <1800>;
			qcom,cdc-micbias3-mv = <1800>;
			qcom,cdc-micbias4-mv = <1800>;

			qcom,cdc-mclk-clk-rate = <12288000>;
			qcom,cdc-dmic-sample-rate = <4800000>;
		};
	};

	sound-9335-i2c {
		compatible = "qcom,apq8096-asoc-snd-tasha-i2c";
		qcom,model = "apq8096-tasha-i2c-snd-card";

		qcom,audio-routing =
			"AIF4 VI", "MCLK",
			"RX_BIAS", "MCLK",
			"MADINPUT", "MCLK",
			"AMIC2", "MIC BIAS2",
			"MIC BIAS2", "Headset Mic",
			"AMIC3", "MIC BIAS2",
			"MIC BIAS2", "ANCRight Headset Mic",
			"AMIC4", "MIC BIAS2",
			"MIC BIAS2", "ANCLeft Headset Mic",
			"AMIC5", "MIC BIAS3",
			"MIC BIAS3", "Handset Mic",
			"AMIC6", "MIC BIAS4",
			"MIC BIAS4", "Analog Mic6",
			"DMIC0", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic0",
			"DMIC1", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic1",
			"DMIC2", "MIC BIAS3",
			"MIC BIAS3", "Digital Mic2",
			"DMIC3", "MIC BIAS3",
			"MIC BIAS3", "Digital Mic3",
			"DMIC4", "MIC BIAS4",
			"MIC BIAS4", "Digital Mic4",
			"DMIC5", "MIC BIAS4",
			"MIC BIAS4", "Digital Mic5",
			"SpkrLeft IN", "SPK1 OUT",
			"SpkrRight IN", "SPK2 OUT";

		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&cpe>, <&compr>;
		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-cpe-lsm",
				"msm-compr-dsp";
		asoc-cpu = <&dai_pri_auxpcm>, <&dai_sec_auxpcm>, <&dai_hdmi>,
				<&dai_mi2s>, <&dai_mi2s_quat>,
				<&afe_pcm_rx>, <&afe_pcm_tx>,
				<&afe_proxy_rx>, <&afe_proxy_tx>,
				<&incall_record_rx>, <&incall_record_tx>,
				<&incall_music_rx>, <&incall_music2_rx>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-auxpcm.2",
				"msm-dai-q6-hdmi.8",
				"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
				"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";
		qcom,tasha-mclk-clk-freq = <12288000>;
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
	};

	qcom,msm-dai-mi2s {
		dai_mi2s: qcom,msm-dai-q6-mi2s-tert {
			compatible = "qcom,msm-dai-q6-mi2s";
			qcom,msm-dai-q6-mi2s-dev-id = <2>;
			qcom,msm-mi2s-rx-lines = <2>;
			qcom,msm-mi2s-tx-lines = <1>;
			pinctrl-names = "default", "sleep";
			pinctrl-0 = <&tert_mi2s_active &tert_mi2s_sd0_active
						&tert_mi2s_sd1_active>;
			pinctrl-1 = <&tert_mi2s_sleep &tert_mi2s_sd0_sleep
						&tert_mi2s_sd1_sleep>;
		};
		dai_mi2s_quat: qcom,msm-dai-q6-mi2s-quat {
			compatible = "qcom,msm-dai-q6-mi2s";
			qcom,msm-dai-q6-mi2s-dev-id = <3>;
			qcom,msm-mi2s-rx-lines = <2>;
			qcom,msm-mi2s-tx-lines = <1>;
			pinctrl-names = "default", "sleep";
			pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active>;
			pinctrl-1 = <&quat_mi2s_sleep &quat_mi2s_sd0_sleep>;
		};
	};
};
+88 −4
Original line number Diff line number Diff line
@@ -1572,6 +1572,33 @@
			};
		};

		tert_mi2s_sd1 {
			tert_mi2s_sd1_sleep: tert_mi2s_sd1_sleep {
				mux {
					pins = "gpio78";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio78";
					drive-strength = <2>;   /* 2 mA */
					bias-pull-down;         /* PULL DOWN */
				};
			};
			tert_mi2s_sd1_active: tert_mi2s_sd1_active {
				mux {
					pins = "gpio78";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio78";
					drive-strength = <8>;   /* 8 mA */
					bias-disable;           /* NO PULL */
				};
			};
		};

		tert_mi2s_sd0 {
			tert_mi2s_sd0_sleep: tert_mi2s_sd0_sleep {
				mux {
@@ -1602,24 +1629,24 @@
		quat_mi2s {
			quat_mi2s_sleep: quat_mi2s_sleep {
				mux {
					pins = "gpio58", "gpio59";
					pins = "gpio58", "gpio59", "gpio61";
					function = "qua_mi2s";
				};

				config {
					pins = "gpio58", "gpio59";
					pins = "gpio58", "gpio59", "gpio61";
					drive-strength = <2>;   /* 2 mA */
					bias-pull-down;         /* PULL DOWN */
				};
			};
			quat_mi2s_active: quat_mi2s_active {
				mux {
					pins = "gpio58", "gpio59";
					pins = "gpio58", "gpio59", "gpio61";
					function = "qua_mi2s";
				};

				config {
					pins = "gpio58", "gpio59";
					pins = "gpio58", "gpio59", "gpio61";
					drive-strength = <8>;   /* 8 mA */
					bias-disable;           /* NO PULL */
					output-high;
@@ -1817,6 +1844,63 @@
				};
			};
		};
		ap_mclk_en {
			ap_mclk_sleep: ap_mclk_sleep {
				mux {
					pins = "gpio133";
					function = "gpio";
				};

				config {
					pins = "gpio133";
					drive-strength = <2>;
					bias-pull-down;
					output-low;
				};
			};
			ap_mclk_active: ap_mclk_active {
				mux {
					pins = "gpio133";
					function = "gpio";
				};

				config {
					pins = "gpio133";
					drive-strength = <2>;
					bias-disable;
					output-high;
				};
			};
		};

		mdm_mclk_en {
			mdm_mclk_sleep: mdm_mclk_sleep {
				mux {
					pins = "gpio134";
					function = "gpio";
				};

				config {
					pins = "gpio134";
					drive-strength = <2>;
					bias-pull-down;
					output-low;
				};
			};
			mdm_mclk_active: mdm_mclk_active {
				mux {
					pins = "gpio134";
					function = "gpio";
				};

				config {
					pins = "gpio134";
					drive-strength = <2>;
					bias-disable;
					output-high;
				};
			};
		};

		cci0_active: cci0_active {
			mux {