pinctrl-exynos.c 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624
  1. /*
  2. * Exynos specific support for Samsung pinctrl/gpiolib driver with eint support.
  3. *
  4. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  5. * http://www.samsung.com
  6. * Copyright (c) 2012 Linaro Ltd
  7. * http://www.linaro.org
  8. *
  9. * Author: Thomas Abraham <thomas.ab@samsung.com>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This file contains the Samsung Exynos specific information required by the
  17. * the Samsung pinctrl/gpiolib driver. It also includes the implementation of
  18. * external gpio and wakeup interrupt support.
  19. */
  20. #include <linux/module.h>
  21. #include <linux/device.h>
  22. #include <linux/interrupt.h>
  23. #include <linux/irqdomain.h>
  24. #include <linux/irq.h>
  25. #include <linux/irqchip/chained_irq.h>
  26. #include <linux/of_irq.h>
  27. #include <linux/io.h>
  28. #include <linux/slab.h>
  29. #include <linux/spinlock.h>
  30. #include <linux/err.h>
  31. #include "pinctrl-samsung.h"
  32. #include "pinctrl-exynos.h"
  33. struct exynos_irq_chip {
  34. struct irq_chip chip;
  35. u32 eint_con;
  36. u32 eint_mask;
  37. u32 eint_pend;
  38. };
  39. static inline struct exynos_irq_chip *to_exynos_irq_chip(struct irq_chip *chip)
  40. {
  41. return container_of(chip, struct exynos_irq_chip, chip);
  42. }
  43. static const struct samsung_pin_bank_type bank_type_off = {
  44. .fld_width = { 4, 1, 2, 2, 2, 2, },
  45. .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, },
  46. };
  47. static const struct samsung_pin_bank_type bank_type_alive = {
  48. .fld_width = { 4, 1, 2, 2, },
  49. .reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
  50. };
  51. static void exynos_irq_mask(struct irq_data *irqd)
  52. {
  53. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  54. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  55. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  56. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  57. unsigned long reg_mask = our_chip->eint_mask + bank->eint_offset;
  58. unsigned long mask;
  59. unsigned long flags;
  60. spin_lock_irqsave(&bank->slock, flags);
  61. mask = readl(d->virt_base + reg_mask);
  62. mask |= 1 << irqd->hwirq;
  63. writel(mask, d->virt_base + reg_mask);
  64. spin_unlock_irqrestore(&bank->slock, flags);
  65. }
  66. static void exynos_irq_ack(struct irq_data *irqd)
  67. {
  68. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  69. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  70. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  71. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  72. unsigned long reg_pend = our_chip->eint_pend + bank->eint_offset;
  73. writel(1 << irqd->hwirq, d->virt_base + reg_pend);
  74. }
  75. static void exynos_irq_unmask(struct irq_data *irqd)
  76. {
  77. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  78. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  79. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  80. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  81. unsigned long reg_mask = our_chip->eint_mask + bank->eint_offset;
  82. unsigned long mask;
  83. unsigned long flags;
  84. /*
  85. * Ack level interrupts right before unmask
  86. *
  87. * If we don't do this we'll get a double-interrupt. Level triggered
  88. * interrupts must not fire an interrupt if the level is not
  89. * _currently_ active, even if it was active while the interrupt was
  90. * masked.
  91. */
  92. if (irqd_get_trigger_type(irqd) & IRQ_TYPE_LEVEL_MASK)
  93. exynos_irq_ack(irqd);
  94. spin_lock_irqsave(&bank->slock, flags);
  95. mask = readl(d->virt_base + reg_mask);
  96. mask &= ~(1 << irqd->hwirq);
  97. writel(mask, d->virt_base + reg_mask);
  98. spin_unlock_irqrestore(&bank->slock, flags);
  99. }
  100. static int exynos_irq_set_type(struct irq_data *irqd, unsigned int type)
  101. {
  102. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  103. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  104. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  105. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  106. unsigned int shift = EXYNOS_EINT_CON_LEN * irqd->hwirq;
  107. unsigned int con, trig_type;
  108. unsigned long reg_con = our_chip->eint_con + bank->eint_offset;
  109. switch (type) {
  110. case IRQ_TYPE_EDGE_RISING:
  111. trig_type = EXYNOS_EINT_EDGE_RISING;
  112. break;
  113. case IRQ_TYPE_EDGE_FALLING:
  114. trig_type = EXYNOS_EINT_EDGE_FALLING;
  115. break;
  116. case IRQ_TYPE_EDGE_BOTH:
  117. trig_type = EXYNOS_EINT_EDGE_BOTH;
  118. break;
  119. case IRQ_TYPE_LEVEL_HIGH:
  120. trig_type = EXYNOS_EINT_LEVEL_HIGH;
  121. break;
  122. case IRQ_TYPE_LEVEL_LOW:
  123. trig_type = EXYNOS_EINT_LEVEL_LOW;
  124. break;
  125. default:
  126. pr_err("unsupported external interrupt type\n");
  127. return -EINVAL;
  128. }
  129. if (type & IRQ_TYPE_EDGE_BOTH)
  130. irq_set_handler_locked(irqd, handle_edge_irq);
  131. else
  132. irq_set_handler_locked(irqd, handle_level_irq);
  133. con = readl(d->virt_base + reg_con);
  134. con &= ~(EXYNOS_EINT_CON_MASK << shift);
  135. con |= trig_type << shift;
  136. writel(con, d->virt_base + reg_con);
  137. return 0;
  138. }
  139. static int exynos_irq_request_resources(struct irq_data *irqd)
  140. {
  141. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  142. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  143. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  144. const struct samsung_pin_bank_type *bank_type = bank->type;
  145. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  146. unsigned int shift = EXYNOS_EINT_CON_LEN * irqd->hwirq;
  147. unsigned long reg_con = our_chip->eint_con + bank->eint_offset;
  148. unsigned long flags;
  149. unsigned int mask;
  150. unsigned int con;
  151. int ret;
  152. ret = gpiochip_lock_as_irq(&bank->gpio_chip, irqd->hwirq);
  153. if (ret) {
  154. dev_err(bank->gpio_chip.parent,
  155. "unable to lock pin %s-%lu IRQ\n",
  156. bank->name, irqd->hwirq);
  157. return ret;
  158. }
  159. reg_con = bank->pctl_offset + bank_type->reg_offset[PINCFG_TYPE_FUNC];
  160. shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
  161. mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
  162. spin_lock_irqsave(&bank->slock, flags);
  163. con = readl(d->virt_base + reg_con);
  164. con &= ~(mask << shift);
  165. con |= EXYNOS_EINT_FUNC << shift;
  166. writel(con, d->virt_base + reg_con);
  167. spin_unlock_irqrestore(&bank->slock, flags);
  168. return 0;
  169. }
  170. static void exynos_irq_release_resources(struct irq_data *irqd)
  171. {
  172. struct irq_chip *chip = irq_data_get_irq_chip(irqd);
  173. struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip);
  174. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  175. const struct samsung_pin_bank_type *bank_type = bank->type;
  176. struct samsung_pinctrl_drv_data *d = bank->drvdata;
  177. unsigned int shift = EXYNOS_EINT_CON_LEN * irqd->hwirq;
  178. unsigned long reg_con = our_chip->eint_con + bank->eint_offset;
  179. unsigned long flags;
  180. unsigned int mask;
  181. unsigned int con;
  182. reg_con = bank->pctl_offset + bank_type->reg_offset[PINCFG_TYPE_FUNC];
  183. shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
  184. mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
  185. spin_lock_irqsave(&bank->slock, flags);
  186. con = readl(d->virt_base + reg_con);
  187. con &= ~(mask << shift);
  188. con |= FUNC_INPUT << shift;
  189. writel(con, d->virt_base + reg_con);
  190. spin_unlock_irqrestore(&bank->slock, flags);
  191. gpiochip_unlock_as_irq(&bank->gpio_chip, irqd->hwirq);
  192. }
  193. /*
  194. * irq_chip for gpio interrupts.
  195. */
  196. static struct exynos_irq_chip exynos_gpio_irq_chip = {
  197. .chip = {
  198. .name = "exynos_gpio_irq_chip",
  199. .irq_unmask = exynos_irq_unmask,
  200. .irq_mask = exynos_irq_mask,
  201. .irq_ack = exynos_irq_ack,
  202. .irq_set_type = exynos_irq_set_type,
  203. .irq_request_resources = exynos_irq_request_resources,
  204. .irq_release_resources = exynos_irq_release_resources,
  205. },
  206. .eint_con = EXYNOS_GPIO_ECON_OFFSET,
  207. .eint_mask = EXYNOS_GPIO_EMASK_OFFSET,
  208. .eint_pend = EXYNOS_GPIO_EPEND_OFFSET,
  209. };
  210. static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq,
  211. irq_hw_number_t hw)
  212. {
  213. struct samsung_pin_bank *b = h->host_data;
  214. irq_set_chip_data(virq, b);
  215. irq_set_chip_and_handler(virq, &b->irq_chip->chip,
  216. handle_level_irq);
  217. return 0;
  218. }
  219. /*
  220. * irq domain callbacks for external gpio and wakeup interrupt controllers.
  221. */
  222. static const struct irq_domain_ops exynos_eint_irqd_ops = {
  223. .map = exynos_eint_irq_map,
  224. .xlate = irq_domain_xlate_twocell,
  225. };
  226. static irqreturn_t exynos_eint_gpio_irq(int irq, void *data)
  227. {
  228. struct samsung_pinctrl_drv_data *d = data;
  229. struct samsung_pin_bank *bank = d->pin_banks;
  230. unsigned int svc, group, pin, virq;
  231. svc = readl(d->virt_base + EXYNOS_SVC_OFFSET);
  232. group = EXYNOS_SVC_GROUP(svc);
  233. pin = svc & EXYNOS_SVC_NUM_MASK;
  234. if (!group)
  235. return IRQ_HANDLED;
  236. bank += (group - 1);
  237. virq = irq_linear_revmap(bank->irq_domain, pin);
  238. if (!virq)
  239. return IRQ_NONE;
  240. generic_handle_irq(virq);
  241. return IRQ_HANDLED;
  242. }
  243. struct exynos_eint_gpio_save {
  244. u32 eint_con;
  245. u32 eint_fltcon0;
  246. u32 eint_fltcon1;
  247. };
  248. /*
  249. * exynos_eint_gpio_init() - setup handling of external gpio interrupts.
  250. * @d: driver data of samsung pinctrl driver.
  251. */
  252. static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d)
  253. {
  254. struct samsung_pin_bank *bank;
  255. struct device *dev = d->dev;
  256. int ret;
  257. int i;
  258. if (!d->irq) {
  259. dev_err(dev, "irq number not available\n");
  260. return -EINVAL;
  261. }
  262. ret = devm_request_irq(dev, d->irq, exynos_eint_gpio_irq,
  263. 0, dev_name(dev), d);
  264. if (ret) {
  265. dev_err(dev, "irq request failed\n");
  266. return -ENXIO;
  267. }
  268. bank = d->pin_banks;
  269. for (i = 0; i < d->nr_banks; ++i, ++bank) {
  270. if (bank->eint_type != EINT_TYPE_GPIO)
  271. continue;
  272. bank->irq_domain = irq_domain_add_linear(bank->of_node,
  273. bank->nr_pins, &exynos_eint_irqd_ops, bank);
  274. if (!bank->irq_domain) {
  275. dev_err(dev, "gpio irq domain add failed\n");
  276. ret = -ENXIO;
  277. goto err_domains;
  278. }
  279. bank->soc_priv = devm_kzalloc(d->dev,
  280. sizeof(struct exynos_eint_gpio_save), GFP_KERNEL);
  281. if (!bank->soc_priv) {
  282. irq_domain_remove(bank->irq_domain);
  283. ret = -ENOMEM;
  284. goto err_domains;
  285. }
  286. bank->irq_chip = &exynos_gpio_irq_chip;
  287. }
  288. return 0;
  289. err_domains:
  290. for (--i, --bank; i >= 0; --i, --bank) {
  291. if (bank->eint_type != EINT_TYPE_GPIO)
  292. continue;
  293. irq_domain_remove(bank->irq_domain);
  294. }
  295. return ret;
  296. }
  297. static u32 exynos_eint_wake_mask = 0xffffffff;
  298. u32 exynos_get_eint_wake_mask(void)
  299. {
  300. return exynos_eint_wake_mask;
  301. }
  302. static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
  303. {
  304. struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
  305. unsigned long bit = 1UL << (2 * bank->eint_offset + irqd->hwirq);
  306. pr_info("wake %s for irq %d\n", on ? "enabled" : "disabled", irqd->irq);
  307. if (!on)
  308. exynos_eint_wake_mask |= bit;
  309. else
  310. exynos_eint_wake_mask &= ~bit;
  311. return 0;
  312. }
  313. /*
  314. * irq_chip for wakeup interrupts
  315. */
  316. static struct exynos_irq_chip exynos4210_wkup_irq_chip __initdata = {
  317. .chip = {
  318. .name = "exynos4210_wkup_irq_chip",
  319. .irq_unmask = exynos_irq_unmask,
  320. .irq_mask = exynos_irq_mask,
  321. .irq_ack = exynos_irq_ack,
  322. .irq_set_type = exynos_irq_set_type,
  323. .irq_set_wake = exynos_wkup_irq_set_wake,
  324. .irq_request_resources = exynos_irq_request_resources,
  325. .irq_release_resources = exynos_irq_release_resources,
  326. },
  327. .eint_con = EXYNOS_WKUP_ECON_OFFSET,
  328. .eint_mask = EXYNOS_WKUP_EMASK_OFFSET,
  329. .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
  330. };
  331. static struct exynos_irq_chip exynos7_wkup_irq_chip __initdata = {
  332. .chip = {
  333. .name = "exynos7_wkup_irq_chip",
  334. .irq_unmask = exynos_irq_unmask,
  335. .irq_mask = exynos_irq_mask,
  336. .irq_ack = exynos_irq_ack,
  337. .irq_set_type = exynos_irq_set_type,
  338. .irq_set_wake = exynos_wkup_irq_set_wake,
  339. .irq_request_resources = exynos_irq_request_resources,
  340. .irq_release_resources = exynos_irq_release_resources,
  341. },
  342. .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
  343. .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
  344. .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
  345. };
  346. /* list of external wakeup controllers supported */
  347. static const struct of_device_id exynos_wkup_irq_ids[] = {
  348. { .compatible = "samsung,exynos4210-wakeup-eint",
  349. .data = &exynos4210_wkup_irq_chip },
  350. { .compatible = "samsung,exynos7-wakeup-eint",
  351. .data = &exynos7_wkup_irq_chip },
  352. { }
  353. };
  354. /* interrupt handler for wakeup interrupts 0..15 */
  355. static void exynos_irq_eint0_15(struct irq_desc *desc)
  356. {
  357. struct exynos_weint_data *eintd = irq_desc_get_handler_data(desc);
  358. struct samsung_pin_bank *bank = eintd->bank;
  359. struct irq_chip *chip = irq_desc_get_chip(desc);
  360. int eint_irq;
  361. chained_irq_enter(chip, desc);
  362. eint_irq = irq_linear_revmap(bank->irq_domain, eintd->irq);
  363. generic_handle_irq(eint_irq);
  364. chained_irq_exit(chip, desc);
  365. }
  366. static inline void exynos_irq_demux_eint(unsigned long pend,
  367. struct irq_domain *domain)
  368. {
  369. unsigned int irq;
  370. while (pend) {
  371. irq = fls(pend) - 1;
  372. generic_handle_irq(irq_find_mapping(domain, irq));
  373. pend &= ~(1 << irq);
  374. }
  375. }
  376. /* interrupt handler for wakeup interrupt 16 */
  377. static void exynos_irq_demux_eint16_31(struct irq_desc *desc)
  378. {
  379. struct irq_chip *chip = irq_desc_get_chip(desc);
  380. struct exynos_muxed_weint_data *eintd = irq_desc_get_handler_data(desc);
  381. struct samsung_pinctrl_drv_data *d = eintd->banks[0]->drvdata;
  382. unsigned long pend;
  383. unsigned long mask;
  384. int i;
  385. chained_irq_enter(chip, desc);
  386. for (i = 0; i < eintd->nr_banks; ++i) {
  387. struct samsung_pin_bank *b = eintd->banks[i];
  388. pend = readl(d->virt_base + b->irq_chip->eint_pend
  389. + b->eint_offset);
  390. mask = readl(d->virt_base + b->irq_chip->eint_mask
  391. + b->eint_offset);
  392. exynos_irq_demux_eint(pend & ~mask, b->irq_domain);
  393. }
  394. chained_irq_exit(chip, desc);
  395. }
  396. /*
  397. * exynos_eint_wkup_init() - setup handling of external wakeup interrupts.
  398. * @d: driver data of samsung pinctrl driver.
  399. */
  400. static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
  401. {
  402. struct device *dev = d->dev;
  403. struct device_node *wkup_np = NULL;
  404. struct device_node *np;
  405. struct samsung_pin_bank *bank;
  406. struct exynos_weint_data *weint_data;
  407. struct exynos_muxed_weint_data *muxed_data;
  408. struct exynos_irq_chip *irq_chip;
  409. unsigned int muxed_banks = 0;
  410. unsigned int i;
  411. int idx, irq;
  412. for_each_child_of_node(dev->of_node, np) {
  413. const struct of_device_id *match;
  414. match = of_match_node(exynos_wkup_irq_ids, np);
  415. if (match) {
  416. irq_chip = kmemdup(match->data,
  417. sizeof(*irq_chip), GFP_KERNEL);
  418. wkup_np = np;
  419. break;
  420. }
  421. }
  422. if (!wkup_np)
  423. return -ENODEV;
  424. bank = d->pin_banks;
  425. for (i = 0; i < d->nr_banks; ++i, ++bank) {
  426. if (bank->eint_type != EINT_TYPE_WKUP)
  427. continue;
  428. bank->irq_domain = irq_domain_add_linear(bank->of_node,
  429. bank->nr_pins, &exynos_eint_irqd_ops, bank);
  430. if (!bank->irq_domain) {
  431. dev_err(dev, "wkup irq domain add failed\n");
  432. return -ENXIO;
  433. }
  434. bank->irq_chip = irq_chip;
  435. if (!of_find_property(bank->of_node, "interrupts", NULL)) {
  436. bank->eint_type = EINT_TYPE_WKUP_MUX;
  437. ++muxed_banks;
  438. continue;
  439. }
  440. weint_data = devm_kzalloc(dev, bank->nr_pins
  441. * sizeof(*weint_data), GFP_KERNEL);
  442. if (!weint_data) {
  443. dev_err(dev, "could not allocate memory for weint_data\n");
  444. return -ENOMEM;
  445. }
  446. for (idx = 0; idx < bank->nr_pins; ++idx) {
  447. irq = irq_of_parse_and_map(bank->of_node, idx);
  448. if (!irq) {
  449. dev_err(dev, "irq number for eint-%s-%d not found\n",
  450. bank->name, idx);
  451. continue;
  452. }
  453. weint_data[idx].irq = idx;
  454. weint_data[idx].bank = bank;
  455. irq_set_chained_handler_and_data(irq,
  456. exynos_irq_eint0_15,
  457. &weint_data[idx]);
  458. }
  459. }
  460. if (!muxed_banks)
  461. return 0;
  462. irq = irq_of_parse_and_map(wkup_np, 0);
  463. if (!irq) {
  464. dev_err(dev, "irq number for muxed EINTs not found\n");
  465. return 0;
  466. }
  467. muxed_data = devm_kzalloc(dev, sizeof(*muxed_data)
  468. + muxed_banks*sizeof(struct samsung_pin_bank *), GFP_KERNEL);
  469. if (!muxed_data) {
  470. dev_err(dev, "could not allocate memory for muxed_data\n");
  471. return -ENOMEM;
  472. }
  473. irq_set_chained_handler_and_data(irq, exynos_irq_demux_eint16_31,
  474. muxed_data);
  475. bank = d->pin_banks;
  476. idx = 0;
  477. for (i = 0; i < d->nr_banks; ++i, ++bank) {
  478. if (bank->eint_type != EINT_TYPE_WKUP_MUX)
  479. continue;
  480. muxed_data->banks[idx++] = bank;
  481. }
  482. muxed_data->nr_banks = muxed_banks;
  483. return 0;
  484. }
  485. static void exynos_pinctrl_suspend_bank(
  486. struct samsung_pinctrl_drv_data *drvdata,
  487. struct samsung_pin_bank *bank)
  488. {
  489. struct exynos_eint_gpio_save *save = bank->soc_priv;
  490. void __iomem *regs = drvdata->virt_base;
  491. save->eint_con = readl(regs + EXYNOS_GPIO_ECON_OFFSET
  492. + bank->eint_offset);
  493. save->eint_fltcon0 = readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
  494. + 2 * bank->eint_offset);
  495. save->eint_fltcon1 = readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
  496. + 2 * bank->eint_offset + 4);
  497. pr_debug("%s: save con %#010x\n", bank->name, save->eint_con);
  498. pr_debug("%s: save fltcon0 %#010x\n", bank->name, save->eint_fltcon0);
  499. pr_debug("%s: save fltcon1 %#010x\n", bank->name, save->eint_fltcon1);
  500. }
  501. static void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata)
  502. {
  503. struct samsung_pin_bank *bank = drvdata->pin_banks;
  504. int i;
  505. for (i = 0; i < drvdata->nr_banks; ++i, ++bank)
  506. if (bank->eint_type == EINT_TYPE_GPIO)
  507. exynos_pinctrl_suspend_bank(drvdata, bank);
  508. }
  509. static void exynos_pinctrl_resume_bank(
  510. struct samsung_pinctrl_drv_data *drvdata,
  511. struct samsung_pin_bank *bank)
  512. {
  513. struct exynos_eint_gpio_save *save = bank->soc_priv;
  514. void __iomem *regs = drvdata->virt_base;
  515. pr_debug("%s: con %#010x => %#010x\n", bank->name,
  516. readl(regs + EXYNOS_GPIO_ECON_OFFSET
  517. + bank->eint_offset), save->eint_con);
  518. pr_debug("%s: fltcon0 %#010x => %#010x\n", bank->name,
  519. readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
  520. + 2 * bank->eint_offset), save->eint_fltcon0);
  521. pr_debug("%s: fltcon1 %#010x => %#010x\n", bank->name,
  522. readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
  523. + 2 * bank->eint_offset + 4), save->eint_fltcon1);
  524. writel(save->eint_con, regs + EXYNOS_GPIO_ECON_OFFSET
  525. + bank->eint_offset);
  526. writel(save->eint_fltcon0, regs + EXYNOS_GPIO_EFLTCON_OFFSET
  527. + 2 * bank->eint_offset);
  528. writel(save->eint_fltcon1, regs + EXYNOS_GPIO_EFLTCON_OFFSET
  529. + 2 * bank->eint_offset + 4);
  530. }
  531. static void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata)
  532. {
  533. struct samsung_pin_bank *bank = drvdata->pin_banks;
  534. int i;
  535. for (i = 0; i < drvdata->nr_banks; ++i, ++bank)
  536. if (bank->eint_type == EINT_TYPE_GPIO)
  537. exynos_pinctrl_resume_bank(drvdata, bank);
  538. }
  539. /* pin banks of s5pv210 pin-controller */
  540. static const struct samsung_pin_bank_data s5pv210_pin_bank[] __initconst = {
  541. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  542. EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpa1", 0x04),
  543. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
  544. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
  545. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
  546. EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
  547. EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18),
  548. EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpe0", 0x1c),
  549. EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpe1", 0x20),
  550. EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpf0", 0x24),
  551. EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpf1", 0x28),
  552. EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpf2", 0x2c),
  553. EXYNOS_PIN_BANK_EINTG(6, 0x180, "gpf3", 0x30),
  554. EXYNOS_PIN_BANK_EINTG(7, 0x1a0, "gpg0", 0x34),
  555. EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38),
  556. EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c),
  557. EXYNOS_PIN_BANK_EINTG(7, 0x200, "gpg3", 0x40),
  558. EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"),
  559. EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x44),
  560. EXYNOS_PIN_BANK_EINTG(6, 0x260, "gpj1", 0x48),
  561. EXYNOS_PIN_BANK_EINTG(8, 0x280, "gpj2", 0x4c),
  562. EXYNOS_PIN_BANK_EINTG(8, 0x2a0, "gpj3", 0x50),
  563. EXYNOS_PIN_BANK_EINTG(5, 0x2c0, "gpj4", 0x54),
  564. EXYNOS_PIN_BANK_EINTN(8, 0x2e0, "mp01"),
  565. EXYNOS_PIN_BANK_EINTN(4, 0x300, "mp02"),
  566. EXYNOS_PIN_BANK_EINTN(8, 0x320, "mp03"),
  567. EXYNOS_PIN_BANK_EINTN(8, 0x340, "mp04"),
  568. EXYNOS_PIN_BANK_EINTN(8, 0x360, "mp05"),
  569. EXYNOS_PIN_BANK_EINTN(8, 0x380, "mp06"),
  570. EXYNOS_PIN_BANK_EINTN(8, 0x3a0, "mp07"),
  571. EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gph0", 0x00),
  572. EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gph1", 0x04),
  573. EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gph2", 0x08),
  574. EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gph3", 0x0c),
  575. };
  576. const struct samsung_pin_ctrl s5pv210_pin_ctrl[] __initconst = {
  577. {
  578. /* pin-controller instance 0 data */
  579. .pin_banks = s5pv210_pin_bank,
  580. .nr_banks = ARRAY_SIZE(s5pv210_pin_bank),
  581. .eint_gpio_init = exynos_eint_gpio_init,
  582. .eint_wkup_init = exynos_eint_wkup_init,
  583. .suspend = exynos_pinctrl_suspend,
  584. .resume = exynos_pinctrl_resume,
  585. },
  586. };
  587. /* pin banks of exynos3250 pin-controller 0 */
  588. static const struct samsung_pin_bank_data exynos3250_pin_banks0[] __initconst = {
  589. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  590. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  591. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
  592. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
  593. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
  594. EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
  595. EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpd1", 0x18),
  596. };
  597. /* pin banks of exynos3250 pin-controller 1 */
  598. static const struct samsung_pin_bank_data exynos3250_pin_banks1[] __initconst = {
  599. EXYNOS_PIN_BANK_EINTN(8, 0x120, "gpe0"),
  600. EXYNOS_PIN_BANK_EINTN(8, 0x140, "gpe1"),
  601. EXYNOS_PIN_BANK_EINTN(3, 0x180, "gpe2"),
  602. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpk0", 0x08),
  603. EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c),
  604. EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10),
  605. EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpl0", 0x18),
  606. EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24),
  607. EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28),
  608. EXYNOS_PIN_BANK_EINTG(5, 0x2a0, "gpm2", 0x2c),
  609. EXYNOS_PIN_BANK_EINTG(8, 0x2c0, "gpm3", 0x30),
  610. EXYNOS_PIN_BANK_EINTG(8, 0x2e0, "gpm4", 0x34),
  611. EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gpx0", 0x00),
  612. EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gpx1", 0x04),
  613. EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gpx2", 0x08),
  614. EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gpx3", 0x0c),
  615. };
  616. /*
  617. * Samsung pinctrl driver data for Exynos3250 SoC. Exynos3250 SoC includes
  618. * two gpio/pin-mux/pinconfig controllers.
  619. */
  620. const struct samsung_pin_ctrl exynos3250_pin_ctrl[] __initconst = {
  621. {
  622. /* pin-controller instance 0 data */
  623. .pin_banks = exynos3250_pin_banks0,
  624. .nr_banks = ARRAY_SIZE(exynos3250_pin_banks0),
  625. .eint_gpio_init = exynos_eint_gpio_init,
  626. .suspend = exynos_pinctrl_suspend,
  627. .resume = exynos_pinctrl_resume,
  628. }, {
  629. /* pin-controller instance 1 data */
  630. .pin_banks = exynos3250_pin_banks1,
  631. .nr_banks = ARRAY_SIZE(exynos3250_pin_banks1),
  632. .eint_gpio_init = exynos_eint_gpio_init,
  633. .eint_wkup_init = exynos_eint_wkup_init,
  634. .suspend = exynos_pinctrl_suspend,
  635. .resume = exynos_pinctrl_resume,
  636. },
  637. };
  638. /* pin banks of exynos4210 pin-controller 0 */
  639. static const struct samsung_pin_bank_data exynos4210_pin_banks0[] __initconst = {
  640. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  641. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  642. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
  643. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
  644. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
  645. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14),
  646. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18),
  647. EXYNOS_PIN_BANK_EINTG(5, 0x0E0, "gpe0", 0x1c),
  648. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20),
  649. EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpe2", 0x24),
  650. EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpe3", 0x28),
  651. EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpe4", 0x2c),
  652. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30),
  653. EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34),
  654. EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38),
  655. EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c),
  656. };
  657. /* pin banks of exynos4210 pin-controller 1 */
  658. static const struct samsung_pin_bank_data exynos4210_pin_banks1[] __initconst = {
  659. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpj0", 0x00),
  660. EXYNOS_PIN_BANK_EINTG(5, 0x020, "gpj1", 0x04),
  661. EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08),
  662. EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c),
  663. EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10),
  664. EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14),
  665. EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpl0", 0x18),
  666. EXYNOS_PIN_BANK_EINTG(3, 0x0E0, "gpl1", 0x1c),
  667. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20),
  668. EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"),
  669. EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"),
  670. EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"),
  671. EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"),
  672. EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"),
  673. EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"),
  674. EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"),
  675. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  676. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  677. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  678. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  679. };
  680. /* pin banks of exynos4210 pin-controller 2 */
  681. static const struct samsung_pin_bank_data exynos4210_pin_banks2[] __initconst = {
  682. EXYNOS_PIN_BANK_EINTN(7, 0x000, "gpz"),
  683. };
  684. /*
  685. * Samsung pinctrl driver data for Exynos4210 SoC. Exynos4210 SoC includes
  686. * three gpio/pin-mux/pinconfig controllers.
  687. */
  688. const struct samsung_pin_ctrl exynos4210_pin_ctrl[] __initconst = {
  689. {
  690. /* pin-controller instance 0 data */
  691. .pin_banks = exynos4210_pin_banks0,
  692. .nr_banks = ARRAY_SIZE(exynos4210_pin_banks0),
  693. .eint_gpio_init = exynos_eint_gpio_init,
  694. .suspend = exynos_pinctrl_suspend,
  695. .resume = exynos_pinctrl_resume,
  696. }, {
  697. /* pin-controller instance 1 data */
  698. .pin_banks = exynos4210_pin_banks1,
  699. .nr_banks = ARRAY_SIZE(exynos4210_pin_banks1),
  700. .eint_gpio_init = exynos_eint_gpio_init,
  701. .eint_wkup_init = exynos_eint_wkup_init,
  702. .suspend = exynos_pinctrl_suspend,
  703. .resume = exynos_pinctrl_resume,
  704. }, {
  705. /* pin-controller instance 2 data */
  706. .pin_banks = exynos4210_pin_banks2,
  707. .nr_banks = ARRAY_SIZE(exynos4210_pin_banks2),
  708. },
  709. };
  710. /* pin banks of exynos4x12 pin-controller 0 */
  711. static const struct samsung_pin_bank_data exynos4x12_pin_banks0[] __initconst = {
  712. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  713. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  714. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
  715. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
  716. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
  717. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14),
  718. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18),
  719. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30),
  720. EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34),
  721. EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38),
  722. EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c),
  723. EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x40),
  724. EXYNOS_PIN_BANK_EINTG(5, 0x260, "gpj1", 0x44),
  725. };
  726. /* pin banks of exynos4x12 pin-controller 1 */
  727. static const struct samsung_pin_bank_data exynos4x12_pin_banks1[] __initconst = {
  728. EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08),
  729. EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c),
  730. EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10),
  731. EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14),
  732. EXYNOS_PIN_BANK_EINTG(7, 0x0C0, "gpl0", 0x18),
  733. EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpl1", 0x1c),
  734. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20),
  735. EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24),
  736. EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28),
  737. EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c),
  738. EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30),
  739. EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34),
  740. EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"),
  741. EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"),
  742. EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"),
  743. EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"),
  744. EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"),
  745. EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"),
  746. EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"),
  747. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  748. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  749. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  750. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  751. };
  752. /* pin banks of exynos4x12 pin-controller 2 */
  753. static const struct samsung_pin_bank_data exynos4x12_pin_banks2[] __initconst = {
  754. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
  755. };
  756. /* pin banks of exynos4x12 pin-controller 3 */
  757. static const struct samsung_pin_bank_data exynos4x12_pin_banks3[] __initconst = {
  758. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00),
  759. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04),
  760. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpv2", 0x08),
  761. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv3", 0x0c),
  762. EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpv4", 0x10),
  763. };
  764. /*
  765. * Samsung pinctrl driver data for Exynos4x12 SoC. Exynos4x12 SoC includes
  766. * four gpio/pin-mux/pinconfig controllers.
  767. */
  768. const struct samsung_pin_ctrl exynos4x12_pin_ctrl[] __initconst = {
  769. {
  770. /* pin-controller instance 0 data */
  771. .pin_banks = exynos4x12_pin_banks0,
  772. .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks0),
  773. .eint_gpio_init = exynos_eint_gpio_init,
  774. .suspend = exynos_pinctrl_suspend,
  775. .resume = exynos_pinctrl_resume,
  776. }, {
  777. /* pin-controller instance 1 data */
  778. .pin_banks = exynos4x12_pin_banks1,
  779. .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks1),
  780. .eint_gpio_init = exynos_eint_gpio_init,
  781. .eint_wkup_init = exynos_eint_wkup_init,
  782. .suspend = exynos_pinctrl_suspend,
  783. .resume = exynos_pinctrl_resume,
  784. }, {
  785. /* pin-controller instance 2 data */
  786. .pin_banks = exynos4x12_pin_banks2,
  787. .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks2),
  788. .eint_gpio_init = exynos_eint_gpio_init,
  789. .suspend = exynos_pinctrl_suspend,
  790. .resume = exynos_pinctrl_resume,
  791. }, {
  792. /* pin-controller instance 3 data */
  793. .pin_banks = exynos4x12_pin_banks3,
  794. .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks3),
  795. .eint_gpio_init = exynos_eint_gpio_init,
  796. .suspend = exynos_pinctrl_suspend,
  797. .resume = exynos_pinctrl_resume,
  798. },
  799. };
  800. /* pin banks of exynos4415 pin-controller 0 */
  801. static const struct samsung_pin_bank_data exynos4415_pin_banks0[] = {
  802. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  803. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  804. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
  805. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
  806. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
  807. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14),
  808. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18),
  809. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30),
  810. EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34),
  811. EXYNOS_PIN_BANK_EINTG(1, 0x1C0, "gpf2", 0x38),
  812. };
  813. /* pin banks of exynos4415 pin-controller 1 */
  814. static const struct samsung_pin_bank_data exynos4415_pin_banks1[] = {
  815. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpk0", 0x08),
  816. EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c),
  817. EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10),
  818. EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14),
  819. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpl0", 0x18),
  820. EXYNOS_PIN_BANK_EINTN(6, 0x120, "mp00"),
  821. EXYNOS_PIN_BANK_EINTN(4, 0x140, "mp01"),
  822. EXYNOS_PIN_BANK_EINTN(6, 0x160, "mp02"),
  823. EXYNOS_PIN_BANK_EINTN(8, 0x180, "mp03"),
  824. EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "mp04"),
  825. EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "mp05"),
  826. EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "mp06"),
  827. EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24),
  828. EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28),
  829. EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c),
  830. EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30),
  831. EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34),
  832. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  833. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  834. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  835. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  836. };
  837. /* pin banks of exynos4415 pin-controller 2 */
  838. static const struct samsung_pin_bank_data exynos4415_pin_banks2[] = {
  839. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
  840. EXYNOS_PIN_BANK_EINTN(2, 0x000, "etc1"),
  841. };
  842. /*
  843. * Samsung pinctrl driver data for Exynos4415 SoC. Exynos4415 SoC includes
  844. * three gpio/pin-mux/pinconfig controllers.
  845. */
  846. const struct samsung_pin_ctrl exynos4415_pin_ctrl[] = {
  847. {
  848. /* pin-controller instance 0 data */
  849. .pin_banks = exynos4415_pin_banks0,
  850. .nr_banks = ARRAY_SIZE(exynos4415_pin_banks0),
  851. .eint_gpio_init = exynos_eint_gpio_init,
  852. .suspend = exynos_pinctrl_suspend,
  853. .resume = exynos_pinctrl_resume,
  854. }, {
  855. /* pin-controller instance 1 data */
  856. .pin_banks = exynos4415_pin_banks1,
  857. .nr_banks = ARRAY_SIZE(exynos4415_pin_banks1),
  858. .eint_gpio_init = exynos_eint_gpio_init,
  859. .eint_wkup_init = exynos_eint_wkup_init,
  860. .suspend = exynos_pinctrl_suspend,
  861. .resume = exynos_pinctrl_resume,
  862. }, {
  863. /* pin-controller instance 2 data */
  864. .pin_banks = exynos4415_pin_banks2,
  865. .nr_banks = ARRAY_SIZE(exynos4415_pin_banks2),
  866. .eint_gpio_init = exynos_eint_gpio_init,
  867. .suspend = exynos_pinctrl_suspend,
  868. .resume = exynos_pinctrl_resume,
  869. },
  870. };
  871. /* pin banks of exynos5250 pin-controller 0 */
  872. static const struct samsung_pin_bank_data exynos5250_pin_banks0[] __initconst = {
  873. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  874. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  875. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08),
  876. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c),
  877. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10),
  878. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14),
  879. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpb3", 0x18),
  880. EXYNOS_PIN_BANK_EINTG(7, 0x0E0, "gpc0", 0x1c),
  881. EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc1", 0x20),
  882. EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc2", 0x24),
  883. EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc3", 0x28),
  884. EXYNOS_PIN_BANK_EINTG(4, 0x160, "gpd0", 0x2c),
  885. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x30),
  886. EXYNOS_PIN_BANK_EINTG(7, 0x2E0, "gpc4", 0x34),
  887. EXYNOS_PIN_BANK_EINTN(6, 0x1A0, "gpy0"),
  888. EXYNOS_PIN_BANK_EINTN(4, 0x1C0, "gpy1"),
  889. EXYNOS_PIN_BANK_EINTN(6, 0x1E0, "gpy2"),
  890. EXYNOS_PIN_BANK_EINTN(8, 0x200, "gpy3"),
  891. EXYNOS_PIN_BANK_EINTN(8, 0x220, "gpy4"),
  892. EXYNOS_PIN_BANK_EINTN(8, 0x240, "gpy5"),
  893. EXYNOS_PIN_BANK_EINTN(8, 0x260, "gpy6"),
  894. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  895. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  896. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  897. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  898. };
  899. /* pin banks of exynos5250 pin-controller 1 */
  900. static const struct samsung_pin_bank_data exynos5250_pin_banks1[] __initconst = {
  901. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00),
  902. EXYNOS_PIN_BANK_EINTG(2, 0x020, "gpe1", 0x04),
  903. EXYNOS_PIN_BANK_EINTG(4, 0x040, "gpf0", 0x08),
  904. EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpf1", 0x0c),
  905. EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10),
  906. EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14),
  907. EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpg2", 0x18),
  908. EXYNOS_PIN_BANK_EINTG(4, 0x0E0, "gph0", 0x1c),
  909. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gph1", 0x20),
  910. };
  911. /* pin banks of exynos5250 pin-controller 2 */
  912. static const struct samsung_pin_bank_data exynos5250_pin_banks2[] __initconst = {
  913. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00),
  914. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04),
  915. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv2", 0x08),
  916. EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpv3", 0x0c),
  917. EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpv4", 0x10),
  918. };
  919. /* pin banks of exynos5250 pin-controller 3 */
  920. static const struct samsung_pin_bank_data exynos5250_pin_banks3[] __initconst = {
  921. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
  922. };
  923. /*
  924. * Samsung pinctrl driver data for Exynos5250 SoC. Exynos5250 SoC includes
  925. * four gpio/pin-mux/pinconfig controllers.
  926. */
  927. const struct samsung_pin_ctrl exynos5250_pin_ctrl[] __initconst = {
  928. {
  929. /* pin-controller instance 0 data */
  930. .pin_banks = exynos5250_pin_banks0,
  931. .nr_banks = ARRAY_SIZE(exynos5250_pin_banks0),
  932. .eint_gpio_init = exynos_eint_gpio_init,
  933. .eint_wkup_init = exynos_eint_wkup_init,
  934. .suspend = exynos_pinctrl_suspend,
  935. .resume = exynos_pinctrl_resume,
  936. }, {
  937. /* pin-controller instance 1 data */
  938. .pin_banks = exynos5250_pin_banks1,
  939. .nr_banks = ARRAY_SIZE(exynos5250_pin_banks1),
  940. .eint_gpio_init = exynos_eint_gpio_init,
  941. .suspend = exynos_pinctrl_suspend,
  942. .resume = exynos_pinctrl_resume,
  943. }, {
  944. /* pin-controller instance 2 data */
  945. .pin_banks = exynos5250_pin_banks2,
  946. .nr_banks = ARRAY_SIZE(exynos5250_pin_banks2),
  947. .eint_gpio_init = exynos_eint_gpio_init,
  948. .suspend = exynos_pinctrl_suspend,
  949. .resume = exynos_pinctrl_resume,
  950. }, {
  951. /* pin-controller instance 3 data */
  952. .pin_banks = exynos5250_pin_banks3,
  953. .nr_banks = ARRAY_SIZE(exynos5250_pin_banks3),
  954. .eint_gpio_init = exynos_eint_gpio_init,
  955. .suspend = exynos_pinctrl_suspend,
  956. .resume = exynos_pinctrl_resume,
  957. },
  958. };
  959. /* pin banks of exynos5260 pin-controller 0 */
  960. static const struct samsung_pin_bank_data exynos5260_pin_banks0[] __initconst = {
  961. EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpa0", 0x00),
  962. EXYNOS_PIN_BANK_EINTG(7, 0x020, "gpa1", 0x04),
  963. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08),
  964. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c),
  965. EXYNOS_PIN_BANK_EINTG(4, 0x080, "gpb1", 0x10),
  966. EXYNOS_PIN_BANK_EINTG(5, 0x0a0, "gpb2", 0x14),
  967. EXYNOS_PIN_BANK_EINTG(8, 0x0c0, "gpb3", 0x18),
  968. EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpb4", 0x1c),
  969. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpb5", 0x20),
  970. EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpd0", 0x24),
  971. EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpd1", 0x28),
  972. EXYNOS_PIN_BANK_EINTG(5, 0x160, "gpd2", 0x2c),
  973. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpe0", 0x30),
  974. EXYNOS_PIN_BANK_EINTG(5, 0x1a0, "gpe1", 0x34),
  975. EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpf0", 0x38),
  976. EXYNOS_PIN_BANK_EINTG(8, 0x1e0, "gpf1", 0x3c),
  977. EXYNOS_PIN_BANK_EINTG(2, 0x200, "gpk0", 0x40),
  978. EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gpx0", 0x00),
  979. EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gpx1", 0x04),
  980. EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gpx2", 0x08),
  981. EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gpx3", 0x0c),
  982. };
  983. /* pin banks of exynos5260 pin-controller 1 */
  984. static const struct samsung_pin_bank_data exynos5260_pin_banks1[] __initconst = {
  985. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpc0", 0x00),
  986. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpc1", 0x04),
  987. EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpc2", 0x08),
  988. EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpc3", 0x0c),
  989. EXYNOS_PIN_BANK_EINTG(4, 0x080, "gpc4", 0x10),
  990. };
  991. /* pin banks of exynos5260 pin-controller 2 */
  992. static const struct samsung_pin_bank_data exynos5260_pin_banks2[] __initconst = {
  993. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00),
  994. EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04),
  995. };
  996. /*
  997. * Samsung pinctrl driver data for Exynos5260 SoC. Exynos5260 SoC includes
  998. * three gpio/pin-mux/pinconfig controllers.
  999. */
  1000. const struct samsung_pin_ctrl exynos5260_pin_ctrl[] __initconst = {
  1001. {
  1002. /* pin-controller instance 0 data */
  1003. .pin_banks = exynos5260_pin_banks0,
  1004. .nr_banks = ARRAY_SIZE(exynos5260_pin_banks0),
  1005. .eint_gpio_init = exynos_eint_gpio_init,
  1006. .eint_wkup_init = exynos_eint_wkup_init,
  1007. }, {
  1008. /* pin-controller instance 1 data */
  1009. .pin_banks = exynos5260_pin_banks1,
  1010. .nr_banks = ARRAY_SIZE(exynos5260_pin_banks1),
  1011. .eint_gpio_init = exynos_eint_gpio_init,
  1012. }, {
  1013. /* pin-controller instance 2 data */
  1014. .pin_banks = exynos5260_pin_banks2,
  1015. .nr_banks = ARRAY_SIZE(exynos5260_pin_banks2),
  1016. .eint_gpio_init = exynos_eint_gpio_init,
  1017. },
  1018. };
  1019. /* pin banks of exynos5410 pin-controller 0 */
  1020. static const struct samsung_pin_bank_data exynos5410_pin_banks0[] __initconst = {
  1021. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  1022. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  1023. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08),
  1024. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c),
  1025. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10),
  1026. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14),
  1027. EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpb3", 0x18),
  1028. EXYNOS_PIN_BANK_EINTG(7, 0x0E0, "gpc0", 0x1c),
  1029. EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc3", 0x20),
  1030. EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc1", 0x24),
  1031. EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc2", 0x28),
  1032. EXYNOS_PIN_BANK_EINTN(2, 0x160, "gpm5"),
  1033. EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x2c),
  1034. EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpe0", 0x30),
  1035. EXYNOS_PIN_BANK_EINTG(2, 0x1C0, "gpe1", 0x34),
  1036. EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf0", 0x38),
  1037. EXYNOS_PIN_BANK_EINTG(8, 0x200, "gpf1", 0x3c),
  1038. EXYNOS_PIN_BANK_EINTG(8, 0x220, "gpg0", 0x40),
  1039. EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpg1", 0x44),
  1040. EXYNOS_PIN_BANK_EINTG(2, 0x260, "gpg2", 0x48),
  1041. EXYNOS_PIN_BANK_EINTG(4, 0x280, "gph0", 0x4c),
  1042. EXYNOS_PIN_BANK_EINTG(8, 0x2A0, "gph1", 0x50),
  1043. EXYNOS_PIN_BANK_EINTN(8, 0x2C0, "gpm7"),
  1044. EXYNOS_PIN_BANK_EINTN(6, 0x2E0, "gpy0"),
  1045. EXYNOS_PIN_BANK_EINTN(4, 0x300, "gpy1"),
  1046. EXYNOS_PIN_BANK_EINTN(6, 0x320, "gpy2"),
  1047. EXYNOS_PIN_BANK_EINTN(8, 0x340, "gpy3"),
  1048. EXYNOS_PIN_BANK_EINTN(8, 0x360, "gpy4"),
  1049. EXYNOS_PIN_BANK_EINTN(8, 0x380, "gpy5"),
  1050. EXYNOS_PIN_BANK_EINTN(8, 0x3A0, "gpy6"),
  1051. EXYNOS_PIN_BANK_EINTN(8, 0x3C0, "gpy7"),
  1052. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  1053. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  1054. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  1055. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  1056. };
  1057. /* pin banks of exynos5410 pin-controller 1 */
  1058. static const struct samsung_pin_bank_data exynos5410_pin_banks1[] __initconst = {
  1059. EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpj0", 0x00),
  1060. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpj1", 0x04),
  1061. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpj2", 0x08),
  1062. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpj3", 0x0c),
  1063. EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpj4", 0x10),
  1064. EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpk0", 0x14),
  1065. EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpk1", 0x18),
  1066. EXYNOS_PIN_BANK_EINTG(8, 0x0E0, "gpk2", 0x1c),
  1067. EXYNOS_PIN_BANK_EINTG(7, 0x100, "gpk3", 0x20),
  1068. };
  1069. /* pin banks of exynos5410 pin-controller 2 */
  1070. static const struct samsung_pin_bank_data exynos5410_pin_banks2[] __initconst = {
  1071. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00),
  1072. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04),
  1073. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv2", 0x08),
  1074. EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpv3", 0x0c),
  1075. EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpv4", 0x10),
  1076. };
  1077. /* pin banks of exynos5410 pin-controller 3 */
  1078. static const struct samsung_pin_bank_data exynos5410_pin_banks3[] __initconst = {
  1079. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
  1080. };
  1081. /*
  1082. * Samsung pinctrl driver data for Exynos5410 SoC. Exynos5410 SoC includes
  1083. * four gpio/pin-mux/pinconfig controllers.
  1084. */
  1085. const struct samsung_pin_ctrl exynos5410_pin_ctrl[] __initconst = {
  1086. {
  1087. /* pin-controller instance 0 data */
  1088. .pin_banks = exynos5410_pin_banks0,
  1089. .nr_banks = ARRAY_SIZE(exynos5410_pin_banks0),
  1090. .eint_gpio_init = exynos_eint_gpio_init,
  1091. .eint_wkup_init = exynos_eint_wkup_init,
  1092. .suspend = exynos_pinctrl_suspend,
  1093. .resume = exynos_pinctrl_resume,
  1094. }, {
  1095. /* pin-controller instance 1 data */
  1096. .pin_banks = exynos5410_pin_banks1,
  1097. .nr_banks = ARRAY_SIZE(exynos5410_pin_banks1),
  1098. .eint_gpio_init = exynos_eint_gpio_init,
  1099. .suspend = exynos_pinctrl_suspend,
  1100. .resume = exynos_pinctrl_resume,
  1101. }, {
  1102. /* pin-controller instance 2 data */
  1103. .pin_banks = exynos5410_pin_banks2,
  1104. .nr_banks = ARRAY_SIZE(exynos5410_pin_banks2),
  1105. .eint_gpio_init = exynos_eint_gpio_init,
  1106. .suspend = exynos_pinctrl_suspend,
  1107. .resume = exynos_pinctrl_resume,
  1108. }, {
  1109. /* pin-controller instance 3 data */
  1110. .pin_banks = exynos5410_pin_banks3,
  1111. .nr_banks = ARRAY_SIZE(exynos5410_pin_banks3),
  1112. .eint_gpio_init = exynos_eint_gpio_init,
  1113. .suspend = exynos_pinctrl_suspend,
  1114. .resume = exynos_pinctrl_resume,
  1115. },
  1116. };
  1117. /* pin banks of exynos5420 pin-controller 0 */
  1118. static const struct samsung_pin_bank_data exynos5420_pin_banks0[] __initconst = {
  1119. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpy7", 0x00),
  1120. EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
  1121. EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
  1122. EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
  1123. EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
  1124. };
  1125. /* pin banks of exynos5420 pin-controller 1 */
  1126. static const struct samsung_pin_bank_data exynos5420_pin_banks1[] __initconst = {
  1127. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpc0", 0x00),
  1128. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc1", 0x04),
  1129. EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpc2", 0x08),
  1130. EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpc3", 0x0c),
  1131. EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpc4", 0x10),
  1132. EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpd1", 0x14),
  1133. EXYNOS_PIN_BANK_EINTN(6, 0x0C0, "gpy0"),
  1134. EXYNOS_PIN_BANK_EINTN(4, 0x0E0, "gpy1"),
  1135. EXYNOS_PIN_BANK_EINTN(6, 0x100, "gpy2"),
  1136. EXYNOS_PIN_BANK_EINTN(8, 0x120, "gpy3"),
  1137. EXYNOS_PIN_BANK_EINTN(8, 0x140, "gpy4"),
  1138. EXYNOS_PIN_BANK_EINTN(8, 0x160, "gpy5"),
  1139. EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy6"),
  1140. };
  1141. /* pin banks of exynos5420 pin-controller 2 */
  1142. static const struct samsung_pin_bank_data exynos5420_pin_banks2[] __initconst = {
  1143. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00),
  1144. EXYNOS_PIN_BANK_EINTG(2, 0x020, "gpe1", 0x04),
  1145. EXYNOS_PIN_BANK_EINTG(6, 0x040, "gpf0", 0x08),
  1146. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpf1", 0x0c),
  1147. EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10),
  1148. EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14),
  1149. EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpg2", 0x18),
  1150. EXYNOS_PIN_BANK_EINTG(4, 0x0E0, "gpj4", 0x1c),
  1151. };
  1152. /* pin banks of exynos5420 pin-controller 3 */
  1153. static const struct samsung_pin_bank_data exynos5420_pin_banks3[] __initconst = {
  1154. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
  1155. EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
  1156. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08),
  1157. EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c),
  1158. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10),
  1159. EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14),
  1160. EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpb3", 0x18),
  1161. EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpb4", 0x1c),
  1162. EXYNOS_PIN_BANK_EINTG(8, 0x100, "gph0", 0x20),
  1163. };
  1164. /* pin banks of exynos5420 pin-controller 4 */
  1165. static const struct samsung_pin_bank_data exynos5420_pin_banks4[] __initconst = {
  1166. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
  1167. };
  1168. /*
  1169. * Samsung pinctrl driver data for Exynos5420 SoC. Exynos5420 SoC includes
  1170. * four gpio/pin-mux/pinconfig controllers.
  1171. */
  1172. const struct samsung_pin_ctrl exynos5420_pin_ctrl[] __initconst = {
  1173. {
  1174. /* pin-controller instance 0 data */
  1175. .pin_banks = exynos5420_pin_banks0,
  1176. .nr_banks = ARRAY_SIZE(exynos5420_pin_banks0),
  1177. .eint_gpio_init = exynos_eint_gpio_init,
  1178. .eint_wkup_init = exynos_eint_wkup_init,
  1179. }, {
  1180. /* pin-controller instance 1 data */
  1181. .pin_banks = exynos5420_pin_banks1,
  1182. .nr_banks = ARRAY_SIZE(exynos5420_pin_banks1),
  1183. .eint_gpio_init = exynos_eint_gpio_init,
  1184. }, {
  1185. /* pin-controller instance 2 data */
  1186. .pin_banks = exynos5420_pin_banks2,
  1187. .nr_banks = ARRAY_SIZE(exynos5420_pin_banks2),
  1188. .eint_gpio_init = exynos_eint_gpio_init,
  1189. }, {
  1190. /* pin-controller instance 3 data */
  1191. .pin_banks = exynos5420_pin_banks3,
  1192. .nr_banks = ARRAY_SIZE(exynos5420_pin_banks3),
  1193. .eint_gpio_init = exynos_eint_gpio_init,
  1194. }, {
  1195. /* pin-controller instance 4 data */
  1196. .pin_banks = exynos5420_pin_banks4,
  1197. .nr_banks = ARRAY_SIZE(exynos5420_pin_banks4),
  1198. .eint_gpio_init = exynos_eint_gpio_init,
  1199. },
  1200. };
  1201. /* pin banks of exynos5433 pin-controller - ALIVE */
  1202. static const struct samsung_pin_bank_data exynos5433_pin_banks0[] = {
  1203. EXYNOS_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00),
  1204. EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04),
  1205. EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08),
  1206. EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c),
  1207. };
  1208. /* pin banks of exynos5433 pin-controller - AUD */
  1209. static const struct samsung_pin_bank_data exynos5433_pin_banks1[] = {
  1210. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00),
  1211. EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04),
  1212. };
  1213. /* pin banks of exynos5433 pin-controller - CPIF */
  1214. static const struct samsung_pin_bank_data exynos5433_pin_banks2[] = {
  1215. EXYNOS_PIN_BANK_EINTG(2, 0x000, "gpv6", 0x00),
  1216. };
  1217. /* pin banks of exynos5433 pin-controller - eSE */
  1218. static const struct samsung_pin_bank_data exynos5433_pin_banks3[] = {
  1219. EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj2", 0x00),
  1220. };
  1221. /* pin banks of exynos5433 pin-controller - FINGER */
  1222. static const struct samsung_pin_bank_data exynos5433_pin_banks4[] = {
  1223. EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpd5", 0x00),
  1224. };
  1225. /* pin banks of exynos5433 pin-controller - FSYS */
  1226. static const struct samsung_pin_bank_data exynos5433_pin_banks5[] = {
  1227. EXYNOS_PIN_BANK_EINTG(6, 0x000, "gph1", 0x00),
  1228. EXYNOS_PIN_BANK_EINTG(7, 0x020, "gpr4", 0x04),
  1229. EXYNOS_PIN_BANK_EINTG(5, 0x040, "gpr0", 0x08),
  1230. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpr1", 0x0c),
  1231. EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpr2", 0x10),
  1232. EXYNOS_PIN_BANK_EINTG(8, 0x0a0, "gpr3", 0x14),
  1233. };
  1234. /* pin banks of exynos5433 pin-controller - IMEM */
  1235. static const struct samsung_pin_bank_data exynos5433_pin_banks6[] = {
  1236. EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpf0", 0x00),
  1237. };
  1238. /* pin banks of exynos5433 pin-controller - NFC */
  1239. static const struct samsung_pin_bank_data exynos5433_pin_banks7[] = {
  1240. EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00),
  1241. };
  1242. /* pin banks of exynos5433 pin-controller - PERIC */
  1243. static const struct samsung_pin_bank_data exynos5433_pin_banks8[] = {
  1244. EXYNOS_PIN_BANK_EINTG(6, 0x000, "gpv7", 0x00),
  1245. EXYNOS_PIN_BANK_EINTG(5, 0x020, "gpb0", 0x04),
  1246. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpc0", 0x08),
  1247. EXYNOS_PIN_BANK_EINTG(2, 0x060, "gpc1", 0x0c),
  1248. EXYNOS_PIN_BANK_EINTG(6, 0x080, "gpc2", 0x10),
  1249. EXYNOS_PIN_BANK_EINTG(8, 0x0a0, "gpc3", 0x14),
  1250. EXYNOS_PIN_BANK_EINTG(2, 0x0c0, "gpg0", 0x18),
  1251. EXYNOS_PIN_BANK_EINTG(4, 0x0e0, "gpd0", 0x1c),
  1252. EXYNOS_PIN_BANK_EINTG(6, 0x100, "gpd1", 0x20),
  1253. EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpd2", 0x24),
  1254. EXYNOS_PIN_BANK_EINTG(5, 0x140, "gpd4", 0x28),
  1255. EXYNOS_PIN_BANK_EINTG(2, 0x160, "gpd8", 0x2c),
  1256. EXYNOS_PIN_BANK_EINTG(7, 0x180, "gpd6", 0x30),
  1257. EXYNOS_PIN_BANK_EINTG(3, 0x1a0, "gpd7", 0x34),
  1258. EXYNOS_PIN_BANK_EINTG(5, 0x1c0, "gpg1", 0x38),
  1259. EXYNOS_PIN_BANK_EINTG(2, 0x1e0, "gpg2", 0x3c),
  1260. EXYNOS_PIN_BANK_EINTG(8, 0x200, "gpg3", 0x40),
  1261. };
  1262. /* pin banks of exynos5433 pin-controller - TOUCH */
  1263. static const struct samsung_pin_bank_data exynos5433_pin_banks9[] = {
  1264. EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00),
  1265. };
  1266. /*
  1267. * Samsung pinctrl driver data for Exynos5433 SoC. Exynos5433 SoC includes
  1268. * ten gpio/pin-mux/pinconfig controllers.
  1269. */
  1270. const struct samsung_pin_ctrl exynos5433_pin_ctrl[] = {
  1271. {
  1272. /* pin-controller instance 0 data */
  1273. .pin_banks = exynos5433_pin_banks0,
  1274. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks0),
  1275. .eint_wkup_init = exynos_eint_wkup_init,
  1276. .suspend = exynos_pinctrl_suspend,
  1277. .resume = exynos_pinctrl_resume,
  1278. }, {
  1279. /* pin-controller instance 1 data */
  1280. .pin_banks = exynos5433_pin_banks1,
  1281. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks1),
  1282. .eint_gpio_init = exynos_eint_gpio_init,
  1283. .suspend = exynos_pinctrl_suspend,
  1284. .resume = exynos_pinctrl_resume,
  1285. }, {
  1286. /* pin-controller instance 2 data */
  1287. .pin_banks = exynos5433_pin_banks2,
  1288. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks2),
  1289. .eint_gpio_init = exynos_eint_gpio_init,
  1290. .suspend = exynos_pinctrl_suspend,
  1291. .resume = exynos_pinctrl_resume,
  1292. }, {
  1293. /* pin-controller instance 3 data */
  1294. .pin_banks = exynos5433_pin_banks3,
  1295. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks3),
  1296. .eint_gpio_init = exynos_eint_gpio_init,
  1297. .suspend = exynos_pinctrl_suspend,
  1298. .resume = exynos_pinctrl_resume,
  1299. }, {
  1300. /* pin-controller instance 4 data */
  1301. .pin_banks = exynos5433_pin_banks4,
  1302. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks4),
  1303. .eint_gpio_init = exynos_eint_gpio_init,
  1304. .suspend = exynos_pinctrl_suspend,
  1305. .resume = exynos_pinctrl_resume,
  1306. }, {
  1307. /* pin-controller instance 5 data */
  1308. .pin_banks = exynos5433_pin_banks5,
  1309. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks5),
  1310. .eint_gpio_init = exynos_eint_gpio_init,
  1311. .suspend = exynos_pinctrl_suspend,
  1312. .resume = exynos_pinctrl_resume,
  1313. }, {
  1314. /* pin-controller instance 6 data */
  1315. .pin_banks = exynos5433_pin_banks6,
  1316. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks6),
  1317. .eint_gpio_init = exynos_eint_gpio_init,
  1318. .suspend = exynos_pinctrl_suspend,
  1319. .resume = exynos_pinctrl_resume,
  1320. }, {
  1321. /* pin-controller instance 7 data */
  1322. .pin_banks = exynos5433_pin_banks7,
  1323. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks7),
  1324. .eint_gpio_init = exynos_eint_gpio_init,
  1325. .suspend = exynos_pinctrl_suspend,
  1326. .resume = exynos_pinctrl_resume,
  1327. }, {
  1328. /* pin-controller instance 8 data */
  1329. .pin_banks = exynos5433_pin_banks8,
  1330. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks8),
  1331. .eint_gpio_init = exynos_eint_gpio_init,
  1332. .suspend = exynos_pinctrl_suspend,
  1333. .resume = exynos_pinctrl_resume,
  1334. }, {
  1335. /* pin-controller instance 9 data */
  1336. .pin_banks = exynos5433_pin_banks9,
  1337. .nr_banks = ARRAY_SIZE(exynos5433_pin_banks9),
  1338. .eint_gpio_init = exynos_eint_gpio_init,
  1339. .suspend = exynos_pinctrl_suspend,
  1340. .resume = exynos_pinctrl_resume,
  1341. },
  1342. };
  1343. /* pin banks of exynos7 pin-controller - ALIVE */
  1344. static const struct samsung_pin_bank_data exynos7_pin_banks0[] __initconst = {
  1345. EXYNOS_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00),
  1346. EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04),
  1347. EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08),
  1348. EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c),
  1349. };
  1350. /* pin banks of exynos7 pin-controller - BUS0 */
  1351. static const struct samsung_pin_bank_data exynos7_pin_banks1[] __initconst = {
  1352. EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00),
  1353. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc0", 0x04),
  1354. EXYNOS_PIN_BANK_EINTG(2, 0x040, "gpc1", 0x08),
  1355. EXYNOS_PIN_BANK_EINTG(6, 0x060, "gpc2", 0x0c),
  1356. EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpc3", 0x10),
  1357. EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
  1358. EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18),
  1359. EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpd2", 0x1c),
  1360. EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpd4", 0x20),
  1361. EXYNOS_PIN_BANK_EINTG(4, 0x120, "gpd5", 0x24),
  1362. EXYNOS_PIN_BANK_EINTG(6, 0x140, "gpd6", 0x28),
  1363. EXYNOS_PIN_BANK_EINTG(3, 0x160, "gpd7", 0x2c),
  1364. EXYNOS_PIN_BANK_EINTG(2, 0x180, "gpd8", 0x30),
  1365. EXYNOS_PIN_BANK_EINTG(2, 0x1a0, "gpg0", 0x34),
  1366. EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpg3", 0x38),
  1367. };
  1368. /* pin banks of exynos7 pin-controller - NFC */
  1369. static const struct samsung_pin_bank_data exynos7_pin_banks2[] __initconst = {
  1370. EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00),
  1371. };
  1372. /* pin banks of exynos7 pin-controller - TOUCH */
  1373. static const struct samsung_pin_bank_data exynos7_pin_banks3[] __initconst = {
  1374. EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00),
  1375. };
  1376. /* pin banks of exynos7 pin-controller - FF */
  1377. static const struct samsung_pin_bank_data exynos7_pin_banks4[] __initconst = {
  1378. EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpg4", 0x00),
  1379. };
  1380. /* pin banks of exynos7 pin-controller - ESE */
  1381. static const struct samsung_pin_bank_data exynos7_pin_banks5[] __initconst = {
  1382. EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpv7", 0x00),
  1383. };
  1384. /* pin banks of exynos7 pin-controller - FSYS0 */
  1385. static const struct samsung_pin_bank_data exynos7_pin_banks6[] __initconst = {
  1386. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpr4", 0x00),
  1387. };
  1388. /* pin banks of exynos7 pin-controller - FSYS1 */
  1389. static const struct samsung_pin_bank_data exynos7_pin_banks7[] __initconst = {
  1390. EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpr0", 0x00),
  1391. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpr1", 0x04),
  1392. EXYNOS_PIN_BANK_EINTG(5, 0x040, "gpr2", 0x08),
  1393. EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpr3", 0x0c),
  1394. };
  1395. /* pin banks of exynos7 pin-controller - BUS1 */
  1396. static const struct samsung_pin_bank_data exynos7_pin_banks8[] __initconst = {
  1397. EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpf0", 0x00),
  1398. EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpf1", 0x04),
  1399. EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpf2", 0x08),
  1400. EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpf3", 0x0c),
  1401. EXYNOS_PIN_BANK_EINTG(8, 0x0a0, "gpf4", 0x10),
  1402. EXYNOS_PIN_BANK_EINTG(8, 0x0c0, "gpf5", 0x14),
  1403. EXYNOS_PIN_BANK_EINTG(5, 0x0e0, "gpg1", 0x18),
  1404. EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpg2", 0x1c),
  1405. EXYNOS_PIN_BANK_EINTG(6, 0x120, "gph1", 0x20),
  1406. EXYNOS_PIN_BANK_EINTG(3, 0x140, "gpv6", 0x24),
  1407. };
  1408. static const struct samsung_pin_bank_data exynos7_pin_banks9[] __initconst = {
  1409. EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00),
  1410. EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04),
  1411. };
  1412. const struct samsung_pin_ctrl exynos7_pin_ctrl[] __initconst = {
  1413. {
  1414. /* pin-controller instance 0 Alive data */
  1415. .pin_banks = exynos7_pin_banks0,
  1416. .nr_banks = ARRAY_SIZE(exynos7_pin_banks0),
  1417. .eint_wkup_init = exynos_eint_wkup_init,
  1418. }, {
  1419. /* pin-controller instance 1 BUS0 data */
  1420. .pin_banks = exynos7_pin_banks1,
  1421. .nr_banks = ARRAY_SIZE(exynos7_pin_banks1),
  1422. .eint_gpio_init = exynos_eint_gpio_init,
  1423. }, {
  1424. /* pin-controller instance 2 NFC data */
  1425. .pin_banks = exynos7_pin_banks2,
  1426. .nr_banks = ARRAY_SIZE(exynos7_pin_banks2),
  1427. .eint_gpio_init = exynos_eint_gpio_init,
  1428. }, {
  1429. /* pin-controller instance 3 TOUCH data */
  1430. .pin_banks = exynos7_pin_banks3,
  1431. .nr_banks = ARRAY_SIZE(exynos7_pin_banks3),
  1432. .eint_gpio_init = exynos_eint_gpio_init,
  1433. }, {
  1434. /* pin-controller instance 4 FF data */
  1435. .pin_banks = exynos7_pin_banks4,
  1436. .nr_banks = ARRAY_SIZE(exynos7_pin_banks4),
  1437. .eint_gpio_init = exynos_eint_gpio_init,
  1438. }, {
  1439. /* pin-controller instance 5 ESE data */
  1440. .pin_banks = exynos7_pin_banks5,
  1441. .nr_banks = ARRAY_SIZE(exynos7_pin_banks5),
  1442. .eint_gpio_init = exynos_eint_gpio_init,
  1443. }, {
  1444. /* pin-controller instance 6 FSYS0 data */
  1445. .pin_banks = exynos7_pin_banks6,
  1446. .nr_banks = ARRAY_SIZE(exynos7_pin_banks6),
  1447. .eint_gpio_init = exynos_eint_gpio_init,
  1448. }, {
  1449. /* pin-controller instance 7 FSYS1 data */
  1450. .pin_banks = exynos7_pin_banks7,
  1451. .nr_banks = ARRAY_SIZE(exynos7_pin_banks7),
  1452. .eint_gpio_init = exynos_eint_gpio_init,
  1453. }, {
  1454. /* pin-controller instance 8 BUS1 data */
  1455. .pin_banks = exynos7_pin_banks8,
  1456. .nr_banks = ARRAY_SIZE(exynos7_pin_banks8),
  1457. .eint_gpio_init = exynos_eint_gpio_init,
  1458. }, {
  1459. /* pin-controller instance 9 AUD data */
  1460. .pin_banks = exynos7_pin_banks9,
  1461. .nr_banks = ARRAY_SIZE(exynos7_pin_banks9),
  1462. .eint_gpio_init = exynos_eint_gpio_init,
  1463. },
  1464. };