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 between 0x41 to 0x48.
28
29  reset-gpio:
30    description: GPIO used to reset the device.
31
32  shutdown-gpios:
33    description: GPIO used to control the state of the device.
34
35  interrupts:
36    maxItems: 1
37
38  ti,imon-slot-no:
39    $ref: /schemas/types.yaml#/definitions/uint32
40    description: TDM TX current sense time slot.
41
42  ti,vmon-slot-no:
43    $ref: /schemas/types.yaml#/definitions/uint32
44    description: TDM TX voltage sense time slot.
45
46  ti,asi-format:
47    $ref: /schemas/types.yaml#/definitions/uint32
48    description: Sets TDM RX capture edge.
49    enum:
50      - 0 # Rising edge
51      - 1 # Falling edge
52
53  '#sound-dai-cells':
54    const: 1
55
56required:
57  - compatible
58  - reg
59
60additionalProperties: false
61
62examples:
63  - |
64   #include <dt-bindings/gpio/gpio.h>
65   i2c0 {
66     #address-cells = <1>;
67     #size-cells = <0>;
68     codec: codec@41 {
69       compatible = "ti,tas2770";
70       reg = <0x41>;
71       #sound-dai-cells = <1>;
72       interrupt-parent = <&gpio1>;
73       interrupts = <14>;
74       reset-gpio = <&gpio1 15 0>;
75       shutdown-gpios = <&gpio1 14 0>;
76       ti,imon-slot-no = <0>;
77       ti,vmon-slot-no = <2>;
78     };
79   };
80
81