1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2022 - 2023 Texas Instruments Incorporated
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/sound/ti,tas2781.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Texas Instruments TAS2781 SmartAMP
9
10maintainers:
11  - Shenghao Ding <shenghao-ding@ti.com>
12
13description:
14  The TAS2781 is a mono, digital input Class-D audio amplifier
15  optimized for efficiently driving high peak power into small
16  loudspeakers. An integrated on-chip DSP supports Texas Instruments
17  Smart Amp speaker protection algorithm. The integrated speaker
18  voltage and current sense provides for real time
19  monitoring of loudspeaker behavior.
20
21allOf:
22  - $ref: dai-common.yaml#
23
24properties:
25  compatible:
26    enum:
27      - ti,tas2781
28
29  reg:
30    description:
31      I2C address, in multiple tas2781s case, all the i2c address
32      aggreate as one Audio Device to support multiple audio slots.
33    maxItems: 8
34    minItems: 1
35    items:
36      minimum: 0x38
37      maximum: 0x3f
38
39  reset-gpios:
40    maxItems: 1
41
42  interrupts:
43    maxItems: 1
44
45  '#sound-dai-cells':
46    const: 0
47
48required:
49  - compatible
50  - reg
51
52additionalProperties: false
53
54examples:
55  - |
56   #include <dt-bindings/gpio/gpio.h>
57   i2c {
58     /* example with quad tas2781s, such as tablet or pad device */
59     #address-cells = <1>;
60     #size-cells = <0>;
61     quad_tas2781: tas2781@38 {
62       compatible = "ti,tas2781";
63       reg = <0x38>, /* Audio slot 0 */
64             <0x3a>, /* Audio slot 1 */
65             <0x39>, /* Audio slot 2 */
66             <0x3b>; /* Audio slot 3 */
67
68       #sound-dai-cells = <0>;
69       reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
70       interrupt-parent = <&gpio1>;
71       interrupts = <15>;
72     };
73   };
74...
75