File Index
Files and directories
Sign in
FILE

cirrus,cs35l41.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/sound/cirrus,cs35l41.yaml YAML
  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,cs35l41.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Cirrus Logic CS35L41 Speaker Amplifier
  8
  9maintainers:
 10  - david.rhodes@cirrus.com
 11
 12description: |
 13  CS35L41 is a boosted mono Class D amplifier with DSP
 14  speaker protection and equalization
 15
 16properties:
 17  compatible:
 18    enum:
 19      - cirrus,cs35l40
 20      - cirrus,cs35l41
 21
 22  reg:
 23    maxItems: 1
 24
 25  interrupts:
 26    maxItems: 1
 27
 28  '#sound-dai-cells':
 29    description:
 30      The first cell indicating the audio interface.
 31    const: 1
 32
 33  reset-gpios:
 34    maxItems: 1
 35
 36  VA-supply:
 37    description: voltage regulator phandle for the VA supply
 38
 39  VP-supply:
 40    description: voltage regulator phandle for the VP supply
 41
 42  cirrus,boost-peak-milliamp:
 43    description:
 44      Boost-converter peak current limit in mA.
 45      Configures the peak current by monitoring the current through the boost FET.
 46      Range starts at 1600 mA and goes to a maximum of 4500 mA with increments
 47      of 50 mA. See section 4.3.6 of the datasheet for details.
 48    $ref: /schemas/types.yaml#/definitions/uint32
 49    minimum: 1600
 50    maximum: 4500
 51    default: 4500
 52
 53  cirrus,boost-ind-nanohenry:
 54    description:
 55      Boost inductor value, expressed in nH. Valid
 56      values include 1000, 1200, 1500 and 2200.
 57    $ref: /schemas/types.yaml#/definitions/uint32
 58    minimum: 1000
 59    maximum: 2200
 60
 61  cirrus,boost-cap-microfarad:
 62    description:
 63      Total equivalent boost capacitance on the VBST
 64      and VAMP pins, derated at 11 volts DC. The value must be rounded to the
 65      nearest integer and expressed in uF.
 66    $ref: /schemas/types.yaml#/definitions/uint32
 67
 68  cirrus,asp-sdout-hiz:
 69    description:
 70      Audio serial port SDOUT Hi-Z control. Sets the Hi-Z
 71      configuration for SDOUT pin of amplifier.
 72      0 = Logic 0 during unused slots, and while all transmit channels disabled
 73      1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled
 74      2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled
 75      3 = Hi-Z during unused slots and while all transmit channels disabled
 76    $ref: /schemas/types.yaml#/definitions/uint32
 77    minimum: 0
 78    maximum: 3
 79    default: 2
 80
 81  cirrus,boost-type:
 82    description:
 83      Configures the type of Boost being used.
 84      Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and
 85      boost-cap-microfarad.
 86      External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to
 87      enable boost voltage.
 88      Shared boost allows two amplifiers to share a single boost circuit by
 89      communicating on the MDSYNC bus. The active amplifier controls the boost
 90      circuit using combined data from both amplifiers. GPIO1 should be
 91      configured for Sync when shared boost is used. Shared boost is not
 92      compatible with External boost. Active amplifier requires
 93      boost-peak-milliamp, boost-ind-nanohenry and boost-cap-microfarad.
 94      0 = Internal Boost
 95      1 = External Boost
 96      2 = Shared Boost Active
 97      3 = Shared Boost Passive
 98    $ref: /schemas/types.yaml#/definitions/uint32
 99    minimum: 0
100    maximum: 3
101
102  cirrus,gpio1-polarity-invert:
103    description:
104      Boolean which specifies whether the GPIO1
105      level is inverted. If this property is not present the level is not inverted.
106    type: boolean
107
108  cirrus,gpio1-output-enable:
109    description:
110      Boolean which specifies whether the GPIO1 pin
111      is configured as an output. If this property is not present the
112      pin will be configured as an input.
113    type: boolean
114
115  cirrus,gpio1-src-select:
116    description:
117      Configures the function of the GPIO1 pin.
118      Note that the options are different from the GPIO2 pin
119      0 = High Impedance (Default)
120      1 = GPIO
121      2 = Sync
122      3 = MCLK input
123    $ref: /schemas/types.yaml#/definitions/uint32
124    minimum: 0
125    maximum: 3
126
127  cirrus,gpio2-polarity-invert:
128    description:
129      Boolean which specifies whether the GPIO2
130      level is inverted. If this property is not present the level is not inverted.
131    type: boolean
132
133  cirrus,gpio2-output-enable:
134    description:
135      Boolean which specifies whether the GPIO2 pin
136      is configured as an output. If this property is not present the
137      pin will be configured as an input.
138    type: boolean
139
140  cirrus,gpio2-src-select:
141    description:
142      Configures the function of the GPIO2 pin.
143      Note that the options are different from the GPIO1 pin.
144      0 = High Impedance (Default)
145      1 = GPIO
146      2 = Open Drain INTB
147      3 = MCLK input
148      4 = Push-pull INTB (active low)
149      5 = Push-pull INT (active high)
150    $ref: /schemas/types.yaml#/definitions/uint32
151    minimum: 0
152    maximum: 5
153
154  cirrus,subsystem-id:
155    $ref: /schemas/types.yaml#/definitions/string
156    description:
157      Subsystem ID. If this property is present, it sets the system name,
158      used to identify the firmware and tuning to load.
159
160required:
161  - compatible
162  - reg
163  - "#sound-dai-cells"
164
165allOf:
166  - $ref: dai-common.yaml#
167  - if:
168      properties:
169        cirrus,boost-type:
170          const: 0
171    then:
172      required:
173        - cirrus,boost-peak-milliamp
174        - cirrus,boost-ind-nanohenry
175        - cirrus,boost-cap-microfarad
176    else:
177      if:
178        properties:
179          cirrus,boost-type:
180            const: 1
181      then:
182        required:
183          - cirrus,gpio1-output-enable
184          - cirrus,gpio1-src-select
185        properties:
186          cirrus,boost-peak-milliamp: false
187          cirrus,boost-ind-nanohenry: false
188          cirrus,boost-cap-microfarad: false
189          cirrus,gpio1-src-select:
190            enum: [1]
191
192unevaluatedProperties: false
193
194examples:
195  - |
196    #include <dt-bindings/gpio/gpio.h>
197
198    spi {
199        #address-cells = <1>;
200        #size-cells = <0>;
201
202        cs35l41: speaker-amp@2 {
203            #sound-dai-cells = <1>;
204            compatible = "cirrus,cs35l41";
205            reg = <2>;
206            VA-supply = <&dummy_vreg>;
207            VP-supply = <&dummy_vreg>;
208            reset-gpios = <&gpio 110 GPIO_ACTIVE_HIGH>;
209
210            cirrus,boost-type = <0>;
211            cirrus,boost-peak-milliamp = <4500>;
212            cirrus,boost-ind-nanohenry = <1000>;
213            cirrus,boost-cap-microfarad = <15>;
214        };
215    };
~/ Read-only file preview.