xref: /freebsd/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5677.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotNVIDIA Tegra audio complex, with RT5677 CODEC
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible : "nvidia,tegra-audio-rt5677"
5*c66ec88fSEmmanuel Vadot- clocks : Must contain an entry for each entry in clock-names.
6*c66ec88fSEmmanuel Vadot  See ../clocks/clock-bindings.txt for details.
7*c66ec88fSEmmanuel Vadot- clock-names : Must include the following entries:
8*c66ec88fSEmmanuel Vadot  - pll_a
9*c66ec88fSEmmanuel Vadot  - pll_a_out0
10*c66ec88fSEmmanuel Vadot  - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk)
11*c66ec88fSEmmanuel Vadot- nvidia,model : The user-visible name of this sound complex.
12*c66ec88fSEmmanuel Vadot- nvidia,audio-routing : A list of the connections between audio components.
13*c66ec88fSEmmanuel Vadot  Each entry is a pair of strings, the first being the connection's sink,
14*c66ec88fSEmmanuel Vadot  the second being the connection's source. Valid names for sources and
15*c66ec88fSEmmanuel Vadot  sinks are the RT5677's pins (as documented in its binding), and the jacks
16*c66ec88fSEmmanuel Vadot  on the board:
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadot  * Headphone
19*c66ec88fSEmmanuel Vadot  * Speaker
20*c66ec88fSEmmanuel Vadot  * Headset Mic
21*c66ec88fSEmmanuel Vadot  * Internal Mic 1
22*c66ec88fSEmmanuel Vadot  * Internal Mic 2
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel Vadot- nvidia,i2s-controller : The phandle of the Tegra I2S controller that's
25*c66ec88fSEmmanuel Vadot  connected to the CODEC.
26*c66ec88fSEmmanuel Vadot- nvidia,audio-codec : The phandle of the RT5677 audio codec. This binding
27*c66ec88fSEmmanuel Vadot  assumes that AIF1 on the CODEC is connected to Tegra.
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel VadotOptional properties:
30*c66ec88fSEmmanuel Vadot- nvidia,hp-det-gpios : The GPIO that detects headphones are plugged in
31*c66ec88fSEmmanuel Vadot- nvidia,hp-en-gpios : The GPIO that enables headphone amplifier
32*c66ec88fSEmmanuel Vadot- nvidia,mic-present-gpios: The GPIO that mic jack is plugged in
33*c66ec88fSEmmanuel Vadot- nvidia,dmic-clk-en-gpios : The GPIO that gates DMIC clock signal
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotExample:
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadotsound {
38*c66ec88fSEmmanuel Vadot	compatible = "nvidia,tegra-audio-rt5677-ryu",
39*c66ec88fSEmmanuel Vadot	        "nvidia,tegra-audio-rt5677";
40*c66ec88fSEmmanuel Vadot	nvidia,model = "NVIDIA Tegra Ryu";
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadot	nvidia,audio-routing =
43*c66ec88fSEmmanuel Vadot		"Headphone", "LOUT2",
44*c66ec88fSEmmanuel Vadot		"Headphone", "LOUT1",
45*c66ec88fSEmmanuel Vadot		"Headset Mic", "MICBIAS1",
46*c66ec88fSEmmanuel Vadot		"IN1P", "Headset Mic",
47*c66ec88fSEmmanuel Vadot		"IN1N", "Headset Mic",
48*c66ec88fSEmmanuel Vadot		"DMIC L1", "Internal Mic 1",
49*c66ec88fSEmmanuel Vadot		"DMIC R1", "Internal Mic 1",
50*c66ec88fSEmmanuel Vadot		"DMIC L2", "Internal Mic 2",
51*c66ec88fSEmmanuel Vadot		"DMIC R2", "Internal Mic 2",
52*c66ec88fSEmmanuel Vadot		"Speaker", "PDM1L",
53*c66ec88fSEmmanuel Vadot		"Speaker", "PDM1R";
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot	nvidia,i2s-controller = <&tegra_i2s1>;
56*c66ec88fSEmmanuel Vadot	nvidia,audio-codec = <&rt5677>;
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot	nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
59*c66ec88fSEmmanuel Vadot	nvidia,mic-present-gpios = <&gpio TEGRA_GPIO(O, 5) GPIO_ACTIVE_LOW>;
60*c66ec88fSEmmanuel Vadot	nvidia,hp-en-gpios = <&rt5677 1 GPIO_ACTIVE_HIGH>;
61*c66ec88fSEmmanuel Vadot	nvidia,dmic-clk-en-gpios = <&rt5677 2 GPIO_ACTIVE_HIGH>;
62*c66ec88fSEmmanuel Vadot
63*c66ec88fSEmmanuel Vadot	clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
64*c66ec88fSEmmanuel Vadot	         <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
65*c66ec88fSEmmanuel Vadot	         <&tegra_car TEGRA124_CLK_EXTERN1>;
66*c66ec88fSEmmanuel Vadot	clock-names = "pll_a", "pll_a_out0", "mclk";
67*c66ec88fSEmmanuel Vadot};
68