Skip to content

Commit 9979902

Browse files
okiasdigetx
authored andcommitted
dt-bindings: sound: nvidia,tegra-audio: Convert multiple txt bindings to yaml
Convert Tegra audio complex with the * ALC5632 * MAX98090 * RT5640 * RT5677 * SGTL5000 * TrimSlice * WM8753 * WM8903 * WM9712 codec to the YAML format. Additional changes: - added missing HPOUTL to the WM9712 codec. - extended rt5677 codec with multiple pins Reviewed-by: Dmitry Osipenko <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
1 parent 4233b65 commit 9979902

19 files changed

+790
-445
lines changed

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-alc5632.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NVIDIA Tegra audio complex with ALC5632 CODEC
8+
9+
maintainers:
10+
- Jon Hunter <[email protected]>
11+
- Thierry Reding <[email protected]>
12+
13+
allOf:
14+
- $ref: nvidia,tegra-audio-common.yaml#
15+
16+
properties:
17+
compatible:
18+
items:
19+
- pattern: '^[a-z0-9]+,tegra-audio-alc5632(-[a-z0-9]+)+$'
20+
- const: nvidia,tegra-audio-alc5632
21+
22+
nvidia,audio-routing:
23+
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
24+
description: |
25+
A list of the connections between audio components.
26+
Each entry is a pair of strings, the first being the connection's sink,
27+
the second being the connection's source. Valid names for sources and
28+
sinks are the pins (documented in the binding document),
29+
and the jacks on the board.
30+
minItems: 2
31+
items:
32+
enum:
33+
# Board Connectors
34+
- "Headset Stereophone"
35+
- "Int Spk"
36+
- "Headset Mic"
37+
- "Digital Mic"
38+
39+
# CODEC Pins
40+
- SPKOUT
41+
- SPKOUTN
42+
- MICBIAS1
43+
- MIC1
44+
- HPR
45+
- HPL
46+
- DMICDAT
47+
48+
required:
49+
- nvidia,i2s-controller
50+
51+
unevaluatedProperties: false
52+
53+
examples:
54+
- |
55+
sound {
56+
compatible = "nvidia,tegra-audio-alc5632-paz00",
57+
"nvidia,tegra-audio-alc5632";
58+
59+
nvidia,model = "Compal PAZ00";
60+
61+
nvidia,audio-routing = "Int Spk", "SPKOUT",
62+
"Int Spk", "SPKOUTN",
63+
"Headset Mic", "MICBIAS1",
64+
"MIC1", "Headset Mic",
65+
"Headset Stereophone", "HPR",
66+
"Headset Stereophone", "HPL",
67+
"DMICDAT", "Digital Mic";
68+
69+
nvidia,i2s-controller = <&i2s>;
70+
nvidia,audio-codec = <&codec>;
71+
72+
clocks = <&clk 112>, <&clk 113>, <&clk 93>;
73+
clock-names = "pll_a", "pll_a_out0", "mclk";
74+
};
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/sound/nvidia,tegra-audio-common.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: Common properties for NVIDIA Tegra audio complexes
8+
9+
maintainers:
10+
- Jon Hunter <[email protected]>
11+
- Thierry Reding <[email protected]>
12+
13+
properties:
14+
clocks:
15+
items:
16+
- description: PLL A clock
17+
- description: PLL A OUT0 clock
18+
- description: The Tegra cdev1/extern1 clock, which feeds the card's mclk
19+
20+
clock-names:
21+
items:
22+
- const: pll_a
23+
- const: pll_a_out0
24+
- const: mclk
25+
26+
nvidia,model:
27+
$ref: /schemas/types.yaml#/definitions/string
28+
description: The user-visible name of this sound complex.
29+
30+
nvidia,audio-routing:
31+
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
32+
description: |
33+
A list of the connections between audio components.
34+
Each entry is a pair of strings, the first being the connection's sink,
35+
the second being the connection's source. Valid names for sources and
36+
sinks are the pins (documented in the binding document),
37+
and the jacks on the board.
38+
39+
nvidia,ac97-controller:
40+
$ref: /schemas/types.yaml#/definitions/phandle
41+
description: The phandle of the AC97 controller
42+
43+
nvidia,i2s-controller:
44+
$ref: /schemas/types.yaml#/definitions/phandle
45+
description: The phandle of the Tegra I2S controller
46+
47+
nvidia,audio-codec:
48+
$ref: /schemas/types.yaml#/definitions/phandle
49+
description: The phandle of audio codec
50+
51+
nvidia,spkr-en-gpios:
52+
maxItems: 1
53+
description: The GPIO that enables the speakers
54+
55+
nvidia,hp-mute-gpios:
56+
maxItems: 1
57+
description: The GPIO that mutes the headphones
58+
59+
nvidia,hp-det-gpios:
60+
maxItems: 1
61+
description: The GPIO that detect headphones are plugged in
62+
63+
nvidia,mic-det-gpios:
64+
maxItems: 1
65+
description: The GPIO that detect microphone is plugged in
66+
67+
nvidia,ear-sel-gpios:
68+
maxItems: 1
69+
description: The GPIO that switch between the microphones
70+
71+
nvidia,int-mic-en-gpios:
72+
maxItems: 1
73+
description: The GPIO that enables the internal microphone
74+
75+
nvidia,ext-mic-en-gpios:
76+
maxItems: 1
77+
description: The GPIO that enables the external microphone
78+
79+
nvidia,headset:
80+
type: boolean
81+
description: The Mic Jack represents state of the headset microphone pin
82+
83+
additionalProperties: true

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-max98090.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NVIDIA Tegra audio complex with MAX98090 CODEC
8+
9+
maintainers:
10+
- Jon Hunter <[email protected]>
11+
- Thierry Reding <[email protected]>
12+
13+
allOf:
14+
- $ref: nvidia,tegra-audio-common.yaml#
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- items:
20+
- pattern: '^[a-z0-9]+,tegra-audio-max98090(-[a-z0-9]+)+$'
21+
- const: nvidia,tegra-audio-max98090
22+
- items:
23+
- enum:
24+
- nvidia,tegra-audio-max98090-nyan-big
25+
- nvidia,tegra-audio-max98090-nyan-blaze
26+
- const: nvidia,tegra-audio-max98090-nyan
27+
- const: nvidia,tegra-audio-max98090
28+
29+
nvidia,audio-routing:
30+
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
31+
description: |
32+
A list of the connections between audio components.
33+
Each entry is a pair of strings, the first being the connection's sink,
34+
the second being the connection's source. Valid names for sources and
35+
sinks are the pins (documented in the binding document),
36+
and the jacks on the board.
37+
minItems: 2
38+
items:
39+
enum:
40+
# Board Connectors
41+
- "Headphones"
42+
- "Speakers"
43+
- "Mic Jack"
44+
- "Int Mic"
45+
46+
# CODEC Pins
47+
- MIC1
48+
- MIC2
49+
- DMICL
50+
- DMICR
51+
- IN1
52+
- IN2
53+
- IN3
54+
- IN4
55+
- IN5
56+
- IN6
57+
- IN12
58+
- IN34
59+
- IN56
60+
- HPL
61+
- HPR
62+
- SPKL
63+
- SPKR
64+
- RCVL
65+
- RCVR
66+
- MICBIAS
67+
68+
required:
69+
- nvidia,i2s-controller
70+
71+
unevaluatedProperties: false
72+
73+
examples:
74+
- |
75+
#include <dt-bindings/clock/tegra124-car.h>
76+
77+
sound {
78+
compatible = "nvidia,tegra-audio-max98090-venice2",
79+
"nvidia,tegra-audio-max98090";
80+
nvidia,model = "NVIDIA Tegra Venice2";
81+
82+
nvidia,audio-routing =
83+
"Headphones", "HPR",
84+
"Headphones", "HPL",
85+
"Speakers", "SPKR",
86+
"Speakers", "SPKL",
87+
"Mic Jack", "MICBIAS",
88+
"IN34", "Mic Jack";
89+
90+
nvidia,i2s-controller = <&tegra_i2s1>;
91+
nvidia,audio-codec = <&acodec>;
92+
93+
clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
94+
<&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
95+
<&tegra_car TEGRA124_CLK_EXTERN1>;
96+
clock-names = "pll_a", "pll_a_out0", "mclk";
97+
};

0 commit comments

Comments
 (0)