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

Commit b9acbdd7 authored by Vatsal Bucha's avatar Vatsal Bucha
Browse files

ARM: dts: qcom: Enable audio for SXR1120



SXR1120 is SDM710 external codec variant.
Enable audio for SXR1120.

CRs-Fixed: 2312325
Change-Id: I2231ed233657de2ff2b88ac9fbfd2ed0de1b4c1b
Signed-off-by: default avatarVatsal Bucha <vbucha@codeaurora.org>
parent 4e25af6b
Loading
Loading
Loading
Loading
+163 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018, 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 "sdm670-wcd.dtsi"
#include "sdm670-wsa881x.dtsi"
#include "sdm670-lpi.dtsi"
#include <dt-bindings/clock/qcom,audio-ext-clk.h>

&tavil_snd {
	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,hph-en0-gpio = <&tavil_hph_en0>;
	qcom,hph-en1-gpio = <&tavil_hph_en1>;
	qcom,msm-mclk-freq = <9600000>;
	asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
	asoc-codec-names = "msm-stub-codec.1", "msm-ext-disp-audio-codec-rx";
	qcom,wsa-max-devs = <2>;
	qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
		<&wsa881x_0213>, <&wsa881x_0214>;
	qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
		"SpkrLeft", "SpkrRight";
};

&qupv3_se8_spi{
	status = "okay";
};

&soc {
	wcd_usbc_analog_en1_gpio: msm_cdc_pinctrl_usbc_audio_en1 {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&wcd_usbc_analog_en1_active>;
		pinctrl-1 = <&wcd_usbc_analog_en1_idle>;
	};

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

	clock_audio_lnbb: audio_ext_clk_lnbb {
		status = "okay";
		compatible = "qcom,audio-ref-clk";
		clock-names = "osr_clk";
		clocks = <&clock_rpmh RPMH_LN_BB_CLK2>;
		qcom,node_has_rpm_clock;
		#clock-cells = <1>;
	};

	wcd_rst_gpio: msm_cdc_pinctrl@64 {
		status = "okay";
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&lpi_cdc_reset_active>;
		pinctrl-1 = <&lpi_cdc_reset_sleep>;
		qcom,lpi-gpios;
	};

	wdsp_mgr: qcom,wcd-dsp-mgr {
		status = "okay";
		compatible = "qcom,wcd-dsp-mgr";
		qcom,wdsp-components = <&wcd934x_cdc 0>,
				       <&wcd_spi_0 1>,
				       <&glink_spi_xprt_wdsp 2>;
					qcom,img-filename = "cpe_9340";
	};

	wdsp_glink: qcom,wcd-dsp-glink {
		status = "okay";
		compatible = "qcom,wcd-dsp-glink";
	};

};

&slim_aud {
	wcd934x_cdc: tavil_codec {
		status = "okay";
		compatible = "qcom,tavil-slim-pgd";
		elemental-addr = [00 01 50 02 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 31>;

		qcom,wcd-rst-gpio-node = <&wcd_rst_gpio>;

		clock-names = "wcd_clk";
		clocks = <&clock_audio_lnbb AUDIO_PMIC_LNBB_CLK>;

		cdc-vdd-mic-bias-supply = <&pm660_l13>;
		qcom,cdc-vdd-mic-bias-voltage = <1696000 1904000>;
		qcom,cdc-vdd-mic-bias-current = <30400>;

		qcom,cdc-static-supplies = "cdc-vdd-mic-bias";

		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 = <9600000>;
		qcom,cdc-slim-ifd = "tavil-slim-ifd";
		qcom,cdc-slim-ifd-elemental-addr = [00 00 50 02 17 02];
		qcom,cdc-dmic-sample-rate = <4800000>;
		qcom,cdc-mad-dmic-rate = <600000>;

		qcom,wdsp-cmpnt-dev-name = "tavil_codec";

		wcd_spi_0: wcd_spi {
			compatible = "qcom,wcd-spi-v2";
			qcom,master-bus-num = <0>;
			qcom,chip-select = <0>;
			qcom,max-frequency = <24000000>;
			qcom,mem-base-addr = <0x100000>;
		};
	};
};
+165 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018, 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 "msm-audio-lpass.dtsi"

&msm_audio_ion {
	iommus = <&apps_smmu 0x1801 0x0>;
	qcom,smmu-sid-mask = /bits/ 64 <0xf>;
};

&soc {
	qcom,msm-audio-apr {
		compatible = "qcom,msm-audio-apr";
		msm_audio_apr_dummy {
			compatible = "qcom,msm-audio-apr-dummy";
		};
	};

	qcom,avtimer@62cf700c {
		compatible = "qcom,avtimer";
		reg = <0x62cf700c 0x4>,
			<0x62cf7010 0x4>;
		reg-names = "avtimer_lsb_addr", "avtimer_msb_addr";
		qcom,clk-div = <192>;
		qcom,clk-mult = <10>;
	};

	tavil_snd: sound-tavil {
		status = "okay";
		compatible = "qcom,sdm670-asoc-snd-tavil";
		qcom,model = "sdm670-tavil-snd-card";
		qcom,wcn-btfm;
		qcom,mi2s-audio-intf;
		qcom,auxpcm-audio-intf;
		qcom,ext-disp-audio-rx;
		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
			<&loopback>, <&compress>, <&hostless>,
			<&afe>, <&lsm>, <&routing>, <&cpe>, <&compr>,
			<&pcm_noirq>;
		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";
		asoc-cpu = <&dai_dp>, <&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-dp.24608",
			"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",
			"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",
			"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673",
			"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
			"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
			"msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36897",
			"msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913",
			"msm-dai-q6-tdm.36928", "msm-dai-q6-tdm.36929";
	};

};

&slim_aud {
	status = "okay";
	dai_slim: msm_dai_slim {
		status = "okay";
		compatible = "qcom,msm-dai-slim";
		elemental-addr = [ff ff ff fe 17 02];
	};
};

&msm_dai_mi2s {
	dai_int_mi2s0: qcom,msm-dai-q6-int-mi2s0 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <7>;
		qcom,msm-mi2s-rx-lines = <3>;
		qcom,msm-mi2s-tx-lines = <0>;
	};

	dai_int_mi2s1: qcom,msm-dai-q6-int-mi2s1 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <8>;
		qcom,msm-mi2s-rx-lines = <3>;
		qcom,msm-mi2s-tx-lines = <0>;
	};

	dai_int_mi2s2: qcom,msm-dai-q6-int-mi2s2 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <9>;
		qcom,msm-mi2s-rx-lines = <0>;
		qcom,msm-mi2s-tx-lines = <3>;
	};

	dai_int_mi2s3: qcom,msm-dai-q6-int-mi2s3 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <10>;
		qcom,msm-mi2s-rx-lines = <0>;
		qcom,msm-mi2s-tx-lines = <3>;
	};

	dai_int_mi2s4: qcom,msm-dai-q6-int-mi2s4 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <11>;
		qcom,msm-mi2s-rx-lines = <3>;
		qcom,msm-mi2s-tx-lines = <0>;
	};

	dai_int_mi2s5: qcom,msm-dai-q6-int-mi2s5 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <12>;
		qcom,msm-mi2s-rx-lines = <0>;
		qcom,msm-mi2s-tx-lines = <3>;
	};

	dai_int_mi2s6: qcom,msm-dai-q6-int-mi2s6 {
		compatible = "qcom,msm-dai-q6-mi2s";
		qcom,msm-dai-q6-mi2s-dev-id = <13>;
		qcom,msm-mi2s-rx-lines = <0>;
		qcom,msm-mi2s-tx-lines = <3>;
	};
};
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>

#include "sxr1120-lc-cdp.dtsi"
#include "sxr1120-audio.dtsi"
#include "sxr1120-audio-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SXR1120 LC Groot+PM8005 Ext. Audio Codec CDP";
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#include "sxr1120-lc.dtsi"
#include "sxr1120-lc-cdp.dtsi"
#include "sxr1120-audio.dtsi"
#include "sxr1120-audio-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SXR1120 LC Groot+PM8005 Ext. Audio Codec CDP";
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@

#include "sxr1120-lc-mtp.dtsi"

#include "sxr1120-audio.dtsi"
#include "sxr1120-audio-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SXR1120 LC Groot+PM8005 Ext. Audio Codec MTP";
	compatible = "qcom,sxr1120-mtp", "qcom,sxr1120", "qcom,mtp";
Loading