Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/realtek,rt5677.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: RT5677 audio CODEC
8
9maintainers:
10 - Animesh Agarwal <animeshagarwal28@gmail.com>
11
12description: |
13 This device supports I2C only.
14
15 Pins on the device (for linking into audio routes):
16 * IN1P
17 * IN1N
18 * IN2P
19 * IN2N
20 * MICBIAS1
21 * DMIC1
22 * DMIC2
23 * DMIC3
24 * DMIC4
25 * LOUT1
26 * LOUT2
27 * LOUT3
28
29allOf:
30 - $ref: dai-common.yaml#
31
32properties:
33 compatible:
34 const: realtek,rt5677
35
36 reg:
37 maxItems: 1
38
39 interrupts:
40 maxItems: 1
41
42 gpio-controller: true
43
44 '#gpio-cells':
45 const: 2
46
47 realtek,pow-ldo2-gpio:
48 maxItems: 1
49 description: CODEC's POW_LDO2 pin.
50
51 realtek,reset-gpio:
52 maxItems: 1
53 description: CODEC's RESET pin. Active low.
54
55 realtek,gpio-config:
56 description: |
57 Array of six 8bit elements that configures GPIO.
58 0 - floating (reset value)
59 1 - pull down
60 2 - pull up
61 $ref: /schemas/types.yaml#/definitions/uint32-array
62 minItems: 6
63 maxItems: 6
64 items:
65 maximum: 2
66
67 realtek,jd1-gpio:
68 $ref: /schemas/types.yaml#/definitions/uint32
69 enum:
70 - 0 # OFF
71 - 1 # GPIO1 for jd1.
72 - 2 # GPIO2 for jd1.
73 - 3 # GPIO3 for jd1.
74 description: Configures GPIO Mic Jack detection 1.
75
76 realtek,jd2-gpio:
77 $ref: /schemas/types.yaml#/definitions/uint32
78 enum:
79 - 0 # OFF
80 - 1 # GPIO4 for jd2.
81 - 2 # GPIO5 for jd2.
82 - 3 # GPIO6 for jd2.
83 description: Configures GPIO Mic Jack detection 2.
84
85 realtek,jd3-gpio:
86 $ref: /schemas/types.yaml#/definitions/uint32
87 enum:
88 - 0 # OFF
89 - 1 # GPIO4 for jd3.
90 - 2 # GPIO5 for jd3.
91 - 3 # GPIO6 for jd3.
92 description: Configures GPIO Mic Jack detection 3.
93
94patternProperties:
95 '^realtek,in[1-2]-differential$':
96 type: boolean
97 description: Indicate MIC1/2 input are differential, rather than
98 single-ended.
99
100 '^realtek,lout[1-3]-differential$':
101 type: boolean
102 description: Indicate LOUT1/2/3 outputs are differential, rather than
103 single-ended.
104
105required:
106 - compatible
107 - reg
108 - interrupts
109 - gpio-controller
110 - '#gpio-cells'
111
112unevaluatedProperties: false
113
114examples:
115 - |
116 #include <dt-bindings/gpio/gpio.h>
117 #include <dt-bindings/interrupt-controller/irq.h>
118
119 i2c {
120 #address-cells = <1>;
121 #size-cells = <0>;
122
123 codec@2c {
124 compatible = "realtek,rt5677";
125 reg = <0x2c>;
126 interrupt-parent = <&gpio>;
127 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
128 gpio-controller;
129 #gpio-cells = <2>;
130 realtek,pow-ldo2-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
131 realtek,reset-gpio = <&gpio 3 GPIO_ACTIVE_LOW>;
132 realtek,in1-differential;
133 realtek,gpio-config = <0 0 0 0 0 2>;
134 };
135 };