162306a36Sopenharmony_ciSTA32X audio CODEC 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe driver for this device only supports I2C. 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciRequired properties: 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci - compatible: "st,sta32x" 862306a36Sopenharmony_ci - reg: the I2C address of the device for I2C 962306a36Sopenharmony_ci - reset-gpios: a GPIO spec for the reset pin. If specified, it will be 1062306a36Sopenharmony_ci deasserted before communication to the codec starts. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci - power-down-gpios: a GPIO spec for the power down pin. If specified, 1362306a36Sopenharmony_ci it will be deasserted before communication to the codec 1462306a36Sopenharmony_ci starts. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci - Vdda-supply: regulator spec, providing 3.3V 1762306a36Sopenharmony_ci - Vdd3-supply: regulator spec, providing 3.3V 1862306a36Sopenharmony_ci - Vcc-supply: regulator spec, providing 5V - 26V 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciOptional properties: 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci - clocks, clock-names: Clock specifier for XTI input clock. 2362306a36Sopenharmony_ci If specified, the clock will be enabled when the codec is probed, 2462306a36Sopenharmony_ci and disabled when it is removed. The 'clock-names' must be set to 'xti'. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci - st,output-conf: number, Selects the output configuration: 2762306a36Sopenharmony_ci 0: 2-channel (full-bridge) power, 2-channel data-out 2862306a36Sopenharmony_ci 1: 2 (half-bridge). 1 (full-bridge) on-board power 2962306a36Sopenharmony_ci 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX 3062306a36Sopenharmony_ci 3: 1 Channel Mono-Parallel 3162306a36Sopenharmony_ci If parameter is missing, mode 0 will be enabled. 3262306a36Sopenharmony_ci This property has to be specified as '/bits/ 8' value. 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci - st,ch1-output-mapping: Channel 1 output mapping 3562306a36Sopenharmony_ci - st,ch2-output-mapping: Channel 2 output mapping 3662306a36Sopenharmony_ci - st,ch3-output-mapping: Channel 3 output mapping 3762306a36Sopenharmony_ci 0: Channel 1 3862306a36Sopenharmony_ci 1: Channel 2 3962306a36Sopenharmony_ci 2: Channel 3 4062306a36Sopenharmony_ci If parameter is missing, channel 1 is chosen. 4162306a36Sopenharmony_ci This properties have to be specified as '/bits/ 8' values. 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci - st,thermal-warning-recover: 4462306a36Sopenharmony_ci If present, thermal warning recovery is enabled. 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci - st,fault-detect-recovery: 4762306a36Sopenharmony_ci If present, fault detect recovery is enabled. 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci - st,thermal-warning-adjustment: 5062306a36Sopenharmony_ci If present, thermal warning adjustment is enabled. 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci - st,fault-detect-recovery: 5362306a36Sopenharmony_ci If present, then fault recovery will be enabled. 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci - st,drop-compensation-ns: number 5662306a36Sopenharmony_ci Only required for "st,ffx-power-output-mode" == 5762306a36Sopenharmony_ci "variable-drop-compensation". 5862306a36Sopenharmony_ci Specifies the drop compensation in nanoseconds. 5962306a36Sopenharmony_ci The value must be in the range of 0..300, and only 6062306a36Sopenharmony_ci multiples of 20 are allowed. Default is 140ns. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci - st,max-power-use-mpcc: 6362306a36Sopenharmony_ci If present, then MPCC bits are used for MPC coefficients, 6462306a36Sopenharmony_ci otherwise standard MPC coefficients are used. 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci - st,max-power-corr: 6762306a36Sopenharmony_ci If present, power bridge correction for THD reduction near maximum 6862306a36Sopenharmony_ci power output is enabled. 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci - st,am-reduction-mode: 7162306a36Sopenharmony_ci If present, FFX mode runs in AM reduction mode, otherwise normal 7262306a36Sopenharmony_ci FFX mode is used. 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci - st,odd-pwm-speed-mode: 7562306a36Sopenharmony_ci If present, PWM speed mode run on odd speed mode (341.3 kHz) on all 7662306a36Sopenharmony_ci channels. If not present, normal PWM spped mode (384 kHz) will be used. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci - st,invalid-input-detect-mute: 7962306a36Sopenharmony_ci If present, automatic invalid input detect mute is enabled. 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ciExample: 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_cicodec: sta32x@38 { 8462306a36Sopenharmony_ci compatible = "st,sta32x"; 8562306a36Sopenharmony_ci reg = <0x1c>; 8662306a36Sopenharmony_ci clocks = <&clock>; 8762306a36Sopenharmony_ci clock-names = "xti"; 8862306a36Sopenharmony_ci reset-gpios = <&gpio1 19 0>; 8962306a36Sopenharmony_ci power-down-gpios = <&gpio1 16 0>; 9062306a36Sopenharmony_ci st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel 9162306a36Sopenharmony_ci // (full-bridge) power, 9262306a36Sopenharmony_ci // 2-channel data-out 9362306a36Sopenharmony_ci st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1 9462306a36Sopenharmony_ci st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1 9562306a36Sopenharmony_ci st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1 9662306a36Sopenharmony_ci st,max-power-correction; // enables power bridge 9762306a36Sopenharmony_ci // correction for THD reduction 9862306a36Sopenharmony_ci // near maximum power output 9962306a36Sopenharmony_ci st,invalid-input-detect-mute; // mute if no valid digital 10062306a36Sopenharmony_ci // audio signal is provided. 10162306a36Sopenharmony_ci}; 102