summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/realtek,rt5651.yaml
blob: dc4f2eef7cf91ac4ee5fd930b374fcc72841d2c5 (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5651.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Realtek RT5651 audio CODEC

maintainers:
  - Bard Liao <bardliao@realtek.com>

description: >
  This device supports I2C only.

  Pins on the device (for linking into audio routes) for RT5651:

    * DMIC L1
    * DMIC R1
    * IN1P
    * IN2P
    * IN2N
    * IN3P
    * HPOL
    * HPOR
    * LOUTL
    * LOUTR
    * PDML
    * PDMR

allOf:
  - $ref: /schemas/sound/dai-common.yaml#

properties:
  compatible:
    const: realtek,rt5651

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: mclk

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

  realtek,in2-differential:
    type: boolean
    description: Indicate MIC2 input are differential, rather than single-ended.

  realtek,dmic-en:
    type: boolean
    description: Indicates DMIC is used.

  realtek,jack-detect-source:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Select jack-detect input pin.
    enum: [1, 2, 3]

  realtek,jack-detect-not-inverted:
    type: boolean
    description:
      Normal jack-detect switches give an inverted (active-low) signal. Set this
      bool in the rare case you've a jack-detect switch which is not inverted.

  realtek,over-current-threshold-microamp:
    description: Micbias over-current detection threshold in µA.
    enum: [600, 1500, 2000]

  realtek,over-current-scale-factor:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: >
      Micbias over-current detection scale factor:

        0: scale current by 0.5
        1: scale current by 0.75
        2: scale current by 1.0
        3: scale current by 1.5
    enum: [0, 1, 2, 3]

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        codec@1a {
            compatible = "realtek,rt5651";
            reg = <0x1a>;
            realtek,dmic-en;
            realtek,in2-differential;
        };
    };