xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/st,sta350.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSTA350 audio CODEC
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe driver for this device only supports I2C.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunRequired properties:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun  - compatible: "st,sta350"
8*4882a593Smuzhiyun  - reg: the I2C address of the device for I2C
9*4882a593Smuzhiyun  - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
10*4882a593Smuzhiyun		 deasserted before communication to the codec starts.
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun  - power-down-gpios: a GPIO spec for the power down pin. If specified,
13*4882a593Smuzhiyun		      it will be deasserted before communication to the codec
14*4882a593Smuzhiyun		      starts.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun  - vdd-dig-supply: regulator spec, providing 3.3V
17*4882a593Smuzhiyun  - vdd-pll-supply: regulator spec, providing 3.3V
18*4882a593Smuzhiyun  - vcc-supply: regulator spec, providing 5V - 26V
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunOptional properties:
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun  -  st,output-conf: number, Selects the output configuration:
23*4882a593Smuzhiyun	0: 2-channel (full-bridge) power, 2-channel data-out
24*4882a593Smuzhiyun	1: 2 (half-bridge). 1 (full-bridge) on-board power
25*4882a593Smuzhiyun	2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
26*4882a593Smuzhiyun	3: 1 Channel Mono-Parallel
27*4882a593Smuzhiyun	If parameter is missing, mode 0 will be enabled.
28*4882a593Smuzhiyun	This property has to be specified as '/bits/ 8' value.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun  -  st,ch1-output-mapping: Channel 1 output mapping
31*4882a593Smuzhiyun  -  st,ch2-output-mapping: Channel 2 output mapping
32*4882a593Smuzhiyun  -  st,ch3-output-mapping: Channel 3 output mapping
33*4882a593Smuzhiyun	0: Channel 1
34*4882a593Smuzhiyun	1: Channel 2
35*4882a593Smuzhiyun	2: Channel 3
36*4882a593Smuzhiyun	If parameter is missing, channel 1 is chosen.
37*4882a593Smuzhiyun	This properties have to be specified as '/bits/ 8' values.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun  -  st,thermal-warning-recover:
40*4882a593Smuzhiyun	If present, thermal warning recovery is enabled.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun  -  st,thermal-warning-adjustment:
43*4882a593Smuzhiyun	If present, thermal warning adjustment is enabled.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun  -  st,fault-detect-recovery:
46*4882a593Smuzhiyun	If present, then fault recovery will be enabled.
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun  -  st,ffx-power-output-mode: string
49*4882a593Smuzhiyun	The FFX power output mode selects how the FFX output timing is
50*4882a593Smuzhiyun	configured. Must be one of these values:
51*4882a593Smuzhiyun	  -  "drop-compensation"
52*4882a593Smuzhiyun	  -  "tapered-compensation"
53*4882a593Smuzhiyun	  -  "full-power-mode"
54*4882a593Smuzhiyun	  -  "variable-drop-compensation" (default)
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun  -  st,drop-compensation-ns: number
57*4882a593Smuzhiyun	Only required for "st,ffx-power-output-mode" ==
58*4882a593Smuzhiyun	"variable-drop-compensation".
59*4882a593Smuzhiyun	Specifies the drop compensation in nanoseconds.
60*4882a593Smuzhiyun	The value must be in the range of 0..300, and only
61*4882a593Smuzhiyun	multiples of 20 are allowed. Default is 140ns.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun  -  st,overcurrent-warning-adjustment:
64*4882a593Smuzhiyun	If present, overcurrent warning adjustment is enabled.
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun  -  st,max-power-use-mpcc:
67*4882a593Smuzhiyun	If present, then MPCC bits are used for MPC coefficients,
68*4882a593Smuzhiyun	otherwise standard MPC coefficients are used.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun  -  st,max-power-corr:
71*4882a593Smuzhiyun	If present, power bridge correction for THD reduction near maximum
72*4882a593Smuzhiyun	power output is enabled.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun  -  st,am-reduction-mode:
75*4882a593Smuzhiyun	If present, FFX mode runs in AM reduction mode, otherwise normal
76*4882a593Smuzhiyun	FFX mode is used.
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun  -  st,odd-pwm-speed-mode:
79*4882a593Smuzhiyun	If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
80*4882a593Smuzhiyun	channels. If not present, normal PWM spped mode (384 kHz) will be used.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun  -  st,distortion-compensation:
83*4882a593Smuzhiyun	If present, distortion compensation variable uses DCC coefficient.
84*4882a593Smuzhiyun	If not present, preset DC coefficient is used.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun  -  st,invalid-input-detect-mute:
87*4882a593Smuzhiyun	If present, automatic invalid input detect mute is enabled.
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun  -  st,activate-mute-output:
90*4882a593Smuzhiyun	If present, a mute output will be activated in ase the volume will
91*4882a593Smuzhiyun	reach a value lower than -76 dBFS.
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun  -  st,bridge-immediate-off:
94*4882a593Smuzhiyun	If present, the bridge will be switched off immediately after the
95*4882a593Smuzhiyun	power-down-gpio goes low. Otherwise, the bridge will wait for 13
96*4882a593Smuzhiyun	million clock cycles to pass before shutting down.
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun  -  st,noise-shape-dc-cut:
99*4882a593Smuzhiyun	If present, the noise-shaping technique on the DC cutoff filter are
100*4882a593Smuzhiyun	enabled.
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun  -  st,powerdown-master-volume:
103*4882a593Smuzhiyun	If present, the power-down pin and I2C power-down functions will
104*4882a593Smuzhiyun	act on the master volume. Otherwise, the functions will act on the
105*4882a593Smuzhiyun	mute commands.
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun  -  st,powerdown-delay-divider:
108*4882a593Smuzhiyun	If present, the bridge power-down time will be divided by the provided
109*4882a593Smuzhiyun	value. If not specified, a divider of 1 will be used. Allowed values
110*4882a593Smuzhiyun	are 1, 2, 4, 8, 16, 32, 64 and 128.
111*4882a593Smuzhiyun	This property has to be specified as '/bits/ 8' value.
112*4882a593Smuzhiyun
113*4882a593SmuzhiyunExample:
114*4882a593Smuzhiyun
115*4882a593Smuzhiyuncodec: sta350@38 {
116*4882a593Smuzhiyun	compatible = "st,sta350";
117*4882a593Smuzhiyun	reg = <0x1c>;
118*4882a593Smuzhiyun	reset-gpios = <&gpio1 19 0>;
119*4882a593Smuzhiyun	power-down-gpios = <&gpio1 16 0>;
120*4882a593Smuzhiyun	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
121*4882a593Smuzhiyun						// (full-bridge) power,
122*4882a593Smuzhiyun						// 2-channel data-out
123*4882a593Smuzhiyun	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
124*4882a593Smuzhiyun	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
125*4882a593Smuzhiyun	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
126*4882a593Smuzhiyun	st,max-power-correction;		// enables power bridge
127*4882a593Smuzhiyun						// correction for THD reduction
128*4882a593Smuzhiyun						// near maximum power output
129*4882a593Smuzhiyun	st,invalid-input-detect-mute;		// mute if no valid digital
130*4882a593Smuzhiyun						// audio signal is provided.
131*4882a593Smuzhiyun};
132