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