Documentation / devicetree / bindings / sound / cirrus,cs48l32.yaml


Based on kernel version 6.16. Page generated on 2025-08-06 08:57 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic CS48L32 audio DSP.

maintainers:
  - patches@opensource.cirrus.com

description: |
  The CS48L32 is a high-performance low-power audio DSP for smartphones and
  other portable audio devices. The CS48L32 combines a programmable Halo Core
  DSP with a variety of power-efficient fixed-function audio processors.
 
  See also the binding headers:
 
    include/dt-bindings/sound/cs48l32.yaml

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - $ref: dai-common.yaml#

properties:
  compatible:
    enum:
      - cirrus,cs48l32

  reg:
    description: SPI chip-select number.
    maxItems: 1

  spi-max-frequency:
    maximum: 25000000

  vdd-a-supply:
    description: Regulator supplying VDD_A

  vdd-d-supply:
    description: Regulator supplying VDD_D

  vdd-io-supply:
    description: Regulator supplying VDD_IO

  vdd-cp-supply:
    description: Regulator supplying VDD_CP

  reset-gpios:
    description:
      One entry specifying the GPIO controlling /RESET. Although optional,
      it is strongly recommended to use a hardware reset.
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: The clock supplied on MCLK1

  clock-names:
    const: mclk1
 
  '#sound-dai-cells':
    const: 1

  cirrus,in-type:
    description: |
      A list of input type settings for each ADC input.
      Inputs are one of these types:
        CS48L32_IN_TYPE_DIFF : analog differential (default)
        CS48L32_IN_TYPE_SE :   analog single-ended
 
      The type of the left (L) and right (R) channel on each input is
      independently configured, as are the two groups of pins muxable to
      the input (referred to in the datasheet as "1" and "2").

    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
      - description:
          IN1L_1 analog input type. One of the CS48L32_IN_TYPE_xxx.
        minimum: 0
        maximum: 1
        default: 0
      - description:
          IN1R_1 analog input type. One of the CS48L32_IN_TYPE_xxx.
        minimum: 0
        maximum: 1
        default: 0
      - description:
          IN1L_2 analog input type. One of the CS48L32_IN_TYPE_xxx.
        minimum: 0
        maximum: 1
        default: 0
      - description:
          IN1R_2 analog input type. One of the CS48L32_IN_TYPE_xxx.
        minimum: 0
        maximum: 1
        default: 0

  cirrus,pdm-sup:
    description: |
      Indicate which MICBIAS output supplies bias to the microphone.
      There is one cell per input (IN1, IN2, ...).
 
      One of the CS48L32_MICBIAS_xxx values.
        CS48L32_PDM_SUP_VOUT_MIC : mic biased from VOUT_MIC
        CS48L32_PDM_SUP_MICBIAS1 : mic biased from MICBIAS1
 
      Also see the INn_PDM_SUP field in the datasheet.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
      - description: IN1 PDM supply source
        minimum: 0
        maximum: 1
        default: 0
      - description: IN2 PDM supply source
        minimum: 0
        maximum: 1
        default: 0

required:
  - compatible
  - reg
  - vdd-a-supply
  - vdd-d-supply
  - vdd-io-supply
  - vdd-cp-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/sound/cs48l32.h>
 
    spi@e0006000 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0xe0006000 0x1000>;
 
        codec@1 {
            compatible = "cirrus,cs48l32";
 
            reg = <0x1>;
            spi-max-frequency = <2500000>;
 
            vdd-a-supply = <&regulator_1v8>;
            vdd-d-supply = <&regulator_1v2>;
            vdd-io-supply = <&regulator_1v8>;
            vdd-cp-supply = <&regulator_1v8>;
 
            reset-gpios = <&gpio 0 0>;
 
            clocks = <&clks 0>;
            clock-names = "mclk1";
 
            interrupt-parent = <&gpio0>;
            interrupts = <56 8>;
 
            #sound-dai-cells = <1>;
 
            cirrus,in-type = <
                CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF
                CS48L32_IN_TYPE_SE   CS48L32_IN_TYPE_SE
            >;
 
            cirrus,pdm-sup = <
              CS48L32_PDM_SUP_MICBIAS1 CS48L32_PDM_SUP_MICBIAS1
            >;
        };
    };

#
# Minimal config
#
  - |
    #include <dt-bindings/sound/cs48l32.h>
 
    spi@e0006000 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0xe0006000 0x1000>;
 
        codec@1 {
            compatible = "cirrus,cs48l32";
 
            reg = <0x1>;
 
            vdd-a-supply = <&regulator_1v8>;
            vdd-d-supply = <&regulator_1v2>;
            vdd-io-supply = <&regulator_1v8>;
            vdd-cp-supply = <&regulator_1v8>;
        };
    };