18c2ecf20Sopenharmony_ciSTA32X audio CODEC
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe driver for this device only supports I2C.
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciRequired properties:
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci  - compatible: "st,sta32x"
88c2ecf20Sopenharmony_ci  - reg: the I2C address of the device for I2C
98c2ecf20Sopenharmony_ci  - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
108c2ecf20Sopenharmony_ci		 deasserted before communication to the codec starts.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci  - power-down-gpios: a GPIO spec for the power down pin. If specified,
138c2ecf20Sopenharmony_ci		      it will be deasserted before communication to the codec
148c2ecf20Sopenharmony_ci		      starts.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci  - Vdda-supply: regulator spec, providing 3.3V
178c2ecf20Sopenharmony_ci  - Vdd3-supply: regulator spec, providing 3.3V
188c2ecf20Sopenharmony_ci  - Vcc-supply: regulator spec, providing 5V - 26V
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciOptional properties:
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci  - clocks, clock-names: Clock specifier for XTI input clock.
238c2ecf20Sopenharmony_ci	If specified, the clock will be enabled when the codec is probed,
248c2ecf20Sopenharmony_ci	and disabled when it is removed. The 'clock-names' must be set to 'xti'.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  -  st,output-conf: number, Selects the output configuration:
278c2ecf20Sopenharmony_ci	0: 2-channel (full-bridge) power, 2-channel data-out
288c2ecf20Sopenharmony_ci	1: 2 (half-bridge). 1 (full-bridge) on-board power
298c2ecf20Sopenharmony_ci	2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
308c2ecf20Sopenharmony_ci	3: 1 Channel Mono-Parallel
318c2ecf20Sopenharmony_ci	If parameter is missing, mode 0 will be enabled.
328c2ecf20Sopenharmony_ci	This property has to be specified as '/bits/ 8' value.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  -  st,ch1-output-mapping: Channel 1 output mapping
358c2ecf20Sopenharmony_ci  -  st,ch2-output-mapping: Channel 2 output mapping
368c2ecf20Sopenharmony_ci  -  st,ch3-output-mapping: Channel 3 output mapping
378c2ecf20Sopenharmony_ci	0: Channel 1
388c2ecf20Sopenharmony_ci	1: Channel 2
398c2ecf20Sopenharmony_ci	2: Channel 3
408c2ecf20Sopenharmony_ci	If parameter is missing, channel 1 is chosen.
418c2ecf20Sopenharmony_ci	This properties have to be specified as '/bits/ 8' values.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci  -  st,thermal-warning-recover:
448c2ecf20Sopenharmony_ci	If present, thermal warning recovery is enabled.
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci  - st,fault-detect-recovery:
478c2ecf20Sopenharmony_ci	If present, fault detect recovery is enabled.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci  -  st,thermal-warning-adjustment:
508c2ecf20Sopenharmony_ci	If present, thermal warning adjustment is enabled.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci  -  st,fault-detect-recovery:
538c2ecf20Sopenharmony_ci	If present, then fault recovery will be enabled.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci  -  st,drop-compensation-ns: number
568c2ecf20Sopenharmony_ci	Only required for "st,ffx-power-output-mode" ==
578c2ecf20Sopenharmony_ci	"variable-drop-compensation".
588c2ecf20Sopenharmony_ci	Specifies the drop compensation in nanoseconds.
598c2ecf20Sopenharmony_ci	The value must be in the range of 0..300, and only
608c2ecf20Sopenharmony_ci	multiples of 20 are allowed. Default is 140ns.
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci  -  st,max-power-use-mpcc:
638c2ecf20Sopenharmony_ci	If present, then MPCC bits are used for MPC coefficients,
648c2ecf20Sopenharmony_ci	otherwise standard MPC coefficients are used.
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci  -  st,max-power-corr:
678c2ecf20Sopenharmony_ci	If present, power bridge correction for THD reduction near maximum
688c2ecf20Sopenharmony_ci	power output is enabled.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci  -  st,am-reduction-mode:
718c2ecf20Sopenharmony_ci	If present, FFX mode runs in AM reduction mode, otherwise normal
728c2ecf20Sopenharmony_ci	FFX mode is used.
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci  -  st,odd-pwm-speed-mode:
758c2ecf20Sopenharmony_ci	If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
768c2ecf20Sopenharmony_ci	channels. If not present, normal PWM spped mode (384 kHz) will be used.
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci  -  st,invalid-input-detect-mute:
798c2ecf20Sopenharmony_ci	If present, automatic invalid input detect mute is enabled.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciExample:
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_cicodec: sta32x@38 {
848c2ecf20Sopenharmony_ci	compatible = "st,sta32x";
858c2ecf20Sopenharmony_ci	reg = <0x1c>;
868c2ecf20Sopenharmony_ci	clocks = <&clock>;
878c2ecf20Sopenharmony_ci	clock-names = "xti";
888c2ecf20Sopenharmony_ci	reset-gpios = <&gpio1 19 0>;
898c2ecf20Sopenharmony_ci	power-down-gpios = <&gpio1 16 0>;
908c2ecf20Sopenharmony_ci	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
918c2ecf20Sopenharmony_ci						// (full-bridge) power,
928c2ecf20Sopenharmony_ci						// 2-channel data-out
938c2ecf20Sopenharmony_ci	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
948c2ecf20Sopenharmony_ci	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
958c2ecf20Sopenharmony_ci	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
968c2ecf20Sopenharmony_ci	st,max-power-correction;		// enables power bridge
978c2ecf20Sopenharmony_ci						// correction for THD reduction
988c2ecf20Sopenharmony_ci						// near maximum power output
998c2ecf20Sopenharmony_ci	st,invalid-input-detect-mute;		// mute if no valid digital
1008c2ecf20Sopenharmony_ci						// audio signal is provided.
1018c2ecf20Sopenharmony_ci};
102