1*c66ec88fSEmmanuel VadotSTA32X audio CODEC
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe driver for this device only supports I2C.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotRequired properties:
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadot  - compatible: "st,sta32x"
8*c66ec88fSEmmanuel Vadot  - reg: the I2C address of the device for I2C
9*c66ec88fSEmmanuel Vadot  - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
10*c66ec88fSEmmanuel Vadot		 deasserted before communication to the codec starts.
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot  - power-down-gpios: a GPIO spec for the power down pin. If specified,
13*c66ec88fSEmmanuel Vadot		      it will be deasserted before communication to the codec
14*c66ec88fSEmmanuel Vadot		      starts.
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel Vadot  - Vdda-supply: regulator spec, providing 3.3V
17*c66ec88fSEmmanuel Vadot  - Vdd3-supply: regulator spec, providing 3.3V
18*c66ec88fSEmmanuel Vadot  - Vcc-supply: regulator spec, providing 5V - 26V
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotOptional properties:
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot  - clocks, clock-names: Clock specifier for XTI input clock.
23*c66ec88fSEmmanuel Vadot	If specified, the clock will be enabled when the codec is probed,
24*c66ec88fSEmmanuel Vadot	and disabled when it is removed. The 'clock-names' must be set to 'xti'.
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadot  -  st,output-conf: number, Selects the output configuration:
27*c66ec88fSEmmanuel Vadot	0: 2-channel (full-bridge) power, 2-channel data-out
28*c66ec88fSEmmanuel Vadot	1: 2 (half-bridge). 1 (full-bridge) on-board power
29*c66ec88fSEmmanuel Vadot	2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
30*c66ec88fSEmmanuel Vadot	3: 1 Channel Mono-Parallel
31*c66ec88fSEmmanuel Vadot	If parameter is missing, mode 0 will be enabled.
32*c66ec88fSEmmanuel Vadot	This property has to be specified as '/bits/ 8' value.
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot  -  st,ch1-output-mapping: Channel 1 output mapping
35*c66ec88fSEmmanuel Vadot  -  st,ch2-output-mapping: Channel 2 output mapping
36*c66ec88fSEmmanuel Vadot  -  st,ch3-output-mapping: Channel 3 output mapping
37*c66ec88fSEmmanuel Vadot	0: Channel 1
38*c66ec88fSEmmanuel Vadot	1: Channel 2
39*c66ec88fSEmmanuel Vadot	2: Channel 3
40*c66ec88fSEmmanuel Vadot	If parameter is missing, channel 1 is chosen.
41*c66ec88fSEmmanuel Vadot	This properties have to be specified as '/bits/ 8' values.
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel Vadot  -  st,thermal-warning-recover:
44*c66ec88fSEmmanuel Vadot	If present, thermal warning recovery is enabled.
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel Vadot  - st,fault-detect-recovery:
47*c66ec88fSEmmanuel Vadot	If present, fault detect recovery is enabled.
48*c66ec88fSEmmanuel Vadot
49*c66ec88fSEmmanuel Vadot  -  st,thermal-warning-adjustment:
50*c66ec88fSEmmanuel Vadot	If present, thermal warning adjustment is enabled.
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot  -  st,fault-detect-recovery:
53*c66ec88fSEmmanuel Vadot	If present, then fault recovery will be enabled.
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot  -  st,drop-compensation-ns: number
56*c66ec88fSEmmanuel Vadot	Only required for "st,ffx-power-output-mode" ==
57*c66ec88fSEmmanuel Vadot	"variable-drop-compensation".
58*c66ec88fSEmmanuel Vadot	Specifies the drop compensation in nanoseconds.
59*c66ec88fSEmmanuel Vadot	The value must be in the range of 0..300, and only
60*c66ec88fSEmmanuel Vadot	multiples of 20 are allowed. Default is 140ns.
61*c66ec88fSEmmanuel Vadot
62*c66ec88fSEmmanuel Vadot  -  st,max-power-use-mpcc:
63*c66ec88fSEmmanuel Vadot	If present, then MPCC bits are used for MPC coefficients,
64*c66ec88fSEmmanuel Vadot	otherwise standard MPC coefficients are used.
65*c66ec88fSEmmanuel Vadot
66*c66ec88fSEmmanuel Vadot  -  st,max-power-corr:
67*c66ec88fSEmmanuel Vadot	If present, power bridge correction for THD reduction near maximum
68*c66ec88fSEmmanuel Vadot	power output is enabled.
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot  -  st,am-reduction-mode:
71*c66ec88fSEmmanuel Vadot	If present, FFX mode runs in AM reduction mode, otherwise normal
72*c66ec88fSEmmanuel Vadot	FFX mode is used.
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadot  -  st,odd-pwm-speed-mode:
75*c66ec88fSEmmanuel Vadot	If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
76*c66ec88fSEmmanuel Vadot	channels. If not present, normal PWM spped mode (384 kHz) will be used.
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot  -  st,invalid-input-detect-mute:
79*c66ec88fSEmmanuel Vadot	If present, automatic invalid input detect mute is enabled.
80*c66ec88fSEmmanuel Vadot
81*c66ec88fSEmmanuel VadotExample:
82*c66ec88fSEmmanuel Vadot
83*c66ec88fSEmmanuel Vadotcodec: sta32x@38 {
84*c66ec88fSEmmanuel Vadot	compatible = "st,sta32x";
85*c66ec88fSEmmanuel Vadot	reg = <0x1c>;
86*c66ec88fSEmmanuel Vadot	clocks = <&clock>;
87*c66ec88fSEmmanuel Vadot	clock-names = "xti";
88*c66ec88fSEmmanuel Vadot	reset-gpios = <&gpio1 19 0>;
89*c66ec88fSEmmanuel Vadot	power-down-gpios = <&gpio1 16 0>;
90*c66ec88fSEmmanuel Vadot	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
91*c66ec88fSEmmanuel Vadot						// (full-bridge) power,
92*c66ec88fSEmmanuel Vadot						// 2-channel data-out
93*c66ec88fSEmmanuel Vadot	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
94*c66ec88fSEmmanuel Vadot	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
95*c66ec88fSEmmanuel Vadot	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
96*c66ec88fSEmmanuel Vadot	st,max-power-correction;		// enables power bridge
97*c66ec88fSEmmanuel Vadot						// correction for THD reduction
98*c66ec88fSEmmanuel Vadot						// near maximum power output
99*c66ec88fSEmmanuel Vadot	st,invalid-input-detect-mute;		// mute if no valid digital
100*c66ec88fSEmmanuel Vadot						// audio signal is provided.
101*c66ec88fSEmmanuel Vadot};
102