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

Commit ab192d58 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: add device tree entries for audio on msmgold"

parents 4295a312 743cbcd9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ dtb-$(CONFIG_ARCH_MSMGOLD) += msmgold-rumi.dtb \
	msmgold-pmi8937-cdp.dtb \
	msmgold-pmi8937-mtp.dtb \
	msmgold-pmi8950-cdp.dtb \
	msmgold-pmi8950-ext-codec-cdp.dtb \
	msmgold-pmi8950-mtp.dtb \
	msmgold-pmi8937-rcm.dtb \
	msmgold-pmi8950-rcm.dtb
+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, 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.
 */

&int_codec {
	status = "okay";
	qcom,msm-hs-micbias-type = "internal";

	asoc-wsa-codec-names = "wsa881x-i2c-codec.2-000f";
	asoc-wsa-codec-prefixes = "SpkrMono";

	msm-vdd-wsa-switch-supply = <&pmgold_l13>;
	qcom,msm-vdd-wsa-switch-voltage = <3075000>;
	qcom,msm-vdd-wsa-switch-current = <5000>;
};

&pm8937_cajon_dig {
	status = "okay";
};

&pm8937_cajon_analog {
	status = "okay";
};

&wsa881x_i2c_e {
	status = "okay";
};

&wsa881x_i2c_44 {
	status = "okay";
};

&wsa881x_i2c_f {
	status = "okay";
};

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

&int_codec {
	status = "okay";
	qcom,model = "msm8952-snd-card-mtp";
	qcom,msm-hs-micbias-type = "external";
};

&pm8937_cajon_dig {
	status = "okay";
};

&pm8937_cajon_analog {
	status = "okay";
};

&wsa881x_i2c_e {
	status = "okay";
};

&wsa881x_i2c_44 {
	status = "okay";
};

&wsa881x_i2c_f {
	status = "okay";
};

&wsa881x_i2c_45 {
	status = "okay";
};
+148 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, 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 "msm8937-wsa881x.dtsi"

&int_codec {
	qcom,model = "msm8952-snd-card-mtp";

	qcom,cdc-us-euro-gpios = <&tlmm 63 0>;
	qcom,msm-mbhc-hphl-swh = <0>;
	qcom,msm-mbhc-gnd-swh = <0>;
	qcom,msm-hs-micbias-type = "external";
	qcom,msm-micbias1-ext-cap;

	asoc-codec = <&stub_codec>, <&pm8937_cajon_dig>;
	asoc-codec-names = "msm-stub-codec.1", "cajon_codec";
};

&ext_codec {
	qcom,model = "msm8952-tasha-snd-card";

	qcom,cdc-us-euro-gpios = <&tlmm 63 0>;
	qcom,msm-mbhc-hphl-swh = <0>;
	qcom,msm-mbhc-gnd-swh = <0>;

	qcom,wsa-max-devs = <2>;
	qcom,wsa-devs = <&wsa881x_211>, <&wsa881x_212>,
			<&wsa881x_213>, <&wsa881x_214>;
	qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
				"SpkrLeft", "SpkrRight";
};

&wcd9xxx_intc {
	interrupt-parent = <&tlmm>;
	interrupts = <73 0>;
	qcom,gpio-connect = <&tlmm 73 0>;
};

&clock_audio {
	qcom,audio-ref-clk-gpio = <&pm8937_gpios 1 0>;
	clocks = <&clock_gcc clk_div_clk2>;
};

&pm8937_1 {
	pm8937_cajon_dig: 8952_wcd_codec@f000 {
		compatible = "qcom,msm8x16_wcd_codec";
		reg = <0xf000 0x100>;
		interrupt-parent = <&spmi_bus>;
		interrupts = <0x1 0xf0 0x0>,
			     <0x1 0xf0 0x1>,
			     <0x1 0xf0 0x2>,
			     <0x1 0xf0 0x3>,
			     <0x1 0xf0 0x4>,
			     <0x1 0xf0 0x5>,
			     <0x1 0xf0 0x6>,
			     <0x1 0xf0 0x7>;
		interrupt-names = "spk_cnp_int",
				  "spk_clip_int",
				  "spk_ocp_int",
				  "ins_rem_det1",
				  "but_rel_det",
				  "but_press_det",
				  "ins_rem_det",
				  "mbhc_int";

		cdc-vdda-cp-supply = <&pmgold_s4>;
		qcom,cdc-vdda-cp-voltage = <2050000 2050000>;
		qcom,cdc-vdda-cp-current = <210000>;

		cdc-vdd-io-supply = <&pmgold_l5>;
		qcom,cdc-vdd-io-voltage = <1800000 1800000>;
		qcom,cdc-vdd-io-current = <10000>;

		cdc-vdd-pa-supply = <&pmgold_s4>;
		qcom,cdc-vdd-pa-voltage = <2050000 2050000>;
		qcom,cdc-vdd-pa-current = <260000>;

		cdc-vdd-mic-bias-supply = <&pmgold_l13>;
		qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
		qcom,cdc-vdd-mic-bias-current = <5000>;

		qcom,cdc-mclk-clk-rate = <9600000>;

		qcom,cdc-static-supplies =  "cdc-vdd-io",
					   "cdc-vdd-pa",
					   "cdc-vdda-cp";

		qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
		qcom,dig-cdc-base-addr = <0xc0f0000>;
	};

	pm8937_cajon_analog: 8952_wcd_codec@f100 {
		compatible = "qcom,msm8x16_wcd_codec";
		reg = <0xf100 0x100>;
		interrupt-parent = <&spmi_bus>;
		interrupts = <0x1 0xf1 0x0>,
			     <0x1 0xf1 0x1>,
			     <0x1 0xf1 0x2>,
			     <0x1 0xf1 0x3>,
			     <0x1 0xf1 0x4>,
			     <0x1 0xf1 0x5>;
		interrupt-names = "ear_ocp_int",
				  "hphr_ocp_int",
				  "hphl_ocp_det",
				  "ear_cnp_int",
				  "hphr_cnp_int",
				  "hphl_cnp_int";
		qcom,dig-cdc-base-addr = <0xc0f0000>;
	};
};

&wcd9335 {
	qcom,cdc-reset-gpio = <&tlmm 68 0>;

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

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

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

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

	cdc-vdd-px-supply = <&pmgold_l5>;
	qcom,cdc-vdd-px-voltage = <1800000 1800000>;
	qcom,cdc-vdd-px-current = <10000>;

	cdc-vdd-mic-bias-supply = <&pmgold_l13>;
	qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
	qcom,cdc-vdd-mic-bias-current = <15000>;
};
+170 −0
Original line number Diff line number Diff line
@@ -348,5 +348,175 @@
				};
			};
		};

		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;
				};
			};
		};

		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;
				};
			};
		};

		/* WSA VI sense */
		wsa-vi {
			wsa_vi_on: wsa_vi_on {
				mux {
					pins = "gpio94", "gpio95";
					function = "wsa_io";
				};

				config {
					pins = "gpio94", "gpio95";
					drive-strength = <8>; /* 8 MA */
					bias-disable; /* NO pull */
				};
			};

			wsa_vi_off: wsa_vi_off {
				mux {
					pins = "gpio94", "gpio95";
					function = "wsa_io";
				};

				config {
					pins = "gpio94", "gpio95";
					drive-strength = <2>; /* 2 MA */
					bias-pull-down;
				};
			};
		};

		/* WSA Reset */
		wsa_reset {
			wsa_reset_on: wsa_reset_on {
				mux {
					pins = "gpio96";
					function = "gpio";
				};

				config {
					pins = "gpio96";
					drive-strength = <2>; /* 2 MA */
					output-high;
				};
			};

			wsa_reset_off: wsa_reset_off {
				mux {
					pins = "gpio96";
					function = "gpio";
				};

				config {
					pins = "gpio96";
					drive-strength = <2>; /* 2 MA */
					output-low;
				};
			};
		};

		/* WSA CLK */
		wsa_clk {
			wsa_clk_on: wsa_clk_on {
				mux {
					pins = "gpio25";
					function = "pri_mi2s_mclk_a";
				};

				config {
					pins = "gpio25";
					drive-strength = <8>; /* 8 MA */
					output-high;
				};
			};

			wsa_clk_off: wsa_clk_off {
				mux {
					pins = "gpio25";
					function = "pri_mi2s_mclk_a";
				};

				config {
					pins = "gpio25";
					drive-strength = <2>; /* 2 MA */
					output-low;
					bias-pull-down;
				};
			};
		};
	};
};
Loading