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