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

Commit cd4a99b6 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 audio support for QCS605 lc variant"

parents 65380d9f 9e699bdb
Loading
Loading
Loading
Loading
+77 −0
Original line number Diff line number Diff line
@@ -3190,3 +3190,80 @@ Example:
		qcom,wsa-aux-dev-prefix = "SpkrRight", "SpkrLeft",
					  "SpkrRight", "SpkrLeft";
	};

* QCS605 LC  ASoC Machine driver

Required properties:
- compatible : "qcom,qcs605-dig-asoc-snd"
- qcom,model : The user-visible name of this sound card.
- qcom,audio-routing : A list of the connections between audio components.
- qcom,msm-gpios : Lists down all the gpio sets that are supported.
- qcom,pinctrl-names : Lists all the possible combinations of the gpio sets
mentioned in qcom,msm-gpios.
- pinctrl-names : The combinations of gpio sets from above that are supported in
the flavor.
- pinctrl-# : Pinctrl states as mentioned in pinctrl-names.

Optional properties:
- qcom,wsa-disable : Boolean. Disables WSA speaker dailinks from sound node.
- qcom,msm-spk-ext-pa : GPIO which enables external speaker pa.
- qcom,msm-mclk-freq : This property is used to inform machine driver about
mclk frequency needs to be configured for internal and external PA.
- asoc-platform: This is phandle list containing the references to platform device
		 nodes that are used as part of the sound card dai-links.
- asoc-platform-names: This property contains list of platform names. The order of
		       the platform names should match to that of the phandle order
		       given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
	    that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
		  cpu dai names should match to that of the phandle order given.
- asoc-codec: This is phandle list containing the references to codec dai device
	nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
	codec dai names should match to that of the phandle order given
	in "asoc-codec".
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs : List of phandles for all possible WSA881x devices supported for the target
- qcom,wsa-aux-dev-prefix : Name prefix with Left/Right configuration for WSA881x device
- qcom,cdc-dmic-gpios : phandle for Digital mic clk and data gpios.
- qcom,cdc-sdw-gpios : phandle for soundwire clk and data gpios.
- qcom,pri-mi2s-gpios : phandle for primary MI2S clk, word select and data gpios.
- qcom,sec-mi2s-gpios : phandle for secondary MI2S clk, word select and data gpios.
- qcom,tert-mi2s-gpios : phandle for tertiary MI2S clk, word select and data gpios.
- qcom,quat-mi2s-gpios : phandle for quaternary MI2S clk, word select and data gpios.
- qcom,quin-mi2s-gpios : phandle for quinary MI2S clk, word select and data gpios.

Example:
	 sound {
		compatible = "qcom,qcs605-dig-asoc-snd";
		qcom,model = "qcs605-lc-snd-card";
		qcom,audio-routing =
			"RX_BIAS", "INT_MCLK0",
			"SPK_RX_BIAS", "INT_MCLK0",
			"DMIC1", "DIGITAL_REGULATOR",
			"DIGITAL_REGULATOR", "Digital Mic1",
			"DMIC2", "DIGITAL_REGULATOR",
			"DIGITAL_REGULATOR", "Digital Mic2",
			"DMIC3", "DIGITAL_REGULATOR",
			"DIGITAL_REGULATOR", "Digital Mic3",
			"DMIC4", "DIGITAL_REGULATOR",
			"DIGITAL_REGULATOR", "Digital Mic4",
			"SpkrLeft IN", "SPK1 OUT",
			"SpkrRight IN", "SPK2 OUT";

		qcom,msm-mi2s-master = <1>, <1>, <1>, <1>, <1>;
		qcom,msm-mclk-freq = <9600000>;
		qcom,cdc-dmic-gpios = <&cdc_dmic_gpios>;

		asoc-codec = <&stub_codec>, <&msm_digital_codec>,
				<&msm_sdw_codec>;
		asoc-codec-names = "msm-stub-codec.1", "msm-dig-codec",
					"msm_sdw_codec";

		qcom,wsa-max-devs = <2>;
		qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_212_en>,
				<&wsa881x_213_en>, <&wsa881x_214_en>;
		qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
					"SpkrLeft", "SpkrRight";
	}
+130 −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-lpi.dtsi"

&int_codec {
	compatible = "qcom,qcs605-dig-asoc-snd";
	qcom,model = "qcs605-lc-snd-card";
	qcom,audio-routing =
		"RX_BIAS", "INT_MCLK0",
		"SPK_RX_BIAS", "INT_MCLK0",
		"TX_I2S_CLK", "INT_MCLK0",
		"DMIC1", "DIGITAL_REGULATOR",
		"DIGITAL_REGULATOR", "Digital Mic1",
		"DMIC2", "DIGITAL_REGULATOR",
		"DIGITAL_REGULATOR", "Digital Mic2",
		"DMIC3", "DIGITAL_REGULATOR",
		"DIGITAL_REGULATOR", "Digital Mic3",
		"DMIC4", "DIGITAL_REGULATOR",
		"DIGITAL_REGULATOR", "Digital Mic4",
		"SpkrLeft IN", "SPK1 OUT",
		"SpkrRight IN", "SPK2 OUT";

	qcom,msm-mi2s-master = <1>, <1>, <1>, <1>, <1>;
	qcom,msm-mclk-freq = <9600000>;
	qcom,cdc-dmic-gpios = <&cdc_dmic_gpios>;

	asoc-codec = <&stub_codec>, <&msm_digital_codec>,
		     <&msm_sdw_codec>;
	asoc-codec-names = "msm-stub-codec.1", "msm-dig-codec",
			   "msm_sdw_codec";

	qcom,wsa-max-devs = <2>;
	qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_212_en>,
			<&wsa881x_213_en>, <&wsa881x_214_en>;
	qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
				  "SpkrLeft", "SpkrRight";
};

&soc {
	msm_digital_codec: msm-dig-codec {
		compatible = "qcom,msm-digital-codec";
		reg = <0x62ec0000 0x0>;
		qcom,no-analog-codec;

		cdc-vdd-digital-supply = <&pm660_l13>;
		qcom,cdc-vdd-digital-voltage = <1800000 1800000>;
		qcom,cdc-vdd-digital-current = <5000>;
		qcom,cdc-on-demand-supplies = "cdc-vdd-digital";
	};

	cdc_dmic_gpios: cdc_dmic_pinctrl {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&cdc_dmic12_gpios_active
			     &cdc_dmic34_gpios_active>;
		pinctrl-1 = <&cdc_dmic12_gpios_sleep
			     &cdc_dmic34_gpios_sleep>;
		qcom,lpi-gpios;
	};

	cdc_sdw_gpios: sdw_clk_data_pinctrl {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&sdw_clk_active &sdw_data_active>;
		pinctrl-1 = <&sdw_clk_sleep &sdw_data_sleep>;
	};

	wsa_spkr_en1: wsa_spkr_en1_pinctrl {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&spkr_1_sd_n_active>;
		pinctrl-1 = <&spkr_1_sd_n_sleep>;
	};

	wsa_spkr_en2: wsa_spkr_en2_pinctrl {
		compatible = "qcom,msm-cdc-pinctrl";
		pinctrl-names = "aud_active", "aud_sleep";
		pinctrl-0 = <&spkr_2_sd_n_active>;
		pinctrl-1 = <&spkr_2_sd_n_sleep>;
	};

	msm_sdw_codec: msm-sdw-codec@62ec1000 {
		status = "okay";
		compatible = "qcom,msm-sdw-codec";
		reg = <0x62ec1000 0x0>;
		interrupts = <0 88 0>;
		interrupt-names = "swr_master_irq";
		qcom,cdc-sdw-gpios = <&cdc_sdw_gpios>;

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

			wsa881x_211_en: wsa881x_en@20170211 {
				compatible = "qcom,wsa881x";
				reg = <0x0 0x20170211>;
				qcom,spkr-sd-n-node = <&wsa_spkr_en1>;
			};

			wsa881x_212_en: wsa881x_en@20170212 {
				compatible = "qcom,wsa881x";
				reg = <0x0 0x20170212>;
				qcom,spkr-sd-n-node = <&wsa_spkr_en2>;
			};

			wsa881x_213_en: wsa881x_en@21170213 {
				compatible = "qcom,wsa881x";
				reg = <0x0 0x21170213>;
				qcom,spkr-sd-n-node = <&wsa_spkr_en1>;
			};

			wsa881x_214_en: wsa881x_en@21170214 {
				compatible = "qcom,wsa881x";
				reg = <0x0 0x21170214>;
				qcom,spkr-sd-n-node = <&wsa_spkr_en2>;
			};
		};
	};
};
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
 * 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
@@ -21,6 +21,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>

#include "qcs605-lc-mtp.dtsi"
#include "qcs605-lc-audio-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. QC605 LC Groot + PM8005 MTP";
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#include "qcs605-lc.dtsi"
#include "qcs605-lc-mtp.dtsi"
#include "qcs605-lc-audio-overlay.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. QC605 LC Groot + PM8005 MTP";
+4 −0
Original line number Diff line number Diff line
@@ -365,3 +365,7 @@
	vdd-supply = <&pm660_l6>;  /* 0.88v */
	core-supply = <&pm660_l2>; /* 1.2v */
};

&int_codec {
	/delete-property/ qcom,ext-disp-audio-rx;
};