xref: /freebsd/sys/contrib/device-tree/Bindings/sound/wlf,wm8903.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2e67e8565SEmmanuel Vadot%YAML 1.2
3e67e8565SEmmanuel Vadot---
4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/wlf,wm8903.yaml#
5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6e67e8565SEmmanuel Vadot
7e67e8565SEmmanuel Vadottitle: WM8903 audio codec
8e67e8565SEmmanuel Vadot
9e67e8565SEmmanuel Vadotdescription: |
10e67e8565SEmmanuel Vadot  This device supports I2C only.
11e67e8565SEmmanuel Vadot  Pins on the device (for linking into audio routes):
12e67e8565SEmmanuel Vadot      * IN1L
13e67e8565SEmmanuel Vadot      * IN1R
14e67e8565SEmmanuel Vadot      * IN2L
15e67e8565SEmmanuel Vadot      * IN2R
16e67e8565SEmmanuel Vadot      * IN3L
17e67e8565SEmmanuel Vadot      * IN3R
18e67e8565SEmmanuel Vadot      * DMICDAT
19e67e8565SEmmanuel Vadot      * HPOUTL
20e67e8565SEmmanuel Vadot      * HPOUTR
21e67e8565SEmmanuel Vadot      * LINEOUTL
22e67e8565SEmmanuel Vadot      * LINEOUTR
23e67e8565SEmmanuel Vadot      * LOP
24e67e8565SEmmanuel Vadot      * LON
25e67e8565SEmmanuel Vadot      * ROP
26e67e8565SEmmanuel Vadot      * RON
27e67e8565SEmmanuel Vadot      * MICBIAS
28e67e8565SEmmanuel Vadot
29e67e8565SEmmanuel Vadotmaintainers:
30e67e8565SEmmanuel Vadot  - patches@opensource.cirrus.com
31e67e8565SEmmanuel Vadot
32e67e8565SEmmanuel Vadotproperties:
33e67e8565SEmmanuel Vadot  compatible:
34e67e8565SEmmanuel Vadot    const: wlf,wm8903
35e67e8565SEmmanuel Vadot
36e67e8565SEmmanuel Vadot  reg:
37e67e8565SEmmanuel Vadot    maxItems: 1
38e67e8565SEmmanuel Vadot
39e67e8565SEmmanuel Vadot  gpio-controller: true
40e67e8565SEmmanuel Vadot  '#gpio-cells':
41e67e8565SEmmanuel Vadot    const: 2
42e67e8565SEmmanuel Vadot
43e67e8565SEmmanuel Vadot  interrupts:
44e67e8565SEmmanuel Vadot    maxItems: 1
45e67e8565SEmmanuel Vadot
46e67e8565SEmmanuel Vadot  micdet-cfg:
47e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
48e67e8565SEmmanuel Vadot    default: 0
49e67e8565SEmmanuel Vadot    description: Default register value for R6 (Mic Bias).
50e67e8565SEmmanuel Vadot
51e67e8565SEmmanuel Vadot  micdet-delay:
52e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
53e67e8565SEmmanuel Vadot    default: 100
54e67e8565SEmmanuel Vadot    description: The debounce delay for microphone detection in mS.
55e67e8565SEmmanuel Vadot
56e67e8565SEmmanuel Vadot  gpio-cfg:
57e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
58e67e8565SEmmanuel Vadot    description: |
59e67e8565SEmmanuel Vadot      minItems: 5
60e67e8565SEmmanuel Vadot      maxItems: 5
61e67e8565SEmmanuel Vadot      A list of GPIO configuration register values.
62e67e8565SEmmanuel Vadot      If absent, no configuration of these registers is performed.
63e67e8565SEmmanuel Vadot      If any entry has the value 0xffffffff, that GPIO's
64e67e8565SEmmanuel Vadot      configuration will not be modified.
65e67e8565SEmmanuel Vadot
66e67e8565SEmmanuel Vadot  AVDD-supply:
67e67e8565SEmmanuel Vadot    description: Analog power supply regulator on the AVDD pin.
68e67e8565SEmmanuel Vadot
69e67e8565SEmmanuel Vadot  CPVDD-supply:
70e67e8565SEmmanuel Vadot    description: Charge pump supply regulator on the CPVDD pin.
71e67e8565SEmmanuel Vadot
72e67e8565SEmmanuel Vadot  DBVDD-supply:
73e67e8565SEmmanuel Vadot    description: Digital buffer supply regulator for the DBVDD pin.
74e67e8565SEmmanuel Vadot
75e67e8565SEmmanuel Vadot  DCVDD-supply:
76e67e8565SEmmanuel Vadot    description: Digital core supply regulator for the DCVDD pin.
77e67e8565SEmmanuel Vadot
78e67e8565SEmmanuel Vadot
79e67e8565SEmmanuel Vadotrequired:
80e67e8565SEmmanuel Vadot  - compatible
81e67e8565SEmmanuel Vadot  - reg
82e67e8565SEmmanuel Vadot  - gpio-controller
83e67e8565SEmmanuel Vadot  - '#gpio-cells'
84e67e8565SEmmanuel Vadot
85e67e8565SEmmanuel VadotadditionalProperties: false
86e67e8565SEmmanuel Vadot
87e67e8565SEmmanuel Vadotexamples:
88e67e8565SEmmanuel Vadot  - |
89e67e8565SEmmanuel Vadot    i2c {
90e67e8565SEmmanuel Vadot      #address-cells = <1>;
91e67e8565SEmmanuel Vadot      #size-cells = <0>;
92e67e8565SEmmanuel Vadot
93e67e8565SEmmanuel Vadot      wm8903: codec@1a {
94e67e8565SEmmanuel Vadot        compatible = "wlf,wm8903";
95e67e8565SEmmanuel Vadot        reg = <0x1a>;
96e67e8565SEmmanuel Vadot        interrupts = <347>;
97e67e8565SEmmanuel Vadot
98e67e8565SEmmanuel Vadot        AVDD-supply = <&fooreg_a>;
99e67e8565SEmmanuel Vadot        CPVDD-supply = <&fooreg_b>;
100e67e8565SEmmanuel Vadot        DBVDD-supply = <&fooreg_c>;
101e67e8565SEmmanuel Vadot        DCVDD-supply = <&fooreg_d>;
102e67e8565SEmmanuel Vadot
103e67e8565SEmmanuel Vadot        gpio-controller;
104e67e8565SEmmanuel Vadot        #gpio-cells = <2>;
105e67e8565SEmmanuel Vadot
106e67e8565SEmmanuel Vadot        micdet-cfg = <0>;
107e67e8565SEmmanuel Vadot        micdet-delay = <100>;
108e67e8565SEmmanuel Vadot        gpio-cfg = <
109e67e8565SEmmanuel Vadot          0x0600 /* DMIC_LR, output */
110e67e8565SEmmanuel Vadot          0x0680 /* DMIC_DAT, input */
111e67e8565SEmmanuel Vadot          0x0000 /* GPIO, output, low */
112e67e8565SEmmanuel Vadot          0x0200 /* Interrupt, output */
113e67e8565SEmmanuel Vadot          0x01a0 /* BCLK, input, active high */
114e67e8565SEmmanuel Vadot        >;
115e67e8565SEmmanuel Vadot      };
116e67e8565SEmmanuel Vadot    };
117