xref: /freebsd/sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*fac71e4eSEmmanuel Vadot%YAML 1.2
3*fac71e4eSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/wlf,wm8960.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*fac71e4eSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: Wolfson WM8960 audio codec
8*fac71e4eSEmmanuel Vadot
9*fac71e4eSEmmanuel Vadotmaintainers:
10*fac71e4eSEmmanuel Vadot  - patches@opensource.cirrus.com
11*fac71e4eSEmmanuel Vadot
12*fac71e4eSEmmanuel Vadotproperties:
13*fac71e4eSEmmanuel Vadot  compatible:
14*fac71e4eSEmmanuel Vadot    const: wlf,wm8960
15*fac71e4eSEmmanuel Vadot
16*fac71e4eSEmmanuel Vadot  reg:
17*fac71e4eSEmmanuel Vadot    maxItems: 1
18*fac71e4eSEmmanuel Vadot
19*fac71e4eSEmmanuel Vadot  clocks:
20*fac71e4eSEmmanuel Vadot    maxItems: 1
21*fac71e4eSEmmanuel Vadot
22*fac71e4eSEmmanuel Vadot  clock-names:
23*fac71e4eSEmmanuel Vadot    items:
24*fac71e4eSEmmanuel Vadot      - const: mclk
25*fac71e4eSEmmanuel Vadot
26*fac71e4eSEmmanuel Vadot  '#sound-dai-cells':
27*fac71e4eSEmmanuel Vadot    const: 0
28*fac71e4eSEmmanuel Vadot
29*fac71e4eSEmmanuel Vadot  wlf,capless:
30*fac71e4eSEmmanuel Vadot    type: boolean
31*fac71e4eSEmmanuel Vadot    description:
32*fac71e4eSEmmanuel Vadot      If present, OUT3 pin will be enabled and disabled together with HP_L and
33*fac71e4eSEmmanuel Vadot      HP_R pins in response to jack detect events.
34*fac71e4eSEmmanuel Vadot
35*fac71e4eSEmmanuel Vadot  wlf,gpio-cfg:
36*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
37*fac71e4eSEmmanuel Vadot    maxItems: 2
38*fac71e4eSEmmanuel Vadot    description: |
39*fac71e4eSEmmanuel Vadot      A list of GPIO configuration register values.
40*fac71e4eSEmmanuel Vadot       - gpio-cfg[0]: ALRCGPIO of R9 (Audio interface)
41*fac71e4eSEmmanuel Vadot       - gpio-cfg[1]: {GPIOPOL:GPIOSEL[2:0]} of R48 (Additional Control 4).
42*fac71e4eSEmmanuel Vadot
43*fac71e4eSEmmanuel Vadot  wlf,hp-cfg:
44*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
45*fac71e4eSEmmanuel Vadot    maxItems: 3
46*fac71e4eSEmmanuel Vadot    description: |
47*fac71e4eSEmmanuel Vadot      A list of headphone jack detect configuration register values:
48*fac71e4eSEmmanuel Vadot       - hp-cfg[0]: HPSEL[1:0] of R48 (Additional Control 4).
49*fac71e4eSEmmanuel Vadot       - hp-cfg[1]: {HPSWEN:HPSWPOL} of R24 (Additional Control 2).
50*fac71e4eSEmmanuel Vadot       - hp-cfg[2]: {TOCLKSEL:TOEN} of R23 (Additional Control 1).
51*fac71e4eSEmmanuel Vadot
52*fac71e4eSEmmanuel Vadot  wlf,shared-lrclk:
53*fac71e4eSEmmanuel Vadot    type: boolean
54*fac71e4eSEmmanuel Vadot    description:
55*fac71e4eSEmmanuel Vadot      If present, the LRCM bit of R24 (Additional control 2) gets set,
56*fac71e4eSEmmanuel Vadot      indicating that ADCLRC and DACLRC pins will be disabled only when ADC
57*fac71e4eSEmmanuel Vadot      (Left and Right) and DAC (Left and Right) are disabled.
58*fac71e4eSEmmanuel Vadot      When WM8960 works on synchronize mode and DACLRC pin is used to supply
59*fac71e4eSEmmanuel Vadot      frame clock, it will no frame clock for captrue unless enable DAC to
60*fac71e4eSEmmanuel Vadot      enable DACLRC pin. If shared-lrclk is present, no need to enable DAC for
61*fac71e4eSEmmanuel Vadot      captrue.
62*fac71e4eSEmmanuel Vadot
63*fac71e4eSEmmanuel Vadotrequired:
64*fac71e4eSEmmanuel Vadot  - compatible
65*fac71e4eSEmmanuel Vadot  - reg
66*fac71e4eSEmmanuel Vadot
67*fac71e4eSEmmanuel VadotallOf:
68*fac71e4eSEmmanuel Vadot  - $ref: dai-common.yaml#
69*fac71e4eSEmmanuel Vadot
70*fac71e4eSEmmanuel VadotunevaluatedProperties: false
71*fac71e4eSEmmanuel Vadot
72*fac71e4eSEmmanuel Vadotexamples:
73*fac71e4eSEmmanuel Vadot  - |
74*fac71e4eSEmmanuel Vadot    i2c {
75*fac71e4eSEmmanuel Vadot        #address-cells = <1>;
76*fac71e4eSEmmanuel Vadot        #size-cells = <0>;
77*fac71e4eSEmmanuel Vadot
78*fac71e4eSEmmanuel Vadot        audio-codec@1a {
79*fac71e4eSEmmanuel Vadot            compatible = "wlf,wm8960";
80*fac71e4eSEmmanuel Vadot            reg = <0x1a>;
81*fac71e4eSEmmanuel Vadot            clocks = <&clks 0>;
82*fac71e4eSEmmanuel Vadot            clock-names = "mclk";
83*fac71e4eSEmmanuel Vadot            #sound-dai-cells = <0>;
84*fac71e4eSEmmanuel Vadot            wlf,hp-cfg = <3 2 3>;
85*fac71e4eSEmmanuel Vadot            wlf,gpio-cfg = <1 3>;
86*fac71e4eSEmmanuel Vadot            wlf,shared-lrclk;
87*fac71e4eSEmmanuel Vadot        };
88*fac71e4eSEmmanuel Vadot    };
89