summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/everest,es8326.yaml
blob: 8c82d47375ec769a970d1cae483f2f1c86539cd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es8326.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Everest ES8326 audio CODEC

maintainers:
  - David Yang <yangxiaohua@everest-semi.com>

properties:
  compatible:
    const: everest,es8326

  reg:
    maxItems: 1

  clocks:
    items:
      - description: clock for master clock (MCLK)

  clock-names:
    items:
      - const: mclk

  "#sound-dai-cells":
    const: 0

  everest,jack-pol:
    $ref: /schemas/types.yaml#/definitions/uint8
    description: |
      just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
      Bit(2) decides whether the button on the headset is inverted.
      Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto.
    minimum: 0x00
    maximum: 0x0f
    default: 0x0f

  everest,mic1-src:
    deprecated: true
    $ref: /schemas/types.yaml#/definitions/uint8
    description:
      the value of reg 2A when headset plugged.
    minimum: 0x00
    maximum: 0x77
    default: 0x22

  everest,mic2-src:
    deprecated: true
    $ref: /schemas/types.yaml#/definitions/uint8
    description:
      the value of reg 2A when headset unplugged.
    minimum: 0x00
    maximum: 0x77
    default: 0x44

  everest,jack-detect-inverted:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      Defined to invert the jack detection.

  everest,interrupt-src:
    $ref: /schemas/types.yaml#/definitions/uint8
    description: |
      value of reg 0x58, Defines the interrupt source.
      Bit(2) 1 means button press triggers irq, 0 means not.
      Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0,
      bias change on PIN9 do not triggers irq.
      Bit(4) 1 means PIN27 is the irq source for jack detection.
      Bit(5) 1 means PIN9 is the irq source after MIC detect.
      Bit(6) 1 means PIN27 is the irq source after MIC detect.
    minimum: 0
    maximum: 0x3c
    default: 0x08

  everest,interrupt-clk:
    $ref: /schemas/types.yaml#/definitions/uint8
    description: |
     value of reg 0x59, Defines the interrupt output behavior.
     Bit(0-3) 0 means irq pulse equals 512*internal clock
       1 means irq pulse equals 1024*internal clock
       2 means ...
       7 means irq pulse equals 65536*internal clock
       8 means irq mutes PA
       9 means irq mutes PA and DAC output
     Bit(4) 1 means we invert the interrupt output.
     Bit(6) 1 means the chip do not detect jack type after button released.
       0 means the chip detect jack type again after button released.
    minimum: 0
    maximum: 0x7f
    default: 0x00

required:
  - compatible
  - reg
  - "#sound-dai-cells"

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      es8326: codec@19 {
        compatible = "everest,es8326";
        reg = <0x19>;
        clocks = <&clks 10>;
        clock-names = "mclk";
        #sound-dai-cells = <0>;
        everest,jack-pol = [0e];
        everest,interrupt-src = [08];
        everest,interrupt-clk = [00];
      };
    };