FILE
nuvoton,nau8825.yaml
File preview with syntax highlighting.
linux-6.19.14/Documentation/devicetree/bindings/sound/nuvoton,nau8825.yaml
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,nau8825.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: NAU8825 audio CODEC 8 9maintainers: 10 - John Hsu <KCHSU0@nuvoton.com> 11 12description: | 13 NAU8825 audio CODEC 14 15 Pins on the device (for linking into audio routes): 16 17 Outputs: 18 * HPOL : Headphone Left Output 19 * HPOR : Headphone Right Output 20 * MICBIAS : Microphone Bias Output 21 22 Inputs: 23 * MICP : Analog Microphone Positive Input 24 * MICN : Analog Microphone Negative Input 25 26allOf: 27 - $ref: dai-common.yaml# 28 29properties: 30 compatible: 31 enum: 32 - nuvoton,nau8825 33 34 reg: 35 maxItems: 1 36 37 interrupts: 38 maxItems: 1 39 40 nuvoton,jkdet-enable: 41 description: 42 Enable jack detection via JKDET pin. 43 type: boolean 44 45 nuvoton,jkdet-pull-enable: 46 description: 47 Enable JKDET pin pull. 48 If set - pin pull enabled, otherwise pin in high impedance state. 49 type: boolean 50 51 nuvoton,jkdet-pull-up: 52 description: 53 Pull-up JKDET pin. 54 If set then JKDET pin is pull up, otherwise pull down. 55 type: boolean 56 57 nuvoton,jkdet-polarity: 58 $ref: /schemas/types.yaml#/definitions/uint32 59 description: 60 JKDET pin polarity. 61 enum: 62 - 0 # active high 63 - 1 # active low 64 default: 1 65 66 nuvoton,vref-impedance: 67 $ref: /schemas/types.yaml#/definitions/uint32 68 description: 69 VREF Impedance selection. 70 enum: 71 - 0 # Open 72 - 1 # 25 kOhm 73 - 2 # 125 kOhm 74 - 3 # 2.5 kOhm 75 default: 2 76 77 nuvoton,micbias-voltage: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 description: 80 Micbias voltage level. 81 enum: 82 - 0 # VDDA 83 - 1 # VDDA 84 - 2 # VDDA * 1.1 85 - 3 # VDDA * 1.2 86 - 4 # VDDA * 1.3 87 - 5 # VDDA * 1.4 88 - 6 # VDDA * 1.53 89 - 7 # VDDA * 1.53 90 default: 6 91 92 nuvoton,sar-threshold-num: 93 $ref: /schemas/types.yaml#/definitions/uint32 94 description: 95 Number of buttons supported. 96 minimum: 1 97 maximum: 4 98 default: 4 99 100 nuvoton,sar-threshold: 101 $ref: /schemas/types.yaml#/definitions/uint32-array 102 description: 103 Impedance threshold for each button. Array that contains up to 8 buttons 104 configuration. SAR value is calculated as 105 SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is 106 configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 107 'nuvoton,sar-voltage', R - button impedance. 108 Refer datasheet section 10.2 for more information about threshold 109 calculation. 110 minItems: 1 111 maxItems: 4 112 items: 113 minimum: 0 114 maximum: 255 115 116 nuvoton,sar-hysteresis: 117 $ref: /schemas/types.yaml#/definitions/uint32 118 description: 119 Button impedance measurement hysteresis. 120 default: 0 121 122 nuvoton,sar-voltage: 123 $ref: /schemas/types.yaml#/definitions/uint32 124 description: 125 Reference voltage for button impedance measurement. 126 enum: 127 - 0 # VDDA 128 - 1 # VDDA 129 - 2 # VDDA * 1.1 130 - 3 # VDDA * 1.2 131 - 4 # VDDA * 1.3 132 - 5 # VDDA * 1.4 133 - 6 # VDDA * 1.53 134 - 7 # VDDA * 1.53 135 default: 6 136 137 nuvoton,sar-compare-time: 138 $ref: /schemas/types.yaml#/definitions/uint32 139 description: 140 SAR compare time. 141 enum: 142 - 0 # 500 ns 143 - 1 # 1 us 144 - 2 # 2 us 145 - 3 # 4 us 146 default: 1 147 148 nuvoton,sar-sampling-time: 149 $ref: /schemas/types.yaml#/definitions/uint32 150 description: 151 SAR sampling time. 152 enum: 153 - 0 # 2 us 154 - 1 # 4 us 155 - 2 # 8 us 156 - 3 # 16 us 157 default: 1 158 159 nuvoton,short-key-debounce: 160 $ref: /schemas/types.yaml#/definitions/uint32 161 description: 162 Button short key press debounce time. 163 enum: 164 - 0 # 30 ms 165 - 1 # 50 ms 166 - 2 # 100 ms 167 - 3 # 30 ms 168 default: 3 169 170 nuvoton,jack-insert-debounce: 171 $ref: /schemas/types.yaml#/definitions/uint32 172 description: 173 number from 0 to 7 that sets debounce time to 2^(n+2) ms. 174 maximum: 7 175 default: 7 176 177 nuvoton,jack-eject-debounce: 178 $ref: /schemas/types.yaml#/definitions/uint32 179 description: 180 number from 0 to 7 that sets debounce time to 2^(n+2) ms 181 maximum: 7 182 default: 0 183 184 nuvoton,crosstalk-enable: 185 description: 186 make crosstalk function enable if set. 187 type: boolean 188 189 nuvoton,adcout-drive-strong: 190 description: 191 make the drive strength of ADCOUT IO PIN strong if set. 192 Otherwise, the drive keeps normal strength. 193 type: boolean 194 195 nuvoton,adc-delay-ms: 196 description: 197 Delay (in ms) to make input path stable and avoid pop noise. 198 The default value is 125 and range between 125 to 500 ms. 199 minimum: 125 200 maximum: 500 201 default: 125 202 203 clocks: 204 maxItems: 1 205 206 clock-names: 207 items: 208 - const: mclk 209 210 '#sound-dai-cells': 211 const: 0 212 213required: 214 - compatible 215 - reg 216 217unevaluatedProperties: false 218 219examples: 220 - | 221 #include <dt-bindings/gpio/gpio.h> 222 #include <dt-bindings/interrupt-controller/irq.h> 223 i2c { 224 #address-cells = <1>; 225 #size-cells = <0>; 226 codec@1a { 227 #sound-dai-cells = <0>; 228 compatible = "nuvoton,nau8825"; 229 reg = <0x1a>; 230 interrupt-parent = <&gpio>; 231 interrupts = <38 IRQ_TYPE_LEVEL_LOW>; 232 nuvoton,jkdet-enable; 233 nuvoton,jkdet-pull-enable; 234 nuvoton,jkdet-pull-up; 235 nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>; 236 nuvoton,vref-impedance = <2>; 237 nuvoton,micbias-voltage = <6>; 238 // Setup 4 buttons impedance according to Android specification 239 nuvoton,sar-threshold-num = <4>; 240 nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>; 241 nuvoton,sar-hysteresis = <1>; 242 nuvoton,sar-voltage = <0>; 243 nuvoton,sar-compare-time = <0>; 244 nuvoton,sar-sampling-time = <0>; 245 nuvoton,short-key-debounce = <2>; 246 nuvoton,jack-insert-debounce = <7>; 247 nuvoton,jack-eject-debounce = <7>; 248 nuvoton,crosstalk-enable; 249 250 clock-names = "mclk"; 251 clocks = <&tegra_pmc 1>; 252 }; 253 };
~/
Read-only file preview.