1f04b1e76SThomas NiederprümSTA32X audio CODEC 2f04b1e76SThomas Niederprüm 3f04b1e76SThomas NiederprümThe driver for this device only supports I2C. 4f04b1e76SThomas Niederprüm 5f04b1e76SThomas NiederprümRequired properties: 6f04b1e76SThomas Niederprüm 7f04b1e76SThomas Niederprüm - compatible: "st,sta32x" 8f04b1e76SThomas Niederprüm - reg: the I2C address of the device for I2C 9f04b1e76SThomas Niederprüm - reset-gpios: a GPIO spec for the reset pin. If specified, it will be 10f04b1e76SThomas Niederprüm deasserted before communication to the codec starts. 11f04b1e76SThomas Niederprüm 12f04b1e76SThomas Niederprüm - power-down-gpios: a GPIO spec for the power down pin. If specified, 13f04b1e76SThomas Niederprüm it will be deasserted before communication to the codec 14f04b1e76SThomas Niederprüm starts. 15f04b1e76SThomas Niederprüm 16f04b1e76SThomas Niederprüm - Vdda-supply: regulator spec, providing 3.3V 17f04b1e76SThomas Niederprüm - Vdd3-supply: regulator spec, providing 3.3V 18f04b1e76SThomas Niederprüm - Vcc-supply: regulator spec, providing 5V - 26V 19f04b1e76SThomas Niederprüm 20f04b1e76SThomas NiederprümOptional properties: 21f04b1e76SThomas Niederprüm 22*fce9ec95SDaniel Mack - clocks, clock-names: Clock specifier for XTI input clock. 23*fce9ec95SDaniel Mack If specified, the clock will be enabled when the codec is probed, 24*fce9ec95SDaniel Mack and disabled when it is removed. The 'clock-names' must be set to 'xti'. 25*fce9ec95SDaniel Mack 26f04b1e76SThomas Niederprüm - st,output-conf: number, Selects the output configuration: 27f04b1e76SThomas Niederprüm 0: 2-channel (full-bridge) power, 2-channel data-out 28f04b1e76SThomas Niederprüm 1: 2 (half-bridge). 1 (full-bridge) on-board power 29f04b1e76SThomas Niederprüm 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX 30f04b1e76SThomas Niederprüm 3: 1 Channel Mono-Parallel 31f04b1e76SThomas Niederprüm If parameter is missing, mode 0 will be enabled. 32f04b1e76SThomas Niederprüm This property has to be specified as '/bits/ 8' value. 33f04b1e76SThomas Niederprüm 34f04b1e76SThomas Niederprüm - st,ch1-output-mapping: Channel 1 output mapping 35f04b1e76SThomas Niederprüm - st,ch2-output-mapping: Channel 2 output mapping 36f04b1e76SThomas Niederprüm - st,ch3-output-mapping: Channel 3 output mapping 37f04b1e76SThomas Niederprüm 0: Channel 1 38f04b1e76SThomas Niederprüm 1: Channel 2 39f04b1e76SThomas Niederprüm 2: Channel 3 40f04b1e76SThomas Niederprüm If parameter is missing, channel 1 is chosen. 41f04b1e76SThomas Niederprüm This properties have to be specified as '/bits/ 8' values. 42f04b1e76SThomas Niederprüm 43f04b1e76SThomas Niederprüm - st,thermal-warning-recover: 44f04b1e76SThomas Niederprüm If present, thermal warning recovery is enabled. 45f04b1e76SThomas Niederprüm 46466dee75SDaniel Mack - st,fault-detect-recovery: 47466dee75SDaniel Mack If present, fault detect recovery is enabled. 48466dee75SDaniel Mack 49f04b1e76SThomas Niederprüm - st,thermal-warning-adjustment: 50f04b1e76SThomas Niederprüm If present, thermal warning adjustment is enabled. 51f04b1e76SThomas Niederprüm 52f04b1e76SThomas Niederprüm - st,fault-detect-recovery: 53f04b1e76SThomas Niederprüm If present, then fault recovery will be enabled. 54f04b1e76SThomas Niederprüm 55f04b1e76SThomas Niederprüm - st,drop-compensation-ns: number 56f04b1e76SThomas Niederprüm Only required for "st,ffx-power-output-mode" == 57f04b1e76SThomas Niederprüm "variable-drop-compensation". 58f04b1e76SThomas Niederprüm Specifies the drop compensation in nanoseconds. 59f04b1e76SThomas Niederprüm The value must be in the range of 0..300, and only 60f04b1e76SThomas Niederprüm multiples of 20 are allowed. Default is 140ns. 61f04b1e76SThomas Niederprüm 62f04b1e76SThomas Niederprüm - st,max-power-use-mpcc: 63f04b1e76SThomas Niederprüm If present, then MPCC bits are used for MPC coefficients, 64f04b1e76SThomas Niederprüm otherwise standard MPC coefficients are used. 65f04b1e76SThomas Niederprüm 66f04b1e76SThomas Niederprüm - st,max-power-corr: 67f04b1e76SThomas Niederprüm If present, power bridge correction for THD reduction near maximum 68f04b1e76SThomas Niederprüm power output is enabled. 69f04b1e76SThomas Niederprüm 70f04b1e76SThomas Niederprüm - st,am-reduction-mode: 71f04b1e76SThomas Niederprüm If present, FFX mode runs in AM reduction mode, otherwise normal 72f04b1e76SThomas Niederprüm FFX mode is used. 73f04b1e76SThomas Niederprüm 74f04b1e76SThomas Niederprüm - st,odd-pwm-speed-mode: 75f04b1e76SThomas Niederprüm If present, PWM speed mode run on odd speed mode (341.3 kHz) on all 76f04b1e76SThomas Niederprüm channels. If not present, normal PWM spped mode (384 kHz) will be used. 77f04b1e76SThomas Niederprüm 78f04b1e76SThomas Niederprüm - st,invalid-input-detect-mute: 79f04b1e76SThomas Niederprüm If present, automatic invalid input detect mute is enabled. 80f04b1e76SThomas Niederprüm 81f04b1e76SThomas NiederprümExample: 82f04b1e76SThomas Niederprüm 83f04b1e76SThomas Niederprümcodec: sta32x@38 { 84f04b1e76SThomas Niederprüm compatible = "st,sta32x"; 85f04b1e76SThomas Niederprüm reg = <0x1c>; 86*fce9ec95SDaniel Mack clocks = <&clock>; 87*fce9ec95SDaniel Mack clock-names = "xti"; 88f04b1e76SThomas Niederprüm reset-gpios = <&gpio1 19 0>; 89f04b1e76SThomas Niederprüm power-down-gpios = <&gpio1 16 0>; 90f04b1e76SThomas Niederprüm st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel 91f04b1e76SThomas Niederprüm // (full-bridge) power, 92f04b1e76SThomas Niederprüm // 2-channel data-out 93f04b1e76SThomas Niederprüm st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1 94f04b1e76SThomas Niederprüm st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1 95f04b1e76SThomas Niederprüm st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1 96f04b1e76SThomas Niederprüm st,max-power-correction; // enables power bridge 97f04b1e76SThomas Niederprüm // correction for THD reduction 98f04b1e76SThomas Niederprüm // near maximum power output 99f04b1e76SThomas Niederprüm st,invalid-input-detect-mute; // mute if no valid digital 100f04b1e76SThomas Niederprüm // audio signal is provided. 101f04b1e76SThomas Niederprüm}; 102