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

Commit 3d002b0f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add audio DT changes for tashalite on trinket"

parents 92809c76 f7a39d05
Loading
Loading
Loading
Loading
+107 −0
Original line number Original line Diff line number Diff line
@@ -350,4 +350,111 @@
		qcom,codec-lpass-clk-id = <0x30D>;
		qcom,codec-lpass-clk-id = <0x30D>;
		#clock-cells = <1>;
		#clock-cells = <1>;
	};
	};

	wcd9xxx_intc: wcd9xxx-irq {
		status = "disabled";
		compatible = "qcom,wcd9xxx-irq";
		interrupt-controller;
		#interrupt-cells = <1>;
		interrupt-parent = <&tlmm>;
		qcom,gpio-connect = <&tlmm 118 0>;
		pinctrl-names = "default";
		pinctrl-0 = <&wcd_intr_default>;
	};

	wcd_rst_gpio: tasha_rst_gpio {
		status = "disabled";
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&tasha_cdc_reset_active>;
		pinctrl-1 = <&tasha_cdc_reset_sleep>;
	};

	clock_audio_native: audio_ext_clk_native {
		status = "disabled";
		compatible = "qcom,audio-ref-clk";
		#clock-cells = <1>;
		qcom,lpass-mclk-id = <0x116>;
		qcom,codec-mclk-clk-freq = <11289600>;
		qcom,audio-ref-clk-gpio = <&tlmm 112 0>;
		pinctrl-names = "sleep", "active";
		pinctrl-0 = <&audio_ref_clk_sleep>;
		pinctrl-1 = <&audio_ref_clk_active>;
	};

	clock_audio: audio_ext_clk {
		status = "disabled";
		compatible = "qcom,audio-ref-clk";
		pinctrl-names = "active", "sleep";
		pinctrl-0 = <&tasha_mclk_default>;
		pinctrl-1 = <&tasha_mclk_default>;
		qcom,audio-ref-clk-gpio = <&pm6125_gpios 1 0>;
		clock-names = "osr_clk";
		clocks = <&pm6125_clkdiv>;
		qcom,node_has_rpm_clock;
		#clock-cells = <1>;
	};

	dbu1: dbu1 {
		compatible = "regulator-fixed";
		regulator-name = "dbu1";
		startup-delay-us = <0>;
		enable-active-high;
	};
};

&slim_aud {
	wcd9335: tasha_codec {
		status = "disabled";
		compatible = "qcom,tasha-slim-pgd";
		elemental-addr = [00 01 a0 01 17 02];

		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,wcd-rst-gpio-node = <&wcd_rst_gpio>;

		clock-names = "wcd_clk", "wcd_native_clk";
		clocks = <&clock_audio AUDIO_PMI_CLK>,
			 <&clock_audio_native AUDIO_LPASS_MCLK_1>;

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

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

		cdc-buck-sido-supply = <&dbu1>;
		qcom,cdc-buck-sido-voltage = <1800000 1800000>;
		qcom,cdc-buck-sido-current = <200000>;

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

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

		cdc-vddio-1-supply = <&dbu1>;
		qcom,cdc-vddio-1-voltage = <1800000 1800000>;
		qcom,cdc-vddio-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-mclk-clk-rate = <9600000>;
		qcom,cdc-slim-ifd = "tasha-slim-ifd";
		qcom,cdc-slim-ifd-elemental-addr = [00 00 a0 01 17 02];
		qcom,cdc-dmic-sample-rate = <4800000>;
		qcom,cdc-mad-dmic-rate = <600000>;
	};
};
};
+144 −0
Original line number Original line Diff line number Diff line
@@ -712,6 +712,137 @@
			};
			};
		};
		};


		wcd9xxx_intr {
			wcd_intr_default: wcd_intr_default{
				mux {
					pins = "gpio118";
					function = "gpio";
				};

				config {
					pins = "gpio118";
					drive-strength = <2>; /* 2 mA */
					bias-pull-down; /* pull down */
					input-enable;
				};
			};
		};

		tasha_cdc_reset_active: lpi_cdc_reset_active {
			mux {
				pins = "gpio120";
				function = "gpio";
			};
			config {
				pins = "gpio120";
				drive-strength = <16>;
				output-high;
			};
		};

		tasha_cdc_reset_sleep: lpi_cdc_reset_sleep {
			mux {
				pins = "gpio120";
				function = "gpio";
			};

			config {
				pins = "gpio120";
				drive-strength = <16>;
				bias-disable;
				output-low;
			};
		};

		/* Tasha WSA speaker reset pins */
		tasha_spkr_1_sd_n {
			tasha_spkr_1_sd_n_sleep: tasha_spkr_1_sd_n_sleep {
				mux {
					pins = "gpio20";
					function = "gpio";
				};

				config {
					pins = "gpio20";
					drive-strength = <2>;   /* 2 mA */
					bias-pull-down;
					input-enable;
				};
			};

			tasha_spkr_1_sd_n_active: tasha_spkr_1_sd_n_active {
				mux {
					pins = "gpio20";
					function = "gpio";
				};

				config {
					pins = "gpio20";
					drive-strength = <16>;   /* 16 mA */
					bias-disable;
					output-high;
				};
			};
		};

		tasha_spkr_2_sd_n {
			tasha_spkr_2_sd_n_sleep: tasha_spkr_2_sd_n_sleep {
				mux {
					pins = "gpio21";
					function = "gpio";
				};

				config {
					pins = "gpio21";
					drive-strength = <2>;   /* 2 mA */
					bias-pull-down;
					input-enable;
				};
			};

			tasha_spkr_2_sd_n_active: tasha_spkr_2_sd_n_active {
				mux {
					pins = "gpio21";
					function = "gpio";
				};

				config {
					pins = "gpio21";
					drive-strength = <16>;   /* 16 mA */
					bias-disable;
					output-high;
				};
			};
		};

		audio_ref_clk_active: audio_ref_clk_active {
			mux {
				pins = "gpio112";
				function = "func2";
			};

			config {
				pins = "gpio112";
				drive-strength = <8>;
				bias-disable;
				output-low;
			};
		};

		audio_ref_clk_sleep: audio_ref_clk_sleep {
			mux {
				pins = "gpio112";
				function = "func2";
			};

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

		wcd937x_reset_active: wcd937x_reset_active {
		wcd937x_reset_active: wcd937x_reset_active {
			mux {
			mux {
				pins = "gpio120";
				pins = "gpio120";
@@ -1217,3 +1348,16 @@
		};
		};
	};
	};
};
};

&pm6125_gpios {
	tasha_mclk {
		tasha_mclk_default: tasha_mclk_default{
			pins = "gpio1";
			function = "func1";
			qcom,drive-strength = <2>;
			power-source = <0>;
			bias-disable;
			output-low;
		};
	};
};
+57 −0
Original line number Original line Diff line number Diff line
/* Copyright (c) 2019, 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.
 */
#include "trinket-audio-overlay.dtsi"
#include "trinket-wcd.dtsi"

&bolero {
	status = "disabled";
};

&wcd937x_codec {
	status = "disabled";
};

&cdc_dmic01_gpios {
	status = "disabled";
};

&cdc_dmic23_gpios {
	status = "disabled";
};

&slim_aud {
	status = "okay";
};

&dai_slim {
	status = "okay";
};

&wcd9335 {
	status = "okay";
};

&clock_audio {
	status = "okay";
};

&clock_audio_native {
	status = "okay";
};

&wcd_rst_gpio {
	status = "okay";
};

&wcd9xxx_intc {
	status = "okay";
};
+159 −0
Original line number Original line Diff line number Diff line
/* Copyright (c) 2019, 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.
 */

#include "trinket-tasha-codec-audio-overlay.dtsi"

&pm6125_div_clk {
	status = "okay";
};

&sm6150_snd {
	qcom,model = "trinket-tashalite-snd-card";
	qcom,tasha_codec = <1>;
	asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
		<&loopback>, <&compress>, <&hostless>,
		<&afe>, <&lsm>, <&routing>, <&cpe>, <&compr>,
		<&pcm_noirq>, <&cpe3>;
	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", "msm-pcm-dsp-noirq",
		"msm-cpe-lsm.3";
	asoc-cpu = <&dai_mi2s0>, <&dai_mi2s1>,
		<&dai_mi2s2>, <&dai_mi2s3>, <&dai_mi2s4>,
		<&dai_pri_auxpcm>, <&dai_sec_auxpcm>,
		<&dai_tert_auxpcm>, <&dai_quat_auxpcm>,
		<&dai_quin_auxpcm>,
		<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
		<&sb_2_rx>, <&sb_2_tx>, <&sb_3_rx>, <&sb_3_tx>,
		<&sb_4_rx>, <&sb_4_tx>, <&sb_5_rx>, <&sb_5_tx>,
		<&sb_6_rx>, <&sb_7_rx>, <&sb_7_tx>,
		<&sb_8_rx>, <&sb_8_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>,
		<&usb_audio_rx>, <&usb_audio_tx>,
		<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
		<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
		<&dai_tert_tdm_rx_0>, <&dai_tert_tdm_tx_0>,
		<&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>,
		<&dai_quin_tdm_rx_0>, <&dai_quin_tdm_tx_0>;
	asoc-cpu-names = "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
		"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
		"msm-dai-q6-mi2s.4",
		"msm-dai-q6-auxpcm.1", "msm-dai-q6-auxpcm.2",
		"msm-dai-q6-auxpcm.3", "msm-dai-q6-auxpcm.4",
		"msm-dai-q6-auxpcm.5",
		"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
		"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
		"msm-dai-q6-dev.16388", "msm-dai-q6-dev.16389",
		"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
		"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
		"msm-dai-q6-dev.16394", "msm-dai-q6-dev.16395",
		"msm-dai-q6-dev.16396",
		"msm-dai-q6-dev.16398", "msm-dai-q6-dev.16399",
		"msm-dai-q6-dev.16400", "msm-dai-q6-dev.16401",
	qcom,msm-mi2s-master = <1>, <1>, <1>, <1>, <1>;
	qcom,audio-routing =
		"AIF4 VI", "MCLK",
		"RX_BIAS", "MCLK",
		"MADINPUT", "MCLK",
		"hifi amp", "LINEOUT1",
		"hifi amp", "LINEOUT2",
		"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",
		"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 = <1>;
	qcom,msm-mbhc-gnd-swh = <1>;
	qcom,msm-mclk-freq = <9600000>;
	asoc-codec = <&stub_codec>;
	asoc-codec-names = "msm-stub-codec.1";
	qcom,wsa-max-devs = <2>;
	qcom,wsa-devs = <&wsa881x_00211>, <&wsa881x_00212>,
		<&wsa881x_00213>, <&wsa881x_00214>;
	qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
		"SpkrLeft", "SpkrRight";
};

&soc {
	wsa_spkr_en2: wsa_spkr_en2_pinctrl {
		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>;
	};
};

&slim_aud {
	status = "okay";
	tasha_codec {
		swr3: swr_master {
			compatible = "qcom,swr-mstr";
			#address-cells = <2>;
			#size-cells = <0>;
			qcom,swr-num-ports = <8>;
			qcom,swr-port-mapping = <1 SPKR_L 0x1>,
				<2 SPKR_L_COMP 0xF>, <3 SPKR_L_BOOST 0x3>,
				<4 SPKR_R 0x1>, <5 SPKR_R_COMP 0xF>,
				<6 SPKR_R_BOOST 0x3>, <7 SPKR_L_VI 0x3>,
				<8 SPKR_R_VI 0x3>;
			qcom,swr_master_id = <1>;
			wsa881x_00211: wsa881x@20170211 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170211>;
				qcom,spkr-sd-n-node = <&wsa_spk_wcd_sd1>;
			};

			wsa881x_00212: wsa881x@20170212 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170212>;
				qcom,spkr-sd-n-node = <&wsa_spk_wcd_sd2>;
			};

			wsa881x_00213: wsa881x@21170213 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x21170213>;
				qcom,spkr-sd-n-node = <&wsa_spk_wcd_sd1>;
			};

			wsa881x_00214: wsa881x@21170214 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x21170214>;
				qcom,spkr-sd-n-node = <&wsa_spk_wcd_sd2>;
			};
		};
	};
};
+29 −0
Original line number Original line Diff line number Diff line
/* Copyright (c) 2019, 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 = <&tasha_spkr_1_sd_n_active>;
			pinctrl-1 = <&tasha_spkr_1_sd_n_sleep>;
		};

		wsa_spkr_sd2: msm_cdc_pinctrlr {
			compatible = "qcom,msm-cdc-pinctrl";
			pinctrl-names = "aud_active", "aud_sleep";
			pinctrl-0 = <&tasha_spkr_2_sd_n_active>;
			pinctrl-1 = <&tasha_spkr_2_sd_n_sleep>;
		};
	};
};