blob: b9b1dba40856d6fd1181be89a1d7fde58f61834d [file] [log] [blame]
Stephan Gerhold17ba36b2021-05-13 12:41:28 +02001# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/nxp,tfa989x.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP/Goodix TFA989X (TFA1) Audio Amplifiers
8
9maintainers:
10 - Stephan Gerhold <stephan@gerhold.net>
11
Sameer Pujar82d3ec12021-09-03 22:05:18 +053012allOf:
13 - $ref: name-prefix.yaml#
14
Stephan Gerhold17ba36b2021-05-13 12:41:28 +020015properties:
16 compatible:
17 enum:
18 - nxp,tfa9895
Vincent Knecht513df992021-05-28 12:50:58 +020019 - nxp,tfa9897
Stephan Gerhold17ba36b2021-05-13 12:41:28 +020020
21 reg:
22 maxItems: 1
23
24 '#sound-dai-cells':
25 const: 0
26
Vincent Knecht77fffb82021-10-31 22:09:55 +010027 rcv-gpios:
28 description: optional GPIO to be asserted when receiver mode is enabled.
29
Sameer Pujar013148f2021-09-21 21:11:00 +053030 sound-name-prefix: true
31
Vincent Knecht9cf1a982021-05-28 12:51:00 +020032 vddd-supply:
33 description: regulator phandle for the VDDD power supply.
34
Vincent Knecht77fffb82021-10-31 22:09:55 +010035if:
36 not:
37 properties:
38 compatible:
39 const: nxp,tfa9897
40then:
41 properties:
42 rcv-gpios: false
43
Stephan Gerhold17ba36b2021-05-13 12:41:28 +020044required:
45 - compatible
46 - reg
47 - '#sound-dai-cells'
48
49additionalProperties: false
50
51examples:
52 - |
53 i2c {
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 audio-codec@34 {
58 compatible = "nxp,tfa9895";
59 reg = <0x34>;
60 sound-name-prefix = "Speaker Left";
61 #sound-dai-cells = <0>;
62 };
63 audio-codec@36 {
64 compatible = "nxp,tfa9895";
65 reg = <0x36>;
66 sound-name-prefix = "Speaker Right";
67 #sound-dai-cells = <0>;
68 };
69 };
Vincent Knecht77fffb82021-10-31 22:09:55 +010070
71 - |
72 #include <dt-bindings/gpio/gpio.h>
73 i2c {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 speaker_codec_top: audio-codec@34 {
78 compatible = "nxp,tfa9897";
79 reg = <0x34>;
80 vddd-supply = <&pm8916_l6>;
81 rcv-gpios = <&msmgpio 50 GPIO_ACTIVE_HIGH>;
82 pinctrl-names = "default";
83 pinctrl-0 = <&speaker_top_default>;
84 sound-name-prefix = "Speaker Top";
85 #sound-dai-cells = <0>;
86 };
87
88 speaker_codec_bottom: audio-codec@36 {
89 compatible = "nxp,tfa9897";
90 reg = <0x36>;
91 vddd-supply = <&pm8916_l6>;
92 rcv-gpios = <&msmgpio 111 GPIO_ACTIVE_HIGH>;
93 pinctrl-names = "default";
94 pinctrl-0 = <&speaker_bottom_default>;
95 sound-name-prefix = "Speaker Bottom";
96 #sound-dai-cells = <0>;
97 };
98 };