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 '#sound-dai-cells': 26 description: 27 The first cell indicating the audio interface. 28 const: 1 29 30 reset-gpios: 31 maxItems: 1 32 33 VA-supply: 34 description: voltage regulator phandle for the VA supply 35 36 VP-supply: 37 description: voltage regulator phandle for the VP supply 38 39 cirrus,boost-peak-milliamp: 40 description: 41 Boost-converter peak current limit in mA. 42 Configures the peak current by monitoring the current through the boost FET. 43 Range starts at 1600 mA and goes to a maximum of 4500 mA with increments 44 of 50 mA. See section 4.3.6 of the datasheet for details. 45 $ref: "/schemas/types.yaml#/definitions/uint32" 46 minimum: 1600 47 maximum: 4500 48 default: 4500 49 50 cirrus,boost-ind-nanohenry: 51 description: 52 Boost inductor value, expressed in nH. Valid 53 values include 1000, 1200, 1500 and 2200. 54 $ref: "/schemas/types.yaml#/definitions/uint32" 55 minimum: 1000 56 maximum: 2200 57 58 cirrus,boost-cap-microfarad: 59 description: 60 Total equivalent boost capacitance on the VBST 61 and VAMP pins, derated at 11 volts DC. The value must be rounded to the 62 nearest integer and expressed in uF. 63 $ref: "/schemas/types.yaml#/definitions/uint32" 64 65 cirrus,asp-sdout-hiz: 66 description: 67 Audio serial port SDOUT Hi-Z control. Sets the Hi-Z 68 configuration for SDOUT pin of amplifier. 69 0 = Logic 0 during unused slots, and while all transmit channels disabled 70 1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled 71 2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled 72 3 = Hi-Z during unused slots and while all transmit channels disabled 73 $ref: "/schemas/types.yaml#/definitions/uint32" 74 minimum: 0 75 maximum: 3 76 default: 2 77 78 cirrus,boost-type: 79 description: 80 Configures the type of Boost being used. 81 Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and 82 boost-cap-microfarad. 83 External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to 84 enable boost voltage. 85 0 = Internal Boost 86 1 = External Boost 87 $ref: "/schemas/types.yaml#/definitions/uint32" 88 minimum: 0 89 maximum: 1 90 91 cirrus,gpio1-polarity-invert: 92 description: 93 Boolean which specifies whether the GPIO1 94 level is inverted. If this property is not present the level is not inverted. 95 type: boolean 96 97 cirrus,gpio1-output-enable: 98 description: 99 Boolean which specifies whether the GPIO1 pin 100 is configured as an output. If this property is not present the 101 pin will be configured as an input. 102 type: boolean 103 104 cirrus,gpio1-src-select: 105 description: 106 Configures the function of the GPIO1 pin. 107 Note that the options are different from the GPIO2 pin 108 0 = High Impedance (Default) 109 1 = GPIO 110 2 = Sync 111 3 = MCLK input 112 $ref: "/schemas/types.yaml#/definitions/uint32" 113 minimum: 0 114 maximum: 3 115 116 cirrus,gpio2-polarity-invert: 117 description: 118 Boolean which specifies whether the GPIO2 119 level is inverted. If this property is not present the level is not inverted. 120 type: boolean 121 122 cirrus,gpio2-output-enable: 123 description: 124 Boolean which specifies whether the GPIO2 pin 125 is configured as an output. If this property is not present the 126 pin will be configured as an input. 127 type: boolean 128 129 cirrus,gpio2-src-select: 130 description: 131 Configures the function of the GPIO2 pin. 132 Note that the options are different from the GPIO1 pin. 133 0 = High Impedance (Default) 134 1 = GPIO 135 2 = Open Drain INTB 136 3 = MCLK input 137 4 = Push-pull INTB (active low) 138 5 = Push-pull INT (active high) 139 $ref: "/schemas/types.yaml#/definitions/uint32" 140 minimum: 0 141 maximum: 5 142 143required: 144 - compatible 145 - reg 146 - "#sound-dai-cells" 147 148allOf: 149 - $ref: dai-common.yaml# 150 - if: 151 properties: 152 cirrus,boost-type: 153 const: 0 154 then: 155 required: 156 - cirrus,boost-peak-milliamp 157 - cirrus,boost-ind-nanohenry 158 - cirrus,boost-cap-microfarad 159 else: 160 if: 161 properties: 162 cirrus,boost-type: 163 const: 1 164 then: 165 required: 166 - cirrus,gpio1-output-enable 167 - cirrus,gpio1-src-select 168 properties: 169 cirrus,boost-peak-milliamp: false 170 cirrus,boost-ind-nanohenry: false 171 cirrus,boost-cap-microfarad: false 172 cirrus,gpio1-src-select: 173 enum: [1] 174 175unevaluatedProperties: false 176 177examples: 178 - | 179 spi { 180 #address-cells = <1>; 181 #size-cells = <0>; 182 183 cs35l41: cs35l41@2 { 184 #sound-dai-cells = <1>; 185 compatible = "cirrus,cs35l41"; 186 reg = <2>; 187 VA-supply = <&dummy_vreg>; 188 VP-supply = <&dummy_vreg>; 189 reset-gpios = <&gpio 110 0>; 190 191 cirrus,boost-type = <0>; 192 cirrus,boost-peak-milliamp = <4500>; 193 cirrus,boost-ind-nanohenry = <1000>; 194 cirrus,boost-cap-microfarad = <15>; 195 }; 196 }; 197