1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*7ef62cebSEmmanuel Vadot%YAML 1.2 3*7ef62cebSEmmanuel Vadot--- 4*7ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/everest,es8326.yaml# 5*7ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*7ef62cebSEmmanuel Vadot 7*7ef62cebSEmmanuel Vadottitle: Everest ES8326 audio CODEC 8*7ef62cebSEmmanuel Vadot 9*7ef62cebSEmmanuel Vadotmaintainers: 10*7ef62cebSEmmanuel Vadot - David Yang <yangxiaohua@everest-semi.com> 11*7ef62cebSEmmanuel Vadot 12*7ef62cebSEmmanuel Vadotproperties: 13*7ef62cebSEmmanuel Vadot compatible: 14*7ef62cebSEmmanuel Vadot const: everest,es8326 15*7ef62cebSEmmanuel Vadot 16*7ef62cebSEmmanuel Vadot reg: 17*7ef62cebSEmmanuel Vadot maxItems: 1 18*7ef62cebSEmmanuel Vadot 19*7ef62cebSEmmanuel Vadot clocks: 20*7ef62cebSEmmanuel Vadot items: 21*7ef62cebSEmmanuel Vadot - description: clock for master clock (MCLK) 22*7ef62cebSEmmanuel Vadot 23*7ef62cebSEmmanuel Vadot clock-names: 24*7ef62cebSEmmanuel Vadot items: 25*7ef62cebSEmmanuel Vadot - const: mclk 26*7ef62cebSEmmanuel Vadot 27*7ef62cebSEmmanuel Vadot "#sound-dai-cells": 28*7ef62cebSEmmanuel Vadot const: 0 29*7ef62cebSEmmanuel Vadot 30*7ef62cebSEmmanuel Vadot everest,jack-pol: 31*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 32*7ef62cebSEmmanuel Vadot description: | 33*7ef62cebSEmmanuel Vadot just the value of reg 57. Bit(3) decides whether the jack polarity is inverted. 34*7ef62cebSEmmanuel Vadot Bit(2) decides whether the button on the headset is inverted. 35*7ef62cebSEmmanuel Vadot Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto. 36*7ef62cebSEmmanuel Vadot minimum: 0x00 37*7ef62cebSEmmanuel Vadot maximum: 0x0f 38*7ef62cebSEmmanuel Vadot default: 0x0f 39*7ef62cebSEmmanuel Vadot 40*7ef62cebSEmmanuel Vadot everest,mic1-src: 41*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 42*7ef62cebSEmmanuel Vadot description: 43*7ef62cebSEmmanuel Vadot the value of reg 2A when headset plugged. 44*7ef62cebSEmmanuel Vadot minimum: 0x00 45*7ef62cebSEmmanuel Vadot maximum: 0x77 46*7ef62cebSEmmanuel Vadot default: 0x22 47*7ef62cebSEmmanuel Vadot 48*7ef62cebSEmmanuel Vadot everest,mic2-src: 49*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 50*7ef62cebSEmmanuel Vadot description: 51*7ef62cebSEmmanuel Vadot the value of reg 2A when headset unplugged. 52*7ef62cebSEmmanuel Vadot minimum: 0x00 53*7ef62cebSEmmanuel Vadot maximum: 0x77 54*7ef62cebSEmmanuel Vadot default: 0x44 55*7ef62cebSEmmanuel Vadot 56*7ef62cebSEmmanuel Vadot everest,jack-detect-inverted: 57*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 58*7ef62cebSEmmanuel Vadot description: 59*7ef62cebSEmmanuel Vadot Defined to invert the jack detection. 60*7ef62cebSEmmanuel Vadot 61*7ef62cebSEmmanuel Vadot everest,interrupt-src: 62*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 63*7ef62cebSEmmanuel Vadot description: | 64*7ef62cebSEmmanuel Vadot value of reg 0x58, Defines the interrupt source. 65*7ef62cebSEmmanuel Vadot Bit(2) 1 means button press triggers irq, 0 means not. 66*7ef62cebSEmmanuel Vadot Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0, 67*7ef62cebSEmmanuel Vadot bias change on PIN9 do not triggers irq. 68*7ef62cebSEmmanuel Vadot Bit(4) 1 means PIN27 is the irq source for jack detection. 69*7ef62cebSEmmanuel Vadot Bit(5) 1 means PIN9 is the irq source after MIC detect. 70*7ef62cebSEmmanuel Vadot Bit(6) 1 means PIN27 is the irq source after MIC detect. 71*7ef62cebSEmmanuel Vadot minimum: 0 72*7ef62cebSEmmanuel Vadot maximum: 0x3c 73*7ef62cebSEmmanuel Vadot default: 0x08 74*7ef62cebSEmmanuel Vadot 75*7ef62cebSEmmanuel Vadot everest,interrupt-clk: 76*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 77*7ef62cebSEmmanuel Vadot description: | 78*7ef62cebSEmmanuel Vadot value of reg 0x59, Defines the interrupt output behavior. 79*7ef62cebSEmmanuel Vadot Bit(0-3) 0 means irq pulse equals 512*internal clock 80*7ef62cebSEmmanuel Vadot 1 means irq pulse equals 1024*internal clock 81*7ef62cebSEmmanuel Vadot 2 means ... 82*7ef62cebSEmmanuel Vadot 7 means irq pulse equals 65536*internal clock 83*7ef62cebSEmmanuel Vadot 8 means irq mutes PA 84*7ef62cebSEmmanuel Vadot 9 means irq mutes PA and DAC output 85*7ef62cebSEmmanuel Vadot Bit(4) 1 means we invert the interrupt output. 86*7ef62cebSEmmanuel Vadot Bit(6) 1 means the chip do not detect jack type after button released. 87*7ef62cebSEmmanuel Vadot 0 means the chip detect jack type again after button released. 88*7ef62cebSEmmanuel Vadot minimum: 0 89*7ef62cebSEmmanuel Vadot maximum: 0x7f 90*7ef62cebSEmmanuel Vadot default: 0x45 91*7ef62cebSEmmanuel Vadot 92*7ef62cebSEmmanuel Vadotrequired: 93*7ef62cebSEmmanuel Vadot - compatible 94*7ef62cebSEmmanuel Vadot - reg 95*7ef62cebSEmmanuel Vadot - "#sound-dai-cells" 96*7ef62cebSEmmanuel Vadot 97*7ef62cebSEmmanuel VadotadditionalProperties: false 98*7ef62cebSEmmanuel Vadot 99*7ef62cebSEmmanuel Vadotexamples: 100*7ef62cebSEmmanuel Vadot - | 101*7ef62cebSEmmanuel Vadot i2c { 102*7ef62cebSEmmanuel Vadot #address-cells = <1>; 103*7ef62cebSEmmanuel Vadot #size-cells = <0>; 104*7ef62cebSEmmanuel Vadot es8326: codec@19 { 105*7ef62cebSEmmanuel Vadot compatible = "everest,es8326"; 106*7ef62cebSEmmanuel Vadot reg = <0x19>; 107*7ef62cebSEmmanuel Vadot clocks = <&clks 10>; 108*7ef62cebSEmmanuel Vadot clock-names = "mclk"; 109*7ef62cebSEmmanuel Vadot #sound-dai-cells = <0>; 110*7ef62cebSEmmanuel Vadot everest,mic1-src = [22]; 111*7ef62cebSEmmanuel Vadot everest,mic2-src = [44]; 112*7ef62cebSEmmanuel Vadot everest,jack-pol = [0e]; 113*7ef62cebSEmmanuel Vadot everest,interrupt-src = [08]; 114*7ef62cebSEmmanuel Vadot everest,interrupt-clk = [45]; 115*7ef62cebSEmmanuel Vadot }; 116*7ef62cebSEmmanuel Vadot }; 117