162306a36Sopenharmony_ciSTA350 audio CODEC 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe driver for this device only supports I2C. 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciRequired properties: 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci - compatible: "st,sta350" 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 - vdd-dig-supply: regulator spec, providing 3.3V 1762306a36Sopenharmony_ci - vdd-pll-supply: regulator spec, providing 3.3V 1862306a36Sopenharmony_ci - vcc-supply: regulator spec, providing 5V - 26V 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciOptional properties: 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci - st,output-conf: number, Selects the output configuration: 2362306a36Sopenharmony_ci 0: 2-channel (full-bridge) power, 2-channel data-out 2462306a36Sopenharmony_ci 1: 2 (half-bridge). 1 (full-bridge) on-board power 2562306a36Sopenharmony_ci 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX 2662306a36Sopenharmony_ci 3: 1 Channel Mono-Parallel 2762306a36Sopenharmony_ci If parameter is missing, mode 0 will be enabled. 2862306a36Sopenharmony_ci This property has to be specified as '/bits/ 8' value. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci - st,ch1-output-mapping: Channel 1 output mapping 3162306a36Sopenharmony_ci - st,ch2-output-mapping: Channel 2 output mapping 3262306a36Sopenharmony_ci - st,ch3-output-mapping: Channel 3 output mapping 3362306a36Sopenharmony_ci 0: Channel 1 3462306a36Sopenharmony_ci 1: Channel 2 3562306a36Sopenharmony_ci 2: Channel 3 3662306a36Sopenharmony_ci If parameter is missing, channel 1 is chosen. 3762306a36Sopenharmony_ci This properties have to be specified as '/bits/ 8' values. 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci - st,thermal-warning-recover: 4062306a36Sopenharmony_ci If present, thermal warning recovery is enabled. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci - st,thermal-warning-adjustment: 4362306a36Sopenharmony_ci If present, thermal warning adjustment is enabled. 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci - st,fault-detect-recovery: 4662306a36Sopenharmony_ci If present, then fault recovery will be enabled. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci - st,ffx-power-output-mode: string 4962306a36Sopenharmony_ci The FFX power output mode selects how the FFX output timing is 5062306a36Sopenharmony_ci configured. Must be one of these values: 5162306a36Sopenharmony_ci - "drop-compensation" 5262306a36Sopenharmony_ci - "tapered-compensation" 5362306a36Sopenharmony_ci - "full-power-mode" 5462306a36Sopenharmony_ci - "variable-drop-compensation" (default) 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci - st,drop-compensation-ns: number 5762306a36Sopenharmony_ci Only required for "st,ffx-power-output-mode" == 5862306a36Sopenharmony_ci "variable-drop-compensation". 5962306a36Sopenharmony_ci Specifies the drop compensation in nanoseconds. 6062306a36Sopenharmony_ci The value must be in the range of 0..300, and only 6162306a36Sopenharmony_ci multiples of 20 are allowed. Default is 140ns. 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci - st,overcurrent-warning-adjustment: 6462306a36Sopenharmony_ci If present, overcurrent warning adjustment is enabled. 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci - st,max-power-use-mpcc: 6762306a36Sopenharmony_ci If present, then MPCC bits are used for MPC coefficients, 6862306a36Sopenharmony_ci otherwise standard MPC coefficients are used. 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci - st,max-power-corr: 7162306a36Sopenharmony_ci If present, power bridge correction for THD reduction near maximum 7262306a36Sopenharmony_ci power output is enabled. 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci - st,am-reduction-mode: 7562306a36Sopenharmony_ci If present, FFX mode runs in AM reduction mode, otherwise normal 7662306a36Sopenharmony_ci FFX mode is used. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci - st,odd-pwm-speed-mode: 7962306a36Sopenharmony_ci If present, PWM speed mode run on odd speed mode (341.3 kHz) on all 8062306a36Sopenharmony_ci channels. If not present, normal PWM spped mode (384 kHz) will be used. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci - st,distortion-compensation: 8362306a36Sopenharmony_ci If present, distortion compensation variable uses DCC coefficient. 8462306a36Sopenharmony_ci If not present, preset DC coefficient is used. 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci - st,invalid-input-detect-mute: 8762306a36Sopenharmony_ci If present, automatic invalid input detect mute is enabled. 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci - st,activate-mute-output: 9062306a36Sopenharmony_ci If present, a mute output will be activated in ase the volume will 9162306a36Sopenharmony_ci reach a value lower than -76 dBFS. 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci - st,bridge-immediate-off: 9462306a36Sopenharmony_ci If present, the bridge will be switched off immediately after the 9562306a36Sopenharmony_ci power-down-gpio goes low. Otherwise, the bridge will wait for 13 9662306a36Sopenharmony_ci million clock cycles to pass before shutting down. 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci - st,noise-shape-dc-cut: 9962306a36Sopenharmony_ci If present, the noise-shaping technique on the DC cutoff filter are 10062306a36Sopenharmony_ci enabled. 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci - st,powerdown-master-volume: 10362306a36Sopenharmony_ci If present, the power-down pin and I2C power-down functions will 10462306a36Sopenharmony_ci act on the master volume. Otherwise, the functions will act on the 10562306a36Sopenharmony_ci mute commands. 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci - st,powerdown-delay-divider: 10862306a36Sopenharmony_ci If present, the bridge power-down time will be divided by the provided 10962306a36Sopenharmony_ci value. If not specified, a divider of 1 will be used. Allowed values 11062306a36Sopenharmony_ci are 1, 2, 4, 8, 16, 32, 64 and 128. 11162306a36Sopenharmony_ci This property has to be specified as '/bits/ 8' value. 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ciExample: 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_cicodec: sta350@38 { 11662306a36Sopenharmony_ci compatible = "st,sta350"; 11762306a36Sopenharmony_ci reg = <0x1c>; 11862306a36Sopenharmony_ci reset-gpios = <&gpio1 19 0>; 11962306a36Sopenharmony_ci power-down-gpios = <&gpio1 16 0>; 12062306a36Sopenharmony_ci st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel 12162306a36Sopenharmony_ci // (full-bridge) power, 12262306a36Sopenharmony_ci // 2-channel data-out 12362306a36Sopenharmony_ci st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1 12462306a36Sopenharmony_ci st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1 12562306a36Sopenharmony_ci st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1 12662306a36Sopenharmony_ci st,max-power-correction; // enables power bridge 12762306a36Sopenharmony_ci // correction for THD reduction 12862306a36Sopenharmony_ci // near maximum power output 12962306a36Sopenharmony_ci st,invalid-input-detect-mute; // mute if no valid digital 13062306a36Sopenharmony_ci // audio signal is provided. 13162306a36Sopenharmony_ci}; 132