요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
Device has 8 GPIO pins which can be configured as GPIO as well as the
special IO functions.
Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
for details of the common pinctrl bindings used by client devices,
including the meaning of the phrase "pin configuration node".
Optional Pinmux properties:
--------------------------
Following properties are required if default setting of pins are required
at boot.
- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
<pinctrl-bindings.txt>.
The pin configurations are defined as child of the pinctrl states node. Each
sub-node have following properties:
Required properties:
------------------
- pins: List of pins. Valid values of pins properties are:
gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
Optional properties:
-------------------
Following are optional properties defined as pinmux DT binding document
<pinctrl-bindings.txt>. Absence of properties will leave the configuration
on default.
function,
drive-push-pull,
drive-open-drain,
bias-pull-up,
bias-pull-down.
Valid values for function properties are:
gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
reference-out
There are also customised properties for the GPIO1, GPIO2 and GPIO3. These
customised properties are required to configure FPS configuration parameters
of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
detail of Flexible Power Sequence (FPS).
- maxim,active-fps-source: FPS source for the GPIOs to get
enabled/disabled when system is in
active state. Valid values are:
- MAX77620_FPS_SRC_0,
FPS source is FPS0.
- MAX77620_FPS_SRC_1,
FPS source is FPS1
- MAX77620_FPS_SRC_2 and
FPS source is FPS2
- MAX77620_FPS_SRC_NONE.
GPIO is not controlled
by FPS events and it gets
enabled/disabled by register
access.
Absence of this property will leave
the FPS configuration register for that
GPIO to default configuration.
- maxim,active-fps-power-up-slot: Sequencing event slot number on which
the GPIO get enabled when
master FPS input event set to HIGH.
Valid values are 0 to 7.
This is applicable if FPS source is
selected as FPS0, FPS1 or FPS2.
- maxim,active-fps-power-down-slot: Sequencing event slot number on which
the GPIO get disabled when master
FPS input event set to LOW.
Valid values are 0 to 7.
This is applicable if FPS source is
selected as FPS0, FPS1 or FPS2.
- maxim,suspend-fps-source: This is same as property
"maxim,active-fps-source" but value
get configured when system enters in
to suspend state.
- maxim,suspend-fps-power-up-slot: This is same as property
"maxim,active-fps-power-up-slot" but
this value get configured into FPS
configuration register when system
enters into suspend.
This is applicable if suspend state
FPS source is selected as FPS0, FPS1 or
- maxim,suspend-fps-power-down-slot: This is same as property
"maxim,active-fps-power-down-slot" but
this value get configured into FPS
configuration register when system
enters into suspend.
This is applicable if suspend state
FPS source is selected as FPS0, FPS1 or
FPS2.
Example:
--------
#include <dt-bindings/mfd/max77620.h>
...
max77620@3c {
pinctrl-names = "default";
pinctrl-0 = <&spmic_default>;
spmic_default: pinmux@0 {
pin_gpio0 {
pins = "gpio0";
function = "gpio";
};
pin_gpio1 {
pins = "gpio1";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
};
pin_gpio2 {
pins = "gpio2";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MAX77620 pinctrl과 default state
1-20Maxim Semiconductor MAX77620 PMIC에는 GPIO 또는 special I/O function으로 구성할 수 있는 GPIO pin 8개가 있습니다. 공통 binding과 pin configuration node의 의미는 `devicetree/bindings/pinctrl/pinctrl-bindings.txt`를 참조합니다.
Boot 때 default pin 설정이 필요하면 `pinctrl-names`와 `pinctrl[0...n]`을 사용합니다. Pin configuration은 pinctrl state node의 child subnode로 정의합니다.
Pin과 function 설정
21-40필수 `pins`는 설정할 pin 목록입니다. 선택적 `function`, `drive-push-pull`, `drive-open-drain`, `bias-pull-up`, `bias-pull-down`은 공통 pinmux binding을 따르며, 생략하면 default configuration을 유지합니다.
| Kind | Valid values |
|---|---|
| Pins | gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7 |
| Functions | gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in, reference-out |
GPIO1·2·3의 active FPS source
41-63GPIO1, GPIO2, GPIO3에는 Flexible Power Sequence(FPS) parameter를 설정하는 custom property가 있습니다. 자세한 FPS 정의는 `devicetree/bindings/mfd/max77620.txt`를 참조합니다.
`maxim,active-fps-source`는 system active state에서 GPIO enable/disable을 제어할 FPS source입니다. Property가 없으면 해당 GPIO의 FPS configuration register는 default를 유지합니다.
| Value | Meaning |
|---|---|
| MAX77620_FPS_SRC_0 | FPS0 |
| MAX77620_FPS_SRC_1 | FPS1 |
| MAX77620_FPS_SRC_2 | FPS2 |
| MAX77620_FPS_SRC_NONE | FPS event가 제어하지 않으며 register access로 enable/disable |
Active power-up·power-down slot
64-77`maxim,active-fps-power-up-slot`은 master FPS input이 HIGH가 될 때 GPIO를 enable할 sequencing event slot이고, `maxim,active-fps-power-down-slot`은 LOW가 될 때 GPIO를 disable할 slot입니다. 둘 다 0부터 7까지이며 source가 FPS0, FPS1, FPS2일 때 적용됩니다.
Suspend FPS 설정
78-99`maxim,suspend-fps-source`는 `maxim,active-fps-source`와 같지만 suspend 진입 때 설정됩니다. `maxim,suspend-fps-power-up-slot`과 `maxim,suspend-fps-power-down-slot`도 active slot과 같은 의미이며 suspend 진입 때 FPS configuration register에 적용됩니다.
Suspend slot property는 suspend FPS source가 FPS0, FPS1 또는 FPS2일 때 적용됩니다. 원문 L90은 목록을 `FPS0, FPS1 or`에서 끝내지만 power-down 설명 L98에서 FPS2까지 명시합니다.
MAX77620 GPIO와 FPS 예제
100-127GPIO0을 일반 GPIO로, GPIO1과 GPIO2를 `fps-out`으로 구성하고 각각 FPS0과 FPS1 source에 연결하는 default pinctrl 예제입니다.
#include <dt-bindings/mfd/max77620.h>
...
max77620@3c {
pinctrl-names = "default";
pinctrl-0 = <&spmic_default>;
spmic_default: pinmux@0 {
pin_gpio0 {
pins = "gpio0";
function = "gpio";
};
pin_gpio1 {
pins = "gpio1";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
};
pin_gpio2 {
pins = "gpio2";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
};
};
};
요약과 해설
pinctrl-max77620.txt:1-1278개 GPIO의 mux·bias·drive와 GPIO1·2·3의 FPS source·slot 계약을 설명합니다.