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,nau8821.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: NAU88L21 audio codec 8 9maintainers: 10 - Seven Lee <wtli@nuvoton.com> 11 12allOf: 13 - $ref: dai-common.yaml# 14 15properties: 16 compatible: 17 const: nuvoton,nau8821 18 19 reg: 20 maxItems: 1 21 22 interrupts: 23 maxItems: 1 24 25 nuvoton,jkdet-enable: 26 description: Enable jack detection via JKDET pin. 27 type: boolean 28 29 nuvoton,jkdet-pull-enable: 30 description: Enable JKDET pin pull. If set - pin pull enabled, 31 otherwise pin in high impedance state. 32 type: boolean 33 34 nuvoton,jkdet-pull-up: 35 description: Pull-up JKDET pin. If set then JKDET pin is pull up, 36 otherwise pull down. 37 type: boolean 38 39 nuvoton,key-enable: 40 description: handles key press detection. 41 type: boolean 42 43 nuvoton,jkdet-polarity: 44 description: JKDET pin polarity. 45 $ref: /schemas/types.yaml#/definitions/uint32 46 enum: 47 - 0 # active high 48 - 1 # active low 49 default: 1 50 51 nuvoton,micbias-voltage: 52 description: MICBIAS output level select. 53 $ref: /schemas/types.yaml#/definitions/uint32 54 enum: 55 - 0 # VDDA 56 - 1 # VDDA * 1 57 - 2 # VDDA * 1.1 58 - 3 # VDDA * 1.2 59 - 4 # VDDA * 1.3 60 - 5 # VDDA * 1.4 61 - 6 # VDDA * 1.53 62 - 7 # VDDA * 1.53 63 default: 6 64 65 nuvoton,vref-impedance: 66 description: VMID Tie-off impedance select. 67 $ref: /schemas/types.yaml#/definitions/uint32 68 enum: 69 - 0 # open 70 - 1 # 25KOhms 71 - 2 # 125KOhms 72 - 3 # 2.5KOhms 73 default: 2 74 75 nuvoton,jack-insert-debounce: 76 description: number from 0 to 7 that sets debounce time to 2^(n+2)ms. 77 $ref: /schemas/types.yaml#/definitions/uint32 78 maximum: 7 79 default: 7 80 81 nuvoton,jack-eject-debounce: 82 description: number from 0 to 7 that sets debounce time to 2^(n+2)ms. 83 $ref: /schemas/types.yaml#/definitions/uint32 84 maximum: 7 85 default: 0 86 87 nuvoton,dmic-clk-threshold: 88 description: DMIC clock speed expected value. Unit is Hz. 89 $ref: /schemas/types.yaml#/definitions/uint32 90 default: 3072000 91 92 nuvoton,left-input-single-end: 93 description: Enable left input with single-ended settings if set. 94 For the headset mic application, the single-ended control is 95 just limited to the left adc for design demand. 96 type: boolean 97 98 '#sound-dai-cells': 99 const: 0 100 101required: 102 - compatible 103 - reg 104 105unevaluatedProperties: false 106 107examples: 108 - | 109 #include <dt-bindings/gpio/gpio.h> 110 #include <dt-bindings/interrupt-controller/irq.h> 111 i2c { 112 #address-cells = <1>; 113 #size-cells = <0>; 114 codec@1b { 115 compatible = "nuvoton,nau8821"; 116 reg = <0x1b>; 117 interrupt-parent = <&gpio>; 118 interrupts = <23 IRQ_TYPE_LEVEL_LOW>; 119 nuvoton,jkdet-enable; 120 nuvoton,jkdet-pull-enable; 121 nuvoton,jkdet-pull-up; 122 nuvoton,key-enable; 123 nuvoton,left-input-single-end; 124 nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>; 125 nuvoton,micbias-voltage = <6>; 126 nuvoton,vref-impedance = <2>; 127 nuvoton,jack-insert-debounce = <7>; 128 nuvoton,jack-eject-debounce = <0>; 129 nuvoton,dmic-clk-threshold = <3072000>; 130 #sound-dai-cells = <0>; 131 }; 132 }; 133