← Documents Documentation/devicetree/bindings/mfd/as3722.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

ams AS3722 PMIC

AS3722 PMIC의 IRQ, 8개 pinmux/GPIO, DCDC·LDO와 system power-off 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

as3722.txt:1-214

Pin function, regulator supply와 외부 ENABLE 제어를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * ams AS3722 Power management IC.
2
3 Required properties:
4 -------------------
5 - compatible: Must be "ams,as3722".
6 - reg: I2C device address.
7 - interrupt-controller: AS3722 has internal interrupt controller which takes the
8 interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
9 as external input.
10 - #interrupt-cells: Should be set to 2 for IRQ number and flags.
11 The first cell is the IRQ number. IRQ numbers for different interrupt source
12 of AS3722 are defined at dt-bindings/mfd/as3722.h
13 The second cell is the flags, encoded as the trigger masks from binding document
14 interrupts.txt, using dt-bindings/irq.
15
16 Optional properties:
17 --------------------
18 - ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on
19 interrupt pin. Missing this will disable internal pullup on INT pin.
20 - ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on
21 i2c scl/sda pins. Missing this will disable internal pullup on i2c
22 scl/sda lines.
23 - ams,enable-ac-ok-power-on: Boolean property, to enable exit out of power off
24 mode with AC_OK pin (pin enabled in power off mode).
25
26 Optional submodule and their properties:
27 =======================================
28
29 Pinmux and GPIO:
30 ===============
31 Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
32 functions.
33
34 Please refer to pinctrl-bindings.txt in this directory for details of the
35 common pinctrl bindings used by client devices, including the meaning of the
36 phrase "pin configuration node".
37
38 Following are properties which is needed if GPIO and pinmux functionality
39 is required:
40 Required properties:
41 -------------------
42 - gpio-controller: Marks the device node as a GPIO controller.
43 - #gpio-cells: Number of GPIO cells. Refer to binding document
44 gpio/gpio.txt
45
46 Optional properties:
47 --------------------
48 Following properties are require if pin control setting is required
49 at boot.
50 - pinctrl-names: A pinctrl state named "default" be defined, using the
51 bindings in pinctrl/pinctrl-bindings.txt.
52 - pinctrl[0...n]: Properties to contain the phandle that refer to
53 different nodes of pin control settings. These nodes represents
54 the pin control setting of state 0 to state n. Each of these
55 nodes contains different subnodes to represents some desired
56 configuration for a list of pins. This configuration can
57 include the mux function to select on those pin(s), and
58 various pin configuration parameters, such as pull-up,
59 open drain.
60
61 Each subnode have following properties:
62 Required properties:
63 - pins: List of pins. Valid values of pins properties are:
64 gpio0, gpio1, gpio2, gpio3, gpio4, gpio5,
65 gpio6, gpio7
66
67 Optional properties:
68 function, bias-disable, bias-pull-up, bias-pull-down,
69 bias-high-impedance, drive-open-drain.
70
71 Valid values for function properties are:
72 gpio, interrupt-out, gpio-in-interrupt,
73 vsup-vbat-low-undebounce-out,
74 vsup-vbat-low-debounce-out,
75 voltage-in-standby, oc-pg-sd0, oc-pg-sd6,
76 powergood-out, pwm-in, pwm-out, clk32k-out,
77 watchdog-in, soft-reset-in
78
79 Regulators:
80 ===========
81 Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
82 functionality is needed.
83
84 Following are properties of regulator subnode.
85
86 Optional properties:
87 -------------------
88 The input supply of regulators are the optional properties on the
89 regulator node. The input supply of these regulators are provided
90 through following properties:
91 vsup-sd2-supply: Input supply for SD2.
92 vsup-sd3-supply: Input supply for SD3.
93 vsup-sd4-supply: Input supply for SD4.
94 vsup-sd5-supply: Input supply for SD5.
95 vin-ldo0-supply: Input supply for LDO0.
96 vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
97 vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
98 vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
99 vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
100 vin-ldo11-supply: Input supply for LDO11.
101
102 Optional sub nodes for regulators:
103 ---------------------------------
104 The subnodes name is the name of regulator and it must be one of:
105 sd[0-6], ldo[0-7], ldo[9-11]
106
107 Each sub-node should contain the constraints and initialization
108 information for that regulator. See regulator.txt for a description
109 of standard properties for these sub-nodes.
110 Additional optional custom properties are listed below.
111 ams,ext-control: External control of the rail. The option of
112 this properties will tell which external input is
113 controlling this rail. Valid values are 0, 1, 2 ad 3.
114 0: There is no external control of this rail.
115 1: Rail is controlled by ENABLE1 input pin.
116 2: Rail is controlled by ENABLE2 input pin.
117 3: Rail is controlled by ENABLE3 input pin.
118 Missing this property on DT will be assume as no
119 external control. The external control pin macros
120 are defined @dt-bindings/mfd/as3722.h
121
122 ams,enable-tracking: Enable tracking with SD1, only supported
123 by LDO3.
124
125 Power-off:
126 =========
127 AS3722 supports the system power off by turning off all its rails.
128 The device node should have the following properties to enable this
129 functionality
130 ams,system-power-controller: Boolean, to enable the power off functionality
131 through this device.
132
133 Example:
134 --------
135 #include <dt-bindings/mfd/as3722.h>
136 ...
137 ams3722 {
138 compatible = "ams,as3722";
139 reg = <0x48>;
140
141 ams,system-power-controller;
142
143 interrupt-parent = <&intc>;
144 interrupt-controller;
145 #interrupt-cells = <2>;
146
147 gpio-controller;
148 #gpio-cells = <2>;
149
150 pinctrl-names = "default";
151 pinctrl-0 = <&as3722_default>;
152
153 as3722_default: pinmux {
154 gpio0 {
155 pins = "gpio0";
156 function = "gpio";
157 bias-pull-down;
158 };
159
160 gpio1_2_4_7 {
161 pins = "gpio1", "gpio2", "gpio4", "gpio7";
162 function = "gpio";
163 bias-pull-up;
164 };
165
166 gpio5 {
167 pins = "gpio5";
168 function = "clk32k_out";
169 };
170 }
171
172 regulators {
173 vsup-sd2-supply = <...>;
174 ...
175
176 sd0 {
177 regulator-name = "vdd_cpu";
178 regulator-min-microvolt = <700000>;
179 regulator-max-microvolt = <1400000>;
180 regulator-always-on;
181 ams,ext-control = <2>;
182 };
183
184 sd1 {
185 regulator-name = "vdd_core";
186 regulator-min-microvolt = <700000>;
187 regulator-max-microvolt = <1400000>;
188 regulator-always-on;
189 ams,ext-control = <1>;
190 };
191
192 sd2 {
193 regulator-name = "vddio_ddr";
194 regulator-min-microvolt = <1350000>;
195 regulator-max-microvolt = <1350000>;
196 regulator-always-on;
197 };
198
199 sd4 {
200 regulator-name = "avdd-hdmi-pex";
201 regulator-min-microvolt = <1050000>;
202 regulator-max-microvolt = <1050000>;
203 regulator-always-on;
204 };
205
206 sd5 {
207 regulator-name = "vdd-1v8";
208 regulator-min-microvolt = <1800000>;
209 regulator-max-microvolt = <1800000>;
210 regulator-always-on;
211 };
212 ....
213 };
214 };
215

3. 한국어 전문 번역

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

ams AS3722 전원 관리 IC

1-2

AS3722는 ams의 전원 관리 IC로 regulator, RTC, GPIO와 외부 입력의 인터럽트를 통합합니다.

AS3722 통합 기능
I2C hostAS3722 core
RTC / regulators / GPIO / external inputInterrupt controller
gpio0..gpio7GPIO and special functions
SD0..SD6 / LDO railsSystem supplies

I2C PMIC가 내부 interrupt controller, 8개 pinmux/GPIO, 여러 DCDC·LDO와 system power-off를 제공합니다.

필수 상위 속성

3-15

`compatible`은 `ams,as3722`, `reg`는 I2C 장치 주소입니다. `interrupt-controller`는 AS3722가 RTC, regulator, GPIO 같은 내부 sub-block과 외부 입력의 요청을 받는 내부 interrupt controller임을 표시합니다.

`#interrupt-cells`는 IRQ 번호와 flag를 위해 2입니다. 첫 cell은 `dt-bindings/mfd/as3722.h`에 정의된 AS3722 interrupt source의 IRQ 번호입니다. 둘째 cell은 `dt-bindings/irq`를 사용해 `interrupts.txt`의 trigger mask로 인코딩한 flag입니다.

내부 pull-up과 AC_OK 기동

16-25

불리언 `ams,enable-internal-int-pullup`은 interrupt pin의 내부 pull-up을 켭니다. 없으면 INT pin pull-up을 끕니다. `ams,enable-internal-i2c-pullup`은 I2C SCL/SDA 내부 pull-up을 켜며 없으면 두 선의 pull-up을 끕니다.

`ams,enable-ac-ok-power-on`은 power-off mode에서 AC_OK pin을 활성화해 그 pin으로 power-off mode를 빠져나오도록 합니다.

Pinmux와 GPIO 개요

26-37

AS3722의 GPIO pin 8개는 일반 GPIO 또는 special I/O function으로 구성할 수 있습니다. 클라이언트 장치가 쓰는 공통 pinctrl 바인딩과 `pin configuration node`의 의미는 이 디렉터리의 `pinctrl-bindings.txt`를 참조합니다.

GPIO controller와 pin 설정

38-78

GPIO 및 pinmux 기능이 필요하면 `gpio-controller`와 `#gpio-cells`가 필수입니다. GPIO cell 형식은 `gpio/gpio.txt`를 따릅니다. 부팅 때 pin control 설정이 필요하면 `pinctrl-names`에 `default` 상태를 정의하고 `pinctrl[0...n]`에 상태 0부터 n까지 각 설정 노드의 phandle을 넣습니다.

각 설정 노드는 pin 목록별 subnode를 가지며 mux function과 pull-up, open-drain 같은 구성을 지정합니다. subnode의 필수 `pins`에는 `gpio0`부터 `gpio7`까지를 사용할 수 있습니다. 선택 속성은 `function`, `bias-disable`, `bias-pull-up`, `bias-pull-down`, `bias-high-impedance`, `drive-open-drain`입니다.

AS3722 pin function 값
그룹function 값
GPIO/IRQgpio, interrupt-out, gpio-in-interrupt
Supply statusvsup-vbat-low-undebounce-out, vsup-vbat-low-debounce-out
Powervoltage-in-standby, oc-pg-sd0, oc-pg-sd6, powergood-out
PWM/Clockpwm-in, pwm-out, clk32k-out
Controlwatchdog-in, soft-reset-in

원문이 허용하는 GPIO 및 special I/O function을 기능별로 정리했습니다.

Regulator supply와 외부 제어

79-124

장치에는 여러 DCDC와 LDO가 있습니다. regulator 기능이 필요하면 `regulators` 노드가 필요합니다. regulator 입력 전원은 regulator 노드의 선택 속성입니다.

AS3722 regulator 입력 supply
속성대상
vsup-sd2-supplySD2
vsup-sd3-supplySD3
vsup-sd4-supplySD4
vsup-sd5-supplySD5
vin-ldo0-supplyLDO0
vin-ldo1-6-supplyLDO1, LDO6
vin-ldo2-5-7-supplyLDO2, LDO5, LDO7
vin-ldo3-4-supplyLDO3, LDO4
vin-ldo9-10-supplyLDO9, LDO10
vin-ldo11-supplyLDO11

각 supply 속성이 공급하는 SD 또는 LDO rail입니다.

regulator subnode 이름은 `sd[0-6]`, `ldo[0-7]`, `ldo[9-11]` 중 하나여야 합니다. 각 노드는 해당 regulator의 constraint와 초기화 정보를 담으며 표준 속성은 `regulator.txt`를 따릅니다.

`ams,ext-control`은 rail을 제어하는 외부 입력을 선택합니다. 0은 외부 제어 없음, 1은 ENABLE1, 2는 ENABLE2, 3은 ENABLE3 pin입니다. 생략하면 외부 제어가 없다고 간주하며 매크로는 `dt-bindings/mfd/as3722.h`에 있습니다. `ams,enable-tracking`은 SD1 tracking을 켜며 LDO3에서만 지원됩니다.

System power-off

125-132

AS3722는 모든 rail을 꺼 시스템 전원을 차단할 수 있습니다. 장치 노드에 불리언 `ams,system-power-controller`를 두면 이 장치를 통한 power-off 기능을 활성화합니다.

Pinmux와 regulator 예제

133-214

예제는 헤더 `dt-bindings/mfd/as3722.h`를 포함하고 I2C 주소 `0x48`, system power controller, 두 interrupt cell과 두 GPIO cell을 지정합니다. GPIO0은 pull-down GPIO, GPIO1·2·4·7은 pull-up GPIO, GPIO5는 32kHz clock output입니다.

regulator 예제에서 SD0은 ENABLE2, SD1은 ENABLE1 외부 입력으로 제어됩니다. SD0·SD1은 0.7~1.4V, SD2는 1.35V, SD4는 1.05V, SD5는 1.8V로 항상 켜집니다. 원문의 `...`와 `....` 생략 표기는 그대로 보존합니다.

#include <dt-bindings/mfd/as3722.h>
...
ams3722 {
        compatible = "ams,as3722";
        reg = <0x48>;

        ams,system-power-controller;

        interrupt-parent = <&intc>;
        interrupt-controller;
        #interrupt-cells = <2>;

        gpio-controller;
        #gpio-cells = <2>;

        pinctrl-names = "default";
        pinctrl-0 = <&as3722_default>;

        as3722_default: pinmux {
                        gpio0 {
                                pins = "gpio0";
                                function = "gpio";
                                bias-pull-down;
                        };

                        gpio1_2_4_7 {
                                pins = "gpio1", "gpio2", "gpio4", "gpio7";
                                function = "gpio";
                                bias-pull-up;
                        };

                        gpio5 {
                                pins = "gpio5";
                                function = "clk32k_out";
                        };
        }

        regulators {
                        vsup-sd2-supply = <...>;
                        ...

                        sd0 {
                                regulator-name = "vdd_cpu";
                                regulator-min-microvolt = <700000>;
                                regulator-max-microvolt = <1400000>;
                                regulator-always-on;
                                ams,ext-control = <2>;
                        };

                        sd1 {
                                regulator-name = "vdd_core";
                                regulator-min-microvolt = <700000>;
                                regulator-max-microvolt = <1400000>;
                                regulator-always-on;
                                ams,ext-control = <1>;
                        };

                        sd2 {
                                regulator-name = "vddio_ddr";
                                regulator-min-microvolt = <1350000>;
                                regulator-max-microvolt = <1350000>;
                                regulator-always-on;
                        };

                        sd4 {
                                regulator-name = "avdd-hdmi-pex";
                                regulator-min-microvolt = <1050000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-always-on;
                        };

                        sd5 {
                                regulator-name = "vdd-1v8";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
                                regulator-always-on;
                        };
                        ....
        };
};