xref: /freebsd/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2fac71e4eSEmmanuel Vadot%YAML 1.2
3fac71e4eSEmmanuel Vadot---
4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-max9808x.yaml#
5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6fac71e4eSEmmanuel Vadot
7fac71e4eSEmmanuel Vadottitle: NVIDIA Tegra audio complex with MAX9808x CODEC
8fac71e4eSEmmanuel Vadot
9fac71e4eSEmmanuel Vadotmaintainers:
10fac71e4eSEmmanuel Vadot  - Jon Hunter <jonathanh@nvidia.com>
11fac71e4eSEmmanuel Vadot  - Thierry Reding <thierry.reding@gmail.com>
12fac71e4eSEmmanuel Vadot
13fac71e4eSEmmanuel VadotallOf:
14fac71e4eSEmmanuel Vadot  - $ref: nvidia,tegra-audio-common.yaml#
15fac71e4eSEmmanuel Vadot
16fac71e4eSEmmanuel Vadotproperties:
17fac71e4eSEmmanuel Vadot  compatible:
18fac71e4eSEmmanuel Vadot    oneOf:
19fac71e4eSEmmanuel Vadot      - items:
20fac71e4eSEmmanuel Vadot          - pattern: '^[a-z0-9]+,tegra-audio-max98088(-[a-z0-9]+)+$'
21fac71e4eSEmmanuel Vadot          - const: nvidia,tegra-audio-max98088
22fac71e4eSEmmanuel Vadot      - items:
23fac71e4eSEmmanuel Vadot          - pattern: '^[a-z0-9]+,tegra-audio-max98089(-[a-z0-9]+)+$'
24fac71e4eSEmmanuel Vadot          - const: nvidia,tegra-audio-max98089
25fac71e4eSEmmanuel Vadot
26fac71e4eSEmmanuel Vadot  nvidia,audio-routing:
27fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
28fac71e4eSEmmanuel Vadot    description: |
29fac71e4eSEmmanuel Vadot      A list of the connections between audio components.
30fac71e4eSEmmanuel Vadot      Each entry is a pair of strings, the first being the connection's sink,
31fac71e4eSEmmanuel Vadot      the second being the connection's source. Valid names for sources and
32fac71e4eSEmmanuel Vadot      sinks are the pins (documented in the binding document),
33fac71e4eSEmmanuel Vadot      and the jacks on the board.
34fac71e4eSEmmanuel Vadot    minItems: 2
35fac71e4eSEmmanuel Vadot    items:
36fac71e4eSEmmanuel Vadot      enum:
37fac71e4eSEmmanuel Vadot        # Board Connectors
38aa1a8ff2SEmmanuel Vadot        - Int Spk
39aa1a8ff2SEmmanuel Vadot        - Headphone Jack
40aa1a8ff2SEmmanuel Vadot        - Earpiece
41aa1a8ff2SEmmanuel Vadot        - Headset Mic
42aa1a8ff2SEmmanuel Vadot        - Internal Mic 1
43aa1a8ff2SEmmanuel Vadot        - Internal Mic 2
44fac71e4eSEmmanuel Vadot
45fac71e4eSEmmanuel Vadot        # CODEC Pins
46fac71e4eSEmmanuel Vadot        - HPL
47fac71e4eSEmmanuel Vadot        - HPR
48fac71e4eSEmmanuel Vadot        - SPKL
49fac71e4eSEmmanuel Vadot        - SPKR
50fac71e4eSEmmanuel Vadot        - RECL
51fac71e4eSEmmanuel Vadot        - RECR
52fac71e4eSEmmanuel Vadot        - INA1
53fac71e4eSEmmanuel Vadot        - INA2
54fac71e4eSEmmanuel Vadot        - INB1
55fac71e4eSEmmanuel Vadot        - INB2
56fac71e4eSEmmanuel Vadot        - MIC1
57fac71e4eSEmmanuel Vadot        - MIC2
58fac71e4eSEmmanuel Vadot        - MICBIAS
59fac71e4eSEmmanuel Vadot
60fac71e4eSEmmanuel VadotunevaluatedProperties: false
61fac71e4eSEmmanuel Vadot
62fac71e4eSEmmanuel Vadotexamples:
63fac71e4eSEmmanuel Vadot  - |
64fac71e4eSEmmanuel Vadot    #include <dt-bindings/clock/tegra30-car.h>
65fac71e4eSEmmanuel Vadot    #include <dt-bindings/soc/tegra-pmc.h>
66fac71e4eSEmmanuel Vadot    sound {
67*8d13bc63SEmmanuel Vadot        compatible = "lg,tegra-audio-max98089-p895",
68fac71e4eSEmmanuel Vadot                     "nvidia,tegra-audio-max98089";
69fac71e4eSEmmanuel Vadot        nvidia,model = "LG Optimus Vu MAX98089";
70fac71e4eSEmmanuel Vadot
71fac71e4eSEmmanuel Vadot        nvidia,audio-routing =
72fac71e4eSEmmanuel Vadot            "Headphone Jack", "HPL",
73fac71e4eSEmmanuel Vadot            "Headphone Jack", "HPR",
74fac71e4eSEmmanuel Vadot            "Int Spk", "SPKL",
75fac71e4eSEmmanuel Vadot            "Int Spk", "SPKR",
76fac71e4eSEmmanuel Vadot            "Earpiece", "RECL",
77fac71e4eSEmmanuel Vadot            "Earpiece", "RECR",
78fac71e4eSEmmanuel Vadot            "INA1", "Headset Mic",
79fac71e4eSEmmanuel Vadot            "MIC1", "MICBIAS",
80fac71e4eSEmmanuel Vadot            "MICBIAS", "Internal Mic 1",
81fac71e4eSEmmanuel Vadot            "MIC2", "Internal Mic 2";
82fac71e4eSEmmanuel Vadot
83fac71e4eSEmmanuel Vadot        nvidia,i2s-controller = <&tegra_i2s0>;
84fac71e4eSEmmanuel Vadot        nvidia,audio-codec = <&codec>;
85fac71e4eSEmmanuel Vadot
86fac71e4eSEmmanuel Vadot        clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
87fac71e4eSEmmanuel Vadot                 <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
88fac71e4eSEmmanuel Vadot                 <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
89fac71e4eSEmmanuel Vadot        clock-names = "pll_a", "pll_a_out0", "mclk";
90fac71e4eSEmmanuel Vadot    };
91