1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Samsung's Exynos3250 SoCs pin-mux and pin-config device tree source
4 *
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 *		http://www.samsung.com
7 *
8 * Samsung's Exynos3250 SoCs pin-mux and pin-config optiosn are listed as device
9 * tree nodes are listed in this file.
10 */
11
12#include <dt-bindings/pinctrl/samsung.h>
13
14#define PIN_IN(_pin, _pull, _drv)					\
15	_pin {								\
16		samsung,pins = #_pin;					\
17		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;		\
18		samsung,pin-pud = <EXYNOS_PIN_PULL_ ##_pull>;		\
19		samsung,pin-drv = <EXYNOS4_PIN_DRV_ ##_drv>;		\
20	}
21
22#define PIN_OUT(_pin, _drv)						\
23	_pin {								\
24		samsung,pins = #_pin;					\
25		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;	\
26		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;		\
27		samsung,pin-drv = <EXYNOS4_PIN_DRV_ ##_drv>;		\
28	}
29
30#define PIN_OUT_SET(_pin, _val, _drv)					\
31	_pin {								\
32		samsung,pins = #_pin;					\
33		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;	\
34		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;		\
35		samsung,pin-drv = <EXYNOS4_PIN_DRV_ ##_drv>;		\
36		samsung,pin-val = <_val>;				\
37	}
38
39#define PIN_CFG(_pin, _sel, _pull, _drv)				\
40	_pin {								\
41		samsung,pins = #_pin;					\
42		samsung,pin-function = <_sel>;				\
43		samsung,pin-pud = <EXYNOS_PIN_PULL_ ##_pull>;		\
44		samsung,pin-drv = <EXYNOS4_PIN_DRV_ ##_drv>;		\
45	}
46
47#define PIN_SLP(_pin, _mode, _pull)					\
48	_pin {								\
49		samsung,pins = #_pin;					\
50		samsung,pin-con-pdn = <EXYNOS_PIN_PDN_ ##_mode>;	\
51		samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_ ##_pull>;	\
52	}
53
54&pinctrl_0 {
55	gpa0: gpa0 {
56		gpio-controller;
57		#gpio-cells = <2>;
58
59		interrupt-controller;
60		#interrupt-cells = <2>;
61	};
62
63	gpa1: gpa1 {
64		gpio-controller;
65		#gpio-cells = <2>;
66
67		interrupt-controller;
68		#interrupt-cells = <2>;
69	};
70
71	gpb: gpb {
72		gpio-controller;
73		#gpio-cells = <2>;
74
75		interrupt-controller;
76		#interrupt-cells = <2>;
77	};
78
79	gpc0: gpc0 {
80		gpio-controller;
81		#gpio-cells = <2>;
82
83		interrupt-controller;
84		#interrupt-cells = <2>;
85	};
86
87	gpc1: gpc1 {
88		gpio-controller;
89		#gpio-cells = <2>;
90
91		interrupt-controller;
92		#interrupt-cells = <2>;
93	};
94
95	gpd0: gpd0 {
96		gpio-controller;
97		#gpio-cells = <2>;
98
99		interrupt-controller;
100		#interrupt-cells = <2>;
101	};
102
103	gpd1: gpd1 {
104		gpio-controller;
105		#gpio-cells = <2>;
106
107		interrupt-controller;
108		#interrupt-cells = <2>;
109	};
110
111	uart0_data: uart0-data {
112		samsung,pins = "gpa0-0", "gpa0-1";
113		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
114		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
115		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
116	};
117
118	uart0_fctl: uart0-fctl {
119		samsung,pins = "gpa0-2", "gpa0-3";
120		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
121		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
122		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
123	};
124
125	uart1_data: uart1-data {
126		samsung,pins = "gpa0-4", "gpa0-5";
127		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
128		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
129		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
130	};
131
132	uart1_fctl: uart1-fctl {
133		samsung,pins = "gpa0-6", "gpa0-7";
134		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
135		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
136		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
137	};
138
139	i2c2_bus: i2c2-bus {
140		samsung,pins = "gpa0-6", "gpa0-7";
141		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
142		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
143		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
144	};
145
146	uart2_data: uart2-data {
147		samsung,pins = "gpa1-0", "gpa1-1";
148		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
149		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
150		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
151	};
152
153	i2c3_bus: i2c3-bus {
154		samsung,pins = "gpa1-2", "gpa1-3";
155		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
156		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
157		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
158	};
159
160	spi0_bus: spi0-bus {
161		samsung,pins = "gpb-0", "gpb-2", "gpb-3";
162		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
163		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
164		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
165	};
166
167	i2c4_bus: i2c4-bus {
168		samsung,pins = "gpb-0", "gpb-1";
169		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
170		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
171		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
172	};
173
174	spi1_bus: spi1-bus {
175		samsung,pins = "gpb-4", "gpb-6", "gpb-7";
176		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
177		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
178		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
179	};
180
181	i2c5_bus: i2c5-bus {
182		samsung,pins = "gpb-2", "gpb-3";
183		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
184		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
185		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
186	};
187
188	i2s2_bus: i2s2-bus {
189		samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
190				"gpc1-4";
191		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
192		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
193		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
194	};
195
196	pcm2_bus: pcm2-bus {
197		samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
198				"gpc1-4";
199		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
200		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
201		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
202	};
203
204	i2c6_bus: i2c6-bus {
205		samsung,pins = "gpc1-3", "gpc1-4";
206		samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
207		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
208		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
209	};
210
211	pwm0_out: pwm0-out {
212		samsung,pins = "gpd0-0";
213		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
214		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
215		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
216	};
217
218	pwm1_out: pwm1-out {
219		samsung,pins = "gpd0-1";
220		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
221		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
222		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
223	};
224
225	i2c7_bus: i2c7-bus {
226		samsung,pins = "gpd0-2", "gpd0-3";
227		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
228		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
229		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
230	};
231
232	pwm2_out: pwm2-out {
233		samsung,pins = "gpd0-2";
234		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
235		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
236		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
237	};
238
239	pwm3_out: pwm3-out {
240		samsung,pins = "gpd0-3";
241		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
242		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
243		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
244	};
245
246	i2c0_bus: i2c0-bus {
247		samsung,pins = "gpd1-0", "gpd1-1";
248		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
249		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
250		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
251	};
252
253	mipi0_clk: mipi0-clk {
254		samsung,pins = "gpd1-0", "gpd1-1";
255		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
256		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
257		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
258	};
259
260	i2c1_bus: i2c1-bus {
261		samsung,pins = "gpd1-2", "gpd1-3";
262		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
263		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
264		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
265	};
266};
267
268&pinctrl_1 {
269	gpe0: gpe0 {
270		gpio-controller;
271		#gpio-cells = <2>;
272	};
273
274	gpe1: gpe1 {
275		gpio-controller;
276		#gpio-cells = <2>;
277	};
278
279	gpe2: gpe2 {
280		gpio-controller;
281		#gpio-cells = <2>;
282	};
283
284	gpk0: gpk0 {
285		gpio-controller;
286		#gpio-cells = <2>;
287
288		interrupt-controller;
289		#interrupt-cells = <2>;
290	};
291
292	gpk1: gpk1 {
293		gpio-controller;
294		#gpio-cells = <2>;
295
296		interrupt-controller;
297		#interrupt-cells = <2>;
298	};
299
300	gpk2: gpk2 {
301		gpio-controller;
302		#gpio-cells = <2>;
303
304		interrupt-controller;
305		#interrupt-cells = <2>;
306	};
307
308	gpl0: gpl0 {
309		gpio-controller;
310		#gpio-cells = <2>;
311
312		interrupt-controller;
313		#interrupt-cells = <2>;
314	};
315
316	gpm0: gpm0 {
317		gpio-controller;
318		#gpio-cells = <2>;
319
320		interrupt-controller;
321		#interrupt-cells = <2>;
322	};
323
324	gpm1: gpm1 {
325		gpio-controller;
326		#gpio-cells = <2>;
327
328		interrupt-controller;
329		#interrupt-cells = <2>;
330	};
331
332	gpm2: gpm2 {
333		gpio-controller;
334		#gpio-cells = <2>;
335
336		interrupt-controller;
337		#interrupt-cells = <2>;
338	};
339
340	gpm3: gpm3 {
341		gpio-controller;
342		#gpio-cells = <2>;
343
344		interrupt-controller;
345		#interrupt-cells = <2>;
346	};
347
348	gpm4: gpm4 {
349		gpio-controller;
350		#gpio-cells = <2>;
351
352		interrupt-controller;
353		#interrupt-cells = <2>;
354	};
355
356	gpx0: gpx0 {
357		gpio-controller;
358		#gpio-cells = <2>;
359
360		interrupt-controller;
361		interrupt-parent = <&gic>;
362		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
363			     <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
364			     <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
365			     <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
366			     <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
367			     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
368			     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
369			     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
370		#interrupt-cells = <2>;
371	};
372
373	gpx1: gpx1 {
374		gpio-controller;
375		#gpio-cells = <2>;
376
377		interrupt-controller;
378		interrupt-parent = <&gic>;
379		interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
380			     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
381			     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
382			     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
383			     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
384			     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
385			     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
386			     <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
387		#interrupt-cells = <2>;
388	};
389
390	gpx2: gpx2 {
391		gpio-controller;
392		#gpio-cells = <2>;
393
394		interrupt-controller;
395		#interrupt-cells = <2>;
396	};
397
398	gpx3: gpx3 {
399		gpio-controller;
400		#gpio-cells = <2>;
401
402		interrupt-controller;
403		#interrupt-cells = <2>;
404	};
405
406	sd0_clk: sd0-clk {
407		samsung,pins = "gpk0-0";
408		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
409		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
410		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
411	};
412
413	sd0_cmd: sd0-cmd {
414		samsung,pins = "gpk0-1";
415		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
416		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
417		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
418	};
419
420	sd0_cd: sd0-cd {
421		samsung,pins = "gpk0-2";
422		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
423		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
424		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
425	};
426
427	sd0_rdqs: sd0-rdqs {
428		samsung,pins = "gpk0-7";
429		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
430		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
431		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
432	};
433
434	sd0_bus1: sd0-bus-width1 {
435		samsung,pins = "gpk0-3";
436		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
437		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
438		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
439	};
440
441	sd0_bus4: sd0-bus-width4 {
442		samsung,pins = "gpk0-4", "gpk0-5", "gpk0-6";
443		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
444		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
445		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
446	};
447
448	sd0_bus8: sd0-bus-width8 {
449		samsung,pins = "gpl0-0", "gpl0-1", "gpl0-2", "gpl0-3";
450		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
451		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
452		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
453	};
454
455	sd1_clk: sd1-clk {
456		samsung,pins = "gpk1-0";
457		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
458		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
459		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
460	};
461
462	sd1_cmd: sd1-cmd {
463		samsung,pins = "gpk1-1";
464		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
465		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
466		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
467	};
468
469	sd1_cd: sd1-cd {
470		samsung,pins = "gpk1-2";
471		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
472		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
473		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
474	};
475
476	sd1_bus1: sd1-bus-width1 {
477		samsung,pins = "gpk1-3";
478		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
479		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
480		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
481	};
482
483	sd1_bus4: sd1-bus-width4 {
484		samsung,pins = "gpk1-4", "gpk1-5", "gpk1-6";
485		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
486		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
487		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
488	};
489
490	sd2_clk: sd2-clk {
491		samsung,pins = "gpk2-0";
492		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
493		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
494		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
495	};
496
497	sd2_cmd: sd2-cmd {
498		samsung,pins = "gpk2-1";
499		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
500		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
501		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
502	};
503
504	sd2_cd: sd2-cd {
505		samsung,pins = "gpk2-2";
506		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
507		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
508		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
509	};
510
511	sd2_bus1: sd2-bus-width1 {
512		samsung,pins = "gpk2-3";
513		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
514		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
515		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
516	};
517
518	sd2_bus4: sd2-bus-width4 {
519		samsung,pins = "gpk2-4", "gpk2-5", "gpk2-6";
520		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
521		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
522		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
523	};
524
525	cam_port_b_io: cam-port-b-io {
526		samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
527				"gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
528				"gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1";
529		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
530		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
531		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
532	};
533
534	cam_port_b_clk_active: cam-port-b-clk-active {
535		samsung,pins = "gpm2-2";
536		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
537		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
538		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
539	};
540
541	cam_port_b_clk_idle: cam-port-b-clk-idle {
542		samsung,pins = "gpm2-2";
543		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
544		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
545		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
546	};
547
548	fimc_is_i2c0: fimc-is-i2c0 {
549		samsung,pins = "gpm4-0", "gpm4-1";
550		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
551		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
552		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
553	};
554
555	fimc_is_i2c1: fimc-is-i2c1 {
556		samsung,pins = "gpm4-2", "gpm4-3";
557		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
558		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
559		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
560	};
561
562	fimc_is_uart: fimc-is-uart {
563		samsung,pins = "gpm3-5", "gpm3-7";
564		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
565		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
566		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
567	};
568};
569