xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSamsung GPIO and Pin Mux/Config controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSamsung's ARM based SoC's integrates a GPIO and Pin mux/config hardware
4*4882a593Smuzhiyuncontroller. It controls the input/output settings on the available pads/pins
5*4882a593Smuzhiyunand also provides ability to multiplex and configure the output of various
6*4882a593Smuzhiyunon-chip controllers onto these pads.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunRequired Properties:
9*4882a593Smuzhiyun- compatible: should be one of the following.
10*4882a593Smuzhiyun  - "samsung,s3c2412-pinctrl": for S3C2412-compatible pin-controller,
11*4882a593Smuzhiyun  - "samsung,s3c2416-pinctrl": for S3C2416-compatible pin-controller,
12*4882a593Smuzhiyun  - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller,
13*4882a593Smuzhiyun  - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller,
14*4882a593Smuzhiyun  - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller,
15*4882a593Smuzhiyun  - "samsung,s5pv210-pinctrl": for S5PV210-compatible pin-controller,
16*4882a593Smuzhiyun  - "samsung,exynos3250-pinctrl": for Exynos3250 compatible pin-controller.
17*4882a593Smuzhiyun  - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller.
18*4882a593Smuzhiyun  - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller.
19*4882a593Smuzhiyun  - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
20*4882a593Smuzhiyun  - "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller.
21*4882a593Smuzhiyun  - "samsung,exynos5410-pinctrl": for Exynos5410 compatible pin-controller.
22*4882a593Smuzhiyun  - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
23*4882a593Smuzhiyun  - "samsung,exynos5433-pinctrl": for Exynos5433 compatible pin-controller.
24*4882a593Smuzhiyun  - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller.
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun- reg: Base address of the pin controller hardware module and length of
27*4882a593Smuzhiyun  the address space it occupies.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun  - reg: Second base address of the pin controller if the specific registers
30*4882a593Smuzhiyun  of the pin controller are separated into the different base address.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun	Eg: GPF[1-5] of Exynos5433 are separated into the two base address.
33*4882a593Smuzhiyun	- First base address is for GPAx and GPF[1-5] external interrupt
34*4882a593Smuzhiyun	  registers.
35*4882a593Smuzhiyun	- Second base address is for GPF[1-5] pinctrl registers.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun	pinctrl_0: pinctrl@10580000 {
38*4882a593Smuzhiyun		compatible = "samsung,exynos5433-pinctrl";
39*4882a593Smuzhiyun		reg = <0x10580000 0x1a20>, <0x11090000 0x100>;
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun		wakeup-interrupt-controller {
42*4882a593Smuzhiyun			compatible = "samsung,exynos7-wakeup-eint";
43*4882a593Smuzhiyun			interrupts = <0 16 0>;
44*4882a593Smuzhiyun		};
45*4882a593Smuzhiyun	};
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun- Pin banks as child nodes: Pin banks of the controller are represented by child
48*4882a593Smuzhiyun  nodes of the controller node. Bank name is taken from name of the node. Each
49*4882a593Smuzhiyun  bank node must contain following properties:
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun  - gpio-controller: identifies the node as a gpio controller and pin bank.
52*4882a593Smuzhiyun  - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
53*4882a593Smuzhiyun    binding is used, the amount of cells must be specified as 2. See the below
54*4882a593Smuzhiyun    mentioned gpio binding representation for description of particular cells.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun	Eg: <&gpx2 6 0>
57*4882a593Smuzhiyun	<[phandle of the gpio controller node]
58*4882a593Smuzhiyun	[pin number within the gpio controller]
59*4882a593Smuzhiyun	[flags]>
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun	Values for gpio specifier:
62*4882a593Smuzhiyun	- Pin number: is a value between 0 to 7.
63*4882a593Smuzhiyun	- Flags: 0 - Active High
64*4882a593Smuzhiyun		 1 - Active Low
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun- Pin mux/config groups as child nodes: The pin mux (selecting pin function
67*4882a593Smuzhiyun  mode) and pin config (pull up/down, driver strength) settings are represented
68*4882a593Smuzhiyun  as child nodes of the pin-controller node. There should be at least one
69*4882a593Smuzhiyun  child node and there is no limit on the count of these child nodes. It is
70*4882a593Smuzhiyun  also possible for a child node to consist of several further child nodes
71*4882a593Smuzhiyun  to allow grouping multiple pinctrl groups into one. The format of second
72*4882a593Smuzhiyun  level child nodes is exactly the same as for first level ones and is
73*4882a593Smuzhiyun  described below.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun  The child node should contain a list of pin(s) on which a particular pin
76*4882a593Smuzhiyun  function selection or pin configuration (or both) have to applied. This
77*4882a593Smuzhiyun  list of pins is specified using the property name "samsung,pins". There
78*4882a593Smuzhiyun  should be at least one pin specified for this property and there is no upper
79*4882a593Smuzhiyun  limit on the count of pins that can be specified. The pins are specified
80*4882a593Smuzhiyun  using pin names which are derived from the hardware manual of the SoC. As
81*4882a593Smuzhiyun  an example, the pins in GPA0 bank of the pin controller can be represented
82*4882a593Smuzhiyun  as "gpa0-0", "gpa0-1", "gpa0-2" and so on. The names should be in lower case.
83*4882a593Smuzhiyun  The format of the pin names should be (as per the hardware manual)
84*4882a593Smuzhiyun  "[pin bank name]-[pin number within the bank]".
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun  The pin function selection that should be applied on the pins listed in the
87*4882a593Smuzhiyun  child node is specified using the "samsung,pin-function" property. The value
88*4882a593Smuzhiyun  of this property that should be applied to each of the pins listed in the
89*4882a593Smuzhiyun  "samsung,pins" property should be picked from the hardware manual of the SoC
90*4882a593Smuzhiyun  for the specified pin group. This property is optional in the child node if
91*4882a593Smuzhiyun  no specific function selection is desired for the pins listed in the child
92*4882a593Smuzhiyun  node. The value of this property is used as-is to program the pin-controller
93*4882a593Smuzhiyun  function selector register of the pin-bank.
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun  The child node can also optionally specify one or more of the pin
96*4882a593Smuzhiyun  configuration that should be applied on all the pins listed in the
97*4882a593Smuzhiyun  "samsung,pins" property of the child node. The following pin configuration
98*4882a593Smuzhiyun  properties are supported.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun  - samsung,pin-val: Initial value of pin output buffer.
101*4882a593Smuzhiyun  - samsung,pin-pud: Pull up/down configuration.
102*4882a593Smuzhiyun  - samsung,pin-drv: Drive strength configuration.
103*4882a593Smuzhiyun  - samsung,pin-pud-pdn: Pull up/down configuration in power down mode.
104*4882a593Smuzhiyun  - samsung,pin-drv-pdn: Drive strength configuration in power down mode.
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun  The values specified by these config properties should be derived from the
107*4882a593Smuzhiyun  hardware manual and these values are programmed as-is into the pin
108*4882a593Smuzhiyun  pull up/down and driver strength register of the pin-controller.
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun  Note: A child should include at least a pin function selection property or
111*4882a593Smuzhiyun  pin configuration property (one or more) or both.
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun  The client nodes that require a particular pin function selection and/or
114*4882a593Smuzhiyun  pin configuration should use the bindings listed in the "pinctrl-bindings.txt"
115*4882a593Smuzhiyun  file.
116*4882a593Smuzhiyun
117*4882a593SmuzhiyunExternal GPIO and Wakeup Interrupts:
118*4882a593Smuzhiyun
119*4882a593SmuzhiyunThe controller supports two types of external interrupts over gpio. The first
120*4882a593Smuzhiyunis the external gpio interrupt and second is the external wakeup interrupts.
121*4882a593SmuzhiyunThe difference between the two is that the external wakeup interrupts can be
122*4882a593Smuzhiyunused as system wakeup events.
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunA. External GPIO Interrupts: For supporting external gpio interrupts, the
125*4882a593Smuzhiyun   following properties should be specified in the pin-controller device node.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun   - interrupts: interrupt specifier for the controller. The format and value of
128*4882a593Smuzhiyun     the interrupt specifier depends on the interrupt parent for the controller.
129*4882a593Smuzhiyun
130*4882a593Smuzhiyun   In addition, following properties must be present in node of every bank
131*4882a593Smuzhiyun   of pins supporting GPIO interrupts:
132*4882a593Smuzhiyun
133*4882a593Smuzhiyun   - interrupt-controller: identifies the controller node as interrupt-parent.
134*4882a593Smuzhiyun   - #interrupt-cells: the value of this property should be 2.
135*4882a593Smuzhiyun     - First Cell: represents the external gpio interrupt number local to the
136*4882a593Smuzhiyun       external gpio interrupt space of the controller.
137*4882a593Smuzhiyun     - Second Cell: flags to identify the type of the interrupt
138*4882a593Smuzhiyun       - 1 = rising edge triggered
139*4882a593Smuzhiyun       - 2 = falling edge triggered
140*4882a593Smuzhiyun       - 3 = rising and falling edge triggered
141*4882a593Smuzhiyun       - 4 = high level triggered
142*4882a593Smuzhiyun       - 8 = low level triggered
143*4882a593Smuzhiyun
144*4882a593SmuzhiyunB. External Wakeup Interrupts: For supporting external wakeup interrupts, a
145*4882a593Smuzhiyun   child node representing the external wakeup interrupt controller should be
146*4882a593Smuzhiyun   included in the pin-controller device node.
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun   Only one pin-controller device node can include external wakeup interrupts
149*4882a593Smuzhiyun   child node (in other words, only one External Wakeup Interrupts
150*4882a593Smuzhiyun   pin-controller is supported).
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun   This child node should include following properties:
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun   - compatible: identifies the type of the external wakeup interrupt controller
155*4882a593Smuzhiyun     The possible values are:
156*4882a593Smuzhiyun     - samsung,s3c2410-wakeup-eint: represents wakeup interrupt controller
157*4882a593Smuzhiyun       found on Samsung S3C24xx SoCs except S3C2412 and S3C2413,
158*4882a593Smuzhiyun     - samsung,s3c2412-wakeup-eint: represents wakeup interrupt controller
159*4882a593Smuzhiyun       found on Samsung S3C2412 and S3C2413 SoCs,
160*4882a593Smuzhiyun     - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller
161*4882a593Smuzhiyun       found on Samsung S3C64xx SoCs,
162*4882a593Smuzhiyun     - samsung,s5pv210-wakeup-eint: represents wakeup interrupt controller
163*4882a593Smuzhiyun       found on Samsung S5Pv210 SoCs,
164*4882a593Smuzhiyun     - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
165*4882a593Smuzhiyun       found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
166*4882a593Smuzhiyun     - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
167*4882a593Smuzhiyun       found on Samsung Exynos7 SoC.
168*4882a593Smuzhiyun   - interrupts: interrupt used by multiplexed wakeup interrupts.
169*4882a593Smuzhiyun
170*4882a593Smuzhiyun   In addition, following properties must be present in node of every bank
171*4882a593Smuzhiyun   of pins supporting wake-up interrupts:
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun   - interrupt-controller: identifies the node as interrupt-parent.
174*4882a593Smuzhiyun   - #interrupt-cells: the value of this property should be 2
175*4882a593Smuzhiyun     - First Cell: represents the external wakeup interrupt number local to
176*4882a593Smuzhiyun       the external wakeup interrupt space of the controller.
177*4882a593Smuzhiyun     - Second Cell: flags to identify the type of the interrupt
178*4882a593Smuzhiyun       - 1 = rising edge triggered
179*4882a593Smuzhiyun       - 2 = falling edge triggered
180*4882a593Smuzhiyun       - 3 = rising and falling edge triggered
181*4882a593Smuzhiyun       - 4 = high level triggered
182*4882a593Smuzhiyun       - 8 = low level triggered
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun   Node of every bank of pins supporting direct wake-up interrupts (without
185*4882a593Smuzhiyun   multiplexing) must contain following properties:
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun   - interrupts: interrupts of the interrupt parent which are used for external
188*4882a593Smuzhiyun     wakeup interrupts from pins of the bank, must contain interrupts for all
189*4882a593Smuzhiyun     pins of the bank.
190*4882a593Smuzhiyun
191*4882a593SmuzhiyunAliases:
192*4882a593Smuzhiyun
193*4882a593SmuzhiyunAll the pin controller nodes should be represented in the aliases node using
194*4882a593Smuzhiyunthe following format 'pinctrl{n}' where n is a unique number for the alias.
195*4882a593Smuzhiyun
196*4882a593SmuzhiyunAliases for controllers compatible with "samsung,exynos7-pinctrl":
197*4882a593Smuzhiyun- pinctrl0: pin controller of ALIVE block,
198*4882a593Smuzhiyun- pinctrl1: pin controller of BUS0 block,
199*4882a593Smuzhiyun- pinctrl2: pin controller of NFC block,
200*4882a593Smuzhiyun- pinctrl3: pin controller of TOUCH block,
201*4882a593Smuzhiyun- pinctrl4: pin controller of FF block,
202*4882a593Smuzhiyun- pinctrl5: pin controller of ESE block,
203*4882a593Smuzhiyun- pinctrl6: pin controller of FSYS0 block,
204*4882a593Smuzhiyun- pinctrl7: pin controller of FSYS1 block,
205*4882a593Smuzhiyun- pinctrl8: pin controller of BUS1 block,
206*4882a593Smuzhiyun- pinctrl9: pin controller of AUDIO block,
207*4882a593Smuzhiyun
208*4882a593SmuzhiyunExample: A pin-controller node with pin banks:
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun	pinctrl_0: pinctrl@11400000 {
211*4882a593Smuzhiyun		compatible = "samsung,exynos4210-pinctrl";
212*4882a593Smuzhiyun		reg = <0x11400000 0x1000>;
213*4882a593Smuzhiyun		interrupts = <0 47 0>;
214*4882a593Smuzhiyun
215*4882a593Smuzhiyun		/* ... */
216*4882a593Smuzhiyun
217*4882a593Smuzhiyun		/* Pin bank without external interrupts */
218*4882a593Smuzhiyun		gpy0: gpy0 {
219*4882a593Smuzhiyun			gpio-controller;
220*4882a593Smuzhiyun			#gpio-cells = <2>;
221*4882a593Smuzhiyun		};
222*4882a593Smuzhiyun
223*4882a593Smuzhiyun		/* ... */
224*4882a593Smuzhiyun
225*4882a593Smuzhiyun		/* Pin bank with external GPIO or muxed wake-up interrupts */
226*4882a593Smuzhiyun		gpj0: gpj0 {
227*4882a593Smuzhiyun			gpio-controller;
228*4882a593Smuzhiyun			#gpio-cells = <2>;
229*4882a593Smuzhiyun
230*4882a593Smuzhiyun			interrupt-controller;
231*4882a593Smuzhiyun			#interrupt-cells = <2>;
232*4882a593Smuzhiyun		};
233*4882a593Smuzhiyun
234*4882a593Smuzhiyun		/* ... */
235*4882a593Smuzhiyun
236*4882a593Smuzhiyun		/* Pin bank with external direct wake-up interrupts */
237*4882a593Smuzhiyun		gpx0: gpx0 {
238*4882a593Smuzhiyun			gpio-controller;
239*4882a593Smuzhiyun			#gpio-cells = <2>;
240*4882a593Smuzhiyun
241*4882a593Smuzhiyun			interrupt-controller;
242*4882a593Smuzhiyun			interrupt-parent = <&gic>;
243*4882a593Smuzhiyun			interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
244*4882a593Smuzhiyun				     <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>;
245*4882a593Smuzhiyun			#interrupt-cells = <2>;
246*4882a593Smuzhiyun		};
247*4882a593Smuzhiyun
248*4882a593Smuzhiyun		/* ... */
249*4882a593Smuzhiyun	};
250*4882a593Smuzhiyun
251*4882a593SmuzhiyunExample 1: A pin-controller node with pin groups.
252*4882a593Smuzhiyun
253*4882a593Smuzhiyun	#include <dt-bindings/pinctrl/samsung.h>
254*4882a593Smuzhiyun
255*4882a593Smuzhiyun	pinctrl_0: pinctrl@11400000 {
256*4882a593Smuzhiyun		compatible = "samsung,exynos4210-pinctrl";
257*4882a593Smuzhiyun		reg = <0x11400000 0x1000>;
258*4882a593Smuzhiyun		interrupts = <0 47 0>;
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun		/* ... */
261*4882a593Smuzhiyun
262*4882a593Smuzhiyun		uart0_data: uart0-data {
263*4882a593Smuzhiyun			samsung,pins = "gpa0-0", "gpa0-1";
264*4882a593Smuzhiyun			samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
265*4882a593Smuzhiyun			samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
266*4882a593Smuzhiyun			samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
267*4882a593Smuzhiyun		};
268*4882a593Smuzhiyun
269*4882a593Smuzhiyun		uart0_fctl: uart0-fctl {
270*4882a593Smuzhiyun			samsung,pins = "gpa0-2", "gpa0-3";
271*4882a593Smuzhiyun			samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
272*4882a593Smuzhiyun			samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
273*4882a593Smuzhiyun			samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
274*4882a593Smuzhiyun		};
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun		uart1_data: uart1-data {
277*4882a593Smuzhiyun			samsung,pins = "gpa0-4", "gpa0-5";
278*4882a593Smuzhiyun			samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
279*4882a593Smuzhiyun			samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
280*4882a593Smuzhiyun			samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
281*4882a593Smuzhiyun		};
282*4882a593Smuzhiyun
283*4882a593Smuzhiyun		uart1_fctl: uart1-fctl {
284*4882a593Smuzhiyun			samsung,pins = "gpa0-6", "gpa0-7";
285*4882a593Smuzhiyun			samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
286*4882a593Smuzhiyun			samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
287*4882a593Smuzhiyun			samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
288*4882a593Smuzhiyun		};
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun		i2c2_bus: i2c2-bus {
291*4882a593Smuzhiyun			samsung,pins = "gpa0-6", "gpa0-7";
292*4882a593Smuzhiyun			samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
293*4882a593Smuzhiyun			samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
294*4882a593Smuzhiyun			samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
295*4882a593Smuzhiyun		};
296*4882a593Smuzhiyun
297*4882a593Smuzhiyun		sd4_bus8: sd4-bus-width8 {
298*4882a593Smuzhiyun			part-1 {
299*4882a593Smuzhiyun				samsung,pins = "gpk0-3", "gpk0-4",
300*4882a593Smuzhiyun						"gpk0-5", "gpk0-6";
301*4882a593Smuzhiyun				samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
302*4882a593Smuzhiyun				samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
303*4882a593Smuzhiyun				samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
304*4882a593Smuzhiyun			};
305*4882a593Smuzhiyun			part-2 {
306*4882a593Smuzhiyun				samsung,pins = "gpk1-3", "gpk1-4",
307*4882a593Smuzhiyun						"gpk1-5", "gpk1-6";
308*4882a593Smuzhiyun				samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
309*4882a593Smuzhiyun				samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
310*4882a593Smuzhiyun				samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
311*4882a593Smuzhiyun			};
312*4882a593Smuzhiyun		};
313*4882a593Smuzhiyun	};
314*4882a593Smuzhiyun
315*4882a593SmuzhiyunExample 2: A pin-controller node with external wakeup interrupt controller node.
316*4882a593Smuzhiyun
317*4882a593Smuzhiyun	pinctrl_1: pinctrl@11000000 {
318*4882a593Smuzhiyun		compatible = "samsung,exynos4210-pinctrl";
319*4882a593Smuzhiyun		reg = <0x11000000 0x1000>;
320*4882a593Smuzhiyun		interrupts = <0 46 0>
321*4882a593Smuzhiyun
322*4882a593Smuzhiyun		/* ... */
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun		wakeup-interrupt-controller {
325*4882a593Smuzhiyun			compatible = "samsung,exynos4210-wakeup-eint";
326*4882a593Smuzhiyun			interrupt-parent = <&gic>;
327*4882a593Smuzhiyun			interrupts = <0 32 0>;
328*4882a593Smuzhiyun		};
329*4882a593Smuzhiyun	};
330*4882a593Smuzhiyun
331*4882a593SmuzhiyunExample 3: A uart client node that supports 'default' and 'flow-control' states.
332*4882a593Smuzhiyun
333*4882a593Smuzhiyun	uart@13800000 {
334*4882a593Smuzhiyun		compatible = "samsung,exynos4210-uart";
335*4882a593Smuzhiyun		reg = <0x13800000 0x100>;
336*4882a593Smuzhiyun		interrupts = <0 52 0>;
337*4882a593Smuzhiyun		pinctrl-names = "default", "flow-control;
338*4882a593Smuzhiyun		pinctrl-0 = <&uart0_data>;
339*4882a593Smuzhiyun		pinctrl-1 = <&uart0_data &uart0_fctl>;
340*4882a593Smuzhiyun	};
341*4882a593Smuzhiyun
342*4882a593SmuzhiyunExample 4: Set up the default pin state for uart controller.
343*4882a593Smuzhiyun
344*4882a593Smuzhiyun	static int s3c24xx_serial_probe(struct platform_device *pdev) {
345*4882a593Smuzhiyun		struct pinctrl *pinctrl;
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun		/* ... */
348*4882a593Smuzhiyun
349*4882a593Smuzhiyun		pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
350*4882a593Smuzhiyun	}
351*4882a593Smuzhiyun
352*4882a593SmuzhiyunExample 5: A display port client node that supports 'default' pinctrl state
353*4882a593Smuzhiyun	   and gpio binding.
354*4882a593Smuzhiyun
355*4882a593Smuzhiyun	display-port-controller {
356*4882a593Smuzhiyun		/* ... */
357*4882a593Smuzhiyun
358*4882a593Smuzhiyun		samsung,hpd-gpio = <&gpx2 6 0>;
359*4882a593Smuzhiyun		pinctrl-names = "default";
360*4882a593Smuzhiyun		pinctrl-0 = <&dp_hpd>;
361*4882a593Smuzhiyun	};
362*4882a593Smuzhiyun
363*4882a593SmuzhiyunExample 6: Request the gpio for display port controller
364*4882a593Smuzhiyun
365*4882a593Smuzhiyun	static int exynos_dp_probe(struct platform_device *pdev)
366*4882a593Smuzhiyun	{
367*4882a593Smuzhiyun		int hpd_gpio, ret;
368*4882a593Smuzhiyun		struct device *dev = &pdev->dev;
369*4882a593Smuzhiyun		struct device_node *dp_node = dev->of_node;
370*4882a593Smuzhiyun
371*4882a593Smuzhiyun		/* ... */
372*4882a593Smuzhiyun
373*4882a593Smuzhiyun		hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0);
374*4882a593Smuzhiyun
375*4882a593Smuzhiyun		/* ... */
376*4882a593Smuzhiyun
377*4882a593Smuzhiyun		ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
378*4882a593Smuzhiyun					    "hpd_gpio");
379*4882a593Smuzhiyun		/* ... */
380*4882a593Smuzhiyun	}
381