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

Commit fd65847f authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

ARM: dts: msm: add DT files for audio on msmtitanium



Add the DT files specific for msmtitanium to enable sound node
for CDP and MTP. Also add the WSA target specific DT file.

Change-Id: Ia8e57c5b8840fea2435bec40788f2d862d60a785
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 33eee101
Loading
Loading
Loading
Loading
+41 −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";
};

&pmtitanium_diangu_dig {
	status = "okay";
};

&pmtitanium_diangu_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 = "msm8953-snd-card-mtp";
	qcom,msm-hs-micbias-type = "external";
};

&pmtitanium_diangu_dig {
	status = "okay";
};

&pmtitanium_diangu_analog {
	status = "okay";
};

&wsa881x_i2c_e {
	status = "okay";
};

&wsa881x_i2c_44 {
	status = "okay";
};

&wsa881x_i2c_f {
	status = "okay";
};

&wsa881x_i2c_45 {
	status = "okay";
};
+168 −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 "msmtitanium-wsa881x.dtsi"

&int_codec {
	qcom,model = "msm8953-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 = "internal";
	qcom,msm-micbias1-ext-cap;

	asoc-codec = <&stub_codec>, <&pmtitanium_diangu_dig>;
	asoc-codec-names = "msm-stub-codec.1", "diangu_codec";
	asoc-wsa-codec-names = "wsa881x-i2c-codec.2-000f";
	asoc-wsa-codec-prefixes = "SpkrMono";

	msm-vdd-wsa-switch-supply = <&pmtitanium_l5>;
	qcom,msm-vdd-wsa-switch-voltage = <1800000>;
	qcom,msm-vdd-wsa-switch-current = <10000>;
};

&pmtitanium_gpios {
	gpio@c000 {
		status = "ok";
		qcom,mode = <1>;
		qcom,pull = <5>;
		qcom,vin-sel = <0>;
		qcom,src-sel = <2>;
		qcom,master-en = <1>;
		qcom,out-strength = <2>;
	};
};

&ext_codec {
	qcom,model = "msm8953-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 = <&pmtitanium_gpios 1 0>;
	clocks = <&clock_gcc clk_div_clk2>;
};

&pmtitanium_1 {
	pmtitanium_diangu_dig: 8953_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 = <&pmtitanium_s4>;
		qcom,cdc-vdda-cp-voltage = <1900000 2050000>;
		qcom,cdc-vdda-cp-current = <500000>;

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

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

		cdc-vdd-mic-bias-supply = <&pmtitanium_l13>;
		qcom,cdc-vdd-mic-bias-voltage = <3125000 3125000>;
		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>;
	};

	pmtitanium_diangu_analog: 8953_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 67 0>;

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

	cdc-buck-sido-supply = <&eldo2_titanium>;
	qcom,cdc-buck-sido-voltage = <1800000 1800000>;
	qcom,cdc-buck-sido-current = <150000>;

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

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

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

	cdc-vdd-mic-bias-supply = <&pmtitanium_l13>;
	qcom,cdc-vdd-mic-bias-voltage = <3125000 3125000>;
	qcom,cdc-vdd-mic-bias-current = <15000>;

	qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
};
+46 −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.
 */

&slim_msm {
	tasha_codec {
		swr_master {
			compatible = "qcom,swr-wcd";
			#address-cells = <2>;
			#size-cells = <0>;

			wsa881x_211: wsa881x@20170211 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170211>;
				qcom,spkr-sd-n-gpio = <&tlmm 96 0>;
			};

			wsa881x_212: wsa881x@20170212 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170212>;
				qcom,spkr-sd-n-gpio = <&tlmm 96 0>;
			};

			wsa881x_213: wsa881x@20170213 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170213>;
				qcom,spkr-sd-n-gpio = <&tlmm 96 0>;
			};

			wsa881x_214: wsa881x@20170214 {
				compatible = "qcom,wsa881x";
				reg = <0x00 0x20170214>;
				qcom,spkr-sd-n-gpio = <&tlmm 96 0>;
			};
		};
	};
};