summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml
blob: 785930658029531c4abcdc975e112f818bf6a52e (plain)
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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,ts3a227e.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments TS3A227E
  Autonomous Audio Accessory Detection and Configuration Switch

maintainers:
  - Dylan Reid <dgreid@chromium.org>

description: |
  The TS3A227E detect headsets of 3-ring and 4-ring standards and
  switches automatically to route the microphone correctly. It also
  handles key press detection in accordance with the Android audio
  headset specification v1.0.

properties:
  compatible:
    enum:
      - ti,ts3a227e

  reg:
    const: 0x3b

  interrupts:
    maxItems: 1

  ti,micbias:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Intended MICBIAS voltage (datasheet section 9.6.7).
    enum:
      - 0 # 2.1 V
      - 1 # 2.2 V
      - 2 # 2.3 V
      - 3 # 2.4 V
      - 4 # 2.5 V
      - 5 # 2.6 V
      - 6 # 2.7 V
      - 7 # 2.8 V
    default: 1

  ti,debounce-release-ms:
    description: key release debounce time in ms (datasheet section 9.6.7).
    enum:
      - 0
      - 20
    default: 20

  ti,debounce-press-ms:
    description: key press debounce time in ms (datasheet section 9.6.7).
    enum:
      - 2
      - 40
      - 80
      - 120
    default: 80

  ti,debounce-insertion-ms:
    description: headset insertion debounce time in ms (datasheet section 9.6.5).
    enum:
      - 2
      - 30
      - 60
      - 90
      - 120
      - 150
      - 1000
      - 2000
    default: 90

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        codec: audio-controller@3b {
            compatible = "ti,ts3a227e";
            reg = <0x3b>;
            interrupt-parent = <&gpio1>;
            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
        };
    };

...