← Documents Documentation/devicetree/bindings/pinctrl/pinctrl-vt8500.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

VIA VT8500·WonderMedia WM8xxx Pinctrl

VT8500·WM8xxx 결합 pinmux/GPIO controller의 function과 pull 설정입니다.

Source pathDocumentation/devicetree/bindings/pinctrl/pinctrl-vt8500.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

pinctrl-vt8500.txt:1-57

Controller cell 계약, pin별 mux·pull 독립 적용 방식, WM8505 node 예제를 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 VIA VT8500 and Wondermedia WM8xxx-series pinmux/gpio controller
2
3 These SoCs contain a combined Pinmux/GPIO module. Each pin may operate as
4 either a GPIO in, GPIO out or as an alternate function (I2C, SPI etc).
5
6 Required properties:
7 - compatible: "via,vt8500-pinctrl", "wm,wm8505-pinctrl", "wm,wm8650-pinctrl",
8 "wm8750-pinctrl" or "wm,wm8850-pinctrl"
9 - reg: Should contain the physical address of the module's registers.
10 - interrupt-controller: Marks the device node as an interrupt controller.
11 - #interrupt-cells: Should be two.
12 - gpio-controller: Marks the device node as a GPIO controller.
13 - #gpio-cells : Should be two. The first cell is the pin number and the
14 second cell is used to specify optional parameters.
15 bit 0 - active low
16
17 Please refer to ../gpio/gpio.txt for a general description of GPIO bindings.
18
19 Please refer to pinctrl-bindings.txt in this directory for details of the
20 common pinctrl bindings used by client devices, including the meaning of the
21 phrase "pin configuration node".
22
23 Each pin configuration node lists the pin(s) to which it applies, and one or
24 more of the mux functions to select on those pin(s), and pull-up/down
25 configuration. Each subnode only affects those parameters that are explicitly
26 listed. In other words, a subnode that lists only a mux function implies no
27 information about any pull configuration. Similarly, a subnode that lists only
28 a pull parameter implies no information about the mux function.
29
30 Required subnode-properties:
31 - wm,pins: An array of cells. Each cell contains the ID of a pin.
32
33 Optional subnode-properties:
34 - wm,function: Integer, containing the function to mux to the pin(s):
35 0: GPIO in
36 1: GPIO out
37 2: alternate
38
39 - wm,pull: Integer, representing the pull-down/up to apply to the pin(s):
40 0: none
41 1: down
42 2: up
43
44 Each of wm,function and wm,pull may contain either a single value which
45 will be applied to all pins in wm,pins, or one value for each entry in
46 wm,pins.
47
48 Example:
49
50 pinctrl: pinctrl {
51 compatible = "wm,wm8505-pinctrl";
52 reg = <0xD8110000 0x10000>;
53 interrupt-controller;
54 #interrupt-cells = <2>;
55 gpio-controller;
56 #gpio-cells = <2>;
57 };
58

3. 한국어 전문 번역

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

VT8500·WM8xxx pinmux/GPIO controller

1-21

VIA VT8500과 WonderMedia WM8xxx 계열 SoC에는 pinmux와 GPIO가 결합된 module이 있습니다. 각 pin은 GPIO input, GPIO output 또는 I2C·SPI 같은 alternate function 중 하나로 동작할 수 있습니다.

필수 `compatible`은 `via,vt8500-pinctrl`, `wm,wm8505-pinctrl`, `wm,wm8650-pinctrl`, `wm8750-pinctrl`, `wm,wm8850-pinctrl` 중 하나입니다. `reg`에는 module register의 physical address를 넣습니다.

`interrupt-controller`는 node를 interrupt controller로 표시하고 `#interrupt-cells`는 2여야 합니다. `gpio-controller`는 GPIO controller 표시이며 `#gpio-cells`도 2입니다. 첫 cell은 pin 번호, 두 번째 cell은 선택 parameter이고 bit 0은 active low를 뜻합니다.

일반 GPIO binding은 `../gpio/gpio.txt`를 참조합니다. Client device가 사용하는 공통 pinctrl binding과 "pin configuration node"의 의미는 이 directory의 `pinctrl-bindings.txt`를 참조합니다.

Pin configuration subnode

22-32

각 pin configuration node는 적용할 pin, 그 pin에서 선택할 하나 이상의 mux function, pull-up/down 구성을 나열합니다. 각 subnode는 명시적으로 적은 parameter에만 영향을 줍니다.

따라서 mux function만 나열한 subnode는 pull configuration 정보를 뜻하지 않으며, pull parameter만 나열한 subnode도 mux function 정보를 뜻하지 않습니다. 필수 `wm,pins`는 cell 배열이고 각 cell은 pin ID 하나를 담습니다.

Function과 pull 값

33-47

선택적 `wm,function`은 pin에 mux할 function을 나타내는 integer입니다.

Value`wm,function` meaning
0GPIO input
1GPIO output
2Alternate function

선택적 `wm,pull`은 pin에 적용할 pull-down/up을 나타내는 integer입니다.

Value`wm,pull` meaning
0None
1Pull-down
2Pull-up

`wm,function`과 `wm,pull`은 각각 값 하나만 담아 `wm,pins`의 모든 pin에 공통 적용하거나, `wm,pins`의 각 entry에 대응하는 값을 하나씩 담을 수 있습니다.

WM8505 controller 예제

48-57

WM8505 pinctrl node에 register 범위, interrupt controller, GPIO controller와 각 cell 수를 선언하는 예제입니다.

pinctrl: pinctrl {
        compatible = "wm,wm8505-pinctrl";
        reg = <0xD8110000 0x10000>;
        interrupt-controller;
        #interrupt-cells = <2>;
        gpio-controller;
        #gpio-cells = <2>;
};