1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/extcon/wlf,arizona.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs
8
9maintainers:
10  - patches@opensource.cirrus.com
11
12description: |
13  These devices are audio SoCs with extensive digital capabilities and a
14  range of analogue I/O.
15
16  This document lists Extcon specific bindings, see the primary binding
17  document ../mfd/arizona.yaml
18
19properties:
20  wlf,hpdet-channel:
21    description:
22      Headphone detection channel.  ARIZONA_ACCDET_MODE_HPL/1 sets the
23      headphone detect mode to HPDETL, ARIZONA_ACCDET_MODE_HPR/2 sets it
24      to HPDETR.  If this node is not included or if the value is unknown,
25      then headphone detection mode is set to HPDETL.
26    $ref: "/schemas/types.yaml#/definitions/uint32"
27    minimum: 1
28    maximum: 2
29
30  wlf,use-jd2:
31    description:
32      Use the additional JD input along with JD1 for dual pin jack detection.
33    type: boolean
34
35  wlf,use-jd2-nopull:
36    description:
37      Internal pull on JD2 is disabled when used for jack detection.
38    type: boolean
39
40  wlf,jd-invert:
41    description:
42      Invert the polarity of the jack detection switch.
43    type: boolean
44
45  wlf,micd-software-compare:
46    description:
47      Use a software comparison to determine mic presence.
48    type: boolean
49
50  wlf,micd-detect-debounce:
51    description:
52      Additional software microphone detection debounce specified in
53      milliseconds.
54    $ref: "/schemas/types.yaml#/definitions/uint32"
55
56  wlf,micd-pol-gpio:
57    description:
58      GPIO specifier for the GPIO controlling the headset polarity if one
59      exists.
60    maxItems: 1
61
62  wlf,micd-bias-start-time:
63    description:
64      Time allowed for MICBIAS to startup prior to performing microphone
65      detection, specified as per the ARIZONA_MICD_TIME_XXX defines.
66    $ref: "/schemas/types.yaml#/definitions/uint32"
67    minimum: 0
68    maximum: 12
69
70  wlf,micd-rate:
71    description:
72      Delay between successive microphone detection measurements, specified
73      as per the ARIZONA_MICD_TIME_XXX defines.
74    $ref: "/schemas/types.yaml#/definitions/uint32"
75    minimum: 0
76    maximum: 12
77
78  wlf,micd-dbtime:
79    description:
80      Microphone detection hardware debounces specified as the number of
81      measurements to take.
82    $ref: "/schemas/types.yaml#/definitions/uint32"
83    enum: [2, 4]
84
85  wlf,micd-timeout-ms:
86    description:
87      Timeout for microphone detection, specified in milliseconds.
88    $ref: "/schemas/types.yaml#/definitions/uint32"
89
90  wlf,micd-force-micbias:
91    description:
92      Force MICBIAS continuously on during microphone detection.
93    type: boolean
94
95  wlf,micd-configs:
96    description:
97      Headset polarity configurations (generally used for detection of
98      CTIA / OMTP headsets), the field can be of variable length but
99      should always be a multiple of 3 cells long, each three cell group
100      represents one polarity configuration.
101    $ref: "/schemas/types.yaml#/definitions/uint32-matrix"
102    items:
103      items:
104        - description:
105            The first cell defines the accessory detection pin, zero
106            will use MICDET1 and 0x2000 will use MICDET2.
107          enum: [ 0, 0x2000 ]
108        - description:
109            The second cell represents the MICBIAS to be used. Zero
110            will use MICVDD, 1-3 will use MICBIASx.
111          minimum: 0
112          maximum: 3
113        - description:
114            The third cell represents the value of the micd-pol-gpio
115            pin.
116          minimum: 0
117          maximum: 1
118
119  wlf,gpsw:
120    description:
121      Settings for the general purpose switch, set as one of the
122      ARIZONA_GPSW_XXX defines.
123    $ref: "/schemas/types.yaml#/definitions/uint32"
124    minimum: 0
125    maximum: 3
126