aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Schulman <james.schulman@cirrus.com>2016-11-07 15:38:38 -0500
committerMark Brown <broonie@kernel.org>2016-11-09 08:50:14 -0500
commitda16c55793539a8c83c81240984915ce6d0140fe (patch)
tree37f584fa3221bbcc4dfb89f19d06e5d5899aeaaa
parent2c394ca79604b404fe60218670ab301ecb758b34 (diff)
ASoC: cs42l42: Add devicetree bindings for CS42L42
Add devicetree bindings documentation file for Cirrus Logic CS42L42 codec. Signed-off-by: James Schulman <james.schulman@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/sound/cs42l42.txt110
1 files changed, 110 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/cs42l42.txt b/Documentation/devicetree/bindings/sound/cs42l42.txt
new file mode 100644
index 000000000000..9a2c5e2423d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs42l42.txt
@@ -0,0 +1,110 @@
1CS42L42 audio CODEC
2
3Required properties:
4
5 - compatible : "cirrus,cs42l42"
6
7 - reg : the I2C address of the device for I2C.
8
9 - VP-supply, VCP-supply, VD_FILT-supply, VL-supply, VA-supply :
10 power supplies for the device, as covered in
11 Documentation/devicetree/bindings/regulator/regulator.txt.
12
13Optional properties:
14
15 - reset-gpios : a GPIO spec for the reset pin. If specified, it will be
16 deasserted before communication to the codec starts.
17
18 - interrupt-parent : Specifies the phandle of the interrupt controller to
19 which the IRQs from CS42L42 are delivered to.
20
21 - interrupts : IRQ line info CS42L42.
22 (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
23 for further information relating to interrupt properties)
24
25 - cirrus,ts-inv : Boolean property. For jacks that invert the tip sense
26 polarity. Normal jacks will short tip sense pin to HS1 when headphones are
27 plugged in and leave tip sense floating when not plugged in. Inverting jacks
28 short tip sense when unplugged and float when plugged in.
29
30 0 = (Default) Non-inverted
31 1 = Inverted
32
33 - cirrus,ts-dbnc-rise : Debounce the rising edge of TIP_SENSE_PLUG. With no
34 debounce, the tip sense pin might be noisy on a plug event.
35
36 0 - 0ms,
37 1 - 125ms,
38 2 - 250ms,
39 3 - 500ms,
40 4 - 750ms,
41 5 - (Default) 1s,
42 6 - 1.25s,
43 7 - 1.5s,
44
45 - cirrus,ts-dbnc-fall : Debounce the falling edge of TIP_SENSE_UNPLUG.
46 With no debounce, the tip sense pin might be noisy on an unplug event.
47
48 0 - 0ms,
49 1 - 125ms,
50 2 - 250ms,
51 3 - 500ms,
52 4 - 750ms,
53 5 - (Default) 1s,
54 6 - 1.25s,
55 7 - 1.5s,
56
57 - cirrus,btn-det-init-dbnce : This sets how long the driver sleeps after
58 enabling button detection interrupts. After auto-detection and before
59 servicing button interrupts, the HS bias needs time to settle. If you
60 don't wait, there is possibility for erroneous button interrupt.
61
62 0ms - 200ms,
63 Default = 100ms
64
65 - cirrus,btn-det-event-dbnce : This sets how long the driver delays after
66 receiving a button press interrupt. With level detect interrupts, you want
67 to wait a small amount of time to make sure the button press is making a
68 clean connection with the bias resistors.
69
70 0ms - 20ms,
71 Default = 10ms
72
73 - cirrus,bias-lvls : For a level-detect headset button scheme, each button
74 will bias the mic pin to a certain voltage. To determine which button was
75 pressed, the driver will compare this biased voltage to sequential,
76 decreasing voltages and will stop when a comparator is tripped,
77 indicating a comparator voltage < bias voltage. This value represents a
78 percentage of the internally generated HS bias voltage. For different
79 hardware setups, a designer might want to tweak this. This is an array of
80 descending values for the comparator voltage.
81
82 Array of 4 values
83 Each 0-63
84 < x1 x2 x3 x4 >
85 Default = < 15 8 4 1>
86
87
88Example:
89
90cs42l42: cs42l42@48 {
91 compatible = "cirrus,cs42l42";
92 reg = <0x48>;
93 VA-supply = <&dummy_vreg>;
94 VP-supply = <&dummy_vreg>;
95 VCP-supply = <&dummy_vreg>;
96 VD_FILT-supply = <&dummy_vreg>;
97 VL-supply = <&dummy_vreg>;
98
99 reset-gpios = <&axi_gpio_0 1 0>;
100 interrupt-parent = <&gpio0>;
101 interrupts = <55 8>
102
103 cirrus,ts-inv = <0x00>;
104 cirrus,ts-dbnc-rise = <0x05>;
105 cirrus,ts-dbnc-fall = <0x00>;
106 cirrus,btn-det-init-dbnce = <100>;
107 cirrus,btn-det-event-dbnce = <10>;
108 cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;
109 cirrus,hs-bias-ramp-rate = <0x02>;
110}; \ No newline at end of file