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