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

Commit 1ff86ca5 authored by Vatsal Bucha's avatar Vatsal Bucha
Browse files

ARM: dts: msm: Add dtsi changes for AQT on sdm670 and sdm710 platforms



AQT1000 codec is a hifi headset that supports audio
playback and recording on headset.
Add the required configuration to support AQT codec
for sdm670 and sdm710 platforms.

CRs-Fixed: 2180664
Change-Id: Ideb87f6038a6084c45b865f4061d270a099ad854
Signed-off-by: default avatarVatsal Bucha <vbucha@codeaurora.org>
parent d11b4306
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>

#include "sdm670-cdp.dtsi"
#include "sdm670-audio-overlay.dtsi"
#include "sdm670-int-cdc-aqt.dtsi"
#include "sdm670-int-cdc-aqt-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SDM670 PM660 + PM660L AQT CDP";
+51 −0
Original line number Diff line number Diff line
@@ -320,6 +320,57 @@
	wdsp_glink: qcom,wcd-dsp-glink {
		compatible = "qcom,wcd-dsp-glink";
	};

	aqt_rst_gpio: aqt_cdc_pinctrl {
		status = "disabled";
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&aqt_rst_active>;
		pinctrl-1 = <&aqt_rst_idle>;
	};

	tert_mi2s_gpios: tert_mi2s_pinctrl {
		status = "disabled";
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&ter_i2s_data0_active &ter_i2s_data1_active
			     &ter_i2s_sck_active>;
		pinctrl-1 = <&ter_i2s_data0_sleep &ter_i2s_data1_sleep
			     &ter_i2s_sck_sleep>;
	};

	i2c@a88000 {
		aqt1000_cdc: aqt1000-i2c-codec@d {
			status = "disabled";
			compatible = "qcom,aqt1000-i2c-codec";
			reg = <0x0d>;

			interrupt-controller;
			#interrupt-cells = <1>;
			interrupt-parent = <&tlmm>;
			qcom,gpio-connect = <&tlmm 79 0>;
			pinctrl-names = "default";
			pinctrl-0 = <&aqt_intr_default>;

			qcom,aqt-rst-gpio-node = <&aqt_rst_gpio>;

			qcom,cdc-vdd-mic-bias-supply = <&pm660l_bob>;
			qcom,cdc-vdd-mic-bias-voltage = <3312000 3312000>;
			qcom,cdc-vdd-mic-bias-current = <30400>;

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

			qcom,cdc-micbias-ldoh-v = <3>;

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

			qcom,cdc-micbias1-mv = <1800>;

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

&slim_aud {
+86 −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-audio-overlay.dtsi"

&int_codec {
	qcom,model = "sdm670-aqt-snd-card";
	qcom,msm-mi2s-master = <1>, <1>, <0>, <1>, <1>;
	qcom,tert-mi2s-gpios = <&tert_mi2s_gpios>;
	qcom,us-euro-gpios = <&wcd_usbc_analog_en2_gpio>;
	asoc-codec = <&stub_codec>, <&msm_digital_codec>,
		     <&pmic_analog_codec>, <&msm_sdw_codec>,
		     <&ext_disp_audio_codec>, <&aqt1000_cdc>;
	qcom,audio-routing =
		"RX_BIAS", "INT_MCLK0",
		"SPK_RX_BIAS", "INT_MCLK0",
		"INT_LDO_H", "INT_MCLK0",
		"RX_I2S_CLK", "INT_MCLK0",
		"TX_I2S_CLK", "INT_MCLK0",
		"MIC BIAS External", "Handset Mic",
		"AQT MIC BIAS1", "Headset Mic",
		"MIC BIAS External", "Secondary Mic",
		"AMIC1", "MIC BIAS External",
		"AMIC2", "AQT MIC BIAS1",
		"AMIC3", "MIC BIAS External",
		"DMIC1", "MIC BIAS External",
		"MIC BIAS External", "Digital Mic1",
		"DMIC2", "MIC BIAS External",
		"MIC BIAS External", "Digital Mic2",
		"DMIC3", "MIC BIAS External",
		"MIC BIAS External", "Digital Mic3",
		"DMIC4", "MIC BIAS External",
		"MIC BIAS External", "Digital Mic4",
		"SpkrLeft IN", "SPK1 OUT",
		"SpkrRight IN", "SPK2 OUT",
		"PDM_IN_RX1", "PDM_OUT_RX1",
		"PDM_IN_RX2", "PDM_OUT_RX2",
		"PDM_IN_RX3", "PDM_OUT_RX3",
		"ADC1_IN", "ADC1_OUT",
		"ADC2_IN", "ADC2_OUT",
		"ADC3_IN", "ADC3_OUT";
	asoc-codec-names = "msm-stub-codec.1", "msm-dig-codec",
			   "analog-codec", "msm_sdw_codec",
			   "msm-ext-disp-audio-codec-rx", "aqt1000-i2c-codec";
	qcom,mi2s-aqt-enabled;
};

&pmic_analog_codec {
	qcom,anlg-cdc-mbhc-disable;
};

&soc {
	i2c@a88000 {
		status = "ok";
	};
	wcd_usbc_analog_en2_gpio: msm_cdc_pinctrl_usbc_audio_en2 {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&wcd_usbc_analog_en2_active>;
		pinctrl-1 = <&wcd_usbc_analog_en2_idle>;
	};
};

&tert_mi2s_gpios {
	status = "ok";
};

&clock_audio_lnbb {
	status = "ok";
};

&aqt1000_cdc {
	status = "ok";
};

&aqt_rst_gpio {
	status = "ok";
};
+16 −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.
 */

&dai_mi2s2 {
	qcom,msm-mi2s-rx-lines = <1>;
	qcom,msm-mi2s-tx-lines = <2>;
};
+126 −0
Original line number Diff line number Diff line
@@ -1679,6 +1679,132 @@
			};
		};

		aqt_intr {
			aqt_intr_default: aqt_intr_default{
				mux {
					pins = "gpio79";
					function = "gpio";
				};

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

		aqt_rst_gpio {
			aqt_rst_idle: aqt_rst_idle{
				mux {
					pins = "gpio80";
					function = "gpio";
				};

				config {
					pins = "gpio80";
					drive-strength = <8>;
					bias-pull-down;
					output-low;
				};
			};
			aqt_rst_active: aqt_rst_active{
				mux {
					pins = "gpio80";
					function = "gpio";
				};

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

		ter_i2s_sck_ws {
			ter_i2s_sck_sleep: ter_i2s_sck_sleep {
				mux {
					pins = "gpio75", "gpio76";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio75", "gpio76";
					drive-strength = <2>;   /* 2 mA */
				};
			};

			ter_i2s_sck_active: ter_i2s_sck_active {
				mux {
					pins = "gpio75", "gpio76";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio75", "gpio76";
					drive-strength = <8>;   /* 8 mA */
					input-enable;
				};
			};
		};

		ter_i2s_data0 {
			ter_i2s_data0_sleep: ter_i2s_data0_sleep {
				mux {
					pins = "gpio77";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio77";
					drive-strength = <2>;   /* 2 mA */
				};
			};

			ter_i2s_data0_active: ter_i2s_data0_active {
				mux {
					pins = "gpio77";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio77";
					drive-strength = <8>;   /* 8 mA */
					input-enable;
				};
			};
		};

		ter_i2s_data1 {
			ter_i2s_data1_sleep: ter_i2s_data1_sleep {
				mux {
					pins = "gpio78";
					function = "ter_mi2s";
				};

				config {
					pins = "gpio78";
					drive-strength = <2>;   /* 2 mA */
				};
			};

			ter_i2s_data1_active: ter_i2s_data1_active {
				mux {
					pins = "gpio78";
					function = "ter_mi2s";
				};

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

		pmx_sde: pmx_sde {
			sde_dsi_active: sde_dsi_active {
				mux {
Loading