xref: /freebsd/sys/contrib/device-tree/Bindings/sound/cirrus,cs48l32.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*ae5de77eSEmmanuel Vadot%YAML 1.2
3*ae5de77eSEmmanuel Vadot---
4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ae5de77eSEmmanuel Vadot
7*ae5de77eSEmmanuel Vadottitle: Cirrus Logic CS48L32 audio DSP.
8*ae5de77eSEmmanuel Vadot
9*ae5de77eSEmmanuel Vadotmaintainers:
10*ae5de77eSEmmanuel Vadot  - patches@opensource.cirrus.com
11*ae5de77eSEmmanuel Vadot
12*ae5de77eSEmmanuel Vadotdescription: |
13*ae5de77eSEmmanuel Vadot  The CS48L32 is a high-performance low-power audio DSP for smartphones and
14*ae5de77eSEmmanuel Vadot  other portable audio devices. The CS48L32 combines a programmable Halo Core
15*ae5de77eSEmmanuel Vadot  DSP with a variety of power-efficient fixed-function audio processors.
16*ae5de77eSEmmanuel Vadot
17*ae5de77eSEmmanuel Vadot  See also the binding headers:
18*ae5de77eSEmmanuel Vadot
19*ae5de77eSEmmanuel Vadot    include/dt-bindings/sound/cs48l32.yaml
20*ae5de77eSEmmanuel Vadot
21*ae5de77eSEmmanuel VadotallOf:
22*ae5de77eSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
23*ae5de77eSEmmanuel Vadot  - $ref: dai-common.yaml#
24*ae5de77eSEmmanuel Vadot
25*ae5de77eSEmmanuel Vadotproperties:
26*ae5de77eSEmmanuel Vadot  compatible:
27*ae5de77eSEmmanuel Vadot    enum:
28*ae5de77eSEmmanuel Vadot      - cirrus,cs48l32
29*ae5de77eSEmmanuel Vadot
30*ae5de77eSEmmanuel Vadot  reg:
31*ae5de77eSEmmanuel Vadot    description: SPI chip-select number.
32*ae5de77eSEmmanuel Vadot    maxItems: 1
33*ae5de77eSEmmanuel Vadot
34*ae5de77eSEmmanuel Vadot  spi-max-frequency:
35*ae5de77eSEmmanuel Vadot    maximum: 25000000
36*ae5de77eSEmmanuel Vadot
37*ae5de77eSEmmanuel Vadot  vdd-a-supply:
38*ae5de77eSEmmanuel Vadot    description: Regulator supplying VDD_A
39*ae5de77eSEmmanuel Vadot
40*ae5de77eSEmmanuel Vadot  vdd-d-supply:
41*ae5de77eSEmmanuel Vadot    description: Regulator supplying VDD_D
42*ae5de77eSEmmanuel Vadot
43*ae5de77eSEmmanuel Vadot  vdd-io-supply:
44*ae5de77eSEmmanuel Vadot    description: Regulator supplying VDD_IO
45*ae5de77eSEmmanuel Vadot
46*ae5de77eSEmmanuel Vadot  vdd-cp-supply:
47*ae5de77eSEmmanuel Vadot    description: Regulator supplying VDD_CP
48*ae5de77eSEmmanuel Vadot
49*ae5de77eSEmmanuel Vadot  reset-gpios:
50*ae5de77eSEmmanuel Vadot    description:
51*ae5de77eSEmmanuel Vadot      One entry specifying the GPIO controlling /RESET. Although optional,
52*ae5de77eSEmmanuel Vadot      it is strongly recommended to use a hardware reset.
53*ae5de77eSEmmanuel Vadot    maxItems: 1
54*ae5de77eSEmmanuel Vadot
55*ae5de77eSEmmanuel Vadot  interrupts:
56*ae5de77eSEmmanuel Vadot    maxItems: 1
57*ae5de77eSEmmanuel Vadot
58*ae5de77eSEmmanuel Vadot  clocks:
59*ae5de77eSEmmanuel Vadot    items:
60*ae5de77eSEmmanuel Vadot      - description: The clock supplied on MCLK1
61*ae5de77eSEmmanuel Vadot
62*ae5de77eSEmmanuel Vadot  clock-names:
63*ae5de77eSEmmanuel Vadot    const: mclk1
64*ae5de77eSEmmanuel Vadot
65*ae5de77eSEmmanuel Vadot  '#sound-dai-cells':
66*ae5de77eSEmmanuel Vadot    const: 1
67*ae5de77eSEmmanuel Vadot
68*ae5de77eSEmmanuel Vadot  cirrus,in-type:
69*ae5de77eSEmmanuel Vadot    description: |
70*ae5de77eSEmmanuel Vadot      A list of input type settings for each ADC input.
71*ae5de77eSEmmanuel Vadot      Inputs are one of these types:
72*ae5de77eSEmmanuel Vadot        CS48L32_IN_TYPE_DIFF : analog differential (default)
73*ae5de77eSEmmanuel Vadot        CS48L32_IN_TYPE_SE :   analog single-ended
74*ae5de77eSEmmanuel Vadot
75*ae5de77eSEmmanuel Vadot      The type of the left (L) and right (R) channel on each input is
76*ae5de77eSEmmanuel Vadot      independently configured, as are the two groups of pins muxable to
77*ae5de77eSEmmanuel Vadot      the input (referred to in the datasheet as "1" and "2").
78*ae5de77eSEmmanuel Vadot
79*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
80*ae5de77eSEmmanuel Vadot    items:
81*ae5de77eSEmmanuel Vadot      - description:
82*ae5de77eSEmmanuel Vadot          IN1L_1 analog input type. One of the CS48L32_IN_TYPE_xxx.
83*ae5de77eSEmmanuel Vadot        minimum: 0
84*ae5de77eSEmmanuel Vadot        maximum: 1
85*ae5de77eSEmmanuel Vadot        default: 0
86*ae5de77eSEmmanuel Vadot      - description:
87*ae5de77eSEmmanuel Vadot          IN1R_1 analog input type. One of the CS48L32_IN_TYPE_xxx.
88*ae5de77eSEmmanuel Vadot        minimum: 0
89*ae5de77eSEmmanuel Vadot        maximum: 1
90*ae5de77eSEmmanuel Vadot        default: 0
91*ae5de77eSEmmanuel Vadot      - description:
92*ae5de77eSEmmanuel Vadot          IN1L_2 analog input type. One of the CS48L32_IN_TYPE_xxx.
93*ae5de77eSEmmanuel Vadot        minimum: 0
94*ae5de77eSEmmanuel Vadot        maximum: 1
95*ae5de77eSEmmanuel Vadot        default: 0
96*ae5de77eSEmmanuel Vadot      - description:
97*ae5de77eSEmmanuel Vadot          IN1R_2 analog input type. One of the CS48L32_IN_TYPE_xxx.
98*ae5de77eSEmmanuel Vadot        minimum: 0
99*ae5de77eSEmmanuel Vadot        maximum: 1
100*ae5de77eSEmmanuel Vadot        default: 0
101*ae5de77eSEmmanuel Vadot
102*ae5de77eSEmmanuel Vadot  cirrus,pdm-sup:
103*ae5de77eSEmmanuel Vadot    description: |
104*ae5de77eSEmmanuel Vadot      Indicate which MICBIAS output supplies bias to the microphone.
105*ae5de77eSEmmanuel Vadot      There is one cell per input (IN1, IN2, ...).
106*ae5de77eSEmmanuel Vadot
107*ae5de77eSEmmanuel Vadot      One of the CS48L32_MICBIAS_xxx values.
108*ae5de77eSEmmanuel Vadot        CS48L32_PDM_SUP_VOUT_MIC : mic biased from VOUT_MIC
109*ae5de77eSEmmanuel Vadot        CS48L32_PDM_SUP_MICBIAS1 : mic biased from MICBIAS1
110*ae5de77eSEmmanuel Vadot
111*ae5de77eSEmmanuel Vadot      Also see the INn_PDM_SUP field in the datasheet.
112*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
113*ae5de77eSEmmanuel Vadot    items:
114*ae5de77eSEmmanuel Vadot      - description: IN1 PDM supply source
115*ae5de77eSEmmanuel Vadot        minimum: 0
116*ae5de77eSEmmanuel Vadot        maximum: 1
117*ae5de77eSEmmanuel Vadot        default: 0
118*ae5de77eSEmmanuel Vadot      - description: IN2 PDM supply source
119*ae5de77eSEmmanuel Vadot        minimum: 0
120*ae5de77eSEmmanuel Vadot        maximum: 1
121*ae5de77eSEmmanuel Vadot        default: 0
122*ae5de77eSEmmanuel Vadot
123*ae5de77eSEmmanuel Vadotrequired:
124*ae5de77eSEmmanuel Vadot  - compatible
125*ae5de77eSEmmanuel Vadot  - reg
126*ae5de77eSEmmanuel Vadot  - vdd-a-supply
127*ae5de77eSEmmanuel Vadot  - vdd-d-supply
128*ae5de77eSEmmanuel Vadot  - vdd-io-supply
129*ae5de77eSEmmanuel Vadot  - vdd-cp-supply
130*ae5de77eSEmmanuel Vadot
131*ae5de77eSEmmanuel VadotadditionalProperties: false
132*ae5de77eSEmmanuel Vadot
133*ae5de77eSEmmanuel Vadotexamples:
134*ae5de77eSEmmanuel Vadot  - |
135*ae5de77eSEmmanuel Vadot    #include <dt-bindings/sound/cs48l32.h>
136*ae5de77eSEmmanuel Vadot
137*ae5de77eSEmmanuel Vadot    spi@e0006000 {
138*ae5de77eSEmmanuel Vadot        #address-cells = <1>;
139*ae5de77eSEmmanuel Vadot        #size-cells = <0>;
140*ae5de77eSEmmanuel Vadot        reg = <0xe0006000 0x1000>;
141*ae5de77eSEmmanuel Vadot
142*ae5de77eSEmmanuel Vadot        codec@1 {
143*ae5de77eSEmmanuel Vadot            compatible = "cirrus,cs48l32";
144*ae5de77eSEmmanuel Vadot
145*ae5de77eSEmmanuel Vadot            reg = <0x1>;
146*ae5de77eSEmmanuel Vadot            spi-max-frequency = <2500000>;
147*ae5de77eSEmmanuel Vadot
148*ae5de77eSEmmanuel Vadot            vdd-a-supply = <&regulator_1v8>;
149*ae5de77eSEmmanuel Vadot            vdd-d-supply = <&regulator_1v2>;
150*ae5de77eSEmmanuel Vadot            vdd-io-supply = <&regulator_1v8>;
151*ae5de77eSEmmanuel Vadot            vdd-cp-supply = <&regulator_1v8>;
152*ae5de77eSEmmanuel Vadot
153*ae5de77eSEmmanuel Vadot            reset-gpios = <&gpio 0 0>;
154*ae5de77eSEmmanuel Vadot
155*ae5de77eSEmmanuel Vadot            clocks = <&clks 0>;
156*ae5de77eSEmmanuel Vadot            clock-names = "mclk1";
157*ae5de77eSEmmanuel Vadot
158*ae5de77eSEmmanuel Vadot            interrupt-parent = <&gpio0>;
159*ae5de77eSEmmanuel Vadot            interrupts = <56 8>;
160*ae5de77eSEmmanuel Vadot
161*ae5de77eSEmmanuel Vadot            #sound-dai-cells = <1>;
162*ae5de77eSEmmanuel Vadot
163*ae5de77eSEmmanuel Vadot            cirrus,in-type = <
164*ae5de77eSEmmanuel Vadot                CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF
165*ae5de77eSEmmanuel Vadot                CS48L32_IN_TYPE_SE   CS48L32_IN_TYPE_SE
166*ae5de77eSEmmanuel Vadot            >;
167*ae5de77eSEmmanuel Vadot
168*ae5de77eSEmmanuel Vadot            cirrus,pdm-sup = <
169*ae5de77eSEmmanuel Vadot              CS48L32_PDM_SUP_MICBIAS1 CS48L32_PDM_SUP_MICBIAS1
170*ae5de77eSEmmanuel Vadot            >;
171*ae5de77eSEmmanuel Vadot        };
172*ae5de77eSEmmanuel Vadot    };
173*ae5de77eSEmmanuel Vadot
174*ae5de77eSEmmanuel Vadot#
175*ae5de77eSEmmanuel Vadot# Minimal config
176*ae5de77eSEmmanuel Vadot#
177*ae5de77eSEmmanuel Vadot  - |
178*ae5de77eSEmmanuel Vadot    #include <dt-bindings/sound/cs48l32.h>
179*ae5de77eSEmmanuel Vadot
180*ae5de77eSEmmanuel Vadot    spi@e0006000 {
181*ae5de77eSEmmanuel Vadot        #address-cells = <1>;
182*ae5de77eSEmmanuel Vadot        #size-cells = <0>;
183*ae5de77eSEmmanuel Vadot        reg = <0xe0006000 0x1000>;
184*ae5de77eSEmmanuel Vadot
185*ae5de77eSEmmanuel Vadot        codec@1 {
186*ae5de77eSEmmanuel Vadot            compatible = "cirrus,cs48l32";
187*ae5de77eSEmmanuel Vadot
188*ae5de77eSEmmanuel Vadot            reg = <0x1>;
189*ae5de77eSEmmanuel Vadot
190*ae5de77eSEmmanuel Vadot            vdd-a-supply = <&regulator_1v8>;
191*ae5de77eSEmmanuel Vadot            vdd-d-supply = <&regulator_1v2>;
192*ae5de77eSEmmanuel Vadot            vdd-io-supply = <&regulator_1v8>;
193*ae5de77eSEmmanuel Vadot            vdd-cp-supply = <&regulator_1v8>;
194*ae5de77eSEmmanuel Vadot        };
195*ae5de77eSEmmanuel Vadot    };
196