Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2010 Samsung Electronics |
| 4 | * Minkyu Kang <mk7.kang@samsung.com> |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __ASM_ARCH_GPIO_H |
| 8 | #define __ASM_ARCH_GPIO_H |
| 9 | |
| 10 | #ifndef __ASSEMBLY__ |
| 11 | struct s5p_gpio_bank { |
| 12 | unsigned int con; |
| 13 | unsigned int dat; |
| 14 | unsigned int pull; |
| 15 | unsigned int drv; |
| 16 | unsigned int pdn_con; |
| 17 | unsigned int pdn_pull; |
| 18 | unsigned char res1[8]; |
| 19 | }; |
| 20 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 21 | /* GPIO pins per bank */ |
| 22 | #define GPIO_PER_BANK 8 |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 23 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 24 | /* A list of valid GPIO numbers for the asm-generic/gpio.h interface */ |
| 25 | enum exynos4_gpio_pin { |
| 26 | /* GPIO_PART1_STARTS */ |
| 27 | EXYNOS4_GPIO_A00, /* 0 */ |
| 28 | EXYNOS4_GPIO_A01, |
| 29 | EXYNOS4_GPIO_A02, |
| 30 | EXYNOS4_GPIO_A03, |
| 31 | EXYNOS4_GPIO_A04, |
| 32 | EXYNOS4_GPIO_A05, |
| 33 | EXYNOS4_GPIO_A06, |
| 34 | EXYNOS4_GPIO_A07, |
| 35 | EXYNOS4_GPIO_A10, /* 8 */ |
| 36 | EXYNOS4_GPIO_A11, |
| 37 | EXYNOS4_GPIO_A12, |
| 38 | EXYNOS4_GPIO_A13, |
| 39 | EXYNOS4_GPIO_A14, |
| 40 | EXYNOS4_GPIO_A15, |
| 41 | EXYNOS4_GPIO_A16, |
| 42 | EXYNOS4_GPIO_A17, |
| 43 | EXYNOS4_GPIO_B0, /* 16 0x10 */ |
| 44 | EXYNOS4_GPIO_B1, |
| 45 | EXYNOS4_GPIO_B2, |
| 46 | EXYNOS4_GPIO_B3, |
| 47 | EXYNOS4_GPIO_B4, |
| 48 | EXYNOS4_GPIO_B5, |
| 49 | EXYNOS4_GPIO_B6, |
| 50 | EXYNOS4_GPIO_B7, |
| 51 | EXYNOS4_GPIO_C00, /* 24 0x18 */ |
| 52 | EXYNOS4_GPIO_C01, |
| 53 | EXYNOS4_GPIO_C02, |
| 54 | EXYNOS4_GPIO_C03, |
| 55 | EXYNOS4_GPIO_C04, |
| 56 | EXYNOS4_GPIO_C05, |
| 57 | EXYNOS4_GPIO_C06, |
| 58 | EXYNOS4_GPIO_C07, |
| 59 | EXYNOS4_GPIO_C10, /* 32 0x20*/ |
| 60 | EXYNOS4_GPIO_C11, |
| 61 | EXYNOS4_GPIO_C12, |
| 62 | EXYNOS4_GPIO_C13, |
| 63 | EXYNOS4_GPIO_C14, |
| 64 | EXYNOS4_GPIO_C15, |
| 65 | EXYNOS4_GPIO_C16, |
| 66 | EXYNOS4_GPIO_C17, |
| 67 | EXYNOS4_GPIO_D00, /* 40 0x28 */ |
| 68 | EXYNOS4_GPIO_D01, |
| 69 | EXYNOS4_GPIO_D02, |
| 70 | EXYNOS4_GPIO_D03, |
| 71 | EXYNOS4_GPIO_D04, |
| 72 | EXYNOS4_GPIO_D05, |
| 73 | EXYNOS4_GPIO_D06, |
| 74 | EXYNOS4_GPIO_D07, |
| 75 | EXYNOS4_GPIO_D10, /* 48 0x30 */ |
| 76 | EXYNOS4_GPIO_D11, |
| 77 | EXYNOS4_GPIO_D12, |
| 78 | EXYNOS4_GPIO_D13, |
| 79 | EXYNOS4_GPIO_D14, |
| 80 | EXYNOS4_GPIO_D15, |
| 81 | EXYNOS4_GPIO_D16, |
| 82 | EXYNOS4_GPIO_D17, |
| 83 | EXYNOS4_GPIO_E00, /* 56 0x38 */ |
| 84 | EXYNOS4_GPIO_E01, |
| 85 | EXYNOS4_GPIO_E02, |
| 86 | EXYNOS4_GPIO_E03, |
| 87 | EXYNOS4_GPIO_E04, |
| 88 | EXYNOS4_GPIO_E05, |
| 89 | EXYNOS4_GPIO_E06, |
| 90 | EXYNOS4_GPIO_E07, |
| 91 | EXYNOS4_GPIO_E10, /* 64 0x40 */ |
| 92 | EXYNOS4_GPIO_E11, |
| 93 | EXYNOS4_GPIO_E12, |
| 94 | EXYNOS4_GPIO_E13, |
| 95 | EXYNOS4_GPIO_E14, |
| 96 | EXYNOS4_GPIO_E15, |
| 97 | EXYNOS4_GPIO_E16, |
| 98 | EXYNOS4_GPIO_E17, |
| 99 | EXYNOS4_GPIO_E20, /* 72 0x48 */ |
| 100 | EXYNOS4_GPIO_E21, |
| 101 | EXYNOS4_GPIO_E22, |
| 102 | EXYNOS4_GPIO_E23, |
| 103 | EXYNOS4_GPIO_E24, |
| 104 | EXYNOS4_GPIO_E25, |
| 105 | EXYNOS4_GPIO_E26, |
| 106 | EXYNOS4_GPIO_E27, |
| 107 | EXYNOS4_GPIO_E30, /* 80 0x50 */ |
| 108 | EXYNOS4_GPIO_E31, |
| 109 | EXYNOS4_GPIO_E32, |
| 110 | EXYNOS4_GPIO_E33, |
| 111 | EXYNOS4_GPIO_E34, |
| 112 | EXYNOS4_GPIO_E35, |
| 113 | EXYNOS4_GPIO_E36, |
| 114 | EXYNOS4_GPIO_E37, |
| 115 | EXYNOS4_GPIO_E40, /* 88 0x58 */ |
| 116 | EXYNOS4_GPIO_E41, |
| 117 | EXYNOS4_GPIO_E42, |
| 118 | EXYNOS4_GPIO_E43, |
| 119 | EXYNOS4_GPIO_E44, |
| 120 | EXYNOS4_GPIO_E45, |
| 121 | EXYNOS4_GPIO_E46, |
| 122 | EXYNOS4_GPIO_E47, |
| 123 | EXYNOS4_GPIO_F00, /* 96 0x60 */ |
| 124 | EXYNOS4_GPIO_F01, |
| 125 | EXYNOS4_GPIO_F02, |
| 126 | EXYNOS4_GPIO_F03, |
| 127 | EXYNOS4_GPIO_F04, |
| 128 | EXYNOS4_GPIO_F05, |
| 129 | EXYNOS4_GPIO_F06, |
| 130 | EXYNOS4_GPIO_F07, |
| 131 | EXYNOS4_GPIO_F10, /* 104 0x68 */ |
| 132 | EXYNOS4_GPIO_F11, |
| 133 | EXYNOS4_GPIO_F12, |
| 134 | EXYNOS4_GPIO_F13, |
| 135 | EXYNOS4_GPIO_F14, |
| 136 | EXYNOS4_GPIO_F15, |
| 137 | EXYNOS4_GPIO_F16, |
| 138 | EXYNOS4_GPIO_F17, |
| 139 | EXYNOS4_GPIO_F20, /* 112 0x70 */ |
| 140 | EXYNOS4_GPIO_F21, |
| 141 | EXYNOS4_GPIO_F22, |
| 142 | EXYNOS4_GPIO_F23, |
| 143 | EXYNOS4_GPIO_F24, |
| 144 | EXYNOS4_GPIO_F25, |
| 145 | EXYNOS4_GPIO_F26, |
| 146 | EXYNOS4_GPIO_F27, |
| 147 | EXYNOS4_GPIO_F30, /* 120 0x78 */ |
| 148 | EXYNOS4_GPIO_F31, |
| 149 | EXYNOS4_GPIO_F32, |
| 150 | EXYNOS4_GPIO_F33, |
| 151 | EXYNOS4_GPIO_F34, |
| 152 | EXYNOS4_GPIO_F35, |
| 153 | EXYNOS4_GPIO_F36, |
| 154 | EXYNOS4_GPIO_F37, |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 155 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 156 | /* GPIO_PART2_STARTS */ |
| 157 | EXYNOS4_GPIO_MAX_PORT_PART_1, /* 128 0x80 */ |
| 158 | EXYNOS4_GPIO_J00 = EXYNOS4_GPIO_MAX_PORT_PART_1, |
| 159 | EXYNOS4_GPIO_J01, |
| 160 | EXYNOS4_GPIO_J02, |
| 161 | EXYNOS4_GPIO_J03, |
| 162 | EXYNOS4_GPIO_J04, |
| 163 | EXYNOS4_GPIO_J05, |
| 164 | EXYNOS4_GPIO_J06, |
| 165 | EXYNOS4_GPIO_J07, |
| 166 | EXYNOS4_GPIO_J10, /* 136 0x88 */ |
| 167 | EXYNOS4_GPIO_J11, |
| 168 | EXYNOS4_GPIO_J12, |
| 169 | EXYNOS4_GPIO_J13, |
| 170 | EXYNOS4_GPIO_J14, |
| 171 | EXYNOS4_GPIO_J15, |
| 172 | EXYNOS4_GPIO_J16, |
| 173 | EXYNOS4_GPIO_J17, |
| 174 | EXYNOS4_GPIO_K00, /* 144 0x90 */ |
| 175 | EXYNOS4_GPIO_K01, |
| 176 | EXYNOS4_GPIO_K02, |
| 177 | EXYNOS4_GPIO_K03, |
| 178 | EXYNOS4_GPIO_K04, |
| 179 | EXYNOS4_GPIO_K05, |
| 180 | EXYNOS4_GPIO_K06, |
| 181 | EXYNOS4_GPIO_K07, |
| 182 | EXYNOS4_GPIO_K10, /* 152 0x98 */ |
| 183 | EXYNOS4_GPIO_K11, |
| 184 | EXYNOS4_GPIO_K12, |
| 185 | EXYNOS4_GPIO_K13, |
| 186 | EXYNOS4_GPIO_K14, |
| 187 | EXYNOS4_GPIO_K15, |
| 188 | EXYNOS4_GPIO_K16, |
| 189 | EXYNOS4_GPIO_K17, |
| 190 | EXYNOS4_GPIO_K20, /* 160 0xA0 */ |
| 191 | EXYNOS4_GPIO_K21, |
| 192 | EXYNOS4_GPIO_K22, |
| 193 | EXYNOS4_GPIO_K23, |
| 194 | EXYNOS4_GPIO_K24, |
| 195 | EXYNOS4_GPIO_K25, |
| 196 | EXYNOS4_GPIO_K26, |
| 197 | EXYNOS4_GPIO_K27, |
| 198 | EXYNOS4_GPIO_K30, /* 168 0xA8 */ |
| 199 | EXYNOS4_GPIO_K31, |
| 200 | EXYNOS4_GPIO_K32, |
| 201 | EXYNOS4_GPIO_K33, |
| 202 | EXYNOS4_GPIO_K34, |
| 203 | EXYNOS4_GPIO_K35, |
| 204 | EXYNOS4_GPIO_K36, |
| 205 | EXYNOS4_GPIO_K37, |
| 206 | EXYNOS4_GPIO_L00, /* 176 0xB0 */ |
| 207 | EXYNOS4_GPIO_L01, |
| 208 | EXYNOS4_GPIO_L02, |
| 209 | EXYNOS4_GPIO_L03, |
| 210 | EXYNOS4_GPIO_L04, |
| 211 | EXYNOS4_GPIO_L05, |
| 212 | EXYNOS4_GPIO_L06, |
| 213 | EXYNOS4_GPIO_L07, |
| 214 | EXYNOS4_GPIO_L10, /* 184 0xB8 */ |
| 215 | EXYNOS4_GPIO_L11, |
| 216 | EXYNOS4_GPIO_L12, |
| 217 | EXYNOS4_GPIO_L13, |
| 218 | EXYNOS4_GPIO_L14, |
| 219 | EXYNOS4_GPIO_L15, |
| 220 | EXYNOS4_GPIO_L16, |
| 221 | EXYNOS4_GPIO_L17, |
| 222 | EXYNOS4_GPIO_L20, /* 192 0xC0 */ |
| 223 | EXYNOS4_GPIO_L21, |
| 224 | EXYNOS4_GPIO_L22, |
| 225 | EXYNOS4_GPIO_L23, |
| 226 | EXYNOS4_GPIO_L24, |
| 227 | EXYNOS4_GPIO_L25, |
| 228 | EXYNOS4_GPIO_L26, |
| 229 | EXYNOS4_GPIO_L27, |
| 230 | EXYNOS4_GPIO_Y00, /* 200 0xC8 */ |
| 231 | EXYNOS4_GPIO_Y01, |
| 232 | EXYNOS4_GPIO_Y02, |
| 233 | EXYNOS4_GPIO_Y03, |
| 234 | EXYNOS4_GPIO_Y04, |
| 235 | EXYNOS4_GPIO_Y05, |
| 236 | EXYNOS4_GPIO_Y06, |
| 237 | EXYNOS4_GPIO_Y07, |
| 238 | EXYNOS4_GPIO_Y10, /* 208 0xD0 */ |
| 239 | EXYNOS4_GPIO_Y11, |
| 240 | EXYNOS4_GPIO_Y12, |
| 241 | EXYNOS4_GPIO_Y13, |
| 242 | EXYNOS4_GPIO_Y14, |
| 243 | EXYNOS4_GPIO_Y15, |
| 244 | EXYNOS4_GPIO_Y16, |
| 245 | EXYNOS4_GPIO_Y17, |
| 246 | EXYNOS4_GPIO_Y20, /* 216 0xD8 */ |
| 247 | EXYNOS4_GPIO_Y21, |
| 248 | EXYNOS4_GPIO_Y22, |
| 249 | EXYNOS4_GPIO_Y23, |
| 250 | EXYNOS4_GPIO_Y24, |
| 251 | EXYNOS4_GPIO_Y25, |
| 252 | EXYNOS4_GPIO_Y26, |
| 253 | EXYNOS4_GPIO_Y27, |
| 254 | EXYNOS4_GPIO_Y30, /* 224 0xE0 */ |
| 255 | EXYNOS4_GPIO_Y31, |
| 256 | EXYNOS4_GPIO_Y32, |
| 257 | EXYNOS4_GPIO_Y33, |
| 258 | EXYNOS4_GPIO_Y34, |
| 259 | EXYNOS4_GPIO_Y35, |
| 260 | EXYNOS4_GPIO_Y36, |
| 261 | EXYNOS4_GPIO_Y37, |
| 262 | EXYNOS4_GPIO_Y40, /* 232 0xE8 */ |
| 263 | EXYNOS4_GPIO_Y41, |
| 264 | EXYNOS4_GPIO_Y42, |
| 265 | EXYNOS4_GPIO_Y43, |
| 266 | EXYNOS4_GPIO_Y44, |
| 267 | EXYNOS4_GPIO_Y45, |
| 268 | EXYNOS4_GPIO_Y46, |
| 269 | EXYNOS4_GPIO_Y47, |
| 270 | EXYNOS4_GPIO_Y50, /* 240 0xF0 */ |
| 271 | EXYNOS4_GPIO_Y51, |
| 272 | EXYNOS4_GPIO_Y52, |
| 273 | EXYNOS4_GPIO_Y53, |
| 274 | EXYNOS4_GPIO_Y54, |
| 275 | EXYNOS4_GPIO_Y55, |
| 276 | EXYNOS4_GPIO_Y56, |
| 277 | EXYNOS4_GPIO_Y57, |
| 278 | EXYNOS4_GPIO_Y60, /* 248 0xF8 */ |
| 279 | EXYNOS4_GPIO_Y61, |
| 280 | EXYNOS4_GPIO_Y62, |
| 281 | EXYNOS4_GPIO_Y63, |
| 282 | EXYNOS4_GPIO_Y64, |
| 283 | EXYNOS4_GPIO_Y65, |
| 284 | EXYNOS4_GPIO_Y66, |
| 285 | EXYNOS4_GPIO_Y67, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 286 | |
| 287 | /* GPIO_PART2_1 STARTS */ |
| 288 | EXYNOS4_GPIO_MAX_PORT_PART_2_0, /* 256 0x100 */ |
| 289 | EXYNOS4_GPIO_X00 = EXYNOS4_GPIO_MAX_PORT_PART_2_0, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 290 | EXYNOS4_GPIO_X01, |
| 291 | EXYNOS4_GPIO_X02, |
| 292 | EXYNOS4_GPIO_X03, |
| 293 | EXYNOS4_GPIO_X04, |
| 294 | EXYNOS4_GPIO_X05, |
| 295 | EXYNOS4_GPIO_X06, |
| 296 | EXYNOS4_GPIO_X07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 297 | EXYNOS4_GPIO_X10, /* 264 0x108 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 298 | EXYNOS4_GPIO_X11, |
| 299 | EXYNOS4_GPIO_X12, |
| 300 | EXYNOS4_GPIO_X13, |
| 301 | EXYNOS4_GPIO_X14, |
| 302 | EXYNOS4_GPIO_X15, |
| 303 | EXYNOS4_GPIO_X16, |
| 304 | EXYNOS4_GPIO_X17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 305 | EXYNOS4_GPIO_X20, /* 272 0x110 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 306 | EXYNOS4_GPIO_X21, |
| 307 | EXYNOS4_GPIO_X22, |
| 308 | EXYNOS4_GPIO_X23, |
| 309 | EXYNOS4_GPIO_X24, |
| 310 | EXYNOS4_GPIO_X25, |
| 311 | EXYNOS4_GPIO_X26, |
| 312 | EXYNOS4_GPIO_X27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 313 | EXYNOS4_GPIO_X30, /* 280 0x118 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 314 | EXYNOS4_GPIO_X31, |
| 315 | EXYNOS4_GPIO_X32, |
| 316 | EXYNOS4_GPIO_X33, |
| 317 | EXYNOS4_GPIO_X34, |
| 318 | EXYNOS4_GPIO_X35, |
| 319 | EXYNOS4_GPIO_X36, |
| 320 | EXYNOS4_GPIO_X37, |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 321 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 322 | /* GPIO_PART3_STARTS */ |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 323 | EXYNOS4_GPIO_MAX_PORT_PART_2_1, /* 288 0x120 */ |
| 324 | EXYNOS4_GPIO_Z0 = EXYNOS4_GPIO_MAX_PORT_PART_2_1, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 325 | EXYNOS4_GPIO_Z1, |
| 326 | EXYNOS4_GPIO_Z2, |
| 327 | EXYNOS4_GPIO_Z3, |
| 328 | EXYNOS4_GPIO_Z4, |
| 329 | EXYNOS4_GPIO_Z5, |
| 330 | EXYNOS4_GPIO_Z6, |
| 331 | EXYNOS4_GPIO_Z7, |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 332 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 333 | EXYNOS4_GPIO_MAX_PORT |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 334 | }; |
| 335 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 336 | enum exynos4X12_gpio_pin { |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 337 | /* EXYNOS4X12_GPIO_PART1_0 starts here */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 338 | EXYNOS4X12_GPIO_A00, /* 0 */ |
| 339 | EXYNOS4X12_GPIO_A01, |
| 340 | EXYNOS4X12_GPIO_A02, |
| 341 | EXYNOS4X12_GPIO_A03, |
| 342 | EXYNOS4X12_GPIO_A04, |
| 343 | EXYNOS4X12_GPIO_A05, |
| 344 | EXYNOS4X12_GPIO_A06, |
| 345 | EXYNOS4X12_GPIO_A07, |
| 346 | EXYNOS4X12_GPIO_A10, /* 8 */ |
| 347 | EXYNOS4X12_GPIO_A11, |
| 348 | EXYNOS4X12_GPIO_A12, |
| 349 | EXYNOS4X12_GPIO_A13, |
| 350 | EXYNOS4X12_GPIO_A14, |
| 351 | EXYNOS4X12_GPIO_A15, |
| 352 | EXYNOS4X12_GPIO_A16, |
| 353 | EXYNOS4X12_GPIO_A17, |
| 354 | EXYNOS4X12_GPIO_B0, /* 16 0x10 */ |
| 355 | EXYNOS4X12_GPIO_B1, |
| 356 | EXYNOS4X12_GPIO_B2, |
| 357 | EXYNOS4X12_GPIO_B3, |
| 358 | EXYNOS4X12_GPIO_B4, |
| 359 | EXYNOS4X12_GPIO_B5, |
| 360 | EXYNOS4X12_GPIO_B6, |
| 361 | EXYNOS4X12_GPIO_B7, |
| 362 | EXYNOS4X12_GPIO_C00, /* 24 0x18 */ |
| 363 | EXYNOS4X12_GPIO_C01, |
| 364 | EXYNOS4X12_GPIO_C02, |
| 365 | EXYNOS4X12_GPIO_C03, |
| 366 | EXYNOS4X12_GPIO_C04, |
| 367 | EXYNOS4X12_GPIO_C05, |
| 368 | EXYNOS4X12_GPIO_C06, |
| 369 | EXYNOS4X12_GPIO_C07, |
| 370 | EXYNOS4X12_GPIO_C10, /* 32 0x20 */ |
| 371 | EXYNOS4X12_GPIO_C11, |
| 372 | EXYNOS4X12_GPIO_C12, |
| 373 | EXYNOS4X12_GPIO_C13, |
| 374 | EXYNOS4X12_GPIO_C14, |
| 375 | EXYNOS4X12_GPIO_C15, |
| 376 | EXYNOS4X12_GPIO_C16, |
| 377 | EXYNOS4X12_GPIO_C17, |
| 378 | EXYNOS4X12_GPIO_D00, /* 40 0x28 */ |
| 379 | EXYNOS4X12_GPIO_D01, |
| 380 | EXYNOS4X12_GPIO_D02, |
| 381 | EXYNOS4X12_GPIO_D03, |
| 382 | EXYNOS4X12_GPIO_D04, |
| 383 | EXYNOS4X12_GPIO_D05, |
| 384 | EXYNOS4X12_GPIO_D06, |
| 385 | EXYNOS4X12_GPIO_D07, |
| 386 | EXYNOS4X12_GPIO_D10, /* 48 0x30 */ |
| 387 | EXYNOS4X12_GPIO_D11, |
| 388 | EXYNOS4X12_GPIO_D12, |
| 389 | EXYNOS4X12_GPIO_D13, |
| 390 | EXYNOS4X12_GPIO_D14, |
| 391 | EXYNOS4X12_GPIO_D15, |
| 392 | EXYNOS4X12_GPIO_D16, |
| 393 | EXYNOS4X12_GPIO_D17, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 394 | EXYNOS4X12_GPIO_MAX_PORT_PART_1_0, /* 56 0x38 */ |
| 395 | /* EXYNOS4X12_GPIO_PART1_1 starts here */ |
| 396 | EXYNOS4X12_GPIO_F00 = EXYNOS4X12_GPIO_MAX_PORT_PART_1_0, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 397 | EXYNOS4X12_GPIO_F01, |
| 398 | EXYNOS4X12_GPIO_F02, |
| 399 | EXYNOS4X12_GPIO_F03, |
| 400 | EXYNOS4X12_GPIO_F04, |
| 401 | EXYNOS4X12_GPIO_F05, |
| 402 | EXYNOS4X12_GPIO_F06, |
| 403 | EXYNOS4X12_GPIO_F07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 404 | EXYNOS4X12_GPIO_F10, /* 64 0x40 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 405 | EXYNOS4X12_GPIO_F11, |
| 406 | EXYNOS4X12_GPIO_F12, |
| 407 | EXYNOS4X12_GPIO_F13, |
| 408 | EXYNOS4X12_GPIO_F14, |
| 409 | EXYNOS4X12_GPIO_F15, |
| 410 | EXYNOS4X12_GPIO_F16, |
| 411 | EXYNOS4X12_GPIO_F17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 412 | EXYNOS4X12_GPIO_F20, /* 72 0x48 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 413 | EXYNOS4X12_GPIO_F21, |
| 414 | EXYNOS4X12_GPIO_F22, |
| 415 | EXYNOS4X12_GPIO_F23, |
| 416 | EXYNOS4X12_GPIO_F24, |
| 417 | EXYNOS4X12_GPIO_F25, |
| 418 | EXYNOS4X12_GPIO_F26, |
| 419 | EXYNOS4X12_GPIO_F27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 420 | EXYNOS4X12_GPIO_F30, /* 80 0x50 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 421 | EXYNOS4X12_GPIO_F31, |
| 422 | EXYNOS4X12_GPIO_F32, |
| 423 | EXYNOS4X12_GPIO_F33, |
| 424 | EXYNOS4X12_GPIO_F34, |
| 425 | EXYNOS4X12_GPIO_F35, |
| 426 | EXYNOS4X12_GPIO_F36, |
| 427 | EXYNOS4X12_GPIO_F37, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 428 | EXYNOS4X12_GPIO_MAX_PORT_PART_1_1, /* 88 0x58 */ |
| 429 | /* EXYNOS4X12_GPIO_PART1_2 starts here */ |
| 430 | EXYNOS4X12_GPIO_J00 = EXYNOS4X12_GPIO_MAX_PORT_PART_1_1, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 431 | EXYNOS4X12_GPIO_J01, |
| 432 | EXYNOS4X12_GPIO_J02, |
| 433 | EXYNOS4X12_GPIO_J03, |
| 434 | EXYNOS4X12_GPIO_J04, |
| 435 | EXYNOS4X12_GPIO_J05, |
| 436 | EXYNOS4X12_GPIO_J06, |
| 437 | EXYNOS4X12_GPIO_J07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 438 | EXYNOS4X12_GPIO_J10, /* 96 0x60 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 439 | EXYNOS4X12_GPIO_J11, |
| 440 | EXYNOS4X12_GPIO_J12, |
| 441 | EXYNOS4X12_GPIO_J13, |
| 442 | EXYNOS4X12_GPIO_J14, |
| 443 | EXYNOS4X12_GPIO_J15, |
| 444 | EXYNOS4X12_GPIO_J16, |
| 445 | EXYNOS4X12_GPIO_J17, |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 446 | |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 447 | /** |
| 448 | * EXYNOS4X12_GPIO_PART2_0 is not used |
| 449 | * EXYNOS4X12_GPIO_PART2_1 starts here |
| 450 | */ |
| 451 | EXYNOS4X12_GPIO_MAX_PORT_PART_1_2, /* 104 0x66 */ |
| 452 | EXYNOS4X12_GPIO_K00 = EXYNOS4X12_GPIO_MAX_PORT_PART_1_2, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 453 | EXYNOS4X12_GPIO_K01, |
| 454 | EXYNOS4X12_GPIO_K02, |
| 455 | EXYNOS4X12_GPIO_K03, |
| 456 | EXYNOS4X12_GPIO_K04, |
| 457 | EXYNOS4X12_GPIO_K05, |
| 458 | EXYNOS4X12_GPIO_K06, |
| 459 | EXYNOS4X12_GPIO_K07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 460 | EXYNOS4X12_GPIO_K10, /* 112 0x70 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 461 | EXYNOS4X12_GPIO_K11, |
| 462 | EXYNOS4X12_GPIO_K12, |
| 463 | EXYNOS4X12_GPIO_K13, |
| 464 | EXYNOS4X12_GPIO_K14, |
| 465 | EXYNOS4X12_GPIO_K15, |
| 466 | EXYNOS4X12_GPIO_K16, |
| 467 | EXYNOS4X12_GPIO_K17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 468 | EXYNOS4X12_GPIO_K20, /* 120 0x78 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 469 | EXYNOS4X12_GPIO_K21, |
| 470 | EXYNOS4X12_GPIO_K22, |
| 471 | EXYNOS4X12_GPIO_K23, |
| 472 | EXYNOS4X12_GPIO_K24, |
| 473 | EXYNOS4X12_GPIO_K25, |
| 474 | EXYNOS4X12_GPIO_K26, |
| 475 | EXYNOS4X12_GPIO_K27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 476 | EXYNOS4X12_GPIO_K30, /* 128 0x80 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 477 | EXYNOS4X12_GPIO_K31, |
| 478 | EXYNOS4X12_GPIO_K32, |
| 479 | EXYNOS4X12_GPIO_K33, |
| 480 | EXYNOS4X12_GPIO_K34, |
| 481 | EXYNOS4X12_GPIO_K35, |
| 482 | EXYNOS4X12_GPIO_K36, |
| 483 | EXYNOS4X12_GPIO_K37, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 484 | EXYNOS4X12_GPIO_L00, /* 136 0x88 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 485 | EXYNOS4X12_GPIO_L01, |
| 486 | EXYNOS4X12_GPIO_L02, |
| 487 | EXYNOS4X12_GPIO_L03, |
| 488 | EXYNOS4X12_GPIO_L04, |
| 489 | EXYNOS4X12_GPIO_L05, |
| 490 | EXYNOS4X12_GPIO_L06, |
| 491 | EXYNOS4X12_GPIO_L07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 492 | EXYNOS4X12_GPIO_L10, /* 144 0x90 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 493 | EXYNOS4X12_GPIO_L11, |
| 494 | EXYNOS4X12_GPIO_L12, |
| 495 | EXYNOS4X12_GPIO_L13, |
| 496 | EXYNOS4X12_GPIO_L14, |
| 497 | EXYNOS4X12_GPIO_L15, |
| 498 | EXYNOS4X12_GPIO_L16, |
| 499 | EXYNOS4X12_GPIO_L17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 500 | EXYNOS4X12_GPIO_L20, /* 152 0x98 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 501 | EXYNOS4X12_GPIO_L21, |
| 502 | EXYNOS4X12_GPIO_L22, |
| 503 | EXYNOS4X12_GPIO_L23, |
| 504 | EXYNOS4X12_GPIO_L24, |
| 505 | EXYNOS4X12_GPIO_L25, |
| 506 | EXYNOS4X12_GPIO_L26, |
| 507 | EXYNOS4X12_GPIO_L27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 508 | EXYNOS4X12_GPIO_Y00, /* 160 0xa0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 509 | EXYNOS4X12_GPIO_Y01, |
| 510 | EXYNOS4X12_GPIO_Y02, |
| 511 | EXYNOS4X12_GPIO_Y03, |
| 512 | EXYNOS4X12_GPIO_Y04, |
| 513 | EXYNOS4X12_GPIO_Y05, |
| 514 | EXYNOS4X12_GPIO_Y06, |
| 515 | EXYNOS4X12_GPIO_Y07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 516 | EXYNOS4X12_GPIO_Y10, /* 168 0xa8 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 517 | EXYNOS4X12_GPIO_Y11, |
| 518 | EXYNOS4X12_GPIO_Y12, |
| 519 | EXYNOS4X12_GPIO_Y13, |
| 520 | EXYNOS4X12_GPIO_Y14, |
| 521 | EXYNOS4X12_GPIO_Y15, |
| 522 | EXYNOS4X12_GPIO_Y16, |
| 523 | EXYNOS4X12_GPIO_Y17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 524 | EXYNOS4X12_GPIO_Y20, /* 176 0xb0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 525 | EXYNOS4X12_GPIO_Y21, |
| 526 | EXYNOS4X12_GPIO_Y22, |
| 527 | EXYNOS4X12_GPIO_Y23, |
| 528 | EXYNOS4X12_GPIO_Y24, |
| 529 | EXYNOS4X12_GPIO_Y25, |
| 530 | EXYNOS4X12_GPIO_Y26, |
| 531 | EXYNOS4X12_GPIO_Y27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 532 | EXYNOS4X12_GPIO_Y30, /* 184 0xb8 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 533 | EXYNOS4X12_GPIO_Y31, |
| 534 | EXYNOS4X12_GPIO_Y32, |
| 535 | EXYNOS4X12_GPIO_Y33, |
| 536 | EXYNOS4X12_GPIO_Y34, |
| 537 | EXYNOS4X12_GPIO_Y35, |
| 538 | EXYNOS4X12_GPIO_Y36, |
| 539 | EXYNOS4X12_GPIO_Y37, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 540 | EXYNOS4X12_GPIO_Y40, /* 192 0xc0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 541 | EXYNOS4X12_GPIO_Y41, |
| 542 | EXYNOS4X12_GPIO_Y42, |
| 543 | EXYNOS4X12_GPIO_Y43, |
| 544 | EXYNOS4X12_GPIO_Y44, |
| 545 | EXYNOS4X12_GPIO_Y45, |
| 546 | EXYNOS4X12_GPIO_Y46, |
| 547 | EXYNOS4X12_GPIO_Y47, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 548 | EXYNOS4X12_GPIO_Y50, /* 200 0xc8 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 549 | EXYNOS4X12_GPIO_Y51, |
| 550 | EXYNOS4X12_GPIO_Y52, |
| 551 | EXYNOS4X12_GPIO_Y53, |
| 552 | EXYNOS4X12_GPIO_Y54, |
| 553 | EXYNOS4X12_GPIO_Y55, |
| 554 | EXYNOS4X12_GPIO_Y56, |
| 555 | EXYNOS4X12_GPIO_Y57, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 556 | EXYNOS4X12_GPIO_Y60, /* 208 0xd0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 557 | EXYNOS4X12_GPIO_Y61, |
| 558 | EXYNOS4X12_GPIO_Y62, |
| 559 | EXYNOS4X12_GPIO_Y63, |
| 560 | EXYNOS4X12_GPIO_Y64, |
| 561 | EXYNOS4X12_GPIO_Y65, |
| 562 | EXYNOS4X12_GPIO_Y66, |
| 563 | EXYNOS4X12_GPIO_Y67, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 564 | EXYNOS4X12_GPIO_MAX_PORT_PART_2_1, /* 216 0xd8 */ |
| 565 | /* EXYNOS4X12_GPIO_PART2_2 starts here */ |
| 566 | EXYNOS4X12_GPIO_M00 = EXYNOS4X12_GPIO_MAX_PORT_PART_2_1, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 567 | EXYNOS4X12_GPIO_M01, |
| 568 | EXYNOS4X12_GPIO_M02, |
| 569 | EXYNOS4X12_GPIO_M03, |
| 570 | EXYNOS4X12_GPIO_M04, |
| 571 | EXYNOS4X12_GPIO_M05, |
| 572 | EXYNOS4X12_GPIO_M06, |
| 573 | EXYNOS4X12_GPIO_M07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 574 | EXYNOS4X12_GPIO_M10, /* 224 0xe0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 575 | EXYNOS4X12_GPIO_M11, |
| 576 | EXYNOS4X12_GPIO_M12, |
| 577 | EXYNOS4X12_GPIO_M13, |
| 578 | EXYNOS4X12_GPIO_M14, |
| 579 | EXYNOS4X12_GPIO_M15, |
| 580 | EXYNOS4X12_GPIO_M16, |
| 581 | EXYNOS4X12_GPIO_M17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 582 | EXYNOS4X12_GPIO_M20, /* 232 0xe8 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 583 | EXYNOS4X12_GPIO_M21, |
| 584 | EXYNOS4X12_GPIO_M22, |
| 585 | EXYNOS4X12_GPIO_M23, |
| 586 | EXYNOS4X12_GPIO_M24, |
| 587 | EXYNOS4X12_GPIO_M25, |
| 588 | EXYNOS4X12_GPIO_M26, |
| 589 | EXYNOS4X12_GPIO_M27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 590 | EXYNOS4X12_GPIO_M30, /* 240 0xf0 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 591 | EXYNOS4X12_GPIO_M31, |
| 592 | EXYNOS4X12_GPIO_M32, |
| 593 | EXYNOS4X12_GPIO_M33, |
| 594 | EXYNOS4X12_GPIO_M34, |
| 595 | EXYNOS4X12_GPIO_M35, |
| 596 | EXYNOS4X12_GPIO_M36, |
| 597 | EXYNOS4X12_GPIO_M37, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 598 | EXYNOS4X12_GPIO_M40, /* 248 0xf8 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 599 | EXYNOS4X12_GPIO_M41, |
| 600 | EXYNOS4X12_GPIO_M42, |
| 601 | EXYNOS4X12_GPIO_M43, |
| 602 | EXYNOS4X12_GPIO_M44, |
| 603 | EXYNOS4X12_GPIO_M45, |
| 604 | EXYNOS4X12_GPIO_M46, |
| 605 | EXYNOS4X12_GPIO_M47, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 606 | EXYNOS4X12_GPIO_MAX_PORT_PART_2_2, /* 256 0x100 */ |
| 607 | /* EXYNOS4X12_GPIO_PART2_3 starts here */ |
| 608 | EXYNOS4X12_GPIO_X00 = EXYNOS4X12_GPIO_MAX_PORT_PART_2_2, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 609 | EXYNOS4X12_GPIO_X01, |
| 610 | EXYNOS4X12_GPIO_X02, |
| 611 | EXYNOS4X12_GPIO_X03, |
| 612 | EXYNOS4X12_GPIO_X04, |
| 613 | EXYNOS4X12_GPIO_X05, |
| 614 | EXYNOS4X12_GPIO_X06, |
| 615 | EXYNOS4X12_GPIO_X07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 616 | EXYNOS4X12_GPIO_X10, /* 264 0x108 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 617 | EXYNOS4X12_GPIO_X11, |
| 618 | EXYNOS4X12_GPIO_X12, |
| 619 | EXYNOS4X12_GPIO_X13, |
| 620 | EXYNOS4X12_GPIO_X14, |
| 621 | EXYNOS4X12_GPIO_X15, |
| 622 | EXYNOS4X12_GPIO_X16, |
| 623 | EXYNOS4X12_GPIO_X17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 624 | EXYNOS4X12_GPIO_X20, /* 272 0x110 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 625 | EXYNOS4X12_GPIO_X21, |
| 626 | EXYNOS4X12_GPIO_X22, |
| 627 | EXYNOS4X12_GPIO_X23, |
| 628 | EXYNOS4X12_GPIO_X24, |
| 629 | EXYNOS4X12_GPIO_X25, |
| 630 | EXYNOS4X12_GPIO_X26, |
| 631 | EXYNOS4X12_GPIO_X27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 632 | EXYNOS4X12_GPIO_X30, /* 280 0x118 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 633 | EXYNOS4X12_GPIO_X31, |
| 634 | EXYNOS4X12_GPIO_X32, |
| 635 | EXYNOS4X12_GPIO_X33, |
| 636 | EXYNOS4X12_GPIO_X34, |
| 637 | EXYNOS4X12_GPIO_X35, |
| 638 | EXYNOS4X12_GPIO_X36, |
| 639 | EXYNOS4X12_GPIO_X37, |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 640 | |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 641 | /* EXYNOS4X12_GPIO_PART3 starts here */ |
| 642 | EXYNOS4X12_GPIO_MAX_PORT_PART_2_3, /* 288 0x120 */ |
| 643 | EXYNOS4X12_GPIO_Z0 = EXYNOS4X12_GPIO_MAX_PORT_PART_2_3, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 644 | EXYNOS4X12_GPIO_Z1, |
| 645 | EXYNOS4X12_GPIO_Z2, |
| 646 | EXYNOS4X12_GPIO_Z3, |
| 647 | EXYNOS4X12_GPIO_Z4, |
| 648 | EXYNOS4X12_GPIO_Z5, |
| 649 | EXYNOS4X12_GPIO_Z6, |
| 650 | EXYNOS4X12_GPIO_Z7, |
Rajeshwari Birje | f0ce84f | 2013-12-26 09:44:23 +0530 | [diff] [blame] | 651 | |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 652 | /* EXYNOS4X12_GPIO_PART4 starts here */ |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 653 | EXYNOS4X12_GPIO_MAX_PORT_PART_3,/* 296 0x128 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 654 | EXYNOS4X12_GPIO_V00 = EXYNOS4X12_GPIO_MAX_PORT_PART_3, |
| 655 | EXYNOS4X12_GPIO_V01, |
| 656 | EXYNOS4X12_GPIO_V02, |
| 657 | EXYNOS4X12_GPIO_V03, |
| 658 | EXYNOS4X12_GPIO_V04, |
| 659 | EXYNOS4X12_GPIO_V05, |
| 660 | EXYNOS4X12_GPIO_V06, |
| 661 | EXYNOS4X12_GPIO_V07, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 662 | EXYNOS4X12_GPIO_V10, /* 304 0x130 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 663 | EXYNOS4X12_GPIO_V11, |
| 664 | EXYNOS4X12_GPIO_V12, |
| 665 | EXYNOS4X12_GPIO_V13, |
| 666 | EXYNOS4X12_GPIO_V14, |
| 667 | EXYNOS4X12_GPIO_V15, |
| 668 | EXYNOS4X12_GPIO_V16, |
| 669 | EXYNOS4X12_GPIO_V17, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 670 | EXYNOS4X12_GPIO_V20, /* 312 0x138 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 671 | EXYNOS4X12_GPIO_V21, |
| 672 | EXYNOS4X12_GPIO_V22, |
| 673 | EXYNOS4X12_GPIO_V23, |
| 674 | EXYNOS4X12_GPIO_V24, |
| 675 | EXYNOS4X12_GPIO_V25, |
| 676 | EXYNOS4X12_GPIO_V26, |
| 677 | EXYNOS4X12_GPIO_V27, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 678 | EXYNOS4X12_GPIO_V30, /* 320 0x140 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 679 | EXYNOS4X12_GPIO_V31, |
| 680 | EXYNOS4X12_GPIO_V32, |
| 681 | EXYNOS4X12_GPIO_V33, |
| 682 | EXYNOS4X12_GPIO_V34, |
| 683 | EXYNOS4X12_GPIO_V35, |
| 684 | EXYNOS4X12_GPIO_V36, |
| 685 | EXYNOS4X12_GPIO_V37, |
Simon Glass | 9b4e0e8 | 2014-10-20 19:48:40 -0600 | [diff] [blame] | 686 | EXYNOS4X12_GPIO_V40, /* 328 0x148 */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 687 | EXYNOS4X12_GPIO_V41, |
| 688 | EXYNOS4X12_GPIO_V42, |
| 689 | EXYNOS4X12_GPIO_V43, |
| 690 | EXYNOS4X12_GPIO_V44, |
| 691 | EXYNOS4X12_GPIO_V45, |
| 692 | EXYNOS4X12_GPIO_V46, |
| 693 | EXYNOS4X12_GPIO_V47, |
Rajeshwari Birje | f0ce84f | 2013-12-26 09:44:23 +0530 | [diff] [blame] | 694 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 695 | EXYNOS4X12_GPIO_MAX_PORT |
Rajeshwari Birje | f0ce84f | 2013-12-26 09:44:23 +0530 | [diff] [blame] | 696 | }; |
| 697 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 698 | enum exynos5_gpio_pin { |
| 699 | /* GPIO_PART1_STARTS */ |
| 700 | EXYNOS5_GPIO_A00, /* 0 */ |
| 701 | EXYNOS5_GPIO_A01, |
| 702 | EXYNOS5_GPIO_A02, |
| 703 | EXYNOS5_GPIO_A03, |
| 704 | EXYNOS5_GPIO_A04, |
| 705 | EXYNOS5_GPIO_A05, |
| 706 | EXYNOS5_GPIO_A06, |
| 707 | EXYNOS5_GPIO_A07, |
| 708 | EXYNOS5_GPIO_A10, /* 8 */ |
| 709 | EXYNOS5_GPIO_A11, |
| 710 | EXYNOS5_GPIO_A12, |
| 711 | EXYNOS5_GPIO_A13, |
| 712 | EXYNOS5_GPIO_A14, |
| 713 | EXYNOS5_GPIO_A15, |
| 714 | EXYNOS5_GPIO_A16, |
| 715 | EXYNOS5_GPIO_A17, |
| 716 | EXYNOS5_GPIO_A20, /* 16 0x10 */ |
| 717 | EXYNOS5_GPIO_A21, |
| 718 | EXYNOS5_GPIO_A22, |
| 719 | EXYNOS5_GPIO_A23, |
| 720 | EXYNOS5_GPIO_A24, |
| 721 | EXYNOS5_GPIO_A25, |
| 722 | EXYNOS5_GPIO_A26, |
| 723 | EXYNOS5_GPIO_A27, |
| 724 | EXYNOS5_GPIO_B00, /* 24 0x18 */ |
| 725 | EXYNOS5_GPIO_B01, |
| 726 | EXYNOS5_GPIO_B02, |
| 727 | EXYNOS5_GPIO_B03, |
| 728 | EXYNOS5_GPIO_B04, |
| 729 | EXYNOS5_GPIO_B05, |
| 730 | EXYNOS5_GPIO_B06, |
| 731 | EXYNOS5_GPIO_B07, |
| 732 | EXYNOS5_GPIO_B10, /* 32 0x20 */ |
| 733 | EXYNOS5_GPIO_B11, |
| 734 | EXYNOS5_GPIO_B12, |
| 735 | EXYNOS5_GPIO_B13, |
| 736 | EXYNOS5_GPIO_B14, |
| 737 | EXYNOS5_GPIO_B15, |
| 738 | EXYNOS5_GPIO_B16, |
| 739 | EXYNOS5_GPIO_B17, |
| 740 | EXYNOS5_GPIO_B20, /* 40 0x28 */ |
| 741 | EXYNOS5_GPIO_B21, |
| 742 | EXYNOS5_GPIO_B22, |
| 743 | EXYNOS5_GPIO_B23, |
| 744 | EXYNOS5_GPIO_B24, |
| 745 | EXYNOS5_GPIO_B25, |
| 746 | EXYNOS5_GPIO_B26, |
| 747 | EXYNOS5_GPIO_B27, |
| 748 | EXYNOS5_GPIO_B30, /* 48 0x39 */ |
| 749 | EXYNOS5_GPIO_B31, |
| 750 | EXYNOS5_GPIO_B32, |
| 751 | EXYNOS5_GPIO_B33, |
| 752 | EXYNOS5_GPIO_B34, |
| 753 | EXYNOS5_GPIO_B35, |
| 754 | EXYNOS5_GPIO_B36, |
| 755 | EXYNOS5_GPIO_B37, |
| 756 | EXYNOS5_GPIO_C00, /* 56 0x38 */ |
| 757 | EXYNOS5_GPIO_C01, |
| 758 | EXYNOS5_GPIO_C02, |
| 759 | EXYNOS5_GPIO_C03, |
| 760 | EXYNOS5_GPIO_C04, |
| 761 | EXYNOS5_GPIO_C05, |
| 762 | EXYNOS5_GPIO_C06, |
| 763 | EXYNOS5_GPIO_C07, |
| 764 | EXYNOS5_GPIO_C10, /* 64 0x40 */ |
| 765 | EXYNOS5_GPIO_C11, |
| 766 | EXYNOS5_GPIO_C12, |
| 767 | EXYNOS5_GPIO_C13, |
| 768 | EXYNOS5_GPIO_C14, |
| 769 | EXYNOS5_GPIO_C15, |
| 770 | EXYNOS5_GPIO_C16, |
| 771 | EXYNOS5_GPIO_C17, |
| 772 | EXYNOS5_GPIO_C20, /* 72 0x48 */ |
| 773 | EXYNOS5_GPIO_C21, |
| 774 | EXYNOS5_GPIO_C22, |
| 775 | EXYNOS5_GPIO_C23, |
| 776 | EXYNOS5_GPIO_C24, |
| 777 | EXYNOS5_GPIO_C25, |
| 778 | EXYNOS5_GPIO_C26, |
| 779 | EXYNOS5_GPIO_C27, |
| 780 | EXYNOS5_GPIO_C30, /* 80 0x50 */ |
| 781 | EXYNOS5_GPIO_C31, |
| 782 | EXYNOS5_GPIO_C32, |
| 783 | EXYNOS5_GPIO_C33, |
| 784 | EXYNOS5_GPIO_C34, |
| 785 | EXYNOS5_GPIO_C35, |
| 786 | EXYNOS5_GPIO_C36, |
| 787 | EXYNOS5_GPIO_C37, |
| 788 | EXYNOS5_GPIO_D00, /* 88 0x58 */ |
| 789 | EXYNOS5_GPIO_D01, |
| 790 | EXYNOS5_GPIO_D02, |
| 791 | EXYNOS5_GPIO_D03, |
| 792 | EXYNOS5_GPIO_D04, |
| 793 | EXYNOS5_GPIO_D05, |
| 794 | EXYNOS5_GPIO_D06, |
| 795 | EXYNOS5_GPIO_D07, |
| 796 | EXYNOS5_GPIO_D10, /* 96 0x60 */ |
| 797 | EXYNOS5_GPIO_D11, |
| 798 | EXYNOS5_GPIO_D12, |
| 799 | EXYNOS5_GPIO_D13, |
| 800 | EXYNOS5_GPIO_D14, |
| 801 | EXYNOS5_GPIO_D15, |
| 802 | EXYNOS5_GPIO_D16, |
| 803 | EXYNOS5_GPIO_D17, |
| 804 | EXYNOS5_GPIO_Y00, /* 104 0x68 */ |
| 805 | EXYNOS5_GPIO_Y01, |
| 806 | EXYNOS5_GPIO_Y02, |
| 807 | EXYNOS5_GPIO_Y03, |
| 808 | EXYNOS5_GPIO_Y04, |
| 809 | EXYNOS5_GPIO_Y05, |
| 810 | EXYNOS5_GPIO_Y06, |
| 811 | EXYNOS5_GPIO_Y07, |
| 812 | EXYNOS5_GPIO_Y10, /* 112 0x70 */ |
| 813 | EXYNOS5_GPIO_Y11, |
| 814 | EXYNOS5_GPIO_Y12, |
| 815 | EXYNOS5_GPIO_Y13, |
| 816 | EXYNOS5_GPIO_Y14, |
| 817 | EXYNOS5_GPIO_Y15, |
| 818 | EXYNOS5_GPIO_Y16, |
| 819 | EXYNOS5_GPIO_Y17, |
| 820 | EXYNOS5_GPIO_Y20, /* 120 0x78 */ |
| 821 | EXYNOS5_GPIO_Y21, |
| 822 | EXYNOS5_GPIO_Y22, |
| 823 | EXYNOS5_GPIO_Y23, |
| 824 | EXYNOS5_GPIO_Y24, |
| 825 | EXYNOS5_GPIO_Y25, |
| 826 | EXYNOS5_GPIO_Y26, |
| 827 | EXYNOS5_GPIO_Y27, |
| 828 | EXYNOS5_GPIO_Y30, /* 128 0x80 */ |
| 829 | EXYNOS5_GPIO_Y31, |
| 830 | EXYNOS5_GPIO_Y32, |
| 831 | EXYNOS5_GPIO_Y33, |
| 832 | EXYNOS5_GPIO_Y34, |
| 833 | EXYNOS5_GPIO_Y35, |
| 834 | EXYNOS5_GPIO_Y36, |
| 835 | EXYNOS5_GPIO_Y37, |
| 836 | EXYNOS5_GPIO_Y40, /* 136 0x88 */ |
| 837 | EXYNOS5_GPIO_Y41, |
| 838 | EXYNOS5_GPIO_Y42, |
| 839 | EXYNOS5_GPIO_Y43, |
| 840 | EXYNOS5_GPIO_Y44, |
| 841 | EXYNOS5_GPIO_Y45, |
| 842 | EXYNOS5_GPIO_Y46, |
| 843 | EXYNOS5_GPIO_Y47, |
| 844 | EXYNOS5_GPIO_Y50, /* 144 0x90 */ |
| 845 | EXYNOS5_GPIO_Y51, |
| 846 | EXYNOS5_GPIO_Y52, |
| 847 | EXYNOS5_GPIO_Y53, |
| 848 | EXYNOS5_GPIO_Y54, |
| 849 | EXYNOS5_GPIO_Y55, |
| 850 | EXYNOS5_GPIO_Y56, |
| 851 | EXYNOS5_GPIO_Y57, |
| 852 | EXYNOS5_GPIO_Y60, /* 152 0x98 */ |
| 853 | EXYNOS5_GPIO_Y61, |
| 854 | EXYNOS5_GPIO_Y62, |
| 855 | EXYNOS5_GPIO_Y63, |
| 856 | EXYNOS5_GPIO_Y64, |
| 857 | EXYNOS5_GPIO_Y65, |
| 858 | EXYNOS5_GPIO_Y66, |
| 859 | EXYNOS5_GPIO_Y67, |
Rajeshwari Birje | f0ce84f | 2013-12-26 09:44:23 +0530 | [diff] [blame] | 860 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 861 | /* GPIO_PART2_STARTS */ |
| 862 | EXYNOS5_GPIO_MAX_PORT_PART_1, /* 160 0xa0 */ |
| 863 | EXYNOS5_GPIO_C40 = EXYNOS5_GPIO_MAX_PORT_PART_1, |
| 864 | EXYNOS5_GPIO_C41, |
| 865 | EXYNOS5_GPIO_C42, |
| 866 | EXYNOS5_GPIO_C43, |
| 867 | EXYNOS5_GPIO_C44, |
| 868 | EXYNOS5_GPIO_C45, |
| 869 | EXYNOS5_GPIO_C46, |
| 870 | EXYNOS5_GPIO_C47, |
Rajeshwari Birje | f0ce84f | 2013-12-26 09:44:23 +0530 | [diff] [blame] | 871 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 872 | /* GPIO_PART3_STARTS */ |
| 873 | EXYNOS5_GPIO_MAX_PORT_PART_2, /* 168 0xa8 */ |
| 874 | EXYNOS5_GPIO_X00 = EXYNOS5_GPIO_MAX_PORT_PART_2, |
| 875 | EXYNOS5_GPIO_X01, |
| 876 | EXYNOS5_GPIO_X02, |
| 877 | EXYNOS5_GPIO_X03, |
| 878 | EXYNOS5_GPIO_X04, |
| 879 | EXYNOS5_GPIO_X05, |
| 880 | EXYNOS5_GPIO_X06, |
| 881 | EXYNOS5_GPIO_X07, |
| 882 | EXYNOS5_GPIO_X10, /* 176 0xb0 */ |
| 883 | EXYNOS5_GPIO_X11, |
| 884 | EXYNOS5_GPIO_X12, |
| 885 | EXYNOS5_GPIO_X13, |
| 886 | EXYNOS5_GPIO_X14, |
| 887 | EXYNOS5_GPIO_X15, |
| 888 | EXYNOS5_GPIO_X16, |
| 889 | EXYNOS5_GPIO_X17, |
| 890 | EXYNOS5_GPIO_X20, /* 184 0xb8 */ |
| 891 | EXYNOS5_GPIO_X21, |
| 892 | EXYNOS5_GPIO_X22, |
| 893 | EXYNOS5_GPIO_X23, |
| 894 | EXYNOS5_GPIO_X24, |
| 895 | EXYNOS5_GPIO_X25, |
| 896 | EXYNOS5_GPIO_X26, |
| 897 | EXYNOS5_GPIO_X27, |
| 898 | EXYNOS5_GPIO_X30, /* 192 0xc0 */ |
| 899 | EXYNOS5_GPIO_X31, |
| 900 | EXYNOS5_GPIO_X32, |
| 901 | EXYNOS5_GPIO_X33, |
| 902 | EXYNOS5_GPIO_X34, |
| 903 | EXYNOS5_GPIO_X35, |
| 904 | EXYNOS5_GPIO_X36, |
| 905 | EXYNOS5_GPIO_X37, |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 906 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 907 | /* GPIO_PART4_STARTS */ |
| 908 | EXYNOS5_GPIO_MAX_PORT_PART_3, /* 200 0xc8 */ |
| 909 | EXYNOS5_GPIO_E00 = EXYNOS5_GPIO_MAX_PORT_PART_3, |
| 910 | EXYNOS5_GPIO_E01, |
| 911 | EXYNOS5_GPIO_E02, |
| 912 | EXYNOS5_GPIO_E03, |
| 913 | EXYNOS5_GPIO_E04, |
| 914 | EXYNOS5_GPIO_E05, |
| 915 | EXYNOS5_GPIO_E06, |
| 916 | EXYNOS5_GPIO_E07, |
| 917 | EXYNOS5_GPIO_E10, /* 208 0xd0 */ |
| 918 | EXYNOS5_GPIO_E11, |
| 919 | EXYNOS5_GPIO_E12, |
| 920 | EXYNOS5_GPIO_E13, |
| 921 | EXYNOS5_GPIO_E14, |
| 922 | EXYNOS5_GPIO_E15, |
| 923 | EXYNOS5_GPIO_E16, |
| 924 | EXYNOS5_GPIO_E17, |
| 925 | EXYNOS5_GPIO_F00, /* 216 0xd8 */ |
| 926 | EXYNOS5_GPIO_F01, |
| 927 | EXYNOS5_GPIO_F02, |
| 928 | EXYNOS5_GPIO_F03, |
| 929 | EXYNOS5_GPIO_F04, |
| 930 | EXYNOS5_GPIO_F05, |
| 931 | EXYNOS5_GPIO_F06, |
| 932 | EXYNOS5_GPIO_F07, |
| 933 | EXYNOS5_GPIO_F10, /* 224 0xe0 */ |
| 934 | EXYNOS5_GPIO_F11, |
| 935 | EXYNOS5_GPIO_F12, |
| 936 | EXYNOS5_GPIO_F13, |
| 937 | EXYNOS5_GPIO_F14, |
| 938 | EXYNOS5_GPIO_F15, |
| 939 | EXYNOS5_GPIO_F16, |
| 940 | EXYNOS5_GPIO_F17, |
| 941 | EXYNOS5_GPIO_G00, /* 232 0xe8 */ |
| 942 | EXYNOS5_GPIO_G01, |
| 943 | EXYNOS5_GPIO_G02, |
| 944 | EXYNOS5_GPIO_G03, |
| 945 | EXYNOS5_GPIO_G04, |
| 946 | EXYNOS5_GPIO_G05, |
| 947 | EXYNOS5_GPIO_G06, |
| 948 | EXYNOS5_GPIO_G07, |
| 949 | EXYNOS5_GPIO_G10, /* 240 0xf0 */ |
| 950 | EXYNOS5_GPIO_G11, |
| 951 | EXYNOS5_GPIO_G12, |
| 952 | EXYNOS5_GPIO_G13, |
| 953 | EXYNOS5_GPIO_G14, |
| 954 | EXYNOS5_GPIO_G15, |
| 955 | EXYNOS5_GPIO_G16, |
| 956 | EXYNOS5_GPIO_G17, |
| 957 | EXYNOS5_GPIO_G20, /* 248 0xf8 */ |
| 958 | EXYNOS5_GPIO_G21, |
| 959 | EXYNOS5_GPIO_G22, |
| 960 | EXYNOS5_GPIO_G23, |
| 961 | EXYNOS5_GPIO_G24, |
| 962 | EXYNOS5_GPIO_G25, |
| 963 | EXYNOS5_GPIO_G26, |
| 964 | EXYNOS5_GPIO_G27, |
| 965 | EXYNOS5_GPIO_H00, /* 256 0x100 */ |
| 966 | EXYNOS5_GPIO_H01, |
| 967 | EXYNOS5_GPIO_H02, |
| 968 | EXYNOS5_GPIO_H03, |
| 969 | EXYNOS5_GPIO_H04, |
| 970 | EXYNOS5_GPIO_H05, |
| 971 | EXYNOS5_GPIO_H06, |
| 972 | EXYNOS5_GPIO_H07, |
| 973 | EXYNOS5_GPIO_H10, /* 264 0x108 */ |
| 974 | EXYNOS5_GPIO_H11, |
| 975 | EXYNOS5_GPIO_H12, |
| 976 | EXYNOS5_GPIO_H13, |
| 977 | EXYNOS5_GPIO_H14, |
| 978 | EXYNOS5_GPIO_H15, |
| 979 | EXYNOS5_GPIO_H16, |
| 980 | EXYNOS5_GPIO_H17, |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 981 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 982 | /* GPIO_PART4_STARTS */ |
| 983 | EXYNOS5_GPIO_MAX_PORT_PART_4, /* 272 0x110 */ |
| 984 | EXYNOS5_GPIO_V00 = EXYNOS5_GPIO_MAX_PORT_PART_4, |
| 985 | EXYNOS5_GPIO_V01, |
| 986 | EXYNOS5_GPIO_V02, |
| 987 | EXYNOS5_GPIO_V03, |
| 988 | EXYNOS5_GPIO_V04, |
| 989 | EXYNOS5_GPIO_V05, |
| 990 | EXYNOS5_GPIO_V06, |
| 991 | EXYNOS5_GPIO_V07, |
| 992 | EXYNOS5_GPIO_V10, /* 280 0x118 */ |
| 993 | EXYNOS5_GPIO_V11, |
| 994 | EXYNOS5_GPIO_V12, |
| 995 | EXYNOS5_GPIO_V13, |
| 996 | EXYNOS5_GPIO_V14, |
| 997 | EXYNOS5_GPIO_V15, |
| 998 | EXYNOS5_GPIO_V16, |
| 999 | EXYNOS5_GPIO_V17, |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1000 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1001 | /* GPIO_PART5_STARTS */ |
| 1002 | EXYNOS5_GPIO_MAX_PORT_PART_5, /* 288 0x120 */ |
| 1003 | EXYNOS5_GPIO_V20 = EXYNOS5_GPIO_MAX_PORT_PART_5, |
| 1004 | EXYNOS5_GPIO_V21, |
| 1005 | EXYNOS5_GPIO_V22, |
| 1006 | EXYNOS5_GPIO_V23, |
| 1007 | EXYNOS5_GPIO_V24, |
| 1008 | EXYNOS5_GPIO_V25, |
| 1009 | EXYNOS5_GPIO_V26, |
| 1010 | EXYNOS5_GPIO_V27, |
| 1011 | EXYNOS5_GPIO_V30, /* 296 0x128 */ |
| 1012 | EXYNOS5_GPIO_V31, |
| 1013 | EXYNOS5_GPIO_V32, |
| 1014 | EXYNOS5_GPIO_V33, |
| 1015 | EXYNOS5_GPIO_V34, |
| 1016 | EXYNOS5_GPIO_V35, |
| 1017 | EXYNOS5_GPIO_V36, |
| 1018 | EXYNOS5_GPIO_V37, |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1019 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1020 | /* GPIO_PART6_STARTS */ |
| 1021 | EXYNOS5_GPIO_MAX_PORT_PART_6, /* 304 0x130 */ |
| 1022 | EXYNOS5_GPIO_V40 = EXYNOS5_GPIO_MAX_PORT_PART_6, |
| 1023 | EXYNOS5_GPIO_V41, |
| 1024 | EXYNOS5_GPIO_V42, |
| 1025 | EXYNOS5_GPIO_V43, |
| 1026 | EXYNOS5_GPIO_V44, |
| 1027 | EXYNOS5_GPIO_V45, |
| 1028 | EXYNOS5_GPIO_V46, |
| 1029 | EXYNOS5_GPIO_V47, |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1030 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1031 | /* GPIO_PART7_STARTS */ /* 312 0x138 */ |
| 1032 | EXYNOS5_GPIO_MAX_PORT_PART_7, |
| 1033 | EXYNOS5_GPIO_Z0 = EXYNOS5_GPIO_MAX_PORT_PART_7, |
| 1034 | EXYNOS5_GPIO_Z1, |
| 1035 | EXYNOS5_GPIO_Z2, |
| 1036 | EXYNOS5_GPIO_Z3, |
| 1037 | EXYNOS5_GPIO_Z4, |
| 1038 | EXYNOS5_GPIO_Z5, |
| 1039 | EXYNOS5_GPIO_Z6, |
| 1040 | EXYNOS5_GPIO_MAX_PORT |
| 1041 | }; |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1042 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1043 | enum exynos5420_gpio_pin { |
| 1044 | /* GPIO_PART1_STARTS */ |
| 1045 | EXYNOS5420_GPIO_A00, /* 0 */ |
| 1046 | EXYNOS5420_GPIO_A01, |
| 1047 | EXYNOS5420_GPIO_A02, |
| 1048 | EXYNOS5420_GPIO_A03, |
| 1049 | EXYNOS5420_GPIO_A04, |
| 1050 | EXYNOS5420_GPIO_A05, |
| 1051 | EXYNOS5420_GPIO_A06, |
| 1052 | EXYNOS5420_GPIO_A07, |
| 1053 | EXYNOS5420_GPIO_A10, /* 8 */ |
| 1054 | EXYNOS5420_GPIO_A11, |
| 1055 | EXYNOS5420_GPIO_A12, |
| 1056 | EXYNOS5420_GPIO_A13, |
| 1057 | EXYNOS5420_GPIO_A14, |
| 1058 | EXYNOS5420_GPIO_A15, |
| 1059 | EXYNOS5420_GPIO_A16, |
| 1060 | EXYNOS5420_GPIO_A17, |
| 1061 | EXYNOS5420_GPIO_A20, /* 16 0x10 */ |
| 1062 | EXYNOS5420_GPIO_A21, |
| 1063 | EXYNOS5420_GPIO_A22, |
| 1064 | EXYNOS5420_GPIO_A23, |
| 1065 | EXYNOS5420_GPIO_A24, |
| 1066 | EXYNOS5420_GPIO_A25, |
| 1067 | EXYNOS5420_GPIO_A26, |
| 1068 | EXYNOS5420_GPIO_A27, |
| 1069 | EXYNOS5420_GPIO_B00, /* 24 0x18 */ |
| 1070 | EXYNOS5420_GPIO_B01, |
| 1071 | EXYNOS5420_GPIO_B02, |
| 1072 | EXYNOS5420_GPIO_B03, |
| 1073 | EXYNOS5420_GPIO_B04, |
| 1074 | EXYNOS5420_GPIO_B05, |
| 1075 | EXYNOS5420_GPIO_B06, |
| 1076 | EXYNOS5420_GPIO_B07, |
| 1077 | EXYNOS5420_GPIO_B10, /* 32 0x20 */ |
| 1078 | EXYNOS5420_GPIO_B11, |
| 1079 | EXYNOS5420_GPIO_B12, |
| 1080 | EXYNOS5420_GPIO_B13, |
| 1081 | EXYNOS5420_GPIO_B14, |
| 1082 | EXYNOS5420_GPIO_B15, |
| 1083 | EXYNOS5420_GPIO_B16, |
| 1084 | EXYNOS5420_GPIO_B17, |
| 1085 | EXYNOS5420_GPIO_B20, /* 40 0x28 */ |
| 1086 | EXYNOS5420_GPIO_B21, |
| 1087 | EXYNOS5420_GPIO_B22, |
| 1088 | EXYNOS5420_GPIO_B23, |
| 1089 | EXYNOS5420_GPIO_B24, |
| 1090 | EXYNOS5420_GPIO_B25, |
| 1091 | EXYNOS5420_GPIO_B26, |
| 1092 | EXYNOS5420_GPIO_B27, |
| 1093 | EXYNOS5420_GPIO_B30, /* 48 0x30 */ |
| 1094 | EXYNOS5420_GPIO_B31, |
| 1095 | EXYNOS5420_GPIO_B32, |
| 1096 | EXYNOS5420_GPIO_B33, |
| 1097 | EXYNOS5420_GPIO_B34, |
| 1098 | EXYNOS5420_GPIO_B35, |
| 1099 | EXYNOS5420_GPIO_B36, |
| 1100 | EXYNOS5420_GPIO_B37, |
| 1101 | EXYNOS5420_GPIO_B40, /* 56 0x38 */ |
| 1102 | EXYNOS5420_GPIO_B41, |
| 1103 | EXYNOS5420_GPIO_B42, |
| 1104 | EXYNOS5420_GPIO_B43, |
| 1105 | EXYNOS5420_GPIO_B44, |
| 1106 | EXYNOS5420_GPIO_B45, |
| 1107 | EXYNOS5420_GPIO_B46, |
| 1108 | EXYNOS5420_GPIO_B47, |
| 1109 | EXYNOS5420_GPIO_H00, /* 64 0x40 */ |
| 1110 | EXYNOS5420_GPIO_H01, |
| 1111 | EXYNOS5420_GPIO_H02, |
| 1112 | EXYNOS5420_GPIO_H03, |
| 1113 | EXYNOS5420_GPIO_H04, |
| 1114 | EXYNOS5420_GPIO_H05, |
| 1115 | EXYNOS5420_GPIO_H06, |
| 1116 | EXYNOS5420_GPIO_H07, |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1117 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1118 | /* GPIO PART 2 STARTS*/ |
| 1119 | EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ |
| 1120 | EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, |
| 1121 | EXYNOS5420_GPIO_Y71, |
| 1122 | EXYNOS5420_GPIO_Y72, |
| 1123 | EXYNOS5420_GPIO_Y73, |
| 1124 | EXYNOS5420_GPIO_Y74, |
| 1125 | EXYNOS5420_GPIO_Y75, |
| 1126 | EXYNOS5420_GPIO_Y76, |
| 1127 | EXYNOS5420_GPIO_Y77, |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1128 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1129 | /* GPIO PART 3 STARTS*/ |
| 1130 | EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ |
| 1131 | EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2, |
| 1132 | EXYNOS5420_GPIO_X01, |
| 1133 | EXYNOS5420_GPIO_X02, |
| 1134 | EXYNOS5420_GPIO_X03, |
| 1135 | EXYNOS5420_GPIO_X04, |
| 1136 | EXYNOS5420_GPIO_X05, |
| 1137 | EXYNOS5420_GPIO_X06, |
| 1138 | EXYNOS5420_GPIO_X07, |
| 1139 | EXYNOS5420_GPIO_X10, /* 88 0x58 */ |
| 1140 | EXYNOS5420_GPIO_X11, |
| 1141 | EXYNOS5420_GPIO_X12, |
| 1142 | EXYNOS5420_GPIO_X13, |
| 1143 | EXYNOS5420_GPIO_X14, |
| 1144 | EXYNOS5420_GPIO_X15, |
| 1145 | EXYNOS5420_GPIO_X16, |
| 1146 | EXYNOS5420_GPIO_X17, |
| 1147 | EXYNOS5420_GPIO_X20, /* 96 0x60 */ |
| 1148 | EXYNOS5420_GPIO_X21, |
| 1149 | EXYNOS5420_GPIO_X22, |
| 1150 | EXYNOS5420_GPIO_X23, |
| 1151 | EXYNOS5420_GPIO_X24, |
| 1152 | EXYNOS5420_GPIO_X25, |
| 1153 | EXYNOS5420_GPIO_X26, |
| 1154 | EXYNOS5420_GPIO_X27, |
| 1155 | EXYNOS5420_GPIO_X30, /* 104 0x68 */ |
| 1156 | EXYNOS5420_GPIO_X31, |
| 1157 | EXYNOS5420_GPIO_X32, |
| 1158 | EXYNOS5420_GPIO_X33, |
| 1159 | EXYNOS5420_GPIO_X34, |
| 1160 | EXYNOS5420_GPIO_X35, |
| 1161 | EXYNOS5420_GPIO_X36, |
| 1162 | EXYNOS5420_GPIO_X37, |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1163 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1164 | /* GPIO PART 4 STARTS*/ |
| 1165 | EXYNOS5420_GPIO_MAX_PORT_PART_3,/* 112 0x70 */ |
| 1166 | EXYNOS5420_GPIO_C00 = EXYNOS5420_GPIO_MAX_PORT_PART_3, |
| 1167 | EXYNOS5420_GPIO_C01, |
| 1168 | EXYNOS5420_GPIO_C02, |
| 1169 | EXYNOS5420_GPIO_C03, |
| 1170 | EXYNOS5420_GPIO_C04, |
| 1171 | EXYNOS5420_GPIO_C05, |
| 1172 | EXYNOS5420_GPIO_C06, |
| 1173 | EXYNOS5420_GPIO_C07, |
| 1174 | EXYNOS5420_GPIO_C10, /* 120 0x78 */ |
| 1175 | EXYNOS5420_GPIO_C11, |
| 1176 | EXYNOS5420_GPIO_C12, |
| 1177 | EXYNOS5420_GPIO_C13, |
| 1178 | EXYNOS5420_GPIO_C14, |
| 1179 | EXYNOS5420_GPIO_C15, |
| 1180 | EXYNOS5420_GPIO_C16, |
| 1181 | EXYNOS5420_GPIO_C17, |
| 1182 | EXYNOS5420_GPIO_C20, /* 128 0x80 */ |
| 1183 | EXYNOS5420_GPIO_C21, |
| 1184 | EXYNOS5420_GPIO_C22, |
| 1185 | EXYNOS5420_GPIO_C23, |
| 1186 | EXYNOS5420_GPIO_C24, |
| 1187 | EXYNOS5420_GPIO_C25, |
| 1188 | EXYNOS5420_GPIO_C26, |
| 1189 | EXYNOS5420_GPIO_C27, |
| 1190 | EXYNOS5420_GPIO_C30, /* 136 0x88 */ |
| 1191 | EXYNOS5420_GPIO_C31, |
| 1192 | EXYNOS5420_GPIO_C32, |
| 1193 | EXYNOS5420_GPIO_C33, |
| 1194 | EXYNOS5420_GPIO_C34, |
| 1195 | EXYNOS5420_GPIO_C35, |
| 1196 | EXYNOS5420_GPIO_C36, |
| 1197 | EXYNOS5420_GPIO_C37, |
| 1198 | EXYNOS5420_GPIO_C40, /* 144 0x90 */ |
| 1199 | EXYNOS5420_GPIO_C41, |
| 1200 | EXYNOS5420_GPIO_C42, |
| 1201 | EXYNOS5420_GPIO_C43, |
| 1202 | EXYNOS5420_GPIO_C44, |
| 1203 | EXYNOS5420_GPIO_C45, |
| 1204 | EXYNOS5420_GPIO_C46, |
| 1205 | EXYNOS5420_GPIO_C47, |
| 1206 | EXYNOS5420_GPIO_D10, /* 152 0x98 */ |
| 1207 | EXYNOS5420_GPIO_D11, |
| 1208 | EXYNOS5420_GPIO_D12, |
| 1209 | EXYNOS5420_GPIO_D13, |
| 1210 | EXYNOS5420_GPIO_D14, |
| 1211 | EXYNOS5420_GPIO_D15, |
| 1212 | EXYNOS5420_GPIO_D16, |
| 1213 | EXYNOS5420_GPIO_D17, |
| 1214 | EXYNOS5420_GPIO_Y00, /* 160 0xa0 */ |
| 1215 | EXYNOS5420_GPIO_Y01, |
| 1216 | EXYNOS5420_GPIO_Y02, |
| 1217 | EXYNOS5420_GPIO_Y03, |
| 1218 | EXYNOS5420_GPIO_Y04, |
| 1219 | EXYNOS5420_GPIO_Y05, |
| 1220 | EXYNOS5420_GPIO_Y06, |
| 1221 | EXYNOS5420_GPIO_Y07, |
| 1222 | EXYNOS5420_GPIO_Y10, /* 168 0xa8 */ |
| 1223 | EXYNOS5420_GPIO_Y11, |
| 1224 | EXYNOS5420_GPIO_Y12, |
| 1225 | EXYNOS5420_GPIO_Y13, |
| 1226 | EXYNOS5420_GPIO_Y14, |
| 1227 | EXYNOS5420_GPIO_Y15, |
| 1228 | EXYNOS5420_GPIO_Y16, |
| 1229 | EXYNOS5420_GPIO_Y17, |
| 1230 | EXYNOS5420_GPIO_Y20, /* 176 0xb0 */ |
| 1231 | EXYNOS5420_GPIO_Y21, |
| 1232 | EXYNOS5420_GPIO_Y22, |
| 1233 | EXYNOS5420_GPIO_Y23, |
| 1234 | EXYNOS5420_GPIO_Y24, |
| 1235 | EXYNOS5420_GPIO_Y25, |
| 1236 | EXYNOS5420_GPIO_Y26, |
| 1237 | EXYNOS5420_GPIO_Y27, |
| 1238 | EXYNOS5420_GPIO_Y30, /* 184 0xb8 */ |
| 1239 | EXYNOS5420_GPIO_Y31, |
| 1240 | EXYNOS5420_GPIO_Y32, |
| 1241 | EXYNOS5420_GPIO_Y33, |
| 1242 | EXYNOS5420_GPIO_Y34, |
| 1243 | EXYNOS5420_GPIO_Y35, |
| 1244 | EXYNOS5420_GPIO_Y36, |
| 1245 | EXYNOS5420_GPIO_Y37, |
| 1246 | EXYNOS5420_GPIO_Y40, /* 192 0xc0 */ |
| 1247 | EXYNOS5420_GPIO_Y41, |
| 1248 | EXYNOS5420_GPIO_Y42, |
| 1249 | EXYNOS5420_GPIO_Y43, |
| 1250 | EXYNOS5420_GPIO_Y44, |
| 1251 | EXYNOS5420_GPIO_Y45, |
| 1252 | EXYNOS5420_GPIO_Y46, |
| 1253 | EXYNOS5420_GPIO_Y47, |
| 1254 | EXYNOS5420_GPIO_Y50, /* 200 0xc8 */ |
| 1255 | EXYNOS5420_GPIO_Y51, |
| 1256 | EXYNOS5420_GPIO_Y52, |
| 1257 | EXYNOS5420_GPIO_Y53, |
| 1258 | EXYNOS5420_GPIO_Y54, |
| 1259 | EXYNOS5420_GPIO_Y55, |
| 1260 | EXYNOS5420_GPIO_Y56, |
| 1261 | EXYNOS5420_GPIO_Y57, |
| 1262 | EXYNOS5420_GPIO_Y60, /* 208 0xd0 */ |
| 1263 | EXYNOS5420_GPIO_Y61, |
| 1264 | EXYNOS5420_GPIO_Y62, |
| 1265 | EXYNOS5420_GPIO_Y63, |
| 1266 | EXYNOS5420_GPIO_Y64, |
| 1267 | EXYNOS5420_GPIO_Y65, |
| 1268 | EXYNOS5420_GPIO_Y66, |
| 1269 | EXYNOS5420_GPIO_Y67, |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 1270 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1271 | /* GPIO_PART5_STARTS */ |
| 1272 | EXYNOS5420_GPIO_MAX_PORT_PART_4,/* 216 0xd8 */ |
| 1273 | EXYNOS5420_GPIO_E00 = EXYNOS5420_GPIO_MAX_PORT_PART_4, |
| 1274 | EXYNOS5420_GPIO_E01, |
| 1275 | EXYNOS5420_GPIO_E02, |
| 1276 | EXYNOS5420_GPIO_E03, |
| 1277 | EXYNOS5420_GPIO_E04, |
| 1278 | EXYNOS5420_GPIO_E05, |
| 1279 | EXYNOS5420_GPIO_E06, |
| 1280 | EXYNOS5420_GPIO_E07, |
| 1281 | EXYNOS5420_GPIO_E10, /* 224 0xe0 */ |
| 1282 | EXYNOS5420_GPIO_E11, |
| 1283 | EXYNOS5420_GPIO_E12, |
| 1284 | EXYNOS5420_GPIO_E13, |
| 1285 | EXYNOS5420_GPIO_E14, |
| 1286 | EXYNOS5420_GPIO_E15, |
| 1287 | EXYNOS5420_GPIO_E16, |
| 1288 | EXYNOS5420_GPIO_E17, |
| 1289 | EXYNOS5420_GPIO_F00, /* 232 0xe8 */ |
| 1290 | EXYNOS5420_GPIO_F01, |
| 1291 | EXYNOS5420_GPIO_F02, |
| 1292 | EXYNOS5420_GPIO_F03, |
| 1293 | EXYNOS5420_GPIO_F04, |
| 1294 | EXYNOS5420_GPIO_F05, |
| 1295 | EXYNOS5420_GPIO_F06, |
| 1296 | EXYNOS5420_GPIO_F07, |
| 1297 | EXYNOS5420_GPIO_F10, /* 240 0xf0 */ |
| 1298 | EXYNOS5420_GPIO_F11, |
| 1299 | EXYNOS5420_GPIO_F12, |
| 1300 | EXYNOS5420_GPIO_F13, |
| 1301 | EXYNOS5420_GPIO_F14, |
| 1302 | EXYNOS5420_GPIO_F15, |
| 1303 | EXYNOS5420_GPIO_F16, |
| 1304 | EXYNOS5420_GPIO_F17, |
| 1305 | EXYNOS5420_GPIO_G00, /* 248 0xf8 */ |
| 1306 | EXYNOS5420_GPIO_G01, |
| 1307 | EXYNOS5420_GPIO_G02, |
| 1308 | EXYNOS5420_GPIO_G03, |
| 1309 | EXYNOS5420_GPIO_G04, |
| 1310 | EXYNOS5420_GPIO_G05, |
| 1311 | EXYNOS5420_GPIO_G06, |
| 1312 | EXYNOS5420_GPIO_G07, |
| 1313 | EXYNOS5420_GPIO_G10, /* 256 0x100 */ |
| 1314 | EXYNOS5420_GPIO_G11, |
| 1315 | EXYNOS5420_GPIO_G12, |
| 1316 | EXYNOS5420_GPIO_G13, |
| 1317 | EXYNOS5420_GPIO_G14, |
| 1318 | EXYNOS5420_GPIO_G15, |
| 1319 | EXYNOS5420_GPIO_G16, |
| 1320 | EXYNOS5420_GPIO_G17, |
| 1321 | EXYNOS5420_GPIO_G20, /* 264 0x108 */ |
| 1322 | EXYNOS5420_GPIO_G21, |
| 1323 | EXYNOS5420_GPIO_G22, |
| 1324 | EXYNOS5420_GPIO_G23, |
| 1325 | EXYNOS5420_GPIO_G24, |
| 1326 | EXYNOS5420_GPIO_G25, |
| 1327 | EXYNOS5420_GPIO_G26, |
| 1328 | EXYNOS5420_GPIO_G27, |
| 1329 | EXYNOS5420_GPIO_J40, /* 272 0x110 */ |
| 1330 | EXYNOS5420_GPIO_J41, |
| 1331 | EXYNOS5420_GPIO_J42, |
| 1332 | EXYNOS5420_GPIO_J43, |
| 1333 | EXYNOS5420_GPIO_J44, |
| 1334 | EXYNOS5420_GPIO_J45, |
| 1335 | EXYNOS5420_GPIO_J46, |
| 1336 | EXYNOS5420_GPIO_J47, |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 1337 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1338 | /* GPIO_PART6_STARTS */ |
| 1339 | EXYNOS5420_GPIO_MAX_PORT_PART_5,/* 280 0x118 */ |
| 1340 | EXYNOS5420_GPIO_Z0 = EXYNOS5420_GPIO_MAX_PORT_PART_5, |
| 1341 | EXYNOS5420_GPIO_Z1, |
| 1342 | EXYNOS5420_GPIO_Z2, |
| 1343 | EXYNOS5420_GPIO_Z3, |
| 1344 | EXYNOS5420_GPIO_Z4, |
| 1345 | EXYNOS5420_GPIO_Z5, |
| 1346 | EXYNOS5420_GPIO_Z6, |
| 1347 | EXYNOS5420_GPIO_MAX_PORT |
| 1348 | }; |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 1349 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1350 | struct gpio_info { |
Thomas Abraham | a99ad39 | 2016-04-23 22:18:12 +0530 | [diff] [blame] | 1351 | unsigned long reg_addr; /* Address of register for this part */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1352 | unsigned int max_gpio; /* Maximum GPIO in this part */ |
| 1353 | }; |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 1354 | |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 1355 | #define EXYNOS4_GPIO_NUM_PARTS 4 |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1356 | static struct gpio_info exynos4_gpio_data[EXYNOS4_GPIO_NUM_PARTS] = { |
| 1357 | { EXYNOS4_GPIO_PART1_BASE, EXYNOS4_GPIO_MAX_PORT_PART_1 }, |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 1358 | { EXYNOS4_GPIO_PART2_0, EXYNOS4_GPIO_MAX_PORT_PART_2_0 }, |
| 1359 | { EXYNOS4_GPIO_PART2_1, EXYNOS4_GPIO_MAX_PORT_PART_2_1 }, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1360 | { EXYNOS4_GPIO_PART3_BASE, EXYNOS4_GPIO_MAX_PORT }, |
| 1361 | }; |
Chander Kashyap | 252991e | 2012-12-25 20:13:42 +0000 | [diff] [blame] | 1362 | |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 1363 | #define EXYNOS4X12_GPIO_NUM_PARTS 8 |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1364 | static struct gpio_info exynos4x12_gpio_data[EXYNOS4X12_GPIO_NUM_PARTS] = { |
Przemyslaw Marczak | cce257f | 2014-10-28 17:31:06 +0100 | [diff] [blame] | 1365 | { EXYNOS4X12_GPIO_PART1_0, EXYNOS4X12_GPIO_MAX_PORT_PART_1_0 }, |
| 1366 | { EXYNOS4X12_GPIO_PART1_1, EXYNOS4X12_GPIO_MAX_PORT_PART_1_1 }, |
| 1367 | { EXYNOS4X12_GPIO_PART1_2, EXYNOS4X12_GPIO_MAX_PORT_PART_1_2 }, |
| 1368 | { EXYNOS4X12_GPIO_PART2_1, EXYNOS4X12_GPIO_MAX_PORT_PART_2_1 }, |
| 1369 | { EXYNOS4X12_GPIO_PART2_2, EXYNOS4X12_GPIO_MAX_PORT_PART_2_2 }, |
| 1370 | { EXYNOS4X12_GPIO_PART2_3, EXYNOS4X12_GPIO_MAX_PORT_PART_2_3 }, |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1371 | { EXYNOS4X12_GPIO_PART3_BASE, EXYNOS4X12_GPIO_MAX_PORT_PART_3 }, |
| 1372 | { EXYNOS4X12_GPIO_PART4_BASE, EXYNOS4X12_GPIO_MAX_PORT }, |
| 1373 | }; |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1374 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1375 | #define EXYNOS5_GPIO_NUM_PARTS 8 |
| 1376 | static struct gpio_info exynos5_gpio_data[EXYNOS5_GPIO_NUM_PARTS] = { |
| 1377 | { EXYNOS5_GPIO_PART1_BASE, EXYNOS5_GPIO_MAX_PORT_PART_1 }, |
| 1378 | { EXYNOS5_GPIO_PART2_BASE, EXYNOS5_GPIO_MAX_PORT_PART_2 }, |
| 1379 | { EXYNOS5_GPIO_PART3_BASE, EXYNOS5_GPIO_MAX_PORT_PART_3 }, |
| 1380 | { EXYNOS5_GPIO_PART4_BASE, EXYNOS5_GPIO_MAX_PORT_PART_4 }, |
| 1381 | { EXYNOS5_GPIO_PART5_BASE, EXYNOS5_GPIO_MAX_PORT_PART_5 }, |
| 1382 | { EXYNOS5_GPIO_PART6_BASE, EXYNOS5_GPIO_MAX_PORT_PART_6 }, |
| 1383 | { EXYNOS5_GPIO_PART7_BASE, EXYNOS5_GPIO_MAX_PORT_PART_7 }, |
| 1384 | { EXYNOS5_GPIO_PART8_BASE, EXYNOS5_GPIO_MAX_PORT }, |
| 1385 | }; |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1386 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1387 | #define EXYNOS5420_GPIO_NUM_PARTS 6 |
| 1388 | static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { |
| 1389 | { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, |
| 1390 | { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, |
| 1391 | { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, |
| 1392 | { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, |
| 1393 | { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_5 }, |
| 1394 | { EXYNOS5420_GPIO_PART6_BASE, EXYNOS5420_GPIO_MAX_PORT }, |
| 1395 | }; |
Chander Kashyap | 34076a0 | 2012-02-05 23:01:46 +0000 | [diff] [blame] | 1396 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1397 | static inline struct gpio_info *get_gpio_data(void) |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1398 | { |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1399 | if (cpu_is_exynos5()) { |
Przemyslaw Marczak | cefbfe4 | 2015-10-27 13:07:57 +0100 | [diff] [blame] | 1400 | if (proid_is_exynos5420() || proid_is_exynos5422()) |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1401 | return exynos5420_gpio_data; |
| 1402 | else |
| 1403 | return exynos5_gpio_data; |
| 1404 | } else if (cpu_is_exynos4()) { |
| 1405 | if (proid_is_exynos4412()) |
| 1406 | return exynos4x12_gpio_data; |
| 1407 | else |
| 1408 | return exynos4_gpio_data; |
| 1409 | } |
Łukasz Majewski | 1e04cae | 2011-08-22 22:34:58 +0000 | [diff] [blame] | 1410 | |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1411 | return NULL; |
| 1412 | } |
| 1413 | |
| 1414 | static inline unsigned int get_bank_num(void) |
| 1415 | { |
| 1416 | if (cpu_is_exynos5()) { |
Przemyslaw Marczak | cefbfe4 | 2015-10-27 13:07:57 +0100 | [diff] [blame] | 1417 | if (proid_is_exynos5420() || proid_is_exynos5422()) |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1418 | return EXYNOS5420_GPIO_NUM_PARTS; |
| 1419 | else |
| 1420 | return EXYNOS5_GPIO_NUM_PARTS; |
| 1421 | } else if (cpu_is_exynos4()) { |
| 1422 | if (proid_is_exynos4412()) |
| 1423 | return EXYNOS4X12_GPIO_NUM_PARTS; |
| 1424 | else |
| 1425 | return EXYNOS4_GPIO_NUM_PARTS; |
Łukasz Majewski | d6614b7 | 2012-09-04 21:47:46 +0000 | [diff] [blame] | 1426 | } |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1427 | |
| 1428 | return 0; |
Łukasz Majewski | d6614b7 | 2012-09-04 21:47:46 +0000 | [diff] [blame] | 1429 | } |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1430 | |
| 1431 | /* |
| 1432 | * This structure helps mapping symbolic GPIO names into indices from |
| 1433 | * exynos5_gpio_pin/exynos5420_gpio_pin enums. |
| 1434 | * |
| 1435 | * By convention, symbolic GPIO name is defined as follows: |
| 1436 | * |
| 1437 | * g[p]<bank><set><bit>, where |
| 1438 | * p is optional |
| 1439 | * <bank> - a single character bank name, as defined by the SOC |
| 1440 | * <set> - a single digit set number |
| 1441 | * <bit> - bit number within the set (in 0..7 range). |
| 1442 | * |
| 1443 | * <set><bit> essentially form an octal number of the GPIO pin within the bank |
| 1444 | * space. On the 5420 architecture some banks' sets do not start not from zero |
| 1445 | * ('d' starts from 1 and 'j' starts from 4). To compensate for that and |
| 1446 | * maintain flat number space withoout holes, those banks use offsets to be |
| 1447 | * deducted from the pin number. |
| 1448 | */ |
| 1449 | struct gpio_name_num_table { |
| 1450 | char bank; /* bank name symbol */ |
| 1451 | unsigned int bank_size; /* total number of pins in the bank */ |
| 1452 | char bank_offset; /* offset of the first bank's pin */ |
| 1453 | unsigned int base; /* index of the first bank's pin in the enum */ |
| 1454 | }; |
| 1455 | |
| 1456 | #define GPIO_ENTRY(name, base, top, offset) { name, top - base, offset, base } |
| 1457 | static const struct gpio_name_num_table exynos4_gpio_table[] = { |
| 1458 | GPIO_ENTRY('a', EXYNOS4_GPIO_A00, EXYNOS4_GPIO_B0, 0), |
| 1459 | GPIO_ENTRY('b', EXYNOS4_GPIO_B0, EXYNOS4_GPIO_C00, 0), |
| 1460 | GPIO_ENTRY('c', EXYNOS4_GPIO_C00, EXYNOS4_GPIO_D00, 0), |
| 1461 | GPIO_ENTRY('d', EXYNOS4_GPIO_D00, EXYNOS4_GPIO_E00, 0), |
| 1462 | GPIO_ENTRY('e', EXYNOS4_GPIO_E00, EXYNOS4_GPIO_F00, 0), |
| 1463 | GPIO_ENTRY('f', EXYNOS4_GPIO_F00, EXYNOS4_GPIO_J00, 0), |
| 1464 | GPIO_ENTRY('j', EXYNOS4_GPIO_J00, EXYNOS4_GPIO_K00, 0), |
| 1465 | GPIO_ENTRY('k', EXYNOS4_GPIO_K00, EXYNOS4_GPIO_L00, 0), |
| 1466 | GPIO_ENTRY('l', EXYNOS4_GPIO_L00, EXYNOS4_GPIO_Y00, 0), |
| 1467 | GPIO_ENTRY('y', EXYNOS4_GPIO_Y00, EXYNOS4_GPIO_X00, 0), |
| 1468 | GPIO_ENTRY('x', EXYNOS4_GPIO_X00, EXYNOS4_GPIO_Z0, 0), |
| 1469 | GPIO_ENTRY('z', EXYNOS4_GPIO_Z0, EXYNOS4_GPIO_MAX_PORT, 0), |
| 1470 | { 0 } |
| 1471 | }; |
| 1472 | |
| 1473 | static const struct gpio_name_num_table exynos4x12_gpio_table[] = { |
| 1474 | GPIO_ENTRY('a', EXYNOS4X12_GPIO_A00, EXYNOS4X12_GPIO_B0, 0), |
| 1475 | GPIO_ENTRY('b', EXYNOS4X12_GPIO_B0, EXYNOS4X12_GPIO_C00, 0), |
| 1476 | GPIO_ENTRY('c', EXYNOS4X12_GPIO_C00, EXYNOS4X12_GPIO_D00, 0), |
| 1477 | GPIO_ENTRY('d', EXYNOS4X12_GPIO_D00, EXYNOS4X12_GPIO_F00, 0), |
| 1478 | GPIO_ENTRY('f', EXYNOS4X12_GPIO_F00, EXYNOS4X12_GPIO_J00, 0), |
| 1479 | GPIO_ENTRY('j', EXYNOS4X12_GPIO_J00, EXYNOS4X12_GPIO_K00, 0), |
| 1480 | GPIO_ENTRY('k', EXYNOS4X12_GPIO_K00, EXYNOS4X12_GPIO_L00, 0), |
| 1481 | GPIO_ENTRY('l', EXYNOS4X12_GPIO_L00, EXYNOS4X12_GPIO_Y00, 0), |
| 1482 | GPIO_ENTRY('y', EXYNOS4X12_GPIO_Y00, EXYNOS4X12_GPIO_M00, 0), |
| 1483 | GPIO_ENTRY('m', EXYNOS4X12_GPIO_M00, EXYNOS4X12_GPIO_X00, 0), |
| 1484 | GPIO_ENTRY('x', EXYNOS4X12_GPIO_X00, EXYNOS4X12_GPIO_Z0, 0), |
| 1485 | GPIO_ENTRY('z', EXYNOS4X12_GPIO_Z0, EXYNOS4X12_GPIO_V00, 0), |
| 1486 | GPIO_ENTRY('v', EXYNOS4X12_GPIO_V00, EXYNOS4X12_GPIO_MAX_PORT, 0), |
| 1487 | { 0 } |
| 1488 | }; |
| 1489 | |
| 1490 | static const struct gpio_name_num_table exynos5_gpio_table[] = { |
| 1491 | GPIO_ENTRY('a', EXYNOS5_GPIO_A00, EXYNOS5_GPIO_B00, 0), |
| 1492 | GPIO_ENTRY('b', EXYNOS5_GPIO_B00, EXYNOS5_GPIO_C00, 0), |
| 1493 | GPIO_ENTRY('c', EXYNOS5_GPIO_C00, EXYNOS5_GPIO_D00, 0), |
| 1494 | GPIO_ENTRY('d', EXYNOS5_GPIO_D00, EXYNOS5_GPIO_Y00, 0), |
| 1495 | GPIO_ENTRY('y', EXYNOS5_GPIO_Y00, EXYNOS5_GPIO_C40, 0), |
| 1496 | GPIO_ENTRY('x', EXYNOS5_GPIO_X00, EXYNOS5_GPIO_E00, 0), |
| 1497 | GPIO_ENTRY('e', EXYNOS5_GPIO_E00, EXYNOS5_GPIO_F00, 0), |
| 1498 | GPIO_ENTRY('f', EXYNOS5_GPIO_F00, EXYNOS5_GPIO_G00, 0), |
| 1499 | GPIO_ENTRY('g', EXYNOS5_GPIO_G00, EXYNOS5_GPIO_H00, 0), |
| 1500 | GPIO_ENTRY('h', EXYNOS5_GPIO_H00, EXYNOS5_GPIO_V00, 0), |
| 1501 | GPIO_ENTRY('v', EXYNOS5_GPIO_V00, EXYNOS5_GPIO_Z0, 0), |
| 1502 | GPIO_ENTRY('z', EXYNOS5_GPIO_Z0, EXYNOS5_GPIO_MAX_PORT, 0), |
| 1503 | { 0 } |
| 1504 | }; |
| 1505 | |
| 1506 | static const struct gpio_name_num_table exynos5420_gpio_table[] = { |
| 1507 | GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), |
| 1508 | GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), |
| 1509 | GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Y70, 0), |
| 1510 | GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), |
| 1511 | GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), |
| 1512 | GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 010), |
| 1513 | GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), |
| 1514 | GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), |
| 1515 | GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), |
| 1516 | GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), |
| 1517 | GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_Z0, 040), |
| 1518 | GPIO_ENTRY('z', EXYNOS5420_GPIO_Z0, EXYNOS5420_GPIO_MAX_PORT, 0), |
| 1519 | { 0 } |
| 1520 | }; |
| 1521 | |
| 1522 | void gpio_cfg_pin(int gpio, int cfg); |
| 1523 | void gpio_set_pull(int gpio, int mode); |
| 1524 | void gpio_set_drv(int gpio, int mode); |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1525 | void gpio_set_rate(int gpio, int mode); |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1526 | int s5p_gpio_get_pin(unsigned gpio); |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 1527 | #endif |
| 1528 | |
| 1529 | /* Pin configurations */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1530 | #define S5P_GPIO_INPUT 0x0 |
| 1531 | #define S5P_GPIO_OUTPUT 0x1 |
| 1532 | #define S5P_GPIO_IRQ 0xf |
| 1533 | #define S5P_GPIO_FUNC(x) (x) |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 1534 | |
| 1535 | /* Pull mode */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1536 | #define S5P_GPIO_PULL_NONE 0x0 |
| 1537 | #define S5P_GPIO_PULL_DOWN 0x1 |
| 1538 | #define S5P_GPIO_PULL_UP 0x3 |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 1539 | |
| 1540 | /* Drive Strength level */ |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 1541 | #define S5P_GPIO_DRV_1X 0x0 |
| 1542 | #define S5P_GPIO_DRV_3X 0x1 |
| 1543 | #define S5P_GPIO_DRV_2X 0x2 |
| 1544 | #define S5P_GPIO_DRV_4X 0x3 |
| 1545 | #define S5P_GPIO_DRV_FAST 0x0 |
| 1546 | #define S5P_GPIO_DRV_SLOW 0x1 |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 1547 | #endif |