brintos

brintos / linux-shallow public Read only

0
0
Text · 6.0 KiB · 14dea1f Raw
210 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---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 Amplifier8 9maintainers:10  - david.rhodes@cirrus.com11 12description: |13  CS35L41 is a boosted mono Class D amplifier with DSP14  speaker protection and equalization15 16properties:17  compatible:18    enum:19      - cirrus,cs35l4020      - cirrus,cs35l4121 22  reg:23    maxItems: 124 25  interrupts:26    maxItems: 127 28  '#sound-dai-cells':29    description:30      The first cell indicating the audio interface.31    const: 132 33  reset-gpios:34    maxItems: 135 36  VA-supply:37    description: voltage regulator phandle for the VA supply38 39  VP-supply:40    description: voltage regulator phandle for the VP supply41 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 increments47      of 50 mA. See section 4.3.6 of the datasheet for details.48    $ref: /schemas/types.yaml#/definitions/uint3249    minimum: 160050    maximum: 450051    default: 450052 53  cirrus,boost-ind-nanohenry:54    description:55      Boost inductor value, expressed in nH. Valid56      values include 1000, 1200, 1500 and 2200.57    $ref: /schemas/types.yaml#/definitions/uint3258    minimum: 100059    maximum: 220060 61  cirrus,boost-cap-microfarad:62    description:63      Total equivalent boost capacitance on the VBST64      and VAMP pins, derated at 11 volts DC. The value must be rounded to the65      nearest integer and expressed in uF.66    $ref: /schemas/types.yaml#/definitions/uint3267 68  cirrus,asp-sdout-hiz:69    description:70      Audio serial port SDOUT Hi-Z control. Sets the Hi-Z71      configuration for SDOUT pin of amplifier.72      0 = Logic 0 during unused slots, and while all transmit channels disabled73      1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled74      2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled75      3 = Hi-Z during unused slots and while all transmit channels disabled76    $ref: /schemas/types.yaml#/definitions/uint3277    minimum: 078    maximum: 379    default: 280 81  cirrus,boost-type:82    description:83      Configures the type of Boost being used.84      Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and85      boost-cap-microfarad.86      External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to87      enable boost voltage.88      Shared boost allows two amplifiers to share a single boost circuit by89      communicating on the MDSYNC bus. The active amplifier controls the boost90      circuit using combined data from both amplifiers. GPIO1 should be91      configured for Sync when shared boost is used. Shared boost is not92      compatible with External boost. Active amplifier requires93      boost-peak-milliamp, boost-ind-nanohenry and boost-cap-microfarad.94      0 = Internal Boost95      1 = External Boost96      2 = Shared Boost Active97      3 = Shared Boost Passive98    $ref: /schemas/types.yaml#/definitions/uint3299    minimum: 0100    maximum: 3101 102  cirrus,gpio1-polarity-invert:103    description:104      Boolean which specifies whether the GPIO1105      level is inverted. If this property is not present the level is not inverted.106    type: boolean107 108  cirrus,gpio1-output-enable:109    description:110      Boolean which specifies whether the GPIO1 pin111      is configured as an output. If this property is not present the112      pin will be configured as an input.113    type: boolean114 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 pin119      0 = High Impedance (Default)120      1 = GPIO121      2 = Sync122      3 = MCLK input123    $ref: /schemas/types.yaml#/definitions/uint32124    minimum: 0125    maximum: 3126 127  cirrus,gpio2-polarity-invert:128    description:129      Boolean which specifies whether the GPIO2130      level is inverted. If this property is not present the level is not inverted.131    type: boolean132 133  cirrus,gpio2-output-enable:134    description:135      Boolean which specifies whether the GPIO2 pin136      is configured as an output. If this property is not present the137      pin will be configured as an input.138    type: boolean139 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 = GPIO146      2 = Open Drain INTB147      3 = MCLK input148      4 = Push-pull INTB (active low)149      5 = Push-pull INT (active high)150    $ref: /schemas/types.yaml#/definitions/uint32151    minimum: 0152    maximum: 5153 154required:155  - compatible156  - reg157  - "#sound-dai-cells"158 159allOf:160  - $ref: dai-common.yaml#161  - if:162      properties:163        cirrus,boost-type:164          const: 0165    then:166      required:167        - cirrus,boost-peak-milliamp168        - cirrus,boost-ind-nanohenry169        - cirrus,boost-cap-microfarad170    else:171      if:172        properties:173          cirrus,boost-type:174            const: 1175      then:176        required:177          - cirrus,gpio1-output-enable178          - cirrus,gpio1-src-select179        properties:180          cirrus,boost-peak-milliamp: false181          cirrus,boost-ind-nanohenry: false182          cirrus,boost-cap-microfarad: false183          cirrus,gpio1-src-select:184            enum: [1]185 186unevaluatedProperties: false187 188examples:189  - |190    #include <dt-bindings/gpio/gpio.h>191 192    spi {193        #address-cells = <1>;194        #size-cells = <0>;195 196        cs35l41: speaker-amp@2 {197            #sound-dai-cells = <1>;198            compatible = "cirrus,cs35l41";199            reg = <2>;200            VA-supply = <&dummy_vreg>;201            VP-supply = <&dummy_vreg>;202            reset-gpios = <&gpio 110 GPIO_ACTIVE_HIGH>;203 204            cirrus,boost-type = <0>;205            cirrus,boost-peak-milliamp = <4500>;206            cirrus,boost-ind-nanohenry = <1000>;207            cirrus,boost-cap-microfarad = <15>;208        };209    };210