xref: /freebsd/sys/contrib/device-tree/Bindings/sound/everest,es8326.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/everest,es8326.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Everest ES8326 audio CODEC
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - David Yang <yangxiaohua@everest-semi.com>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotproperties:
137ef62cebSEmmanuel Vadot  compatible:
147ef62cebSEmmanuel Vadot    const: everest,es8326
157ef62cebSEmmanuel Vadot
167ef62cebSEmmanuel Vadot  reg:
177ef62cebSEmmanuel Vadot    maxItems: 1
187ef62cebSEmmanuel Vadot
197ef62cebSEmmanuel Vadot  clocks:
207ef62cebSEmmanuel Vadot    items:
217ef62cebSEmmanuel Vadot      - description: clock for master clock (MCLK)
227ef62cebSEmmanuel Vadot
237ef62cebSEmmanuel Vadot  clock-names:
247ef62cebSEmmanuel Vadot    items:
257ef62cebSEmmanuel Vadot      - const: mclk
267ef62cebSEmmanuel Vadot
277ef62cebSEmmanuel Vadot  "#sound-dai-cells":
287ef62cebSEmmanuel Vadot    const: 0
297ef62cebSEmmanuel Vadot
307ef62cebSEmmanuel Vadot  everest,jack-pol:
317ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
327ef62cebSEmmanuel Vadot    description: |
337ef62cebSEmmanuel Vadot      just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
347ef62cebSEmmanuel Vadot      Bit(2) decides whether the button on the headset is inverted.
35*b2d2a78aSEmmanuel Vadot      Bit(1)/(0) decides the mic property to be OMTP/CTIA or auto.
367ef62cebSEmmanuel Vadot    minimum: 0x00
377ef62cebSEmmanuel Vadot    maximum: 0x0f
387ef62cebSEmmanuel Vadot    default: 0x0f
397ef62cebSEmmanuel Vadot
407ef62cebSEmmanuel Vadot  everest,mic1-src:
4101950c46SEmmanuel Vadot    deprecated: true
427ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
437ef62cebSEmmanuel Vadot    description:
447ef62cebSEmmanuel Vadot      the value of reg 2A when headset plugged.
457ef62cebSEmmanuel Vadot    minimum: 0x00
467ef62cebSEmmanuel Vadot    maximum: 0x77
477ef62cebSEmmanuel Vadot    default: 0x22
487ef62cebSEmmanuel Vadot
497ef62cebSEmmanuel Vadot  everest,mic2-src:
5001950c46SEmmanuel Vadot    deprecated: true
517ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
527ef62cebSEmmanuel Vadot    description:
537ef62cebSEmmanuel Vadot      the value of reg 2A when headset unplugged.
547ef62cebSEmmanuel Vadot    minimum: 0x00
557ef62cebSEmmanuel Vadot    maximum: 0x77
567ef62cebSEmmanuel Vadot    default: 0x44
577ef62cebSEmmanuel Vadot
587ef62cebSEmmanuel Vadot  everest,jack-detect-inverted:
597ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
607ef62cebSEmmanuel Vadot    description:
617ef62cebSEmmanuel Vadot      Defined to invert the jack detection.
627ef62cebSEmmanuel Vadot
637ef62cebSEmmanuel Vadot  everest,interrupt-src:
647ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
657ef62cebSEmmanuel Vadot    description: |
667ef62cebSEmmanuel Vadot      value of reg 0x58, Defines the interrupt source.
677ef62cebSEmmanuel Vadot      Bit(2) 1 means button press triggers irq, 0 means not.
687ef62cebSEmmanuel Vadot      Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0,
697ef62cebSEmmanuel Vadot      bias change on PIN9 do not triggers irq.
707ef62cebSEmmanuel Vadot      Bit(4) 1 means PIN27 is the irq source for jack detection.
717ef62cebSEmmanuel Vadot      Bit(5) 1 means PIN9 is the irq source after MIC detect.
727ef62cebSEmmanuel Vadot      Bit(6) 1 means PIN27 is the irq source after MIC detect.
737ef62cebSEmmanuel Vadot    minimum: 0
747ef62cebSEmmanuel Vadot    maximum: 0x3c
757ef62cebSEmmanuel Vadot    default: 0x08
767ef62cebSEmmanuel Vadot
777ef62cebSEmmanuel Vadot  everest,interrupt-clk:
787ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
797ef62cebSEmmanuel Vadot    description: |
807ef62cebSEmmanuel Vadot     value of reg 0x59, Defines the interrupt output behavior.
817ef62cebSEmmanuel Vadot     Bit(0-3) 0 means irq pulse equals 512*internal clock
827ef62cebSEmmanuel Vadot       1 means irq pulse equals 1024*internal clock
837ef62cebSEmmanuel Vadot       2 means ...
847ef62cebSEmmanuel Vadot       7 means irq pulse equals 65536*internal clock
857ef62cebSEmmanuel Vadot       8 means irq mutes PA
867ef62cebSEmmanuel Vadot       9 means irq mutes PA and DAC output
877ef62cebSEmmanuel Vadot     Bit(4) 1 means we invert the interrupt output.
887ef62cebSEmmanuel Vadot     Bit(6) 1 means the chip do not detect jack type after button released.
897ef62cebSEmmanuel Vadot       0 means the chip detect jack type again after button released.
907ef62cebSEmmanuel Vadot    minimum: 0
917ef62cebSEmmanuel Vadot    maximum: 0x7f
9201950c46SEmmanuel Vadot    default: 0x00
937ef62cebSEmmanuel Vadot
947ef62cebSEmmanuel Vadotrequired:
957ef62cebSEmmanuel Vadot  - compatible
967ef62cebSEmmanuel Vadot  - reg
977ef62cebSEmmanuel Vadot  - "#sound-dai-cells"
987ef62cebSEmmanuel Vadot
997ef62cebSEmmanuel VadotadditionalProperties: false
1007ef62cebSEmmanuel Vadot
1017ef62cebSEmmanuel Vadotexamples:
1027ef62cebSEmmanuel Vadot  - |
1037ef62cebSEmmanuel Vadot    i2c {
1047ef62cebSEmmanuel Vadot      #address-cells = <1>;
1057ef62cebSEmmanuel Vadot      #size-cells = <0>;
1067ef62cebSEmmanuel Vadot      es8326: codec@19 {
1077ef62cebSEmmanuel Vadot        compatible = "everest,es8326";
1087ef62cebSEmmanuel Vadot        reg = <0x19>;
1097ef62cebSEmmanuel Vadot        clocks = <&clks 10>;
1107ef62cebSEmmanuel Vadot        clock-names = "mclk";
1117ef62cebSEmmanuel Vadot        #sound-dai-cells = <0>;
1127ef62cebSEmmanuel Vadot        everest,jack-pol = [0e];
1137ef62cebSEmmanuel Vadot        everest,interrupt-src = [08];
11401950c46SEmmanuel Vadot        everest,interrupt-clk = [00];
1157ef62cebSEmmanuel Vadot      };
1167ef62cebSEmmanuel Vadot    };
117