xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/cs35l35.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunCS35L35 Boosted Speaker Amplifier
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun  - compatible : "cirrus,cs35l35"
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun  - reg : the I2C address of the device for I2C
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun  - VA-supply, VP-supply : power supplies for the device,
10*4882a593Smuzhiyun    as covered in
11*4882a593Smuzhiyun    Documentation/devicetree/bindings/regulator/regulator.txt.
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun  - interrupts : IRQ line info CS35L35.
14*4882a593Smuzhiyun    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
15*4882a593Smuzhiyun    for further information relating to interrupt properties)
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun - cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
18*4882a593Smuzhiyun    in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunOptional properties:
21*4882a593Smuzhiyun  - reset-gpios : gpio used to reset the amplifier
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  - cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
24*4882a593Smuzhiyun  Stereo configuration
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
27*4882a593Smuzhiyun  0 = Data Packet received on Left I2S Channel
28*4882a593Smuzhiyun  1 = Data Packet received on Right I2S Channel
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
31*4882a593Smuzhiyun  0 = Data Packet received on Left I2S Channel
32*4882a593Smuzhiyun  1 = Data Packet received on Right I2S Channel
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun  - cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
35*4882a593Smuzhiyun  if 2 Devices share Boost BST_CTL
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun  - cirrus,external-boost : Boolean to specify the device is using an external
38*4882a593Smuzhiyun  boost supply, note that sharing a boost from another cs35l35 would constitute
39*4882a593Smuzhiyun  using an external supply for the slave device
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
42*4882a593Smuzhiyun  Table 3-10 of the datasheet lists drive-strength specifications
43*4882a593Smuzhiyun  0 = 1x (Default)
44*4882a593Smuzhiyun  1 = .5x
45*4882a593Smuzhiyun  - cirrus,sp-drv-unused : Determines how unused slots should be driven on the
46*4882a593Smuzhiyun  Serial Port.
47*4882a593Smuzhiyun  0 - Hi-Z
48*4882a593Smuzhiyun  2 - Drive 0's (Default)
49*4882a593Smuzhiyun  3 - Drive 1's
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun  - cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
52*4882a593Smuzhiyun  powers down with a rectification FET On or Off. If VSPK is supplied
53*4882a593Smuzhiyun  externally then FET is off.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
56*4882a593Smuzhiyun    converter's output voltage in mV. The range is from 2600mV to 9000mV with
57*4882a593Smuzhiyun    increments of 100mV.
58*4882a593Smuzhiyun    (Default) VP
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
61*4882a593Smuzhiyun  Configures the peak current by monitoring the current through the boost FET.
62*4882a593Smuzhiyun  Range starts at 1680mA and goes to a maximum of 4480mA with increments of
63*4882a593Smuzhiyun  110mA.
64*4882a593Smuzhiyun  (Default) 2.46 Amps
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun  - cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
67*4882a593Smuzhiyun  zero-cross
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunOptional H/G Algorithm sub-node:
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun  The cs35l35 node can have a single "cirrus,classh-internal-algo" sub-node
72*4882a593Smuzhiyun  that will disable automatic control of the internal H/G Algorithm.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun  It is strongly recommended that the Datasheet be referenced when adjusting
75*4882a593Smuzhiyun  or using these Class H Algorithm controls over the internal Algorithm.
76*4882a593Smuzhiyun  Serious damage can occur to the Device and surrounding components.
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun  - cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
79*4882a593Smuzhiyun  See Section 4.3 Internal Class H Algorithm in the Datasheet.
80*4882a593Smuzhiyun  If not used, the device manages the ClassH Algorithm internally.
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunOptional properties for the "cirrus,classh-internal-algo" Sub-node
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun  Section 7.29 Class H Control
85*4882a593Smuzhiyun  - cirrus,classh-bst-overide : Boolean
86*4882a593Smuzhiyun  - cirrus,classh-bst-max-limit
87*4882a593Smuzhiyun  - cirrus,classh-mem-depth
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun  Section 7.30 Class H Headroom Control
90*4882a593Smuzhiyun  - cirrus,classh-headroom
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun  Section 7.31 Class H Release Rate
93*4882a593Smuzhiyun  - cirrus,classh-release-rate
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun  Section 7.32 Class H Weak FET Drive Control
96*4882a593Smuzhiyun  - cirrus,classh-wk-fet-disable
97*4882a593Smuzhiyun  - cirrus,classh-wk-fet-delay
98*4882a593Smuzhiyun  - cirrus,classh-wk-fet-thld
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun  Section 7.34 Class H VP Control
101*4882a593Smuzhiyun  - cirrus,classh-vpch-auto
102*4882a593Smuzhiyun  - cirrus,classh-vpch-rate
103*4882a593Smuzhiyun  - cirrus,classh-vpch-man
104*4882a593Smuzhiyun
105*4882a593SmuzhiyunOptional Monitor Signal Format sub-node:
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
108*4882a593Smuzhiyun  for adjusting the Depth, Location and Frame of the Monitoring Signals
109*4882a593Smuzhiyun  for Algorithms.
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
114*4882a593Smuzhiyun  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
115*4882a593Smuzhiyun  for depth, location, and frame.
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun  If not used, the defaults for the 6 monitor signals is used.
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun  Sections 7.44 - 7.53 lists values for the depth, location, and frame
120*4882a593Smuzhiyun  for each monitoring signal.
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun  - cirrus,imon : 4 8 bit values to set the depth, location, frame and ADC
123*4882a593Smuzhiyun  scale of the IMON monitor signal.
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun  - cirrus,vmon : 3 8 bit values to set the depth, location, and frame
126*4882a593Smuzhiyun  of the VMON monitor signal.
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun  - cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
129*4882a593Smuzhiyun  of the VPMON monitor signal.
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun  - cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
132*4882a593Smuzhiyun  of the VBSTMON monitor signal
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun  - cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
135*4882a593Smuzhiyun  of the VPBRSTAT monitor signal
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun  - cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\
138*4882a593Smuzhiyun  of the ZEROFILL packet in the monitor signal
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunExample:
141*4882a593Smuzhiyun
142*4882a593Smuzhiyuncs35l35: cs35l35@20 {
143*4882a593Smuzhiyun	compatible = "cirrus,cs35l35";
144*4882a593Smuzhiyun	reg = <0x20>;
145*4882a593Smuzhiyun	VA-supply = <&dummy_vreg>;
146*4882a593Smuzhiyun	VP-supply = <&dummy_vreg>;
147*4882a593Smuzhiyun	reset-gpios = <&axi_gpio 54 0>;
148*4882a593Smuzhiyun	interrupt-parent = <&gpio8>;
149*4882a593Smuzhiyun	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
150*4882a593Smuzhiyun	cirrus,boost-ctl-millivolt = <9000>;
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun	cirrus,stereo-config;
153*4882a593Smuzhiyun	cirrus,audio-channel = <0x00>;
154*4882a593Smuzhiyun	cirrus,advisory-channel = <0x01>;
155*4882a593Smuzhiyun	cirrus,shared-boost;
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun	cirrus,classh-internal-algo {
158*4882a593Smuzhiyun		cirrus,classh-bst-overide;
159*4882a593Smuzhiyun		cirrus,classh-bst-max-limit = <0x01>;
160*4882a593Smuzhiyun		cirrus,classh-mem-depth = <0x01>;
161*4882a593Smuzhiyun		cirrus,classh-release-rate = <0x08>;
162*4882a593Smuzhiyun		cirrus,classh-headroom-millivolt = <0x0B>;
163*4882a593Smuzhiyun		cirrus,classh-wk-fet-disable = <0x01>;
164*4882a593Smuzhiyun		cirrus,classh-wk-fet-delay = <0x04>;
165*4882a593Smuzhiyun		cirrus,classh-wk-fet-thld = <0x01>;
166*4882a593Smuzhiyun		cirrus,classh-vpch-auto = <0x01>;
167*4882a593Smuzhiyun		cirrus,classh-vpch-rate = <0x02>;
168*4882a593Smuzhiyun		cirrus,classh-vpch-man = <0x05>;
169*4882a593Smuzhiyun	};
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun	/* Depth, Location, Frame */
172*4882a593Smuzhiyun	cirrus,monitor-signal-format {
173*4882a593Smuzhiyun		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
174*4882a593Smuzhiyun		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
175*4882a593Smuzhiyun		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
176*4882a593Smuzhiyun		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
177*4882a593Smuzhiyun		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
178*4882a593Smuzhiyun		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
179*4882a593Smuzhiyun	};
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun};
182