← Documents Documentation/devicetree/bindings/sound/cs35l36.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

Cirrus CS35L36 speaker amplifier

CS35L36의 boost, multi-amp, Weak-FET, interrupt와 VPBR brownout 방지를 설명합니다.

Source pathDocumentation/devicetree/bindings/sound/cs35l36.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

cs35l36.txt:1-168

Boost 전기 설정, multi-device bus 운용, Weak-FET와 온도 보호, interrupt pin, VP brownout prevention을 순서대로 해설합니다. 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 CS35L36 Speaker Amplifier
2
3 Required properties:
4
5 - compatible : "cirrus,cs35l36"
6
7 - reg : the I2C address of the device for I2C
8
9 - VA-supply, VP-supply : power supplies for the device,
10 as covered in
11 Documentation/devicetree/bindings/regulator/regulator.txt.
12
13 - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost
14 converter's output voltage in mV. The range is from 2550mV to 12000mV with
15 increments of 50mV.
16 (Default) VP
17
18 - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
19 Configures the peak current by monitoring the current through the boost FET.
20 Range starts at 1600mA and goes to a maximum of 4500mA with increments of
21 50mA.
22 (Default) 4.50 Amps
23
24 - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
25 Seeds the digital boost converter's inductor estimation block with the initial
26 inductance value to reference.
27
28 1000 = 1uH (Default)
29 1200 = 1.2uH
30
31 Optional properties:
32 - cirrus,multi-amp-mode : Boolean to determine if there are more than
33 one amplifier in the system. If more than one it is best to Hi-Z the ASP
34 port to prevent bus contention on the output signal
35
36 - cirrus,boost-ctl-select : Boost converter control source selection.
37 Selects the source of the BST_CTL target VBST voltage for the boost
38 converter to generate.
39 0x00 - Control Port Value
40 0x01 - Class H Tracking (Default)
41 0x10 - MultiDevice Sync Value
42
43 - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
44 PCM data
45
46 - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
47 polarity of outbound IMON feedback data
48
49 - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
50 polarity of outbound VMON feedback data
51
52 - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
53 This enables the digital boost converter to operate in a low power
54 (Discontinuous Conduction) mode during low loading conditions.
55
56 - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
57 reduced when operating in a Weak-FET Drive Mode and must not be used to drive
58 a large load.
59
60 - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay
61 (in ms) before the Class H algorithm switches to the weak-FET voltage
62 (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
63
64 0 = 0ms
65 1 = 5ms
66 2 = 10ms
67 3 = 50ms
68 4 = 100ms (Default)
69 5 = 200ms
70 6 = 500ms
71 7 = 1000ms
72
73 - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
74 Configures the signal threshold at which the PWM output stage enters
75 weak-FET operation. The range is 50mV to 700mV in 50mV increments.
76
77 - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
78 Configures the threshold at which the overtemperature warning condition occurs.
79 When the threshold is met, the overtemperature warning attenuation is applied
80 and the TEMP_WARN_EINT interrupt status bit is set.
81 If TEMP_WARN_MASK = 0, INTb is asserted.
82
83 0 = 105C
84 1 = 115C
85 2 = 125C (Default)
86 3 = 135C
87
88 - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
89 output.
90
91 0 = Open-drain
92 1 = Push-pull (Default)
93
94 - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
95 interrupt output.
96
97 0 = PDM_DATA / SWIRE_SD / INT (Default)
98 1 = GPIO
99
100 Optional properties for the "cirrus,vpbr-config" Sub-node
101
102 - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
103 VBST brownout prevention algorithm is enabled or disabled.
104
105 0 = VBST brownout prevention disabled (default)
106 1 = VBST brownout prevention enabled
107
108 See Section 7.31.1 VPBR Config for configuration options & further details
109
110 - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
111 threshold voltage
112
113 - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
114 amount delay between consecutive volume attenuation steps when a brownout
115 condition is present and the VP brownout condition is in an attacking state.
116
117 - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
118 brownout prevention attacking attenuation step size when operating in either
119 digital volume or analog gain modes.
120
121 - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
122 can apply to the audio signal.
123
124 - cirrus,vpbr-wait : Configures the delay time between a brownout condition
125 no longer being present and the VP brownout prevention entering an attenuation
126 release state.
127
128 - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
129 between consecutive volume attenuation release steps when a brownout condition
130 is not longer present and the VP brownout is in an attenuation release state.
131
132 - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
133 is reached, the error condition still remains, and this bit is set, the audio
134 is muted.
135
136 Example:
137
138 cs35l36: cs35l36@40 {
139 compatible = "cirrus,cs35l36";
140 reg = <0x40>;
141 VA-supply = <&dummy_vreg>;
142 VP-supply = <&dummy_vreg>;
143 reset-gpios = <&gpio0 54 0>;
144 interrupt-parent = <&gpio8>;
145 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
146
147 cirrus,boost-ind-nanohenry = <1000>;
148 cirrus,boost-ctl-millivolt = <10000>;
149 cirrus,boost-peak-milliamp = <4500>;
150 cirrus,boost-ctl-select = <0x00>;
151 cirrus,weak-fet-delay = <0x04>;
152 cirrus,weak-fet-thld = <0x01>;
153 cirrus,temp-warn-threshold = <0x01>;
154 cirrus,multi-amp-mode;
155 cirrus,irq-drive-select = <0x01>;
156 cirrus,irq-gpio-select = <0x01>;
157
158 cirrus,vpbr-config {
159 cirrus,vpbr-en = <0x00>;
160 cirrus,vpbr-thld = <0x05>;
161 cirrus,vpbr-atk-rate = <0x02>;
162 cirrus,vpbr-atk-vol = <0x01>;
163 cirrus,vpbr-max-attn = <0x09>;
164 cirrus,vpbr-wait = <0x01>;
165 cirrus,vpbr-rel-rate = <0x05>;
166 cirrus,vpbr-mute-en = <0x00>;
167 };
168 };
169

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

CS35L36 필수 속성과 boost

1-30

CS35L36 speaker amplifier의 `compatible` 값은 `cirrus,cs35l36`이고 `reg`에는 I2C 장치 주소를 지정합니다. `VA-supply`와 `VP-supply`는 `Documentation/devicetree/bindings/regulator/regulator.txt`에 정의된 전원 공급 장치를 가리킵니다.

`cirrus,boost-ctl-millivolt`는 boost converter output voltage를 2550mV부터 12000mV까지 50mV 단위로 설정하며 기본값은 VP입니다.

`cirrus,boost-peak-milliamp`는 boost FET 전류를 감시해 peak current limit를 설정합니다. 1600mA부터 최대 4500mA까지 50mA 단위로 증가하며 기본값은 4.50A입니다.

`cirrus,boost-ind-nanohenry`는 digital boost converter의 inductor estimation block에 초기 inductance reference를 제공합니다. 값 1000은 기본 1uH, 값 1200은 1.2uH입니다.

Multi-amp와 boost control source

31-55

Boolean `cirrus,multi-amp-mode`는 시스템에 amplifier가 둘 이상 있음을 나타냅니다. 여러 장치가 있으면 output signal의 bus contention을 막기 위해 ASP port를 Hi-Z로 두는 것이 좋습니다.

`cirrus,boost-ctl-select`는 boost converter가 생성할 target VBST voltage의 제어 source를 선택합니다. 값 `0x00`은 Control Port Value, 기본값 `0x01`은 Class H Tracking, `0x10`은 MultiDevice Sync Value입니다.

Boolean `cirrus,amp-pcm-inv`는 들어오는 PCM data를 반전하고, `cirrus,imon-pol-inv`와 `cirrus,vmon-pol-inv`는 각각 외부로 보내는 IMON·VMON feedback data의 polarity를 반전합니다.

`cirrus,dcm-mode-enable`은 부하가 낮을 때 digital boost converter가 저전력 DCM(Discontinuous Conduction Mode)으로 자동 동작하도록 합니다.

Weak-FET 동작

56-76

Boolean `cirrus,weak-fet-disable`은 Weak-FET Drive Mode와 관련됩니다. 이 mode에서는 output driver strength가 줄어들므로 큰 부하를 구동하는 데 사용하면 안 됩니다.

`cirrus,classh-wk-fet-delay`는 audio가 `WKFET_AMP_THLD` 아래로 내려가 유지된 뒤 Class H algorithm이 weak-FET voltage로 전환하기 전의 지연입니다. 값 0~7은 각각 0ms, 5ms, 10ms, 50ms, 기본 100ms, 200ms, 500ms, 1000ms입니다.

`cirrus,classh-weak-fet-thld-millivolt`는 PWM output stage가 weak-FET operation에 들어가는 signal threshold이며 50mV부터 700mV까지 50mV 단위입니다.

온도 경고와 interrupt 출력

77-99

`cirrus,temp-warn-threshold`는 amplifier overtemperature warning threshold입니다. 임계값에 도달하면 attenuation이 적용되고 `TEMP_WARN_EINT` status bit가 설정되며, `TEMP_WARN_MASK = 0`이면 `INTb`가 assert됩니다. 값 0, 1, 2, 3은 각각 105C, 115C, 기본 125C, 135C입니다.

`cirrus,irq-drive-select`는 interrupt output driver type을 선택합니다. 값 0은 open-drain, 기본값 1은 push-pull입니다.

`cirrus,irq-gpio-select`는 programmable interrupt output으로 사용할 pin을 선택합니다. 기본값 0은 `PDM_DATA / SWIRE_SD / INT`, 값 1은 GPIO입니다.

VPBR brownout 방지

100-109

`cirrus,vpbr-config` 하위 노드의 `cirrus,vpbr-en`은 VBST brownout prevention algorithm을 켜거나 끕니다. 값 0은 비활성화이며 기본값이고, 값 1은 활성화입니다.

구성 선택지와 자세한 동작은 Datasheet 7.31.1절 VPBR Config를 참조합니다.

VPBR attack과 release 제어

110-135

`cirrus,vpbr-thld`는 초기 VPBR threshold, 즉 VP brownout threshold voltage를 설정합니다.

원문에 `cirrus,cirrus,vpbr-atk-rate`로 적힌 속성은 brownout condition이 있고 VPBR가 attack state일 때 연속 volume attenuation step 사이의 지연을 설정합니다.

`cirrus,vpbr-atk-vol`은 digital volume 또는 analog gain mode에서 attack attenuation step size를 정하고, `cirrus,vpbr-max-attn`은 VPBR가 audio signal에 적용할 수 있는 최대 attenuation을 정합니다.

`cirrus,vpbr-wait`는 brownout condition이 사라진 뒤 attenuation release state로 들어가기 전의 지연입니다. `cirrus,vpbr-rel-rate`는 brownout이 더 이상 없고 release state일 때 연속 volume attenuation release step 사이의 지연을 설정합니다.

`cirrus,vpbr-mute-en`이 설정된 상태에서 attack 중 `vpbr-max-attn`에 도달한 뒤에도 error condition이 남아 있으면 audio를 mute합니다.

`cirrus,cirrus,vpbr-atk-rate`의 중복 `cirrus,` 접두사는 원문 표기를 그대로 보존한 것입니다. 아래 예제에서는 `cirrus,vpbr-atk-rate`로 사용됩니다.

CS35L36 기본 예제

136-157

예제는 I2C 주소 `0x40`, VA·VP supply, reset GPIO와 level-low interrupt를 지정합니다. 1uH inductor, 10000mV boost, 4500mA peak current, Control Port boost source와 multi-amp mode를 구성하고 온도 경고와 interrupt pin 동작을 선택합니다.

예제의 `cirrus,weak-fet-delay`와 `cirrus,weak-fet-thld`는 위 설명의 `cirrus,classh-wk-fet-delay` 및 `cirrus,classh-weak-fet-thld-millivolt`와 이름이 다릅니다. 예제 코드는 원문 그대로 유지했습니다.

cs35l36: cs35l36@40 {
        compatible = "cirrus,cs35l36";
        reg = <0x40>;
        VA-supply = <&dummy_vreg>;
        VP-supply = <&dummy_vreg>;
        reset-gpios = <&gpio0 54 0>;
        interrupt-parent = <&gpio8>;
        interrupts = <3 IRQ_TYPE_LEVEL_LOW>;

        cirrus,boost-ind-nanohenry = <1000>;
        cirrus,boost-ctl-millivolt = <10000>;
        cirrus,boost-peak-milliamp = <4500>;
        cirrus,boost-ctl-select = <0x00>;
        cirrus,weak-fet-delay = <0x04>;
        cirrus,weak-fet-thld = <0x01>;
        cirrus,temp-warn-threshold = <0x01>;
        cirrus,multi-amp-mode;
        cirrus,irq-drive-select = <0x01>;
        cirrus,irq-gpio-select = <0x01>;

VPBR 하위 노드 예제

158-168

`cirrus,vpbr-config` 예제는 brownout prevention enable, threshold, attack rate와 step, 최대 attenuation, wait, release rate, mute enable 값을 지정합니다.

        cirrus,vpbr-config {
                cirrus,vpbr-en = <0x00>;
                cirrus,vpbr-thld = <0x05>;
                cirrus,vpbr-atk-rate = <0x02>;
                cirrus,vpbr-atk-vol = <0x01>;
                cirrus,vpbr-max-attn = <0x09>;
                cirrus,vpbr-wait = <0x01>;
                cirrus,vpbr-rel-rate = <0x05>;
                cirrus,vpbr-mute-en = <0x00>;
        };
};