18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/cirrus,cs35l41.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78cc087a1SEmmanuel Vadottitle: Cirrus Logic CS35L41 Speaker Amplifier 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - david.rhodes@cirrus.com 118cc087a1SEmmanuel Vadot 128cc087a1SEmmanuel Vadotdescription: | 138cc087a1SEmmanuel Vadot CS35L41 is a boosted mono Class D amplifier with DSP 148cc087a1SEmmanuel Vadot speaker protection and equalization 158cc087a1SEmmanuel Vadot 168cc087a1SEmmanuel Vadotproperties: 178cc087a1SEmmanuel Vadot compatible: 188cc087a1SEmmanuel Vadot enum: 198cc087a1SEmmanuel Vadot - cirrus,cs35l40 208cc087a1SEmmanuel Vadot - cirrus,cs35l41 218cc087a1SEmmanuel Vadot 228cc087a1SEmmanuel Vadot reg: 238cc087a1SEmmanuel Vadot maxItems: 1 248cc087a1SEmmanuel Vadot 25cb7aa33aSEmmanuel Vadot interrupts: 26cb7aa33aSEmmanuel Vadot maxItems: 1 27cb7aa33aSEmmanuel Vadot 288cc087a1SEmmanuel Vadot '#sound-dai-cells': 298cc087a1SEmmanuel Vadot description: 308cc087a1SEmmanuel Vadot The first cell indicating the audio interface. 318cc087a1SEmmanuel Vadot const: 1 328cc087a1SEmmanuel Vadot 338cc087a1SEmmanuel Vadot reset-gpios: 348cc087a1SEmmanuel Vadot maxItems: 1 358cc087a1SEmmanuel Vadot 368cc087a1SEmmanuel Vadot VA-supply: 378cc087a1SEmmanuel Vadot description: voltage regulator phandle for the VA supply 388cc087a1SEmmanuel Vadot 398cc087a1SEmmanuel Vadot VP-supply: 408cc087a1SEmmanuel Vadot description: voltage regulator phandle for the VP supply 418cc087a1SEmmanuel Vadot 428cc087a1SEmmanuel Vadot cirrus,boost-peak-milliamp: 438cc087a1SEmmanuel Vadot description: 448cc087a1SEmmanuel Vadot Boost-converter peak current limit in mA. 458cc087a1SEmmanuel Vadot Configures the peak current by monitoring the current through the boost FET. 468cc087a1SEmmanuel Vadot Range starts at 1600 mA and goes to a maximum of 4500 mA with increments 478cc087a1SEmmanuel Vadot of 50 mA. See section 4.3.6 of the datasheet for details. 48cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 498cc087a1SEmmanuel Vadot minimum: 1600 508cc087a1SEmmanuel Vadot maximum: 4500 518cc087a1SEmmanuel Vadot default: 4500 528cc087a1SEmmanuel Vadot 538cc087a1SEmmanuel Vadot cirrus,boost-ind-nanohenry: 548cc087a1SEmmanuel Vadot description: 558cc087a1SEmmanuel Vadot Boost inductor value, expressed in nH. Valid 568cc087a1SEmmanuel Vadot values include 1000, 1200, 1500 and 2200. 57cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 588cc087a1SEmmanuel Vadot minimum: 1000 598cc087a1SEmmanuel Vadot maximum: 2200 608cc087a1SEmmanuel Vadot 618cc087a1SEmmanuel Vadot cirrus,boost-cap-microfarad: 628cc087a1SEmmanuel Vadot description: 638cc087a1SEmmanuel Vadot Total equivalent boost capacitance on the VBST 648cc087a1SEmmanuel Vadot and VAMP pins, derated at 11 volts DC. The value must be rounded to the 658cc087a1SEmmanuel Vadot nearest integer and expressed in uF. 66cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 678cc087a1SEmmanuel Vadot 688cc087a1SEmmanuel Vadot cirrus,asp-sdout-hiz: 698cc087a1SEmmanuel Vadot description: 708cc087a1SEmmanuel Vadot Audio serial port SDOUT Hi-Z control. Sets the Hi-Z 718cc087a1SEmmanuel Vadot configuration for SDOUT pin of amplifier. 728cc087a1SEmmanuel Vadot 0 = Logic 0 during unused slots, and while all transmit channels disabled 738cc087a1SEmmanuel Vadot 1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled 748cc087a1SEmmanuel Vadot 2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled 758cc087a1SEmmanuel Vadot 3 = Hi-Z during unused slots and while all transmit channels disabled 76cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 778cc087a1SEmmanuel Vadot minimum: 0 788cc087a1SEmmanuel Vadot maximum: 3 798cc087a1SEmmanuel Vadot default: 2 808cc087a1SEmmanuel Vadot 81d5b0e70fSEmmanuel Vadot cirrus,boost-type: 82d5b0e70fSEmmanuel Vadot description: 83d5b0e70fSEmmanuel Vadot Configures the type of Boost being used. 84d5b0e70fSEmmanuel Vadot Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and 85d5b0e70fSEmmanuel Vadot boost-cap-microfarad. 86d5b0e70fSEmmanuel Vadot External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to 87d5b0e70fSEmmanuel Vadot enable boost voltage. 88*fac71e4eSEmmanuel Vadot Shared boost allows two amplifiers to share a single boost circuit by 89*fac71e4eSEmmanuel Vadot communicating on the MDSYNC bus. The active amplifier controls the boost 90*fac71e4eSEmmanuel Vadot circuit using combined data from both amplifiers. GPIO1 should be 91*fac71e4eSEmmanuel Vadot configured for Sync when shared boost is used. Shared boost is not 92*fac71e4eSEmmanuel Vadot compatible with External boost. Active amplifier requires 93*fac71e4eSEmmanuel Vadot boost-peak-milliamp, boost-ind-nanohenry and boost-cap-microfarad. 94d5b0e70fSEmmanuel Vadot 0 = Internal Boost 95d5b0e70fSEmmanuel Vadot 1 = External Boost 96*fac71e4eSEmmanuel Vadot 2 = Shared Boost Active 97*fac71e4eSEmmanuel Vadot 3 = Shared Boost Passive 98cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 99d5b0e70fSEmmanuel Vadot minimum: 0 100*fac71e4eSEmmanuel Vadot maximum: 3 101d5b0e70fSEmmanuel Vadot 1028cc087a1SEmmanuel Vadot cirrus,gpio1-polarity-invert: 1038cc087a1SEmmanuel Vadot description: 1048cc087a1SEmmanuel Vadot Boolean which specifies whether the GPIO1 1058cc087a1SEmmanuel Vadot level is inverted. If this property is not present the level is not inverted. 1068cc087a1SEmmanuel Vadot type: boolean 1078cc087a1SEmmanuel Vadot 1088cc087a1SEmmanuel Vadot cirrus,gpio1-output-enable: 1098cc087a1SEmmanuel Vadot description: 1108cc087a1SEmmanuel Vadot Boolean which specifies whether the GPIO1 pin 1118cc087a1SEmmanuel Vadot is configured as an output. If this property is not present the 1128cc087a1SEmmanuel Vadot pin will be configured as an input. 1138cc087a1SEmmanuel Vadot type: boolean 1148cc087a1SEmmanuel Vadot 1158cc087a1SEmmanuel Vadot cirrus,gpio1-src-select: 1168cc087a1SEmmanuel Vadot description: 1178cc087a1SEmmanuel Vadot Configures the function of the GPIO1 pin. 1188cc087a1SEmmanuel Vadot Note that the options are different from the GPIO2 pin 1198cc087a1SEmmanuel Vadot 0 = High Impedance (Default) 1208cc087a1SEmmanuel Vadot 1 = GPIO 1218cc087a1SEmmanuel Vadot 2 = Sync 1228cc087a1SEmmanuel Vadot 3 = MCLK input 123cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1248cc087a1SEmmanuel Vadot minimum: 0 1258cc087a1SEmmanuel Vadot maximum: 3 1268cc087a1SEmmanuel Vadot 1278cc087a1SEmmanuel Vadot cirrus,gpio2-polarity-invert: 1288cc087a1SEmmanuel Vadot description: 1298cc087a1SEmmanuel Vadot Boolean which specifies whether the GPIO2 1308cc087a1SEmmanuel Vadot level is inverted. If this property is not present the level is not inverted. 1318cc087a1SEmmanuel Vadot type: boolean 1328cc087a1SEmmanuel Vadot 1338cc087a1SEmmanuel Vadot cirrus,gpio2-output-enable: 1348cc087a1SEmmanuel Vadot description: 1358cc087a1SEmmanuel Vadot Boolean which specifies whether the GPIO2 pin 1368cc087a1SEmmanuel Vadot is configured as an output. If this property is not present the 1378cc087a1SEmmanuel Vadot pin will be configured as an input. 1388cc087a1SEmmanuel Vadot type: boolean 1398cc087a1SEmmanuel Vadot 1408cc087a1SEmmanuel Vadot cirrus,gpio2-src-select: 1418cc087a1SEmmanuel Vadot description: 1428cc087a1SEmmanuel Vadot Configures the function of the GPIO2 pin. 1438cc087a1SEmmanuel Vadot Note that the options are different from the GPIO1 pin. 1448cc087a1SEmmanuel Vadot 0 = High Impedance (Default) 1458cc087a1SEmmanuel Vadot 1 = GPIO 1468cc087a1SEmmanuel Vadot 2 = Open Drain INTB 1478cc087a1SEmmanuel Vadot 3 = MCLK input 1488cc087a1SEmmanuel Vadot 4 = Push-pull INTB (active low) 1498cc087a1SEmmanuel Vadot 5 = Push-pull INT (active high) 150cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1518cc087a1SEmmanuel Vadot minimum: 0 1528cc087a1SEmmanuel Vadot maximum: 5 1538cc087a1SEmmanuel Vadot 1548cc087a1SEmmanuel Vadotrequired: 1558cc087a1SEmmanuel Vadot - compatible 1568cc087a1SEmmanuel Vadot - reg 1578cc087a1SEmmanuel Vadot - "#sound-dai-cells" 158d5b0e70fSEmmanuel Vadot 159d5b0e70fSEmmanuel VadotallOf: 1608bab661aSEmmanuel Vadot - $ref: dai-common.yaml# 161d5b0e70fSEmmanuel Vadot - if: 162d5b0e70fSEmmanuel Vadot properties: 163d5b0e70fSEmmanuel Vadot cirrus,boost-type: 164d5b0e70fSEmmanuel Vadot const: 0 165d5b0e70fSEmmanuel Vadot then: 166d5b0e70fSEmmanuel Vadot required: 1678cc087a1SEmmanuel Vadot - cirrus,boost-peak-milliamp 1688cc087a1SEmmanuel Vadot - cirrus,boost-ind-nanohenry 1698cc087a1SEmmanuel Vadot - cirrus,boost-cap-microfarad 170d5b0e70fSEmmanuel Vadot else: 171d5b0e70fSEmmanuel Vadot if: 172d5b0e70fSEmmanuel Vadot properties: 173d5b0e70fSEmmanuel Vadot cirrus,boost-type: 174d5b0e70fSEmmanuel Vadot const: 1 175d5b0e70fSEmmanuel Vadot then: 176d5b0e70fSEmmanuel Vadot required: 177d5b0e70fSEmmanuel Vadot - cirrus,gpio1-output-enable 178d5b0e70fSEmmanuel Vadot - cirrus,gpio1-src-select 179d5b0e70fSEmmanuel Vadot properties: 180d5b0e70fSEmmanuel Vadot cirrus,boost-peak-milliamp: false 181d5b0e70fSEmmanuel Vadot cirrus,boost-ind-nanohenry: false 182d5b0e70fSEmmanuel Vadot cirrus,boost-cap-microfarad: false 183d5b0e70fSEmmanuel Vadot cirrus,gpio1-src-select: 184d5b0e70fSEmmanuel Vadot enum: [1] 1858cc087a1SEmmanuel Vadot 1868bab661aSEmmanuel VadotunevaluatedProperties: false 1878cc087a1SEmmanuel Vadot 1888cc087a1SEmmanuel Vadotexamples: 1898cc087a1SEmmanuel Vadot - | 190cb7aa33aSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 191cb7aa33aSEmmanuel Vadot 1928cc087a1SEmmanuel Vadot spi { 1938cc087a1SEmmanuel Vadot #address-cells = <1>; 1948cc087a1SEmmanuel Vadot #size-cells = <0>; 1958cc087a1SEmmanuel Vadot 196cb7aa33aSEmmanuel Vadot cs35l41: speaker-amp@2 { 1978cc087a1SEmmanuel Vadot #sound-dai-cells = <1>; 1988cc087a1SEmmanuel Vadot compatible = "cirrus,cs35l41"; 1998cc087a1SEmmanuel Vadot reg = <2>; 2008cc087a1SEmmanuel Vadot VA-supply = <&dummy_vreg>; 2018cc087a1SEmmanuel Vadot VP-supply = <&dummy_vreg>; 202cb7aa33aSEmmanuel Vadot reset-gpios = <&gpio 110 GPIO_ACTIVE_HIGH>; 203d5b0e70fSEmmanuel Vadot 204d5b0e70fSEmmanuel Vadot cirrus,boost-type = <0>; 2058cc087a1SEmmanuel Vadot cirrus,boost-peak-milliamp = <4500>; 2068cc087a1SEmmanuel Vadot cirrus,boost-ind-nanohenry = <1000>; 2078cc087a1SEmmanuel Vadot cirrus,boost-cap-microfarad = <15>; 2088cc087a1SEmmanuel Vadot }; 2098cc087a1SEmmanuel Vadot }; 210