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