xref: /freebsd/sys/contrib/device-tree/Bindings/sound/realtek,rt5659.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/realtek,rt5659.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: RT5659/RT5658 audio CODEC
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Animesh Agarwal <animeshagarwal28@gmail.com>
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel Vadotdescription: |
13*0e8011faSEmmanuel Vadot  This device supports I2C only.
14*0e8011faSEmmanuel Vadot
15*0e8011faSEmmanuel Vadot  Pins on the device (for linking into audio routes) for RT5659/RT5658:
16*0e8011faSEmmanuel Vadot    * DMIC L1
17*0e8011faSEmmanuel Vadot    * DMIC R1
18*0e8011faSEmmanuel Vadot    * DMIC L2
19*0e8011faSEmmanuel Vadot    * DMIC R2
20*0e8011faSEmmanuel Vadot    * IN1P
21*0e8011faSEmmanuel Vadot    * IN1N
22*0e8011faSEmmanuel Vadot    * IN2P
23*0e8011faSEmmanuel Vadot    * IN2N
24*0e8011faSEmmanuel Vadot    * IN3P
25*0e8011faSEmmanuel Vadot    * IN3N
26*0e8011faSEmmanuel Vadot    * IN4P
27*0e8011faSEmmanuel Vadot    * IN4N
28*0e8011faSEmmanuel Vadot    * HPOL
29*0e8011faSEmmanuel Vadot    * HPOR
30*0e8011faSEmmanuel Vadot    * SPOL
31*0e8011faSEmmanuel Vadot    * SPOR
32*0e8011faSEmmanuel Vadot    * LOUTL
33*0e8011faSEmmanuel Vadot    * LOUTR
34*0e8011faSEmmanuel Vadot    * MONOOUT
35*0e8011faSEmmanuel Vadot    * PDML
36*0e8011faSEmmanuel Vadot    * PDMR
37*0e8011faSEmmanuel Vadot    * SPDIF
38*0e8011faSEmmanuel Vadot
39*0e8011faSEmmanuel VadotallOf:
40*0e8011faSEmmanuel Vadot  - $ref: dai-common.yaml#
41*0e8011faSEmmanuel Vadot
42*0e8011faSEmmanuel Vadotproperties:
43*0e8011faSEmmanuel Vadot  compatible:
44*0e8011faSEmmanuel Vadot    enum:
45*0e8011faSEmmanuel Vadot      - realtek,rt5659
46*0e8011faSEmmanuel Vadot      - realtek,rt5658
47*0e8011faSEmmanuel Vadot
48*0e8011faSEmmanuel Vadot  reg:
49*0e8011faSEmmanuel Vadot    maxItems: 1
50*0e8011faSEmmanuel Vadot
51*0e8011faSEmmanuel Vadot  interrupts:
52*0e8011faSEmmanuel Vadot    maxItems: 1
53*0e8011faSEmmanuel Vadot
54*0e8011faSEmmanuel Vadot  clocks:
55*0e8011faSEmmanuel Vadot    maxItems: 1
56*0e8011faSEmmanuel Vadot
57*0e8011faSEmmanuel Vadot  clock-names:
58*0e8011faSEmmanuel Vadot    const: mclk
59*0e8011faSEmmanuel Vadot
60*0e8011faSEmmanuel Vadot  realtek,dmic1-data-pin:
61*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
62*0e8011faSEmmanuel Vadot    enum:
63*0e8011faSEmmanuel Vadot      - 0 # dmic1 is not used
64*0e8011faSEmmanuel Vadot      - 1 # using IN2N pin as dmic1 data pin
65*0e8011faSEmmanuel Vadot      - 2 # using GPIO5 pin as dmic1 data pin
66*0e8011faSEmmanuel Vadot      - 3 # using GPIO9 pin as dmic1 data pin
67*0e8011faSEmmanuel Vadot      - 4 # using GPIO11 pin as dmic1 data pin
68*0e8011faSEmmanuel Vadot    description: Specify which pin to be used as DMIC1 data pin.
69*0e8011faSEmmanuel Vadot    default: 0
70*0e8011faSEmmanuel Vadot
71*0e8011faSEmmanuel Vadot  realtek,dmic2-data-pin:
72*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
73*0e8011faSEmmanuel Vadot    enum:
74*0e8011faSEmmanuel Vadot      - 0 # dmic2 is not used
75*0e8011faSEmmanuel Vadot      - 1 # using IN2P pin as dmic2 data pin
76*0e8011faSEmmanuel Vadot      - 2 # using GPIO6 pin as dmic2 data pin
77*0e8011faSEmmanuel Vadot      - 3 # using GPIO10 pin as dmic2 data pin
78*0e8011faSEmmanuel Vadot      - 4 # using GPIO12 pin as dmic2 data pin
79*0e8011faSEmmanuel Vadot    description: Specify which pin to be used as DMIC2 data pin.
80*0e8011faSEmmanuel Vadot    default: 0
81*0e8011faSEmmanuel Vadot
82*0e8011faSEmmanuel Vadot  realtek,jd-src:
83*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
84*0e8011faSEmmanuel Vadot    enum:
85*0e8011faSEmmanuel Vadot      - 0 # No JD is used
86*0e8011faSEmmanuel Vadot      - 1 # using JD3 as JD source
87*0e8011faSEmmanuel Vadot      - 2 # JD source for Intel HDA header
88*0e8011faSEmmanuel Vadot    description: Specify which JD source be used.
89*0e8011faSEmmanuel Vadot    default: 0
90*0e8011faSEmmanuel Vadot
91*0e8011faSEmmanuel Vadot  realtek,ldo1-en-gpios:
92*0e8011faSEmmanuel Vadot    maxItems: 1
93*0e8011faSEmmanuel Vadot    description: CODEC's LDO1_EN pin.
94*0e8011faSEmmanuel Vadot
95*0e8011faSEmmanuel Vadot  realtek,reset-gpios:
96*0e8011faSEmmanuel Vadot    maxItems: 1
97*0e8011faSEmmanuel Vadot    description: CODEC's RESET pin.
98*0e8011faSEmmanuel Vadot
99*0e8011faSEmmanuel Vadot  ports:
100*0e8011faSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
101*0e8011faSEmmanuel Vadot
102*0e8011faSEmmanuel Vadot  port:
103*0e8011faSEmmanuel Vadot    $ref: audio-graph-port.yaml#
104*0e8011faSEmmanuel Vadot    unevaluatedProperties: false
105*0e8011faSEmmanuel Vadot
106*0e8011faSEmmanuel Vadotrequired:
107*0e8011faSEmmanuel Vadot  - compatible
108*0e8011faSEmmanuel Vadot  - reg
109*0e8011faSEmmanuel Vadot  - interrupts
110*0e8011faSEmmanuel Vadot
111*0e8011faSEmmanuel VadotunevaluatedProperties: false
112*0e8011faSEmmanuel Vadot
113*0e8011faSEmmanuel Vadotexamples:
114*0e8011faSEmmanuel Vadot  - |
115*0e8011faSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
116*0e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
117*0e8011faSEmmanuel Vadot
118*0e8011faSEmmanuel Vadot    i2c {
119*0e8011faSEmmanuel Vadot        #address-cells = <1>;
120*0e8011faSEmmanuel Vadot        #size-cells = <0>;
121*0e8011faSEmmanuel Vadot
122*0e8011faSEmmanuel Vadot        codec@1b {
123*0e8011faSEmmanuel Vadot            compatible = "realtek,rt5659";
124*0e8011faSEmmanuel Vadot            reg = <0x1b>;
125*0e8011faSEmmanuel Vadot            interrupt-parent = <&gpio>;
126*0e8011faSEmmanuel Vadot            interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
127*0e8011faSEmmanuel Vadot            realtek,ldo1-en-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
128*0e8011faSEmmanuel Vadot        };
129*0e8011faSEmmanuel Vadot    };
130