← Documents Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

ST-Ericsson Nomadik Pinctrl

Nomadik mux와 active·sleep pin configuration 및 UART state binding입니다.

Source pathDocumentation/devicetree/bindings/pinctrl/ste,nomadik.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

ste,nomadik.txt:1-148

Controller backend, generic mux subnode, 21개 configuration 값, UART0 default·sleep state를 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ST Ericsson Nomadik pinmux controller
2
3 Required properties:
4 - compatible: "stericsson,db8500-pinctrl", "stericsson,db8540-pinctrl",
5 "stericsson,stn8815-pinctrl"
6 - nomadik-gpio-chips: array of phandles to the corresponding GPIO chips
7 (these have the register ranges used by the pin controller).
8 - prcm: phandle to the PRCMU managing the back end of this pin controller
9
10 Please refer to pinctrl-bindings.txt in this directory for details of the
11 common pinctrl bindings used by client devices, including the meaning of the
12 phrase "pin configuration node".
13
14 ST Ericsson's pin configuration nodes act as a container for an arbitrary number of
15 subnodes. Each of these subnodes represents some desired configuration for a
16 pin, a group, or a list of pins or groups. This configuration can include the
17 mux function to select on those pin(s)/group(s), and various pin configuration
18 parameters, such as input, output, pull up, pull down...
19
20 The name of each subnode is not important; all subnodes should be enumerated
21 and processed purely based on their content. The subnodes use the generic
22 pin multiplexing node layout from the standard pin control bindings
23 (see pinctrl-bindings.txt):
24
25 Required pin multiplexing subnode properties:
26 - function: A string containing the name of the function to mux to the
27 pin or group.
28 - groups : An array of strings. Each string contains the name of a pin
29 group that will be combined with the function to form a multiplexing
30 set-up.
31
32 Required pin configuration subnode properties:
33 - pins: A string array describing the pins affected by the configuration
34 in the node.
35 - ste,config: Handle of pin configuration node
36 (e.g. ste,config = <&slpm_in_wkup_pdis>)
37
38 - ste,input : <0/1/2>
39 0: input with no pull
40 1: input with pull up,
41 2: input with pull down,
42
43 - ste,output: <0/1/2>
44 0: output low,
45 1: output high,
46 2: output (value is not specified).
47
48 - ste,sleep: <0/1>
49 0: sleep mode disable,
50 1: sleep mode enable.
51
52 - ste,sleep-input: <0/1/2/3>
53 0: sleep input with no pull,
54 1: sleep input with pull up,
55 2: sleep input with pull down.
56 3: sleep input and keep last input configuration (no pull, pull up or pull down).
57
58 - ste,sleep-output: <0/1/2>
59 0: sleep output low,
60 1: sleep output high,
61 2: sleep output (value is not specified).
62
63 - ste,sleep-gpio: <0/1>
64 0: disable sleep gpio mode,
65 1: enable sleep gpio mode.
66
67 - ste,sleep-wakeup: <0/1>
68 0: wake-up detection enabled,
69 1: wake-up detection disabled.
70
71 - ste,sleep-pull-disable: <0/1>
72 0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
73 1: GPIO pull-up and pull-down resistor are disabled.
74
75 Example board file extract:
76
77 pinctrl@80157000 {
78 compatible = "stericsson,db8500-pinctrl";
79 nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>;
80 prcm = <&prcmu>;
81
82 pinctrl-names = "default";
83
84 slpm_in_wkup_pdis: slpm_in_wkup_pdis {
85 ste,sleep = <1>;
86 ste,sleep-input = <3>;
87 ste,sleep-wakeup = <1>;
88 ste,sleep-pull-disable = <0>;
89 };
90
91 slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
92 ste,sleep = <1>;
93 ste,sleep-output = <1>;
94 ste,sleep-wakeup = <1>;
95 ste,sleep-pull-disable = <0>;
96 };
97
98 slpm_out_wkup_pdis: slpm_out_wkup_pdis {
99 ste,sleep = <1>;
100 ste,sleep-output = <2>;
101 ste,sleep-wakeup = <1>;
102 ste,sleep-pull-disable = <0>;
103 };
104
105 uart0 {
106 uart0_default_mux: uart0_mux {
107 u0_default_mux {
108 function = "u0";
109 pins = "u0_a_1";
110 };
111 };
112 uart0_default_mode: uart0_default {
113 uart0_default_cfg1 {
114 pins = "GPIO0", "GPIO2";
115 ste,input = <1>;
116 };
117
118 uart0_default_cfg2 {
119 pins = "GPIO1", "GPIO3";
120 ste,output = <1>;
121 };
122 };
123 uart0_sleep_mode: uart0_sleep {
124 uart0_sleep_cfg1 {
125 pins = "GPIO0", "GPIO2";
126 ste,config = <&slpm_in_wkup_pdis>;
127 };
128 uart0_sleep_cfg2 {
129 pins = "GPIO1";
130 ste,config = <&slpm_out_hi_wkup_pdis>;
131 };
132 uart0_sleep_cfg3 {
133 pins = "GPIO3";
134 ste,config = <&slpm_out_wkup_pdis>;
135 };
136 };
137 };
138 };
139
140 uart@80120000 {
141 compatible = "arm,pl011", "arm,primecell";
142 reg = <0x80120000 0x1000>;
143 interrupts = <0 11 0x4>;
144
145 pinctrl-names = "default","sleep";
146 pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
147 pinctrl-1 = <&uart0_sleep_mode>;
148 };
149

3. 한국어 전문 번역

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

Nomadik controller 필수 속성

1-12

ST-Ericsson Nomadik pinmux controller의 필수 `compatible`은 `stericsson,db8500-pinctrl`, `stericsson,db8540-pinctrl`, `stericsson,stn8815-pinctrl` 중 하나입니다.

`nomadik-gpio-chips`는 대응하는 GPIO chip들의 phandle 배열이며, 이 GPIO chip들이 pin controller가 사용하는 register range를 가집니다. `prcm`은 pin controller backend를 관리하는 PRCMU의 phandle입니다.

Client device의 공통 pinctrl binding과 "pin configuration node"의 의미는 이 directory의 `pinctrl-bindings.txt`를 참조합니다.

Container와 pin multiplexing subnode

13-30

ST-Ericsson pin configuration node는 임의 개수의 subnode를 담는 container입니다. 각 subnode는 pin 하나, group 하나 또는 pin/group 목록에 원하는 구성을 표현하며 mux function과 input·output·pull-up·pull-down 같은 pin configuration parameter를 포함할 수 있습니다.

Subnode 이름은 중요하지 않습니다. 모든 subnode를 열거한 뒤 이름이 아니라 content만으로 처리해야 합니다. Subnode는 표준 pin control binding의 generic pin multiplexing node layout을 사용합니다.

Pin multiplexing subnode에는 mux할 function 이름 string인 `function`과 pin group 이름 string 배열인 `groups`가 필수입니다. 각 group은 function과 결합되어 multiplexing setup을 만듭니다.

Pin configuration과 active 값

31-50

Pin configuration subnode에는 영향을 받는 pin을 나타내는 string 배열 `pins`와 pin configuration node handle인 `ste,config`가 필요합니다. 예를 들어 `ste,config = <&slpm_in_wkup_pdis>`처럼 사용합니다.

`ste,input`, `ste,output`, `ste,sleep`의 값과 의미는 다음과 같습니다.

PropertyValueMeaning
ste,input0Input, no pull
ste,input1Input with pull-up
ste,input2Input with pull-down
ste,output0Output low
ste,output1Output high
ste,output2Output, value unspecified
ste,sleep0Sleep mode disabled
ste,sleep1Sleep mode enabled

Sleep input·output·GPIO·wakeup·pull

51-74

Sleep 상태의 input, output, GPIO mode, wake-up detection, pull resistor는 아래 값으로 구성합니다. `ste,sleep-input = <3>`은 no pull, pull-up, pull-down 중 마지막 input 구성을 유지합니다.

PropertyValueMeaning
ste,sleep-input0Sleep input, no pull
ste,sleep-input1Sleep input with pull-up
ste,sleep-input2Sleep input with pull-down
ste,sleep-input3Sleep input, keep last input configuration
ste,sleep-output0Sleep output low
ste,sleep-output1Sleep output high
ste,sleep-output2Sleep output, value unspecified
ste,sleep-gpio0Sleep GPIO mode disabled
ste,sleep-gpio1Sleep GPIO mode enabled
ste,sleep-wakeup0Wake-up detection enabled
ste,sleep-wakeup1Wake-up detection disabled
ste,sleep-pull-disable0Input일 때 GPIO pull-up/down resistor enabled
ste,sleep-pull-disable1GPIO pull-up과 pull-down resistor disabled

`ste,sleep-wakeup`은 0이 wake-up detection 활성화, 1이 비활성화이므로 property 이름만 보고 값을 반대로 해석하지 않아야 합니다.

Controller와 UART0 state 예제

75-138

DB8500 controller 예제는 GPIO0부터 GPIO3까지의 chip과 PRCMU를 연결합니다. `slpm_in_wkup_pdis`, `slpm_out_hi_wkup_pdis`, `slpm_out_wkup_pdis` 세 reusable sleep configuration을 정의합니다.

UART0의 default mux는 `u0` function을 `u0_a_1`에 적용합니다. Default configuration에서 GPIO0·2는 pull-up input, GPIO1·3은 high output입니다. Sleep configuration에서는 GPIO0·2가 마지막 input 설정을 유지하고 GPIO1은 high output, GPIO3은 값 미지정 output을 사용하며 wake-up detection은 비활성화됩니다.

원문 예제 L109는 앞서 필수 mux property로 설명한 `groups` 대신 `pins = "u0_a_1"`을 사용합니다. 코드 보존을 위해 그대로 싣습니다.

pinctrl@80157000 {
        compatible = "stericsson,db8500-pinctrl";
        nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>;
        prcm = <&prcmu>;

        pinctrl-names = "default";

        slpm_in_wkup_pdis: slpm_in_wkup_pdis {
                ste,sleep = <1>;
                ste,sleep-input = <3>;
                ste,sleep-wakeup = <1>;
                ste,sleep-pull-disable = <0>;
        };

        slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
                ste,sleep = <1>;
                ste,sleep-output = <1>;
                ste,sleep-wakeup = <1>;
                ste,sleep-pull-disable = <0>;
        };

        slpm_out_wkup_pdis: slpm_out_wkup_pdis {
                ste,sleep = <1>;
                ste,sleep-output = <2>;
                ste,sleep-wakeup = <1>;
                ste,sleep-pull-disable = <0>;
        };

        uart0 {
                uart0_default_mux: uart0_mux {
                        u0_default_mux {
                                function = "u0";
                                pins = "u0_a_1";
                        };
                };
                uart0_default_mode: uart0_default {
                        uart0_default_cfg1 {
                                pins = "GPIO0", "GPIO2";
                                ste,input = <1>;
                        };

                        uart0_default_cfg2 {
                                pins = "GPIO1", "GPIO3";
                                ste,output = <1>;
                        };
                };
                uart0_sleep_mode: uart0_sleep {
                        uart0_sleep_cfg1 {
                                pins = "GPIO0", "GPIO2";
                                ste,config = <&slpm_in_wkup_pdis>;
                        };
                        uart0_sleep_cfg2 {
                                pins = "GPIO1";
                                ste,config = <&slpm_out_hi_wkup_pdis>;
                        };
                        uart0_sleep_cfg3 {
                                pins = "GPIO3";
                                ste,config = <&slpm_out_wkup_pdis>;
                        };
                };
        };
};

PL011 UART consumer 예제

139-148

PL011 UART node는 `default`와 `sleep` 두 pinctrl state를 선언합니다. Default state는 UART0 mux와 active mode를 함께 참조하고, sleep state는 `uart0_sleep_mode`를 참조합니다.

uart@80120000 {
        compatible = "arm,pl011", "arm,primecell";
        reg = <0x80120000 0x1000>;
        interrupts = <0 11 0x4>;

        pinctrl-names = "default","sleep";
        pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
        pinctrl-1 = <&uart0_sleep_mode>;
};