Documentation / devicetree / bindings / sound / nxp,tfa989x.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nxp,tfa989x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP/Goodix TFA989X (TFA1) Audio Amplifiers

maintainers:
  - Stephan Gerhold <stephan@gerhold.net>

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    enum:
      - nxp,tfa9890
      - nxp,tfa9895
      - nxp,tfa9897

  reg:
    maxItems: 1
 
  '#sound-dai-cells':
    const: 0

  rcv-gpios:
    description: optional GPIO to be asserted when receiver mode is enabled.

  sound-name-prefix: true

  vddd-supply:
    description: regulator phandle for the VDDD power supply.

if:
  not:
    properties:
      compatible:
        const: nxp,tfa9897
then:
  properties:
    rcv-gpios: false

required:
  - compatible
  - reg
  - '#sound-dai-cells'

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
 
      audio-codec@34 {
        compatible = "nxp,tfa9895";
        reg = <0x34>;
        sound-name-prefix = "Speaker Left";
        #sound-dai-cells = <0>;
      };
      audio-codec@36 {
        compatible = "nxp,tfa9895";
        reg = <0x36>;
        sound-name-prefix = "Speaker Right";
        #sound-dai-cells = <0>;
      };
    };

  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
 
      speaker_codec_top: audio-codec@34 {
        compatible = "nxp,tfa9897";
        reg = <0x34>;
        vddd-supply = <&pm8916_l6>;
        rcv-gpios = <&msmgpio 50 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&speaker_top_default>;
        sound-name-prefix = "Speaker Top";
        #sound-dai-cells = <0>;
      };
 
      speaker_codec_bottom: audio-codec@36 {
        compatible = "nxp,tfa9897";
        reg = <0x36>;
        vddd-supply = <&pm8916_l6>;
        rcv-gpios = <&msmgpio 111 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&speaker_bottom_default>;
        sound-name-prefix = "Speaker Bottom";
        #sound-dai-cells = <0>;
      };
    };