12439ea1fSSven BrandauSTA350 audio CODEC
22439ea1fSSven Brandau
32439ea1fSSven BrandauThe driver for this device only supports I2C.
42439ea1fSSven Brandau
52439ea1fSSven BrandauRequired properties:
62439ea1fSSven Brandau
72439ea1fSSven Brandau  - compatible: "st,sta350"
82439ea1fSSven Brandau  - reg: the I2C address of the device for I2C
92439ea1fSSven Brandau  - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
102439ea1fSSven Brandau		 deasserted before communication to the codec starts.
112439ea1fSSven Brandau
122439ea1fSSven Brandau  - power-down-gpios: a GPIO spec for the power down pin. If specified,
132439ea1fSSven Brandau		      it will be deasserted before communication to the codec
142439ea1fSSven Brandau		      starts.
152439ea1fSSven Brandau
162439ea1fSSven Brandau  - vdd-dig-supply: regulator spec, providing 3.3V
172439ea1fSSven Brandau  - vdd-pll-supply: regulator spec, providing 3.3V
182439ea1fSSven Brandau  - vcc-supply: regulator spec, providing 5V - 26V
192439ea1fSSven Brandau
202439ea1fSSven BrandauOptional properties:
212439ea1fSSven Brandau
222439ea1fSSven Brandau  -  st,output-conf: number, Selects the output configuration:
232439ea1fSSven Brandau	0: 2-channel (full-bridge) power, 2-channel data-out
242439ea1fSSven Brandau	1: 2 (half-bridge). 1 (full-bridge) on-board power
252439ea1fSSven Brandau	2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
262439ea1fSSven Brandau	3: 1 Channel Mono-Parallel
272439ea1fSSven Brandau	If parameter is missing, mode 0 will be enabled.
2809af62ffSDaniel Mack	This property has to be specified as '/bits/ 8' value.
292439ea1fSSven Brandau
302439ea1fSSven Brandau  -  st,ch1-output-mapping: Channel 1 output mapping
312439ea1fSSven Brandau  -  st,ch2-output-mapping: Channel 2 output mapping
322439ea1fSSven Brandau  -  st,ch3-output-mapping: Channel 3 output mapping
332439ea1fSSven Brandau	0: Channel 1
342439ea1fSSven Brandau	1: Channel 2
352439ea1fSSven Brandau	2: Channel 3
3624488c39SHayato Suzuki	If parameter is missing, channel 1 is chosen.
3709af62ffSDaniel Mack	This properties have to be specified as '/bits/ 8' values.
382439ea1fSSven Brandau
392439ea1fSSven Brandau  -  st,thermal-warning-recover:
402439ea1fSSven Brandau	If present, thermal warning recovery is enabled.
412439ea1fSSven Brandau
422439ea1fSSven Brandau  -  st,thermal-warning-adjustment:
432439ea1fSSven Brandau	If present, thermal warning adjustment is enabled.
442439ea1fSSven Brandau
452439ea1fSSven Brandau  -  st,fault-detect-recovery:
462439ea1fSSven Brandau	If present, then fault recovery will be enabled.
472439ea1fSSven Brandau
482439ea1fSSven Brandau  -  st,ffx-power-output-mode: string
492439ea1fSSven Brandau	The FFX power output mode selects how the FFX output timing is
502439ea1fSSven Brandau	configured. Must be one of these values:
512439ea1fSSven Brandau	  -  "drop-compensation"
522439ea1fSSven Brandau	  -  "tapered-compensation"
532439ea1fSSven Brandau	  -  "full-power-mode"
542439ea1fSSven Brandau	  -  "variable-drop-compensation" (default)
552439ea1fSSven Brandau
562439ea1fSSven Brandau  -  st,drop-compensation-ns: number
572439ea1fSSven Brandau	Only required for "st,ffx-power-output-mode" ==
582439ea1fSSven Brandau	"variable-drop-compensation".
592439ea1fSSven Brandau	Specifies the drop compensation in nanoseconds.
602439ea1fSSven Brandau	The value must be in the range of 0..300, and only
612439ea1fSSven Brandau	multiples of 20 are allowed. Default is 140ns.
622439ea1fSSven Brandau
632439ea1fSSven Brandau  -  st,overcurrent-warning-adjustment:
642439ea1fSSven Brandau	If present, overcurrent warning adjustment is enabled.
652439ea1fSSven Brandau
662439ea1fSSven Brandau  -  st,max-power-use-mpcc:
672439ea1fSSven Brandau	If present, then MPCC bits are used for MPC coefficients,
682439ea1fSSven Brandau	otherwise standard MPC coefficients are used.
692439ea1fSSven Brandau
702439ea1fSSven Brandau  -  st,max-power-corr:
712439ea1fSSven Brandau	If present, power bridge correction for THD reduction near maximum
722439ea1fSSven Brandau	power output is enabled.
732439ea1fSSven Brandau
742439ea1fSSven Brandau  -  st,am-reduction-mode:
752439ea1fSSven Brandau	If present, FFX mode runs in AM reduction mode, otherwise normal
762439ea1fSSven Brandau	FFX mode is used.
772439ea1fSSven Brandau
782439ea1fSSven Brandau  -  st,odd-pwm-speed-mode:
792439ea1fSSven Brandau	If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
802439ea1fSSven Brandau	channels. If not present, normal PWM spped mode (384 kHz) will be used.
812439ea1fSSven Brandau
822439ea1fSSven Brandau  -  st,distortion-compensation:
832439ea1fSSven Brandau	If present, distortion compensation variable uses DCC coefficient.
842439ea1fSSven Brandau	If not present, preset DC coefficient is used.
852439ea1fSSven Brandau
862439ea1fSSven Brandau  -  st,invalid-input-detect-mute:
8709af62ffSDaniel Mack	If present, automatic invalid input detect mute is enabled.
882439ea1fSSven Brandau
897c2fccccSDaniel Mack  -  st,activate-mute-output:
907c2fccccSDaniel Mack	If present, a mute output will be activated in ase the volume will
917c2fccccSDaniel Mack	reach a value lower than -76 dBFS.
922439ea1fSSven Brandau
937c2fccccSDaniel Mack  -  st,bridge-immediate-off:
947c2fccccSDaniel Mack	If present, the bridge will be switched off immediately after the
957c2fccccSDaniel Mack	power-down-gpio goes low. Otherwise, the bridge will wait for 13
967c2fccccSDaniel Mack	million clock cycles to pass before shutting down.
977c2fccccSDaniel Mack
987c2fccccSDaniel Mack  -  st,noise-shape-dc-cut:
997c2fccccSDaniel Mack	If present, the noise-shaping technique on the DC cutoff filter are
1007c2fccccSDaniel Mack	enabled.
1017c2fccccSDaniel Mack
1027c2fccccSDaniel Mack  -  st,powerdown-master-volume:
1037c2fccccSDaniel Mack	If present, the power-down pin and I2C power-down functions will
1047c2fccccSDaniel Mack	act on the master volume. Otherwise, the functions will act on the
1057c2fccccSDaniel Mack	mute commands.
1067c2fccccSDaniel Mack
1077c2fccccSDaniel Mack  -  st,powerdown-delay-divider:
1087c2fccccSDaniel Mack	If present, the bridge power-down time will be divided by the provided
1097c2fccccSDaniel Mack	value. If not specified, a divider of 1 will be used. Allowed values
1107c2fccccSDaniel Mack	are 1, 2, 4, 8, 16, 32, 64 and 128.
1117c2fccccSDaniel Mack	This property has to be specified as '/bits/ 8' value.
1122439ea1fSSven Brandau
1132439ea1fSSven BrandauExample:
1142439ea1fSSven Brandau
1152439ea1fSSven Brandaucodec: sta350@38 {
1162439ea1fSSven Brandau	compatible = "st,sta350";
1172439ea1fSSven Brandau	reg = <0x1c>;
1182439ea1fSSven Brandau	reset-gpios = <&gpio1 19 0>;
1192439ea1fSSven Brandau	power-down-gpios = <&gpio1 16 0>;
12009af62ffSDaniel Mack	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
1212439ea1fSSven Brandau						// (full-bridge) power,
1222439ea1fSSven Brandau						// 2-channel data-out
12309af62ffSDaniel Mack	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
12409af62ffSDaniel Mack	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
12509af62ffSDaniel Mack	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
1262439ea1fSSven Brandau	st,max-power-correction;		// enables power bridge
1272439ea1fSSven Brandau						// correction for THD reduction
1282439ea1fSSven Brandau						// near maximum power output
1292439ea1fSSven Brandau	st,invalid-input-detect-mute;		// mute if no valid digital
1302439ea1fSSven Brandau						// audio signal is provided.
1312439ea1fSSven Brandau};
132