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. 282439ea1fSSven Brandau 292439ea1fSSven Brandau - st,ch1-output-mapping: Channel 1 output mapping 302439ea1fSSven Brandau - st,ch2-output-mapping: Channel 2 output mapping 312439ea1fSSven Brandau - st,ch3-output-mapping: Channel 3 output mapping 322439ea1fSSven Brandau 0: Channel 1 332439ea1fSSven Brandau 1: Channel 2 342439ea1fSSven Brandau 2: Channel 3 352439ea1fSSven Brandau If parameter is missing, channel 1 is choosen. 362439ea1fSSven Brandau 372439ea1fSSven Brandau - st,thermal-warning-recover: 382439ea1fSSven Brandau If present, thermal warning recovery is enabled. 392439ea1fSSven Brandau 402439ea1fSSven Brandau - st,thermal-warning-adjustment: 412439ea1fSSven Brandau If present, thermal warning adjustment is enabled. 422439ea1fSSven Brandau 432439ea1fSSven Brandau - st,fault-detect-recovery: 442439ea1fSSven Brandau If present, then fault recovery will be enabled. 452439ea1fSSven Brandau 462439ea1fSSven Brandau - st,ffx-power-output-mode: string 472439ea1fSSven Brandau The FFX power output mode selects how the FFX output timing is 482439ea1fSSven Brandau configured. Must be one of these values: 492439ea1fSSven Brandau - "drop-compensation" 502439ea1fSSven Brandau - "tapered-compensation" 512439ea1fSSven Brandau - "full-power-mode" 522439ea1fSSven Brandau - "variable-drop-compensation" (default) 532439ea1fSSven Brandau 542439ea1fSSven Brandau - st,drop-compensation-ns: number 552439ea1fSSven Brandau Only required for "st,ffx-power-output-mode" == 562439ea1fSSven Brandau "variable-drop-compensation". 572439ea1fSSven Brandau Specifies the drop compensation in nanoseconds. 582439ea1fSSven Brandau The value must be in the range of 0..300, and only 592439ea1fSSven Brandau multiples of 20 are allowed. Default is 140ns. 602439ea1fSSven Brandau 612439ea1fSSven Brandau - st,overcurrent-warning-adjustment: 622439ea1fSSven Brandau If present, overcurrent warning adjustment is enabled. 632439ea1fSSven Brandau 642439ea1fSSven Brandau - st,max-power-use-mpcc: 652439ea1fSSven Brandau If present, then MPCC bits are used for MPC coefficients, 662439ea1fSSven Brandau otherwise standard MPC coefficients are used. 672439ea1fSSven Brandau 682439ea1fSSven Brandau - st,max-power-corr: 692439ea1fSSven Brandau If present, power bridge correction for THD reduction near maximum 702439ea1fSSven Brandau power output is enabled. 712439ea1fSSven Brandau 722439ea1fSSven Brandau - st,am-reduction-mode: 732439ea1fSSven Brandau If present, FFX mode runs in AM reduction mode, otherwise normal 742439ea1fSSven Brandau FFX mode is used. 752439ea1fSSven Brandau 762439ea1fSSven Brandau - st,odd-pwm-speed-mode: 772439ea1fSSven Brandau If present, PWM speed mode run on odd speed mode (341.3 kHz) on all 782439ea1fSSven Brandau channels. If not present, normal PWM spped mode (384 kHz) will be used. 792439ea1fSSven Brandau 802439ea1fSSven Brandau - st,distortion-compensation: 812439ea1fSSven Brandau If present, distortion compensation variable uses DCC coefficient. 822439ea1fSSven Brandau If not present, preset DC coefficient is used. 832439ea1fSSven Brandau 842439ea1fSSven Brandau - st,invalid-input-detect-mute: 852439ea1fSSven Brandau If not present, automatic invalid input detect mute is enabled. 862439ea1fSSven Brandau 872439ea1fSSven Brandau 882439ea1fSSven Brandau 892439ea1fSSven BrandauExample: 902439ea1fSSven Brandau 912439ea1fSSven Brandaucodec: sta350@38 { 922439ea1fSSven Brandau compatible = "st,sta350"; 932439ea1fSSven Brandau reg = <0x1c>; 942439ea1fSSven Brandau reset-gpios = <&gpio1 19 0>; 952439ea1fSSven Brandau power-down-gpios = <&gpio1 16 0>; 962439ea1fSSven Brandau st,output-conf = <0x3>; // set output to 2-channel 972439ea1fSSven Brandau // (full-bridge) power, 982439ea1fSSven Brandau // 2-channel data-out 992439ea1fSSven Brandau st,ch1-output-mapping = <0>; // set channel 1 output ch 1 1002439ea1fSSven Brandau st,ch2-output-mapping = <0>; // set channel 2 output ch 1 1012439ea1fSSven Brandau st,ch3-output-mapping = <0>; // set channel 3 output ch 1 1022439ea1fSSven Brandau st,max-power-correction; // enables power bridge 1032439ea1fSSven Brandau // correction for THD reduction 1042439ea1fSSven Brandau // near maximum power output 1052439ea1fSSven Brandau st,invalid-input-detect-mute; // mute if no valid digital 1062439ea1fSSven Brandau // audio signal is provided. 1072439ea1fSSven Brandau}; 108