Stephan Gerhold | 17ba36b | 2021-05-13 12:41:28 +0200 | [diff] [blame] | 1 | # 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 | |
| 7 | title: NXP/Goodix TFA989X (TFA1) Audio Amplifiers |
| 8 | |
| 9 | maintainers: |
| 10 | - Stephan Gerhold <stephan@gerhold.net> |
| 11 | |
Sameer Pujar | 82d3ec1 | 2021-09-03 22:05:18 +0530 | [diff] [blame] | 12 | allOf: |
| 13 | - $ref: name-prefix.yaml# |
| 14 | |
Stephan Gerhold | 17ba36b | 2021-05-13 12:41:28 +0200 | [diff] [blame] | 15 | properties: |
| 16 | compatible: |
| 17 | enum: |
| 18 | - nxp,tfa9895 |
Vincent Knecht | 513df99 | 2021-05-28 12:50:58 +0200 | [diff] [blame] | 19 | - nxp,tfa9897 |
Stephan Gerhold | 17ba36b | 2021-05-13 12:41:28 +0200 | [diff] [blame] | 20 | |
| 21 | reg: |
| 22 | maxItems: 1 |
| 23 | |
| 24 | '#sound-dai-cells': |
| 25 | const: 0 |
| 26 | |
Vincent Knecht | 77fffb8 | 2021-10-31 22:09:55 +0100 | [diff] [blame] | 27 | rcv-gpios: |
| 28 | description: optional GPIO to be asserted when receiver mode is enabled. |
| 29 | |
Sameer Pujar | 013148f | 2021-09-21 21:11:00 +0530 | [diff] [blame] | 30 | sound-name-prefix: true |
| 31 | |
Vincent Knecht | 9cf1a98 | 2021-05-28 12:51:00 +0200 | [diff] [blame] | 32 | vddd-supply: |
| 33 | description: regulator phandle for the VDDD power supply. |
| 34 | |
Vincent Knecht | 77fffb8 | 2021-10-31 22:09:55 +0100 | [diff] [blame] | 35 | if: |
| 36 | not: |
| 37 | properties: |
| 38 | compatible: |
| 39 | const: nxp,tfa9897 |
| 40 | then: |
| 41 | properties: |
| 42 | rcv-gpios: false |
| 43 | |
Stephan Gerhold | 17ba36b | 2021-05-13 12:41:28 +0200 | [diff] [blame] | 44 | required: |
| 45 | - compatible |
| 46 | - reg |
| 47 | - '#sound-dai-cells' |
| 48 | |
| 49 | additionalProperties: false |
| 50 | |
| 51 | examples: |
| 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 Knecht | 77fffb8 | 2021-10-31 22:09:55 +0100 | [diff] [blame] | 70 | |
| 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 | }; |