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