요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Palmas Pincontrol bindings
The pins of Palmas device can be set on different option and provides
the configuration for Pull UP/DOWN, open drain etc.
Required properties:
- compatible: It must be one of following:
- "ti,palmas-pinctrl" for Palma series of the pincontrol.
- "ti,tps65913-pinctrl" for Palma series device TPS65913.
- "ti,tps80036-pinctrl" for Palma series device TPS80036.
Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".
Palmas's pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
list of pins. This configuration can include the mux function to select on
those pin(s), and various pin configuration parameters, such as pull-up,
open drain.
The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content.
Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.
Optional properties:
- ti,palmas-enable-dvfs1: Enable DVFS1. Configure pins for DVFS1 mode.
Selection primary or secondary function associated to I2C2_SCL_SCE,
I2C2_SDA_SDO pin/pad for DVFS1 interface
- ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode.
Selection primary or secondary function associated to GPADC_START
and SYSEN2 pin/pad for DVFS2 interface
- ti,palmas-override-powerhold: This is applicable for PMICs for which
GPIO7 is configured in POWERHOLD mode which has higher priority
over DEV_ON bit and keeps the PMIC supplies on even after the DEV_ON
bit is turned off. This property enables driver to over ride the
POWERHOLD value to GPIO7 so as to turn off the PMIC in power off
scenarios. So for GPIO7 if ti,palmas-override-powerhold is set
then the GPIO_7 field should never be muxed to anything else.
It should be set to POWERHOLD by default and only in case of
power off scenarios the driver will over ride the mux value.
This binding uses the following generic properties as defined in
pinctrl-bindings.txt:
Required: pins
Options: function, bias-disable, bias-pull-up, bias-pull-down,
drive-open-drain.
Note that many of these properties are only valid for certain specific pins.
See the Palmas device datasheet for complete details regarding which pins
support which functionality.
Valid values for pin names are:
gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, vac, powergood,
nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2,
int.
Valid value of function names are:
gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det,
vac, vacok, powergood, usb_psel, msecure, pwrhold, int, nreswarm,
simrsto, simrsti, low_vbat, wireless_chrg1, rcm, pwrdown, gpadc_start,
reset_in, nsleep, enable.
There are 4 special functions: opt0, opt1, opt2 and opt3. If any of these
functions is selected then directly pins register will be written with 0, 1, 2
or 3 respectively if it is valid for that pins or list of pins.
Example:
palmas: tps65913 {
....
pinctrl {
compatible = "ti,tps65913-pinctrl";
ti,palmas-enable-dvfs1;
pinctrl-names = "default";
pinctrl-0 = <&palmas_pins_state>;
palmas_pins_state: pinmux {
gpio0 {
pins = "gpio0";
function = "id";
bias-pull-up;
};
vac {
pins = "vac";
function = "vacok";
bias-pull-down;
};
gpio5 {
pins = "gpio5";
function = "opt0";
drive-open-drain = <1>;
};
};
};
....
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Palmas pin configuration model
1-30Palmas pin은 여러 option으로 설정할 수 있고 pull-up/down, open drain 등을 구성합니다. `compatible`은 `ti,palmas-pinctrl`, TPS65913용 `ti,tps65913-pinctrl`, TPS80036용 `ti,tps80036-pinctrl` 중 하나입니다.
공통 binding은 같은 directory의 `pinctrl-bindings.txt`를 따릅니다. Palmas pin configuration node는 임의 개수의 subnode를 담고 각 subnode는 pin 목록의 mux function과 pull-up·open-drain 같은 parameter를 표현합니다. 이름은 중요하지 않고 content만으로 처리합니다.
각 subnode는 명시된 parameter에만 영향을 줍니다. Mux function만 있으면 pin configuration parameter 정보가 없고, pull-up만 있으면 mux function 정보가 없습니다.
DVFS와 POWERHOLD custom 속성
31-47`ti,palmas-enable-dvfs1`은 I2C2_SCL_SCE와 I2C2_SDA_SDO pin/pad의 primary 또는 secondary function을 선택해 DVFS1 interface를 활성화합니다. `ti,palmas-enable-dvfs2`는 GPADC_START와 SYSEN2에 같은 방식으로 DVFS2를 활성화합니다.
`ti,palmas-override-powerhold`는 GPIO7 POWERHOLD가 DEV_ON보다 높은 우선순위로 supply를 계속 켜는 PMIC에서 power-off 때 driver가 POWERHOLD 값을 override하도록 합니다. 이 property를 쓰면 GPIO7을 다른 function으로 mux하면 안 되고 default는 POWERHOLD여야 합니다.
Generic 속성과 pin·function 값
48-70필수 generic property는 `pins`이고 선택 속성은 `function`, `bias-disable`, `bias-pull-up`, `bias-pull-down`, `drive-open-drain`입니다. 많은 속성은 특정 pin에서만 유효하므로 정확한 지원 범위는 Palmas datasheet를 확인합니다.
| Kind | Valid values |
|---|---|
| Pins | gpio0..gpio15, vac, powergood, nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2, int |
| Functions | gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det, vac, vacok, powergood, usb_psel, msecure, pwrhold, int, nreswarm, simrsto, simrsti, low_vbat, wireless_chrg1, rcm, pwrdown, gpadc_start, reset_in, nsleep, enable |
Special opt function
71-74`opt0`부터 `opt3`까지 special function을 선택하면 해당 pin 또는 pin 목록에 유효한 경우 pin register에 각각 0부터 3을 직접 씁니다.
| Function | Register value |
|---|---|
| opt0 | 0 |
| opt1 | 1 |
| opt2 | 2 |
| opt3 | 3 |
TPS65913 pinctrl 예제
75-105DVFS1을 활성화하고 GPIO0은 ID와 pull-up, VAC는 VACOK와 pull-down, GPIO5는 opt0와 open-drain으로 구성하는 예제입니다.
palmas: tps65913 {
....
pinctrl {
compatible = "ti,tps65913-pinctrl";
ti,palmas-enable-dvfs1;
pinctrl-names = "default";
pinctrl-0 = <&palmas_pins_state>;
palmas_pins_state: pinmux {
gpio0 {
pins = "gpio0";
function = "id";
bias-pull-up;
};
vac {
pins = "vac";
function = "vacok";
bias-pull-down;
};
gpio5 {
pins = "gpio5";
function = "opt0";
drive-open-drain = <1>;
};
};
};
....
};
요약과 해설
pinctrl-palmas.txt:1-105Palmas·TPS65913·TPS80036 compatible과 pin/function·special opt 값을 정리합니다.