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

Commit 376df19e authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

ARM: dts: msm: add device node for audio sound card



Add sound card for 8939 external codec over slimbus.
Possible external codec support added for wcd9330 and
wcd9306.

Change-Id: I5319caa6d7ad4f7ddbf9595593a7d94d169624af
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 38542b15
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -56,3 +56,35 @@
	pinctrl-0 = <&usbid_default>;
	vbus_otg-supply = <&smb1360_otg_supply>;
};

&soc {
	sound {
		compatible = "qcom,msm8x16-audio-codec";
		qcom,model = "msm8939-snd-card-mtp";
		qcom,msm-snd-card-id = <0>;
		qcom,msm-codec-type = "internal";
		qcom,msm-ext-pa = "primary";
		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,msm-hs-micbias-type = "internal";
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"SPK_RX_BIAS", "MCLK",
			"INT_LDO_H", "MCLK",
			"MIC BIAS External", "Handset Mic",
			"MIC BIAS Internal2", "Headset Mic",
			"MIC BIAS External", "Secondary Mic",
			"AMIC1", "MIC BIAS External",
			"AMIC2", "MIC BIAS Internal2",
			"AMIC3", "MIC BIAS External";
		pinctrl-names = "cdc_lines_act",
				"cdc_lines_sus",
				"cross_conn_det_act",
				"cross_conn_det_sus";
		pinctrl-0 = <&cdc_pdm_lines_act>;
		pinctrl-1 = <&cdc_pdm_lines_sus>;
		pinctrl-2 = <&cross_conn_det_act>;
		pinctrl-3 = <&cross_conn_det_sus>;
		qcom,cdc-us-euro-gpios = <&msm_gpio 120 0>;
	};
};
+102 −0
Original line number Diff line number Diff line
@@ -48,3 +48,105 @@
	status = "ok";
	qcom,disable-bms;
};

&soc{
	wcd9xxx_intc: wcd9xxx-irq {
		compatible = "qcom,wcd9xxx-irq";
		interrupt-controller;
		#interrupt-cells = <1>;
		interrupt-parent = <&msm_gpio>;
		interrupts = <66 0>;
		interrupt-names = "cdc-int";
	};

	slim_msm {
		status = "ok";
		tapan_codec {
			compatible = "qcom,tapan-slim-pgd";
			elemental-addr = [00 01 E0 00 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>;
			qcom,cdc-reset-gpio = <&msm_gpio 67 0>;

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

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

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

			cdc-vdd-px-supply = <&pm8916_l5>;
			qcom,cdc-vdd-px-voltage = <1800000 1800000>;
			qcom,cdc-vdd-px-current = <45000>;

			cdc-vdd-cx-supply = <&pm8916_l2>;
			qcom,cdc-vdd-cx-voltage = <1200000 1200000>;
			qcom,cdc-vdd-cx-current = <10000>;

			qcom,cdc-static-supplies = "cdc-vdd-tx-h",
						   "cdc-vdd-rx-h",
						   "cdc-vdd-px",
						   "cdc-vdd-cx";
			qcom,cdc-cp-supplies = "cdc-vdd-buck";

			qcom,cdc-micbias-ldoh-v = <0x3>;
			qcom,cdc-micbias-cfilt1-mv = <1800>;
			qcom,cdc-micbias-cfilt2-mv = <2700>;
			qcom,cdc-micbias-cfilt3-mv = <1800>;

			qcom,cdc-micbias1-cfilt-sel = <0x0>;
			qcom,cdc-micbias2-cfilt-sel = <0x1>;
			qcom,cdc-micbias3-cfilt-sel = <0x2>;
			qcom,cdc-micbias4-cfilt-sel = <0x2>;

			qcom,cdc-dmic-sample-rate = <4800000>;
			qcom,cdc-mclk-clk-rate = <9600000>;
			qcom,cdc-slim-ifd = "tapan-slim-ifd";
			qcom,cdc-slim-ifd-elemental-addr = [00 00 E0 00 17 02];
		};
	};
	sound-9306 {
		compatible = "qcom,msm8939-audio-codec";
		qcom,model = "msm8939-tapan-snd-card";
		qcom,tapan-mclk-clk-freq = <9600000>;
		pinctrl-names = "cdc_slim_lines_act", "cdc_slim_lines_sus",
				"cross_conn_det_act","cross_conn_det_sus",
				"cdc_vdd_spkr_act","cdc_vdd_spkr_sus";
		pinctrl-0 = <&cdc_slim_lines_act>;
		pinctrl-1 = <&cdc_slim_lines_sus>;
		pinctrl-2 = <&cross_conn_det_act>;
		pinctrl-3 = <&cross_conn_det_sus>;
		pinctrl-4 = <&cdc_vdd_spkr_act>;
		pinctrl-5 = <&cdc_vdd_spkr_sus>;
		qcom,cdc-us-euro-gpios = <&msm_gpio 120 0>;
		qcom,cdc-vdd-spkr-gpios = <&msm_gpio 121 0>;
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"LDO_H", "MCLK",
			"SPK_OUT", "MCLK",
			"SPK_OUT", "EXT_VDD_SPKR",
			"AMIC1", "MIC BIAS1 Internal1",
			"MIC BIAS1 Internal1", "Handset Mic",
			"AMIC2", "MIC BIAS2 External",
			"MIC BIAS2 External", "Headset Mic",
			"AMIC4", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCRight Headset Mic",
			"AMIC5", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCLeft Headset Mic",
			"DMIC1", "MIC BIAS1 External",
			"MIC BIAS1 External", "Digital Mic1",
			"DMIC2", "MIC BIAS1 External",
			"MIC BIAS1 External", "Digital Mic2",
			"DMIC3", "MIC BIAS3 External",
			"MIC BIAS3 External", "Digital Mic3",
			"DMIC4", "MIC BIAS3 External",
			"MIC BIAS3 External", "Digital Mic4";
	};
};
+32 −0
Original line number Diff line number Diff line
@@ -20,3 +20,35 @@
	compatible = "qcom,msm8939-mtp", "qcom,msm8939", "qcom,mtp";
	qcom,board-id = <8 1>;
};

&soc {
	sound {
		compatible = "qcom,msm8x16-audio-codec";
		qcom,model = "msm8939-snd-card-mtp";
		qcom,msm-snd-card-id = <0>;
		qcom,msm-codec-type = "internal";
		qcom,msm-ext-pa = "primary";
		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,msm-hs-micbias-type = "internal";
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"SPK_RX_BIAS", "MCLK",
			"INT_LDO_H", "MCLK",
			"MIC BIAS External", "Handset Mic",
			"MIC BIAS Internal2", "Headset Mic",
			"MIC BIAS External", "Secondary Mic",
			"AMIC1", "MIC BIAS External",
			"AMIC2", "MIC BIAS Internal2",
			"AMIC3", "MIC BIAS External";
		pinctrl-names = "cdc_lines_act",
				"cdc_lines_sus",
				"cross_conn_det_act",
				"cross_conn_det_sus";
		pinctrl-0 = <&cdc_pdm_lines_act>;
		pinctrl-1 = <&cdc_pdm_lines_sus>;
		pinctrl-2 = <&cross_conn_det_act>;
		pinctrl-3 = <&cross_conn_det_sus>;
		qcom,cdc-us-euro-gpios = <&msm_gpio 120 0>;
	};
};
+0 −29
Original line number Diff line number Diff line
@@ -151,35 +151,6 @@
		};

	};
       sound {
		compatible = "qcom,msm8x16-audio-codec";
		qcom,model = "msm8939-snd-card-mtp";
		qcom,msm-snd-card-id = <0>;
		qcom,msm-codec-type = "internal";
		qcom,msm-ext-pa = "primary";
		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,msm-hs-micbias-type = "internal";
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"SPK_RX_BIAS", "MCLK",
			"INT_LDO_H", "MCLK",
			"MIC BIAS External", "Handset Mic",
			"MIC BIAS Internal2", "Headset Mic",
			"MIC BIAS External", "Secondary Mic",
			"AMIC1", "MIC BIAS External",
			"AMIC2", "MIC BIAS Internal2",
			"AMIC3", "MIC BIAS External";
		pinctrl-names = "cdc_lines_act",
				"cdc_lines_sus",
				"cross_conn_det_act",
				"cross_conn_det_sus";
		pinctrl-0 = <&cdc_pdm_lines_act>;
		pinctrl-1 = <&cdc_pdm_lines_sus>;
		pinctrl-2 = <&cross_conn_det_act>;
		pinctrl-3 = <&cross_conn_det_sus>;
		qcom,cdc-us-euro-gpios = <&msm_gpio 120 0>;
       };
};

&blsp1_uart2 {
+32 −0
Original line number Diff line number Diff line
@@ -505,6 +505,22 @@
			};
		};

		cdc_slim_lines {
			qcom,pins = <&gp 63>;
			qcom,num-grp-pins = <1>;
			qcom,pin-func = <2>;
			label = "cdc_slim_lines";
			cdc_slim_lines_act: slim_lines_on {
				drive-strength = <8>;
				bias-pull-none;
				output-high;
			};
			cdc_slim_lines_sus: slim_lines_off {
				drive-strength = <2>;
				bias-disable;
			};
		};

		cdc-pdm-lines {
			qcom,pins = <&gp 63>, <&gp 64>, <&gp 65>,
					<&gp 66>, <&gp 67>, <&gp 68>;
@@ -520,6 +536,7 @@
				bias-disable;
			};
		};

		cross-conn-det {
			qcom,pins = <&gp 120>;
			qcom,num-grp-pins = <1>;
@@ -535,6 +552,21 @@
			};
		};

		cdc-vdd-spkr {
			qcom,pins = <&gp 121>;
			qcom,num-grp-pins = <1>;
			qcom,pin-func = <0>;
			label = "cdc-vdd-spkr-gpio";
			cdc_vdd_spkr_act: spk_lines_on {
				drive-strength = <8>;
				bias-pull-none;
				output-low;
			};
			cdc_vdd_spkr_sus: spk_lines_off {
				drive-strength = <2>;
				bias-disable;
			};
		};
		pmx_mdss: pmx_mdss {
			label = "mdss-pins";
			qcom,pin-func = <0>;