18c2ecf20Sopenharmony_ciSTA350 audio CODEC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe driver for this device only supports I2C. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciRequired properties: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci - compatible: "st,sta350" 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 - vdd-dig-supply: regulator spec, providing 3.3V 178c2ecf20Sopenharmony_ci - vdd-pll-supply: regulator spec, providing 3.3V 188c2ecf20Sopenharmony_ci - vcc-supply: regulator spec, providing 5V - 26V 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciOptional properties: 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci - st,output-conf: number, Selects the output configuration: 238c2ecf20Sopenharmony_ci 0: 2-channel (full-bridge) power, 2-channel data-out 248c2ecf20Sopenharmony_ci 1: 2 (half-bridge). 1 (full-bridge) on-board power 258c2ecf20Sopenharmony_ci 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX 268c2ecf20Sopenharmony_ci 3: 1 Channel Mono-Parallel 278c2ecf20Sopenharmony_ci If parameter is missing, mode 0 will be enabled. 288c2ecf20Sopenharmony_ci This property has to be specified as '/bits/ 8' value. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci - st,ch1-output-mapping: Channel 1 output mapping 318c2ecf20Sopenharmony_ci - st,ch2-output-mapping: Channel 2 output mapping 328c2ecf20Sopenharmony_ci - st,ch3-output-mapping: Channel 3 output mapping 338c2ecf20Sopenharmony_ci 0: Channel 1 348c2ecf20Sopenharmony_ci 1: Channel 2 358c2ecf20Sopenharmony_ci 2: Channel 3 368c2ecf20Sopenharmony_ci If parameter is missing, channel 1 is chosen. 378c2ecf20Sopenharmony_ci This properties have to be specified as '/bits/ 8' values. 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci - st,thermal-warning-recover: 408c2ecf20Sopenharmony_ci If present, thermal warning recovery is enabled. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci - st,thermal-warning-adjustment: 438c2ecf20Sopenharmony_ci If present, thermal warning adjustment is enabled. 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci - st,fault-detect-recovery: 468c2ecf20Sopenharmony_ci If present, then fault recovery will be enabled. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci - st,ffx-power-output-mode: string 498c2ecf20Sopenharmony_ci The FFX power output mode selects how the FFX output timing is 508c2ecf20Sopenharmony_ci configured. Must be one of these values: 518c2ecf20Sopenharmony_ci - "drop-compensation" 528c2ecf20Sopenharmony_ci - "tapered-compensation" 538c2ecf20Sopenharmony_ci - "full-power-mode" 548c2ecf20Sopenharmony_ci - "variable-drop-compensation" (default) 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci - st,drop-compensation-ns: number 578c2ecf20Sopenharmony_ci Only required for "st,ffx-power-output-mode" == 588c2ecf20Sopenharmony_ci "variable-drop-compensation". 598c2ecf20Sopenharmony_ci Specifies the drop compensation in nanoseconds. 608c2ecf20Sopenharmony_ci The value must be in the range of 0..300, and only 618c2ecf20Sopenharmony_ci multiples of 20 are allowed. Default is 140ns. 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci - st,overcurrent-warning-adjustment: 648c2ecf20Sopenharmony_ci If present, overcurrent warning adjustment is enabled. 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci - st,max-power-use-mpcc: 678c2ecf20Sopenharmony_ci If present, then MPCC bits are used for MPC coefficients, 688c2ecf20Sopenharmony_ci otherwise standard MPC coefficients are used. 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci - st,max-power-corr: 718c2ecf20Sopenharmony_ci If present, power bridge correction for THD reduction near maximum 728c2ecf20Sopenharmony_ci power output is enabled. 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci - st,am-reduction-mode: 758c2ecf20Sopenharmony_ci If present, FFX mode runs in AM reduction mode, otherwise normal 768c2ecf20Sopenharmony_ci FFX mode is used. 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci - st,odd-pwm-speed-mode: 798c2ecf20Sopenharmony_ci If present, PWM speed mode run on odd speed mode (341.3 kHz) on all 808c2ecf20Sopenharmony_ci channels. If not present, normal PWM spped mode (384 kHz) will be used. 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci - st,distortion-compensation: 838c2ecf20Sopenharmony_ci If present, distortion compensation variable uses DCC coefficient. 848c2ecf20Sopenharmony_ci If not present, preset DC coefficient is used. 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci - st,invalid-input-detect-mute: 878c2ecf20Sopenharmony_ci If present, automatic invalid input detect mute is enabled. 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci - st,activate-mute-output: 908c2ecf20Sopenharmony_ci If present, a mute output will be activated in ase the volume will 918c2ecf20Sopenharmony_ci reach a value lower than -76 dBFS. 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci - st,bridge-immediate-off: 948c2ecf20Sopenharmony_ci If present, the bridge will be switched off immediately after the 958c2ecf20Sopenharmony_ci power-down-gpio goes low. Otherwise, the bridge will wait for 13 968c2ecf20Sopenharmony_ci million clock cycles to pass before shutting down. 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci - st,noise-shape-dc-cut: 998c2ecf20Sopenharmony_ci If present, the noise-shaping technique on the DC cutoff filter are 1008c2ecf20Sopenharmony_ci enabled. 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci - st,powerdown-master-volume: 1038c2ecf20Sopenharmony_ci If present, the power-down pin and I2C power-down functions will 1048c2ecf20Sopenharmony_ci act on the master volume. Otherwise, the functions will act on the 1058c2ecf20Sopenharmony_ci mute commands. 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci - st,powerdown-delay-divider: 1088c2ecf20Sopenharmony_ci If present, the bridge power-down time will be divided by the provided 1098c2ecf20Sopenharmony_ci value. If not specified, a divider of 1 will be used. Allowed values 1108c2ecf20Sopenharmony_ci are 1, 2, 4, 8, 16, 32, 64 and 128. 1118c2ecf20Sopenharmony_ci This property has to be specified as '/bits/ 8' value. 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ciExample: 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_cicodec: sta350@38 { 1168c2ecf20Sopenharmony_ci compatible = "st,sta350"; 1178c2ecf20Sopenharmony_ci reg = <0x1c>; 1188c2ecf20Sopenharmony_ci reset-gpios = <&gpio1 19 0>; 1198c2ecf20Sopenharmony_ci power-down-gpios = <&gpio1 16 0>; 1208c2ecf20Sopenharmony_ci st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel 1218c2ecf20Sopenharmony_ci // (full-bridge) power, 1228c2ecf20Sopenharmony_ci // 2-channel data-out 1238c2ecf20Sopenharmony_ci st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1 1248c2ecf20Sopenharmony_ci st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1 1258c2ecf20Sopenharmony_ci st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1 1268c2ecf20Sopenharmony_ci st,max-power-correction; // enables power bridge 1278c2ecf20Sopenharmony_ci // correction for THD reduction 1288c2ecf20Sopenharmony_ci // near maximum power output 1298c2ecf20Sopenharmony_ci st,invalid-input-detect-mute; // mute if no valid digital 1308c2ecf20Sopenharmony_ci // audio signal is provided. 1318c2ecf20Sopenharmony_ci}; 132