1 /*
2  * GPIO definitions for Amlogic Meson8b SoCs
3  *
4  * Copyright (C) 2015 Endless Mobile, Inc.
5  * Author: Carlo Caione <carlo@endlessm.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * version 2 as published by the Free Software Foundation.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program. If not, see <http://www.gnu.org/licenses/>.
13  */
14 
15 #ifndef _DT_BINDINGS_MESON8B_GPIO_H
16 #define _DT_BINDINGS_MESON8B_GPIO_H
17 
18 /* EE (CBUS) GPIO chip */
19 #define GPIOX_0		0
20 #define GPIOX_1		1
21 #define GPIOX_2		2
22 #define GPIOX_3		3
23 #define GPIOX_4		4
24 #define GPIOX_5		5
25 #define GPIOX_6		6
26 #define GPIOX_7		7
27 #define GPIOX_8		8
28 #define GPIOX_9		9
29 #define GPIOX_10	10
30 #define GPIOX_11	11
31 #define GPIOX_16	12
32 #define GPIOX_17	13
33 #define GPIOX_18	14
34 #define GPIOX_19	15
35 #define GPIOX_20	16
36 #define GPIOX_21	17
37 
38 #define GPIOY_0		18
39 #define GPIOY_1		19
40 #define GPIOY_3		20
41 #define GPIOY_6		21
42 #define GPIOY_7		22
43 #define GPIOY_8		23
44 #define GPIOY_9		24
45 #define GPIOY_10	25
46 #define GPIOY_11	26
47 #define GPIOY_12	27
48 #define GPIOY_13	28
49 #define GPIOY_14	29
50 
51 #define GPIODV_9	30
52 #define GPIODV_24	31
53 #define GPIODV_25	32
54 #define GPIODV_26	33
55 #define GPIODV_27	34
56 #define GPIODV_28	35
57 #define GPIODV_29	36
58 
59 #define GPIOH_0		37
60 #define GPIOH_1		38
61 #define GPIOH_2		39
62 #define GPIOH_3		40
63 #define GPIOH_4		41
64 #define GPIOH_5		42
65 #define GPIOH_6		43
66 #define GPIOH_7		44
67 #define GPIOH_8		45
68 #define GPIOH_9		46
69 
70 #define CARD_0		47
71 #define CARD_1		48
72 #define CARD_2		49
73 #define CARD_3		50
74 #define CARD_4		51
75 #define CARD_5		52
76 #define CARD_6		53
77 
78 #define BOOT_0		54
79 #define BOOT_1		55
80 #define BOOT_2		56
81 #define BOOT_3		57
82 #define BOOT_4		58
83 #define BOOT_5		59
84 #define BOOT_6		60
85 #define BOOT_7		61
86 #define BOOT_8		62
87 #define BOOT_9		63
88 #define BOOT_10		64
89 #define BOOT_11		65
90 #define BOOT_12		66
91 #define BOOT_13		67
92 #define BOOT_14		68
93 #define BOOT_15		69
94 #define BOOT_16		70
95 #define BOOT_17		71
96 #define BOOT_18		72
97 
98 #define DIF_0_P		73
99 #define DIF_0_N		74
100 #define DIF_1_P		75
101 #define DIF_1_N		76
102 #define DIF_2_P		77
103 #define DIF_2_N		78
104 #define DIF_3_P		79
105 #define DIF_3_N		80
106 #define DIF_4_P		81
107 #define DIF_4_N		82
108 
109 /* AO GPIO chip */
110 #define GPIOAO_0	0
111 #define GPIOAO_1	1
112 #define GPIOAO_2	2
113 #define GPIOAO_3	3
114 #define GPIOAO_4	4
115 #define GPIOAO_5	5
116 #define GPIOAO_6	6
117 #define GPIOAO_7	7
118 #define GPIOAO_8	8
119 #define GPIOAO_9	9
120 #define GPIOAO_10	10
121 #define GPIOAO_11	11
122 #define GPIOAO_12	12
123 #define GPIOAO_13	13
124 #define GPIO_BSD_EN	14
125 #define GPIO_TEST_N	15
126 
127 #endif /* _DT_BINDINGS_MESON8B_GPIO_H */
128