1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2019-20 Texas Instruments Incorporated
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/sound/tas2770.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: Texas Instruments TAS2770 Smart PA
9
10maintainers:
11  - Shi Fu <shifu0704@thundersoft.com>
12
13description: |
14  The TAS2770 is a mono, digital input Class-D audio amplifier optimized for
15  efficiently driving high peak power into small loudspeakers.
16  Integrated speaker voltage and current sense provides for
17  real time monitoring of loudspeaker behavior.
18
19properties:
20  compatible:
21    enum:
22      - ti,tas2770
23
24  reg:
25    maxItems: 1
26    description: |
27       I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
28
29  reset-gpio:
30    description: GPIO used to reset the device.
31
32  interrupts:
33    maxItems: 1
34
35  ti,imon-slot-no:
36    $ref: /schemas/types.yaml#/definitions/uint32
37    description: TDM TX current sense time slot.
38
39  ti,vmon-slot-no:
40    $ref: /schemas/types.yaml#/definitions/uint32
41    description: TDM TX voltage sense time slot.
42
43  ti,asi-format:
44    $ref: /schemas/types.yaml#/definitions/uint32
45    description: Sets TDM RX capture edge.
46    enum:
47      - 0 # Rising edge
48      - 1 # Falling edge
49
50  '#sound-dai-cells':
51    const: 1
52
53required:
54  - compatible
55  - reg
56
57additionalProperties: false
58
59examples:
60  - |
61   #include <dt-bindings/gpio/gpio.h>
62   i2c0 {
63     #address-cells = <1>;
64     #size-cells = <0>;
65     codec: codec@4c {
66       compatible = "ti,tas2770";
67       reg = <0x4c>;
68       #sound-dai-cells = <1>;
69       interrupt-parent = <&gpio1>;
70       interrupts = <14>;
71       reset-gpio = <&gpio1 15 0>;
72       ti,imon-slot-no = <0>;
73       ti,vmon-slot-no = <2>;
74     };
75   };
76
77