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


Based on kernel version 7.3. Page generated on 2026-10-19 13:17 EDT.

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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs35l36.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic CS35L36 Speaker Amplifier

maintainers:
  - David Rhodes <drhodes@opensource.cirrus.com>
  - patches@opensource.cirrus.com

description:
  CS35L36 is a boosted mono Class D amplifier

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    enum:
      - cirrus,cs35l36

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  VA-supply:
    description: Voltage regulator of analog internal section

  VP-supply:
    description: Voltage regulator of boost converter

  reset-gpios:
    maxItems: 1

  cirrus,boost-ctl-millivolt:
    description: Boost converter output voltage (step 50)
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 2550
    maximum: 12000

  cirrus,boost-peak-milliamp:
    description: Boost-converter peak current limit (step 50)
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 4500
    minimum: 1600
    maximum: 4500

  cirrus,boost-ind-nanohenry:
    description: Initial inductor estimation reference value (1000=1μH, 1200=1.2μH)
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1000

  cirrus,multi-amp-mode:
    description: Hi-Z ASP port when more than one amplifier in system
    type: boolean

  cirrus,boost-ctl-select:
    description: Boost converter control source selection
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1
    enum:
      - 0 # Control Port
      - 1 # Class
      - 2 # Sync

  cirrus,amp-pcm-inv:
    description: Invert incoming PCM data when true
    type: boolean

  cirrus,imon-pol-inv:
    description: Invert polarity of outbound IMON feedback when true
    type: boolean

  cirrus,vmon-pol-inv:
    description: Invert polarity of outbound VMON feedback when true
    type: boolean

  cirrus,dcm-mode-enable:
    description: Enable boost converter automatic Discontinuous Conduction Mode
    type: boolean

  cirrus,weak-fet-disable:
    description: Reduce output driver strength in Weak-FET Drive Mode when true
    type: boolean

  cirrus,classh-wk-fet-delay-ms:
    description: Weak-FET entry delay
    default: 100
    enum: [0, 5, 10, 50, 100, 200, 500, 1000]

  cirrus,classh-weak-fet-thld-millivolt:
    description: Weak-FET drive threshold
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]

  cirrus,temp-warn-threshold:
    description: Overtemperature warning threshold
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 2
    enum:
      - 0 # 105°C
      - 1 # 115°C
      - 2 # 125°C
      - 3 # 135°C

  cirrus,irq-drive-select:
    description: Interrupt output driver type
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1
    enum:
      - 0 # open-drain
      - 1 # push-pull

  cirrus,irq-gpio-select:
    description: Programmable IRQ pin selection
    $ref: /schemas/types.yaml#/definitions/uint32
    enum:
      - 0 # PDM_DATA/SWIRE_SD/INT
      - 1 # GPIO

  cirrus,vpbr-config:
    $ref: "#/$defs/vpbr-config"

$defs:
  vpbr-config:
    description: Brownout prevention configuration sub-node
    type: object
    additionalProperties: false

    properties:
      cirrus,vpbr-en:
        description: VBST brownout prevention enable
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 0
        enum:
          - 0 # disabled
          - 1 # enabled

      cirrus,vpbr-thld:
        description: Initial VPBR threshold voltage
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 2
        maximum: 31

      cirrus,vpbr-atk-rate:
        description: Attenuation attack step rate
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 7

      cirrus,vpbr-atk-vol:
        description: VP brownout prevention step size
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 7

      cirrus,vpbr-max-attn:
        description: Maximum attenuation during VP brownout prevention (dB)
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 15

      cirrus,vpbr-wait:
        description: Delay between brownout clearance and attenuation release (ms)
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 1
        enum:
          - 0 # 10
          - 1 # 100
          - 2 # 250
          - 3 # 500

      cirrus,vpbr-rel-rate:
        description: Attenuation release step rate
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 7

      cirrus,vpbr-mute-en:
        description: Mute audio if maximum attenuation reached
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 1

required:
  - compatible
  - reg
  - interrupts
  - VA-supply
  - cirrus,boost-ctl-millivolt
  - cirrus,boost-peak-milliamp

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
 
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        codec@40 {
            compatible = "cirrus,cs35l36";
            reg = <0x40>;
            VA-supply = <&dummy_vreg>;
            VP-supply = <&dummy_vreg>;
            reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
 
            cirrus,boost-ind-nanohenry = <1000>;
            cirrus,boost-ctl-millivolt = <10000>;
            cirrus,boost-peak-milliamp = <4500>;
            cirrus,boost-ctl-select = <0>;
            cirrus,classh-wk-fet-delay-ms = <100>;
            cirrus,classh-weak-fet-thld-millivolt = <100>;
            cirrus,temp-warn-threshold = <1>;
            cirrus,multi-amp-mode;
            cirrus,irq-drive-select = <1>;
            cirrus,irq-gpio-select = <1>;
 
            cirrus,vpbr-config {
                cirrus,vpbr-en = <0>;
                cirrus,vpbr-thld = <5>;
                cirrus,vpbr-atk-rate = <2>;
                cirrus,vpbr-atk-vol = <1>;
                cirrus,vpbr-max-attn = <9>;
                cirrus,vpbr-wait = <1>;
                cirrus,vpbr-rel-rate = <5>;
                cirrus,vpbr-mute-en = <0>;
            };
        };
    };

...