~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2 %YAML 1.2
  3 ---
  4 $id: http://devicetree.org/schemas/sound/nuvoton,nau8824.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: NAU8824 audio CODEC
  8 
  9 maintainers:
 10   - John Hsu <KCHSU0@nuvoton.com>
 11 
 12 allOf:
 13   - $ref: dai-common.yaml#
 14 
 15 properties:
 16   compatible:
 17     enum:
 18       - nuvoton,nau8824
 19 
 20   reg:
 21     maxItems: 1
 22 
 23   '#sound-dai-cells':
 24     const: 0
 25 
 26   clocks:
 27     items:
 28       - description: The phandle of the master clock to the CODEC
 29 
 30   clock-names:
 31     items:
 32       - const: mclk
 33 
 34   interrupts:
 35     maxItems: 1
 36 
 37   nuvoton,jkdet-polarity:
 38     $ref: /schemas/types.yaml#/definitions/uint32
 39     description:
 40       JKDET pin polarity.
 41     enum:
 42       - 0 # active high
 43       - 1 # active low
 44     default: 1
 45 
 46   nuvoton,vref-impedance:
 47     $ref: /schemas/types.yaml#/definitions/uint32
 48     description:
 49       VREF Impedance selection.
 50     enum:
 51       - 0 # Open
 52       - 1 # 25 kOhm
 53       - 2 # 125 kOhm
 54       - 3 # 2.5 kOhm
 55     default: 2
 56 
 57   nuvoton,micbias-voltage:
 58     $ref: /schemas/types.yaml#/definitions/uint32
 59     description:
 60       Micbias voltage level.
 61     enum:
 62       - 0 # VDDA
 63       - 1 # VDDA
 64       - 2 # VDDA * 1.1
 65       - 3 # VDDA * 1.2
 66       - 4 # VDDA * 1.3
 67       - 5 # VDDA * 1.4
 68       - 6 # VDDA * 1.53
 69       - 7 # VDDA * 1.53
 70     default: 6
 71 
 72   nuvoton,sar-threshold-num:
 73     $ref: /schemas/types.yaml#/definitions/uint32
 74     description:
 75       Number of buttons supported.
 76     minimum: 1
 77     maximum: 8
 78     default: 4
 79 
 80   nuvoton,sar-threshold:
 81     $ref: /schemas/types.yaml#/definitions/uint32-array
 82     description:
 83       Impedance threshold for each button. Array that contains up to 8 buttons
 84       configuration. SAR value is calculated as
 85       SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
 86       configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
 87       'nuvoton,sar-voltage', R - button impedance.
 88       Refer datasheet section 10.2 for more information about threshold
 89       calculation.
 90     minItems: 1
 91     maxItems: 8
 92     items:
 93       minimum: 0
 94       maximum: 255
 95 
 96   nuvoton,sar-hysteresis:
 97     $ref: /schemas/types.yaml#/definitions/uint32
 98     description:
 99       Button impedance measurement hysteresis.
100     default: 0
101 
102   nuvoton,sar-voltage:
103     $ref: /schemas/types.yaml#/definitions/uint32
104     description:
105       Reference voltage for button impedance measurement.
106     enum:
107       - 0 # VDDA
108       - 1 # VDDA
109       - 2 # VDDA * 1.1
110       - 3 # VDDA * 1.2
111       - 4 # VDDA * 1.3
112       - 5 # VDDA * 1.4
113       - 6 # VDDA * 1.53
114       - 7 # VDDA * 1.53
115     default: 6
116 
117   nuvoton,sar-compare-time:
118     $ref: /schemas/types.yaml#/definitions/uint32
119     description:
120       SAR compare time.
121     enum:
122       - 0 # 500ns
123       - 1 # 1us
124       - 2 # 2us
125       - 3 # 4us
126     default: 1
127 
128   nuvoton,sar-sampling-time:
129     $ref: /schemas/types.yaml#/definitions/uint32
130     description:
131       SAR sampling time.
132     enum:
133       - 0 # 2us
134       - 1 # 4us
135       - 2 # 8us
136       - 3 # 16us
137     default: 1
138 
139   nuvoton,short-key-debounce:
140     $ref: /schemas/types.yaml#/definitions/uint32
141     description:
142       Button short key press debounce time.
143     enum:
144       - 0 # 30 ms
145       - 1 # 50 ms
146       - 2 # 100 ms
147     default: 0
148 
149   nuvoton,jack-eject-debounce:
150     $ref: /schemas/types.yaml#/definitions/uint32
151     description:
152       Jack ejection debounce time.
153     enum:
154       - 0 # 0 ms
155       - 1 # 1 ms
156       - 2 # 10 ms
157     default: 1
158 
159 required:
160   - compatible
161   - reg
162 
163 unevaluatedProperties: false
164 
165 examples:
166   - |
167     #include <dt-bindings/gpio/gpio.h>
168     #include <dt-bindings/interrupt-controller/irq.h>
169     i2c {
170         #address-cells = <1>;
171         #size-cells = <0>;
172         codec@1a {
173             #sound-dai-cells = <0>;
174             compatible = "nuvoton,nau8824";
175             reg = <0x1a>;
176             interrupt-parent = <&gpio>;
177             interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
178             nuvoton,vref-impedance = <2>;
179             nuvoton,micbias-voltage = <6>;
180             nuvoton,sar-threshold-num = <4>;
181             // Setup 4 buttons impedance according to Android specification
182             nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
183             nuvoton,sar-hysteresis = <0>;
184             nuvoton,sar-voltage = <6>;
185             nuvoton,sar-compare-time = <1>;
186             nuvoton,sar-sampling-time = <1>;
187             nuvoton,short-key-debounce = <0>;
188             nuvoton,jack-eject-debounce = <1>;
189         };
190     };

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php