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