xref: /freebsd/sys/contrib/device-tree/Bindings/sound/cirrus,cs35l41.yaml (revision b197d4b893974c9eb4d7b38704c6d5c486235d6f)
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,gpio1-polarity-invert:
79    description:
80      Boolean which specifies whether the GPIO1
81      level is inverted. If this property is not present the level is not inverted.
82    type: boolean
83
84  cirrus,gpio1-output-enable:
85    description:
86      Boolean which specifies whether the GPIO1 pin
87      is configured as an output. If this property is not present the
88      pin will be configured as an input.
89    type: boolean
90
91  cirrus,gpio1-src-select:
92    description:
93      Configures the function of the GPIO1 pin.
94      Note that the options are different from the GPIO2 pin
95      0 = High Impedance (Default)
96      1 = GPIO
97      2 = Sync
98      3 = MCLK input
99    $ref: "/schemas/types.yaml#/definitions/uint32"
100    minimum: 0
101    maximum: 3
102
103  cirrus,gpio2-polarity-invert:
104    description:
105      Boolean which specifies whether the GPIO2
106      level is inverted. If this property is not present the level is not inverted.
107    type: boolean
108
109  cirrus,gpio2-output-enable:
110    description:
111      Boolean which specifies whether the GPIO2 pin
112      is configured as an output. If this property is not present the
113      pin will be configured as an input.
114    type: boolean
115
116  cirrus,gpio2-src-select:
117    description:
118      Configures the function of the GPIO2 pin.
119      Note that the options are different from the GPIO1 pin.
120      0 = High Impedance (Default)
121      1 = GPIO
122      2 = Open Drain INTB
123      3 = MCLK input
124      4 = Push-pull INTB (active low)
125      5 = Push-pull INT (active high)
126    $ref: "/schemas/types.yaml#/definitions/uint32"
127    minimum: 0
128    maximum: 5
129
130required:
131  - compatible
132  - reg
133  - "#sound-dai-cells"
134  - cirrus,boost-peak-milliamp
135  - cirrus,boost-ind-nanohenry
136  - cirrus,boost-cap-microfarad
137
138additionalProperties: false
139
140examples:
141  - |
142    spi {
143        #address-cells = <1>;
144        #size-cells = <0>;
145
146        cs35l41: cs35l41@2 {
147          #sound-dai-cells = <1>;
148          compatible = "cirrus,cs35l41";
149          reg = <2>;
150          VA-supply = <&dummy_vreg>;
151          VP-supply = <&dummy_vreg>;
152          reset-gpios = <&gpio 110 0>;
153          cirrus,boost-peak-milliamp = <4500>;
154          cirrus,boost-ind-nanohenry = <1000>;
155          cirrus,boost-cap-microfarad = <15>;
156        };
157    };
158