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

Commit 0fc1ff85 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Documentation: sound: Add documentation for qcs405 nodes"

parents 7e1ab28a e8d773ca
Loading
Loading
Loading
Loading
+172 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. LPI GPIO controller driver

This DT bindings describes the GPIO controller driver
being added for supporting LPI (Low Power Island) TLMM
from QTI chipsets.

Following properties are for LPI GPIO controller device main node.
- compatible:
	Usage: required
	Value type: <string>
	Definition: must be "qcom,lpi-pinctrl"

- reg:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: Register base of the GPIO controller and length.

- qcom,num-gpios:
	Usage: required
	Value type: <u32>
	Definition: Number of GPIOs supported by the controller.

- qcom,lpi-offset-tbl
	Usage: required
	Value type: <u32-array>
	Definition: Offset table of GPIOs supported by the controller.

- gpio-controller:
	Usage: required
	Value type: <none>
	Definition: Used to mark the device node as a GPIO controller.

- #gpio-cells:
	Usage: required
	Value type: <u32>
	Definition: Must be 2;
		    The first cell will be used to define gpio number and the
		    second denotes the flags for this gpio.

Please refer to ../gpio/gpio.txt for general description of GPIO bindings.

Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

The pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
pin or a list of pins. This configuration can include the
mux function to select on those pin(s), and various pin configuration
parameters, as listed below.

SUBNODES:

The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content.

Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.

The following generic properties as defined in pinctrl-bindings.txt are valid
to specify in a pin configuration subnode:

- pins:
	Usage: required
	Value type: <string-array>
	Definition: List of gpio pins affected by the properties specified in
		    this subnode.  Valid pins are: gpio0-gpio31 for LPI.

- function:
	Usage: required
	Value type: <string>
	Definition: Specify the alternative function to be configured for the
		    specified pins. Valid values are:
			"gpio",
			"func1",
			"func2",
			"func3",
			"func4",
			"func5"

- bias-disable:
	Usage: optional
	Value type: <none>
	Definition: The specified pins should be configured as no pull.

- bias-pull-down:
	Usage: optional
	Value type: <none>
	Definition: The specified pins should be configured as pull down.

- bias-bus-hold:
	Usage: optional
	Value type: <none>
	Definition: The specified pins should be configured as bus-keeper mode.

- bias-pull-up:
	Usage: optional
	Value type: <empty>
	Definition: The specified pins should be configured as pull up.

- input-enable:
	Usage: optional
	Value type: <none>
	Definition: The specified pins are put in input mode.

- output-high:
	Usage: optional
	Value type: <none>
	Definition: The specified pins are configured in output mode, driven
		    high.

- output-low:
	Usage: optional
	Value type: <none>
	Definition: The specified pins are configured in output mode, driven
		    low.

- qcom,drive-strength:
	Usage: optional
	Value type: <u32>
	Definition: Selects the drive strength for the specified pins.

Example:

	lpi_tlmm: lpi_pinctrl@152c000 {
		compatible = "qcom,lpi-pinctrl";
		qcom,num-gpios = <32>;
		reg = <0x152c000 0>;
		gpio-controller;
		#gpio-cells = <2>;
		qcom,lpi-offset-tbl = <0x00000010>, <0x00000020>,
				<0x00000030>, <0x00000040>,
				<0x00000050>, <0x00000060>,
				<0x00000070>, <0x00000080>,
				<0x00000090>, <0x00000100>,
				<0x00000110>, <0x00000120>,
				<0x00000130>, <0x00000140>,
				<0x00000150>, <0x00000160>,
				<0x00000170>, <0x00000180>,
				<0x00000190>, <0x00000200>,
				<0x00000210>;


		hph_comp_active: hph_comp_active {
			mux {
				pins = "gpio22";
				function = "func1";
			};

			config {
				pins = "gpio22";
				output-high;
				qcom,drive-strength = <8>;
			};
		};

		hph_comp_sleep: hph_comp_sleep {
			mux {
				pins = "gpio22";
				function = "func1";
			};

			config {
				pins = "gpio22";
				qcom,drive-strength = <2>;
			};
		};
	};
+169 −0
Original line number Diff line number Diff line
@@ -220,6 +220,23 @@ Required properties:
                            inCall Music Delivery port ID is 32773.
                            incall Music 2 Delivery port ID is 32770.

* msm_dai_cdc_dma

[First Level Nodes]

Required properties:

 - compatible : "qcom,msm-dai-cdc-dma"

[Second Level Nodes]

Required properties:

 - compatible : "qcom,msm-dai-cdc-dma-dev"
 - qcom,msm-dai-cdc-dma-dev-id : WSA codec dma port ID
                            Value is from 45056 to 45061.
                            VA codec dma port ID Value is from 45089 to 45091.

* msm-auxpcm

Required properties:
@@ -656,6 +673,12 @@ Example:
	audio_apr: qcom,msm-audio-apr {
		compatible = "qcom,msm-audio-apr";
		qcom,subsys-name = "apr_adsp";
                q6core {
                        compatible = "qcom,q6core-audio";
                        bolero: bolero-cdc {
                                compatible = "qcom,bolero-cdc";
                        };
                };
	};

	qcom,msm-ocmem-audio {
@@ -1191,3 +1214,149 @@ Example:
		qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
					  "SpkrLeft", "SpkrRight";
	};


* QCS405 ASoC Machine driver

Required properties:
- compatible : "qcom,qcs405-asoc-snd".
- qcom,model : The user-visible name of this sound card.
- qcom,audio-routing : A list of the connections between audio components.
- 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
		  in "asoc-cpu". The cpu names are in the form of "%s.%d" form,
		  where the id (%d) field represents the back-end AFE port id that
		  this CPU dai is associated with.
- 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".
Optional properties:
- clock-names : clock name defined for external clock.
- clocks : external clock defined for codec clock.
- 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,wcn-btfm : Property to specify if WCN BT/FM chip is used for the target
- qcom,wsa_bolero_codec : Property to specify if WSA macro in Bolero codec is used for this target
- qcom,va_bolero_codec : Property to specify if VA macro in Bolero codec is used for this target
- qcom,tasha_codec : Property to specify if Tasha codec is used for this target
- qcom,cdc-dmic-gpios : phandle for Digital mic clk and data gpios.
Example:

	qcs405_snd {
		compatible = "qcom,qcs405-asoc-snd";
		qcom,wsa_bolero_codec =  <1>;
		qcom,va_bolero_codec = <1>;
		qcom,tasha_codec = <1>;
		qcom,ext-disp-audio-rx = <1>;
		qcom,wcn-btfm = <1>;
		qcom,mi2s-audio-intf = <1>;
		qcom,auxpcm-audio-intf = <1>;
		qcom,msm-mi2s-master = <1>, <1>, <1>, <1>;

		qcom,audio-routing =
			"MADINPUT", "MCLK",
			"AMIC2", "MIC BIAS2",
			"AMIC3", "MIC BIAS2",
			"AMIC4", "MIC BIAS2",
			"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";

		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_hdmi>, <&dai_dp>,
				<&dai_mi2s0>, <&dai_mi2s1>,
				<&dai_mi2s2>, <&dai_mi2s3>,
				<&dai_pri_auxpcm>, <&dai_sec_auxpcm>,
				<&dai_tert_auxpcm>, <&dai_quat_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_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>, <&sb_5_rx>, <&sb_6_rx>,
				<&sb_7_rx>, <&sb_7_tx>, <&sb_8_tx>,
				<&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>,
				<&wsa_cdc_dma_0_rx>, <&wsa_cdc_dma_0_tx>,
				<&wsa_cdc_dma_1_rx>, <&wsa_cdc_dma_1_tx>,
				<&wsa_cdc_dma_2_tx>, <&va_cdc_dma_0_tx>,
				<&va_cdc_dma_1_tx>;
		asoc-cpu-names = "msm-dai-q6-hdmi.8",  "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-auxpcm.1", "msm-dai-q6-auxpcm.2",
				"msm-dai-q6-auxpcm.3", "msm-dai-q6-auxpcm.4",
				"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.16395", "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.16394",
				"msm-dai-q6-dev.16396", "msm-dai-q6-dev.16398",
				"msm-dai-q6-dev.16399", "msm-dai-q6-dev.16401",
				"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-cdc-dma-dev.45056",
				"msm-dai-q6-cdc-dma-dev.45057",
				"msm-dai-q6-cdc-dma-dev.45058",
				"msm-dai-q6-cdc-dma-dev.45059",
				"msm-dai-q6-cdc-dma-dev.45061",
				"msm-dai-q6-cdc-dma-dev.45089",
				"msm-dai-q6-cdc-dma-dev.45091";
		asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>,
				<&bolero>;;
		asoc-codec-names = "msm-stub-codec.1",
				   "msm-ext-disp-audio-codec-rx",
				   "bolero_codec";
		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";
		qcom,cdc-dmic-gpios = <&cdc_dmic12_gpios>, <&cdc_dmic34_gpios>,
					<&cdc_dmic56_gpios>, <&cdc_dmic78_gpios>;
	};
+43 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Required properties:

 - compatible : "qcom,pahu-slim-pgd" or "qcom,pahu-i2c" for pahu Codec
                "qcom,tavil-slim-pgd" or "qcom,tavil-i2c-pgd" for Tavil codec
		"qcom,tasha-slim-pgd" or "qcom,tasha-i2c-pgd" for Tasha Codec
 - elemental-addr: codec slimbus slave PGD enumeration address.(48 bits)

 - qcom,cdc-reset-gpio: gpio used for codec SOC reset.
@@ -439,3 +440,45 @@ msm_sdw_codec: qcom,msm-sdw-codec@152c1000 {
		};
	};
};

WSA macro in Bolero codec

Required properties:
 - compatible = "qcom,wsa-macro";
 - reg: Specifies the WSA macro base address for Bolero
	soundwire core registers.
 - clock-names : clock names defined for WSA macro
 - clocks : clock handles defined for WSA  macro

Example:

&bolero {
	wsa_macro: wsa-macro {
		compatible = "qcom,wsa-macro";
		reg = <0x0C2C0000 0x0>;
		clock-names = "wsa_core_clk", "wsa_npl_clk";
		clocks = <&clock_audio_wsa_1 AUDIO_LPASS_MCLK>,
		<&clock_audio_wsa_2 AUDIO_LPASS_MCLK>;
		qcom,wsa-swr-gpios = &wsa_swr_gpios;
	};
};

VA macro in bolero codec

Required properties:
 - compatible = "qcom,va-macro";
 - reg: Specifies the VA macro base address for Bolero
	soundwire core registers.
 - clock-names : clock names defined for WSA macro
 - clocks : clock handles defined for WSA  macro

Example:

&bolero {
	va_macro: va-macro {
		compatible = "qcom,va-macro";
		reg = <0x0C490000 0x0>;
		clock-names = "va_core_clk";
		clocks = <&clock_audio_va AUDIO_LPASS_MCLK>;
	};
};