xref: /openbmc/linux/Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1be541bd4SAstrid Rost# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2be541bd4SAstrid Rost%YAML 1.2
3be541bd4SAstrid Rost---
4be541bd4SAstrid Rost$id: http://devicetree.org/schemas/sound/ti,ts3a227e.yaml#
5be541bd4SAstrid Rost$schema: http://devicetree.org/meta-schemas/core.yaml#
6be541bd4SAstrid Rost
7be541bd4SAstrid Rosttitle: Texas Instruments TS3A227E
8be541bd4SAstrid Rost  Autonomous Audio Accessory Detection and Configuration Switch
9be541bd4SAstrid Rost
10be541bd4SAstrid Rostmaintainers:
11be541bd4SAstrid Rost  - Dylan Reid <dgreid@chromium.org>
12be541bd4SAstrid Rost
13be541bd4SAstrid Rostdescription: |
14be541bd4SAstrid Rost  The TS3A227E detect headsets of 3-ring and 4-ring standards and
15be541bd4SAstrid Rost  switches automatically to route the microphone correctly. It also
16be541bd4SAstrid Rost  handles key press detection in accordance with the Android audio
17be541bd4SAstrid Rost  headset specification v1.0.
18be541bd4SAstrid Rost
19be541bd4SAstrid Rostproperties:
20be541bd4SAstrid Rost  compatible:
21be541bd4SAstrid Rost    enum:
22be541bd4SAstrid Rost      - ti,ts3a227e
23be541bd4SAstrid Rost
24be541bd4SAstrid Rost  reg:
25be541bd4SAstrid Rost    const: 0x3b
26be541bd4SAstrid Rost
27be541bd4SAstrid Rost  interrupts:
28be541bd4SAstrid Rost    maxItems: 1
29be541bd4SAstrid Rost
30be541bd4SAstrid Rost  ti,micbias:
31be541bd4SAstrid Rost    $ref: /schemas/types.yaml#/definitions/uint32
32be541bd4SAstrid Rost    description: Intended MICBIAS voltage (datasheet section 9.6.7).
33be541bd4SAstrid Rost    enum:
34be541bd4SAstrid Rost      - 0 # 2.1 V
35be541bd4SAstrid Rost      - 1 # 2.2 V
36be541bd4SAstrid Rost      - 2 # 2.3 V
37be541bd4SAstrid Rost      - 3 # 2.4 V
38be541bd4SAstrid Rost      - 4 # 2.5 V
39be541bd4SAstrid Rost      - 5 # 2.6 V
40be541bd4SAstrid Rost      - 6 # 2.7 V
41be541bd4SAstrid Rost      - 7 # 2.8 V
42be541bd4SAstrid Rost    default: 1
43be541bd4SAstrid Rost
44*6a47412dSAstrid Rost  ti,debounce-release-ms:
45*6a47412dSAstrid Rost    description: key release debounce time in ms (datasheet section 9.6.7).
46*6a47412dSAstrid Rost    enum:
47*6a47412dSAstrid Rost      - 0
48*6a47412dSAstrid Rost      - 20
49*6a47412dSAstrid Rost    default: 20
50*6a47412dSAstrid Rost
51*6a47412dSAstrid Rost  ti,debounce-press-ms:
52*6a47412dSAstrid Rost    description: key press debounce time in ms (datasheet section 9.6.7).
53*6a47412dSAstrid Rost    enum:
54*6a47412dSAstrid Rost      - 2
55*6a47412dSAstrid Rost      - 40
56*6a47412dSAstrid Rost      - 80
57*6a47412dSAstrid Rost      - 120
58*6a47412dSAstrid Rost    default: 80
59*6a47412dSAstrid Rost
60*6a47412dSAstrid Rost  ti,debounce-insertion-ms:
61*6a47412dSAstrid Rost    description: headset insertion debounce time in ms (datasheet section 9.6.5).
62*6a47412dSAstrid Rost    enum:
63*6a47412dSAstrid Rost      - 2
64*6a47412dSAstrid Rost      - 30
65*6a47412dSAstrid Rost      - 60
66*6a47412dSAstrid Rost      - 90
67*6a47412dSAstrid Rost      - 120
68*6a47412dSAstrid Rost      - 150
69*6a47412dSAstrid Rost      - 1000
70*6a47412dSAstrid Rost      - 2000
71*6a47412dSAstrid Rost    default: 90
72*6a47412dSAstrid Rost
73be541bd4SAstrid Rostrequired:
74be541bd4SAstrid Rost  - compatible
75be541bd4SAstrid Rost  - reg
76be541bd4SAstrid Rost  - interrupts
77be541bd4SAstrid Rost
78be541bd4SAstrid RostadditionalProperties: false
79be541bd4SAstrid Rost
80be541bd4SAstrid Rostexamples:
81be541bd4SAstrid Rost  - |
82be541bd4SAstrid Rost    #include <dt-bindings/interrupt-controller/irq.h>
83be541bd4SAstrid Rost    i2c {
84be541bd4SAstrid Rost        #address-cells = <1>;
85be541bd4SAstrid Rost        #size-cells = <0>;
86be541bd4SAstrid Rost        codec: audio-controller@3b {
87be541bd4SAstrid Rost            compatible = "ti,ts3a227e";
88be541bd4SAstrid Rost            reg = <0x3b>;
89be541bd4SAstrid Rost            interrupt-parent = <&gpio1>;
90be541bd4SAstrid Rost            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
91be541bd4SAstrid Rost        };
92be541bd4SAstrid Rost    };
93be541bd4SAstrid Rost
94be541bd4SAstrid Rost...
95