18c2ecf20Sopenharmony_ciNVIDIA Tegra audio complex, with RT5677 CODEC
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible : "nvidia,tegra-audio-rt5677"
58c2ecf20Sopenharmony_ci- clocks : Must contain an entry for each entry in clock-names.
68c2ecf20Sopenharmony_ci  See ../clocks/clock-bindings.txt for details.
78c2ecf20Sopenharmony_ci- clock-names : Must include the following entries:
88c2ecf20Sopenharmony_ci  - pll_a
98c2ecf20Sopenharmony_ci  - pll_a_out0
108c2ecf20Sopenharmony_ci  - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk)
118c2ecf20Sopenharmony_ci- nvidia,model : The user-visible name of this sound complex.
128c2ecf20Sopenharmony_ci- nvidia,audio-routing : A list of the connections between audio components.
138c2ecf20Sopenharmony_ci  Each entry is a pair of strings, the first being the connection's sink,
148c2ecf20Sopenharmony_ci  the second being the connection's source. Valid names for sources and
158c2ecf20Sopenharmony_ci  sinks are the RT5677's pins (as documented in its binding), and the jacks
168c2ecf20Sopenharmony_ci  on the board:
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci  * Headphone
198c2ecf20Sopenharmony_ci  * Speaker
208c2ecf20Sopenharmony_ci  * Headset Mic
218c2ecf20Sopenharmony_ci  * Internal Mic 1
228c2ecf20Sopenharmony_ci  * Internal Mic 2
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci- nvidia,i2s-controller : The phandle of the Tegra I2S controller that's
258c2ecf20Sopenharmony_ci  connected to the CODEC.
268c2ecf20Sopenharmony_ci- nvidia,audio-codec : The phandle of the RT5677 audio codec. This binding
278c2ecf20Sopenharmony_ci  assumes that AIF1 on the CODEC is connected to Tegra.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciOptional properties:
308c2ecf20Sopenharmony_ci- nvidia,hp-det-gpios : The GPIO that detects headphones are plugged in
318c2ecf20Sopenharmony_ci- nvidia,hp-en-gpios : The GPIO that enables headphone amplifier
328c2ecf20Sopenharmony_ci- nvidia,mic-present-gpios: The GPIO that mic jack is plugged in
338c2ecf20Sopenharmony_ci- nvidia,dmic-clk-en-gpios : The GPIO that gates DMIC clock signal
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciExample:
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cisound {
388c2ecf20Sopenharmony_ci	compatible = "nvidia,tegra-audio-rt5677-ryu",
398c2ecf20Sopenharmony_ci	        "nvidia,tegra-audio-rt5677";
408c2ecf20Sopenharmony_ci	nvidia,model = "NVIDIA Tegra Ryu";
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci	nvidia,audio-routing =
438c2ecf20Sopenharmony_ci		"Headphone", "LOUT2",
448c2ecf20Sopenharmony_ci		"Headphone", "LOUT1",
458c2ecf20Sopenharmony_ci		"Headset Mic", "MICBIAS1",
468c2ecf20Sopenharmony_ci		"IN1P", "Headset Mic",
478c2ecf20Sopenharmony_ci		"IN1N", "Headset Mic",
488c2ecf20Sopenharmony_ci		"DMIC L1", "Internal Mic 1",
498c2ecf20Sopenharmony_ci		"DMIC R1", "Internal Mic 1",
508c2ecf20Sopenharmony_ci		"DMIC L2", "Internal Mic 2",
518c2ecf20Sopenharmony_ci		"DMIC R2", "Internal Mic 2",
528c2ecf20Sopenharmony_ci		"Speaker", "PDM1L",
538c2ecf20Sopenharmony_ci		"Speaker", "PDM1R";
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci	nvidia,i2s-controller = <&tegra_i2s1>;
568c2ecf20Sopenharmony_ci	nvidia,audio-codec = <&rt5677>;
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
598c2ecf20Sopenharmony_ci	nvidia,mic-present-gpios = <&gpio TEGRA_GPIO(O, 5) GPIO_ACTIVE_LOW>;
608c2ecf20Sopenharmony_ci	nvidia,hp-en-gpios = <&rt5677 1 GPIO_ACTIVE_HIGH>;
618c2ecf20Sopenharmony_ci	nvidia,dmic-clk-en-gpios = <&rt5677 2 GPIO_ACTIVE_HIGH>;
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci	clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
648c2ecf20Sopenharmony_ci	         <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
658c2ecf20Sopenharmony_ci	         <&tegra_car TEGRA124_CLK_EXTERN1>;
668c2ecf20Sopenharmony_ci	clock-names = "pll_a", "pll_a_out0", "mclk";
678c2ecf20Sopenharmony_ci};
68