pinctrl-pxa168.c 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. /*
  2. * linux/drivers/pinctrl/pinmux-pxa168.c
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * publishhed by the Free Software Foundation.
  7. *
  8. * Copyright (C) 2011, Marvell Technology Group Ltd.
  9. *
  10. * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
  11. *
  12. */
  13. #include <linux/device.h>
  14. #include <linux/module.h>
  15. #include <linux/io.h>
  16. #include <linux/platform_device.h>
  17. #include "pinctrl-pxa3xx.h"
  18. #define PXA168_DS_MASK 0x1800
  19. #define PXA168_DS_SHIFT 11
  20. #define PXA168_SLEEP_MASK 0x38
  21. #define PXA168_SLEEP_SELECT (1 << 9)
  22. #define PXA168_SLEEP_DATA (1 << 8)
  23. #define PXA168_SLEEP_DIR (1 << 7)
  24. #define MFPR_168(a, r, f0, f1, f2, f3, f4, f5, f6, f7) \
  25. { \
  26. .name = #a, \
  27. .pin = a, \
  28. .mfpr = r, \
  29. .func = { \
  30. PXA168_MUX_##f0, \
  31. PXA168_MUX_##f1, \
  32. PXA168_MUX_##f2, \
  33. PXA168_MUX_##f3, \
  34. PXA168_MUX_##f4, \
  35. PXA168_MUX_##f5, \
  36. PXA168_MUX_##f6, \
  37. PXA168_MUX_##f7, \
  38. }, \
  39. }
  40. #define GRP_168(a, m, p) \
  41. { .name = a, .mux = PXA168_MUX_##m, .pins = p, .npins = ARRAY_SIZE(p), }
  42. /* 131 pins */
  43. enum pxa168_pin_list {
  44. /* 0~122: GPIO0~GPIO122 */
  45. PWR_SCL = 123,
  46. PWR_SDA,
  47. TDI,
  48. TMS,
  49. TCK,
  50. TDO,
  51. TRST,
  52. WAKEUP = 130,
  53. };
  54. enum pxa168_mux {
  55. /* PXA3xx_MUX_GPIO = 0 (predefined in pinctrl-pxa3xx.h) */
  56. PXA168_MUX_GPIO = 0,
  57. PXA168_MUX_DFIO,
  58. PXA168_MUX_NAND,
  59. PXA168_MUX_SMC,
  60. PXA168_MUX_SMC_CS0,
  61. PXA168_MUX_SMC_CS1,
  62. PXA168_MUX_SMC_INT,
  63. PXA168_MUX_SMC_RDY,
  64. PXA168_MUX_MMC1,
  65. PXA168_MUX_MMC2,
  66. PXA168_MUX_MMC2_CMD,
  67. PXA168_MUX_MMC2_CLK,
  68. PXA168_MUX_MMC3,
  69. PXA168_MUX_MMC3_CMD,
  70. PXA168_MUX_MMC3_CLK,
  71. PXA168_MUX_MMC4,
  72. PXA168_MUX_MSP,
  73. PXA168_MUX_MSP_DAT3,
  74. PXA168_MUX_MSP_INS,
  75. PXA168_MUX_I2C,
  76. PXA168_MUX_PWRI2C,
  77. PXA168_MUX_AC97,
  78. PXA168_MUX_AC97_SYSCLK,
  79. PXA168_MUX_PWM,
  80. PXA168_MUX_PWM1,
  81. PXA168_MUX_XD,
  82. PXA168_MUX_XP,
  83. PXA168_MUX_LCD,
  84. PXA168_MUX_CCIC,
  85. PXA168_MUX_CF,
  86. PXA168_MUX_CF_RDY,
  87. PXA168_MUX_CF_nINPACK,
  88. PXA168_MUX_CF_nWAIT,
  89. PXA168_MUX_KP_MKOUT,
  90. PXA168_MUX_KP_MKIN,
  91. PXA168_MUX_KP_DK,
  92. PXA168_MUX_ETH,
  93. PXA168_MUX_ETH_TX,
  94. PXA168_MUX_ETH_RX,
  95. PXA168_MUX_ONE_WIRE,
  96. PXA168_MUX_UART1,
  97. PXA168_MUX_UART1_TX,
  98. PXA168_MUX_UART1_CTS,
  99. PXA168_MUX_UART1_nRI,
  100. PXA168_MUX_UART1_DTR,
  101. PXA168_MUX_UART2,
  102. PXA168_MUX_UART2_TX,
  103. PXA168_MUX_UART3,
  104. PXA168_MUX_UART3_TX,
  105. PXA168_MUX_UART3_CTS,
  106. PXA168_MUX_SSP1,
  107. PXA168_MUX_SSP1_TX,
  108. PXA168_MUX_SSP2,
  109. PXA168_MUX_SSP2_TX,
  110. PXA168_MUX_SSP3,
  111. PXA168_MUX_SSP3_TX,
  112. PXA168_MUX_SSP4,
  113. PXA168_MUX_SSP4_TX,
  114. PXA168_MUX_SSP5,
  115. PXA168_MUX_SSP5_TX,
  116. PXA168_MUX_USB,
  117. PXA168_MUX_JTAG,
  118. PXA168_MUX_RESET,
  119. PXA168_MUX_WAKEUP,
  120. PXA168_MUX_EXT_32K_IN,
  121. PXA168_MUX_NONE = 0xffff,
  122. };
  123. static struct pinctrl_pin_desc pxa168_pads[] = {
  124. PINCTRL_PIN(GPIO0, "GPIO0"),
  125. PINCTRL_PIN(GPIO1, "GPIO1"),
  126. PINCTRL_PIN(GPIO2, "GPIO2"),
  127. PINCTRL_PIN(GPIO3, "GPIO3"),
  128. PINCTRL_PIN(GPIO4, "GPIO4"),
  129. PINCTRL_PIN(GPIO5, "GPIO5"),
  130. PINCTRL_PIN(GPIO6, "GPIO6"),
  131. PINCTRL_PIN(GPIO7, "GPIO7"),
  132. PINCTRL_PIN(GPIO8, "GPIO8"),
  133. PINCTRL_PIN(GPIO9, "GPIO9"),
  134. PINCTRL_PIN(GPIO10, "GPIO10"),
  135. PINCTRL_PIN(GPIO11, "GPIO11"),
  136. PINCTRL_PIN(GPIO12, "GPIO12"),
  137. PINCTRL_PIN(GPIO13, "GPIO13"),
  138. PINCTRL_PIN(GPIO14, "GPIO14"),
  139. PINCTRL_PIN(GPIO15, "GPIO15"),
  140. PINCTRL_PIN(GPIO16, "GPIO16"),
  141. PINCTRL_PIN(GPIO17, "GPIO17"),
  142. PINCTRL_PIN(GPIO18, "GPIO18"),
  143. PINCTRL_PIN(GPIO19, "GPIO19"),
  144. PINCTRL_PIN(GPIO20, "GPIO20"),
  145. PINCTRL_PIN(GPIO21, "GPIO21"),
  146. PINCTRL_PIN(GPIO22, "GPIO22"),
  147. PINCTRL_PIN(GPIO23, "GPIO23"),
  148. PINCTRL_PIN(GPIO24, "GPIO24"),
  149. PINCTRL_PIN(GPIO25, "GPIO25"),
  150. PINCTRL_PIN(GPIO26, "GPIO26"),
  151. PINCTRL_PIN(GPIO27, "GPIO27"),
  152. PINCTRL_PIN(GPIO28, "GPIO28"),
  153. PINCTRL_PIN(GPIO29, "GPIO29"),
  154. PINCTRL_PIN(GPIO30, "GPIO30"),
  155. PINCTRL_PIN(GPIO31, "GPIO31"),
  156. PINCTRL_PIN(GPIO32, "GPIO32"),
  157. PINCTRL_PIN(GPIO33, "GPIO33"),
  158. PINCTRL_PIN(GPIO34, "GPIO34"),
  159. PINCTRL_PIN(GPIO35, "GPIO35"),
  160. PINCTRL_PIN(GPIO36, "GPIO36"),
  161. PINCTRL_PIN(GPIO37, "GPIO37"),
  162. PINCTRL_PIN(GPIO38, "GPIO38"),
  163. PINCTRL_PIN(GPIO39, "GPIO39"),
  164. PINCTRL_PIN(GPIO40, "GPIO40"),
  165. PINCTRL_PIN(GPIO41, "GPIO41"),
  166. PINCTRL_PIN(GPIO42, "GPIO42"),
  167. PINCTRL_PIN(GPIO43, "GPIO43"),
  168. PINCTRL_PIN(GPIO44, "GPIO44"),
  169. PINCTRL_PIN(GPIO45, "GPIO45"),
  170. PINCTRL_PIN(GPIO46, "GPIO46"),
  171. PINCTRL_PIN(GPIO47, "GPIO47"),
  172. PINCTRL_PIN(GPIO48, "GPIO48"),
  173. PINCTRL_PIN(GPIO49, "GPIO49"),
  174. PINCTRL_PIN(GPIO50, "GPIO50"),
  175. PINCTRL_PIN(GPIO51, "GPIO51"),
  176. PINCTRL_PIN(GPIO52, "GPIO52"),
  177. PINCTRL_PIN(GPIO53, "GPIO53"),
  178. PINCTRL_PIN(GPIO54, "GPIO54"),
  179. PINCTRL_PIN(GPIO55, "GPIO55"),
  180. PINCTRL_PIN(GPIO56, "GPIO56"),
  181. PINCTRL_PIN(GPIO57, "GPIO57"),
  182. PINCTRL_PIN(GPIO58, "GPIO58"),
  183. PINCTRL_PIN(GPIO59, "GPIO59"),
  184. PINCTRL_PIN(GPIO60, "GPIO60"),
  185. PINCTRL_PIN(GPIO61, "GPIO61"),
  186. PINCTRL_PIN(GPIO62, "GPIO62"),
  187. PINCTRL_PIN(GPIO63, "GPIO63"),
  188. PINCTRL_PIN(GPIO64, "GPIO64"),
  189. PINCTRL_PIN(GPIO65, "GPIO65"),
  190. PINCTRL_PIN(GPIO66, "GPIO66"),
  191. PINCTRL_PIN(GPIO67, "GPIO67"),
  192. PINCTRL_PIN(GPIO68, "GPIO68"),
  193. PINCTRL_PIN(GPIO69, "GPIO69"),
  194. PINCTRL_PIN(GPIO70, "GPIO70"),
  195. PINCTRL_PIN(GPIO71, "GPIO71"),
  196. PINCTRL_PIN(GPIO72, "GPIO72"),
  197. PINCTRL_PIN(GPIO73, "GPIO73"),
  198. PINCTRL_PIN(GPIO74, "GPIO74"),
  199. PINCTRL_PIN(GPIO75, "GPIO75"),
  200. PINCTRL_PIN(GPIO76, "GPIO76"),
  201. PINCTRL_PIN(GPIO77, "GPIO77"),
  202. PINCTRL_PIN(GPIO78, "GPIO78"),
  203. PINCTRL_PIN(GPIO79, "GPIO79"),
  204. PINCTRL_PIN(GPIO80, "GPIO80"),
  205. PINCTRL_PIN(GPIO81, "GPIO81"),
  206. PINCTRL_PIN(GPIO82, "GPIO82"),
  207. PINCTRL_PIN(GPIO83, "GPIO83"),
  208. PINCTRL_PIN(GPIO84, "GPIO84"),
  209. PINCTRL_PIN(GPIO85, "GPIO85"),
  210. PINCTRL_PIN(GPIO86, "GPIO86"),
  211. PINCTRL_PIN(GPIO87, "GPIO87"),
  212. PINCTRL_PIN(GPIO88, "GPIO88"),
  213. PINCTRL_PIN(GPIO89, "GPIO89"),
  214. PINCTRL_PIN(GPIO90, "GPIO90"),
  215. PINCTRL_PIN(GPIO91, "GPIO91"),
  216. PINCTRL_PIN(GPIO92, "GPIO92"),
  217. PINCTRL_PIN(GPIO93, "GPIO93"),
  218. PINCTRL_PIN(GPIO94, "GPIO94"),
  219. PINCTRL_PIN(GPIO95, "GPIO95"),
  220. PINCTRL_PIN(GPIO96, "GPIO96"),
  221. PINCTRL_PIN(GPIO97, "GPIO97"),
  222. PINCTRL_PIN(GPIO98, "GPIO98"),
  223. PINCTRL_PIN(GPIO99, "GPIO99"),
  224. PINCTRL_PIN(GPIO100, "GPIO100"),
  225. PINCTRL_PIN(GPIO101, "GPIO101"),
  226. PINCTRL_PIN(GPIO102, "GPIO102"),
  227. PINCTRL_PIN(GPIO103, "GPIO103"),
  228. PINCTRL_PIN(GPIO104, "GPIO104"),
  229. PINCTRL_PIN(GPIO105, "GPIO105"),
  230. PINCTRL_PIN(GPIO106, "GPIO106"),
  231. PINCTRL_PIN(GPIO107, "GPIO107"),
  232. PINCTRL_PIN(GPIO108, "GPIO108"),
  233. PINCTRL_PIN(GPIO109, "GPIO109"),
  234. PINCTRL_PIN(GPIO110, "GPIO110"),
  235. PINCTRL_PIN(GPIO111, "GPIO111"),
  236. PINCTRL_PIN(GPIO112, "GPIO112"),
  237. PINCTRL_PIN(GPIO113, "GPIO113"),
  238. PINCTRL_PIN(GPIO114, "GPIO114"),
  239. PINCTRL_PIN(GPIO115, "GPIO115"),
  240. PINCTRL_PIN(GPIO116, "GPIO116"),
  241. PINCTRL_PIN(GPIO117, "GPIO117"),
  242. PINCTRL_PIN(GPIO118, "GPIO118"),
  243. PINCTRL_PIN(GPIO119, "GPIO119"),
  244. PINCTRL_PIN(GPIO120, "GPIO120"),
  245. PINCTRL_PIN(GPIO121, "GPIO121"),
  246. PINCTRL_PIN(GPIO122, "GPIO122"),
  247. PINCTRL_PIN(PWR_SCL, "PWR_SCL"),
  248. PINCTRL_PIN(PWR_SDA, "PWR_SDA"),
  249. PINCTRL_PIN(TDI, "TDI"),
  250. PINCTRL_PIN(TMS, "TMS"),
  251. PINCTRL_PIN(TCK, "TCK"),
  252. PINCTRL_PIN(TDO, "TDO"),
  253. PINCTRL_PIN(TRST, "TRST"),
  254. PINCTRL_PIN(WAKEUP, "WAKEUP"),
  255. };
  256. struct pxa3xx_mfp_pin pxa168_mfp[] = {
  257. /* pin offs f0 f1 f2 f3 f4 f5 f6 f7 */
  258. MFPR_168(GPIO0, 0x04C, DFIO, NONE, NONE, MSP, MMC3_CMD, GPIO, MMC3, NONE),
  259. MFPR_168(GPIO1, 0x050, DFIO, NONE, NONE, MSP, MMC3_CLK, GPIO, MMC3, NONE),
  260. MFPR_168(GPIO2, 0x054, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
  261. MFPR_168(GPIO3, 0x058, DFIO, NONE, NONE, NONE, NONE, GPIO, MMC3, NONE),
  262. MFPR_168(GPIO4, 0x05C, DFIO, NONE, NONE, MSP_DAT3, NONE, GPIO, MMC3, NONE),
  263. MFPR_168(GPIO5, 0x060, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
  264. MFPR_168(GPIO6, 0x064, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
  265. MFPR_168(GPIO7, 0x068, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
  266. MFPR_168(GPIO8, 0x06C, DFIO, MMC2, UART3_TX, NONE, MMC2_CMD, GPIO, MMC3_CLK, NONE),
  267. MFPR_168(GPIO9, 0x070, DFIO, MMC2, UART3, NONE, MMC2_CLK, GPIO, MMC3_CMD, NONE),
  268. MFPR_168(GPIO10, 0x074, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP_DAT3, NONE),
  269. MFPR_168(GPIO11, 0x078, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
  270. MFPR_168(GPIO12, 0x07C, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
  271. MFPR_168(GPIO13, 0x080, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
  272. MFPR_168(GPIO14, 0x084, DFIO, MMC2, NONE, NONE, NONE, GPIO, MSP, NONE),
  273. MFPR_168(GPIO15, 0x088, DFIO, MMC2, NONE, NONE, NONE, GPIO, MSP, NONE),
  274. MFPR_168(GPIO16, 0x08C, GPIO, NAND, SMC_CS0, SMC_CS1, NONE, NONE, MMC3, NONE),
  275. MFPR_168(GPIO17, 0x090, NAND, NONE, NONE, NONE, NONE, GPIO, MSP, NONE),
  276. MFPR_168(GPIO18, 0x094, GPIO, NAND, SMC_CS1, SMC_CS0, NONE, NONE, NONE, NONE),
  277. MFPR_168(GPIO19, 0x098, SMC_CS0, NONE, NONE, CF, NONE, GPIO, NONE, NONE),
  278. MFPR_168(GPIO20, 0x09C, GPIO, NONE, SMC_CS1, CF, CF_RDY, NONE, NONE, NONE),
  279. MFPR_168(GPIO21, 0x0A0, NAND, MMC2_CLK, NONE, NONE, NONE, GPIO, NONE, NONE),
  280. MFPR_168(GPIO22, 0x0A4, NAND, MMC2_CMD, NONE, NONE, NONE, GPIO, NONE, NONE),
  281. MFPR_168(GPIO23, 0x0A8, SMC, NAND, NONE, CF, NONE, GPIO, NONE, NONE),
  282. MFPR_168(GPIO24, 0x0AC, NAND, NONE, NONE, NONE, NONE, GPIO, NONE, NONE),
  283. MFPR_168(GPIO25, 0x0B0, SMC, NAND, NONE, CF, NONE, GPIO, NONE, NONE),
  284. MFPR_168(GPIO26, 0x0B4, GPIO, NAND, NONE, NONE, CF, NONE, NONE, NONE),
  285. MFPR_168(GPIO27, 0x0B8, SMC_INT, NAND, SMC, NONE, SMC_RDY, GPIO, NONE, NONE),
  286. MFPR_168(GPIO28, 0x0BC, SMC_RDY, MMC4, SMC, CF_RDY, NONE, GPIO, MMC2_CMD, NONE),
  287. MFPR_168(GPIO29, 0x0C0, SMC, MMC4, NONE, CF, NONE, GPIO, MMC2_CLK, KP_DK),
  288. MFPR_168(GPIO30, 0x0C4, SMC, MMC4, UART3_TX, CF, NONE, GPIO, MMC2, KP_DK),
  289. MFPR_168(GPIO31, 0x0C8, SMC, MMC4, UART3, CF, NONE, GPIO, MMC2, KP_DK),
  290. MFPR_168(GPIO32, 0x0CC, SMC, MMC4, UART3, CF, NONE, GPIO, MMC2, KP_DK),
  291. MFPR_168(GPIO33, 0x0D0, SMC, MMC4, UART3, CF, CF_nINPACK, GPIO, MMC2, KP_DK),
  292. MFPR_168(GPIO34, 0x0D4, GPIO, NONE, SMC_CS1, CF, CF_nWAIT, NONE, MMC3, KP_DK),
  293. MFPR_168(GPIO35, 0x0D8, GPIO, NONE, SMC, CF_nINPACK, NONE, NONE, MMC3_CMD, KP_DK),
  294. MFPR_168(GPIO36, 0x0DC, GPIO, NONE, SMC, CF_nWAIT, NONE, NONE, MMC3_CLK, KP_DK),
  295. MFPR_168(GPIO37, 0x000, GPIO, MMC1, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
  296. MFPR_168(GPIO38, 0x004, GPIO, MMC1, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
  297. MFPR_168(GPIO39, 0x008, GPIO, NONE, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
  298. MFPR_168(GPIO40, 0x00C, GPIO, MMC1, MSP, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
  299. MFPR_168(GPIO41, 0x010, GPIO, MMC1, MSP, NONE, CCIC, XP, KP_MKIN, KP_DK),
  300. MFPR_168(GPIO42, 0x014, GPIO, I2C, NONE, MSP, CCIC, XP, KP_MKIN, KP_DK),
  301. MFPR_168(GPIO43, 0x018, GPIO, MMC1, MSP, MSP_INS, NONE, NONE, KP_MKIN, KP_DK),
  302. MFPR_168(GPIO44, 0x01C, GPIO, MMC1, MSP_DAT3, MSP, CCIC, XP, KP_MKIN, KP_DK),
  303. MFPR_168(GPIO45, 0x020, GPIO, NONE, NONE, MSP, CCIC, XP, NONE, KP_DK),
  304. MFPR_168(GPIO46, 0x024, GPIO, MMC1, MSP_INS, MSP, CCIC, NONE, KP_MKOUT, KP_DK),
  305. MFPR_168(GPIO47, 0x028, GPIO, NONE, NONE, MSP_INS, NONE, XP, NONE, KP_DK),
  306. MFPR_168(GPIO48, 0x02C, GPIO, MMC1, NONE, MSP_DAT3, CCIC, NONE, NONE, KP_DK),
  307. MFPR_168(GPIO49, 0x030, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
  308. MFPR_168(GPIO50, 0x034, GPIO, I2C, NONE, MSP, CCIC, XD, KP_MKOUT, NONE),
  309. MFPR_168(GPIO51, 0x038, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
  310. MFPR_168(GPIO52, 0x03C, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
  311. MFPR_168(GPIO53, 0x040, GPIO, MMC1, NONE, NONE, NONE, XD, KP_MKOUT, NONE),
  312. MFPR_168(GPIO54, 0x044, GPIO, MMC1, NONE, NONE, CCIC, XD, KP_MKOUT, NONE),
  313. MFPR_168(GPIO55, 0x048, GPIO, NONE, NONE, MSP, CCIC, XD, KP_MKOUT, NONE),
  314. MFPR_168(GPIO56, 0x0E0, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  315. MFPR_168(GPIO57, 0x0E4, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  316. MFPR_168(GPIO58, 0x0E8, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  317. MFPR_168(GPIO59, 0x0EC, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  318. MFPR_168(GPIO60, 0x0F0, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  319. MFPR_168(GPIO61, 0x0F4, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  320. MFPR_168(GPIO62, 0x0F8, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  321. MFPR_168(GPIO63, 0x0FC, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  322. MFPR_168(GPIO64, 0x100, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  323. MFPR_168(GPIO65, 0x104, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  324. MFPR_168(GPIO66, 0x108, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  325. MFPR_168(GPIO67, 0x10C, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
  326. MFPR_168(GPIO68, 0x110, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  327. MFPR_168(GPIO69, 0x114, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  328. MFPR_168(GPIO70, 0x118, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  329. MFPR_168(GPIO71, 0x11C, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  330. MFPR_168(GPIO72, 0x120, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  331. MFPR_168(GPIO73, 0x124, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
  332. MFPR_168(GPIO74, 0x128, GPIO, LCD, PWM, XD, NONE, NONE, NONE, NONE),
  333. MFPR_168(GPIO75, 0x12C, GPIO, LCD, PWM, XD, ONE_WIRE, NONE, NONE, NONE),
  334. MFPR_168(GPIO76, 0x130, GPIO, LCD, PWM, I2C, NONE, NONE, MSP_INS, NONE),
  335. MFPR_168(GPIO77, 0x134, GPIO, LCD, PWM1, I2C, ONE_WIRE, NONE, XD, NONE),
  336. MFPR_168(GPIO78, 0x138, GPIO, LCD, NONE, NONE, NONE, MMC4, NONE, NONE),
  337. MFPR_168(GPIO79, 0x13C, GPIO, LCD, NONE, NONE, ONE_WIRE, MMC4, NONE, NONE),
  338. MFPR_168(GPIO80, 0x140, GPIO, LCD, NONE, I2C, NONE, MMC4, NONE, NONE),
  339. MFPR_168(GPIO81, 0x144, GPIO, LCD, NONE, I2C, ONE_WIRE, MMC4, NONE, NONE),
  340. MFPR_168(GPIO82, 0x148, GPIO, LCD, PWM, NONE, NONE, MMC4, NONE, NONE),
  341. MFPR_168(GPIO83, 0x14C, GPIO, LCD, PWM, NONE, RESET, MMC4, NONE, NONE),
  342. MFPR_168(GPIO84, 0x150, GPIO, NONE, PWM, ONE_WIRE, PWM1, NONE, NONE, EXT_32K_IN),
  343. MFPR_168(GPIO85, 0x154, GPIO, NONE, PWM1, NONE, NONE, NONE, NONE, USB),
  344. MFPR_168(GPIO86, 0x158, GPIO, MMC2, UART2, NONE, JTAG, ETH_TX, SSP5_TX, SSP5),
  345. MFPR_168(GPIO87, 0x15C, GPIO, MMC2, UART2, NONE, JTAG, ETH_TX, SSP5, SSP5_TX),
  346. MFPR_168(GPIO88, 0x160, GPIO, MMC2, UART2, UART2_TX, JTAG, ETH_TX, ETH_RX, SSP5),
  347. MFPR_168(GPIO89, 0x164, GPIO, MMC2, UART2_TX, UART2, JTAG, ETH_TX, ETH_RX, SSP5),
  348. MFPR_168(GPIO90, 0x168, GPIO, MMC2, NONE, SSP3, JTAG, ETH_TX, ETH_RX, NONE),
  349. MFPR_168(GPIO91, 0x16C, GPIO, MMC2, NONE, SSP3, SSP4, ETH_TX, ETH_RX, NONE),
  350. MFPR_168(GPIO92, 0x170, GPIO, MMC2, NONE, SSP3, SSP3_TX, ETH, NONE, NONE),
  351. MFPR_168(GPIO93, 0x174, GPIO, MMC2, NONE, SSP3_TX, SSP3, ETH, NONE, NONE),
  352. MFPR_168(GPIO94, 0x178, GPIO, MMC2_CMD, SSP3, AC97_SYSCLK, AC97, ETH, NONE, NONE),
  353. MFPR_168(GPIO95, 0x17C, GPIO, MMC2_CLK, NONE, NONE, AC97, ETH, NONE, NONE),
  354. MFPR_168(GPIO96, 0x180, GPIO, PWM, NONE, MMC2, NONE, ETH_RX, ETH_TX, NONE),
  355. MFPR_168(GPIO97, 0x184, GPIO, PWM, ONE_WIRE, NONE, NONE, ETH_RX, ETH_TX, NONE),
  356. MFPR_168(GPIO98, 0x188, GPIO, PWM1, UART3_TX, UART3, NONE, ETH_RX, ETH_TX, NONE),
  357. MFPR_168(GPIO99, 0x18C, GPIO, ONE_WIRE, UART3, UART3_TX, NONE, ETH_RX, ETH_TX, NONE),
  358. MFPR_168(GPIO100, 0x190, GPIO, NONE, UART3_CTS, UART3, NONE, ETH, NONE, NONE),
  359. MFPR_168(GPIO101, 0x194, GPIO, NONE, UART3, UART3_CTS, NONE, ETH, NONE, NONE),
  360. MFPR_168(GPIO102, 0x198, GPIO, I2C, UART3, SSP4, NONE, NONE, NONE, NONE),
  361. MFPR_168(GPIO103, 0x19C, GPIO, I2C, UART3, SSP4, SSP2, ETH, NONE, NONE),
  362. MFPR_168(GPIO104, 0x1A0, GPIO, PWM, UART1, SSP4, SSP4_TX, AC97, KP_MKOUT, NONE),
  363. MFPR_168(GPIO105, 0x1A4, GPIO, I2C, UART1, SSP4_TX, SSP4, AC97, KP_MKOUT, NONE),
  364. MFPR_168(GPIO106, 0x1A8, GPIO, I2C, PWM1, AC97_SYSCLK, MMC2, NONE, KP_MKOUT, NONE),
  365. MFPR_168(GPIO107, 0x1AC, GPIO, UART1_TX, UART1, NONE, SSP2, MSP_DAT3, NONE, KP_MKIN),
  366. MFPR_168(GPIO108, 0x1B0, GPIO, UART1, UART1_TX, NONE, SSP2_TX, MSP, NONE, KP_MKIN),
  367. MFPR_168(GPIO109, 0x1B4, GPIO, UART1_CTS, UART1, NONE, AC97_SYSCLK, MSP, NONE, KP_MKIN),
  368. MFPR_168(GPIO110, 0x1B8, GPIO, UART1, UART1_CTS, NONE, SMC_RDY, MSP, NONE, KP_MKIN),
  369. MFPR_168(GPIO111, 0x1BC, GPIO, UART1_nRI, UART1, SSP3, SSP2, MSP, XD, KP_MKOUT),
  370. MFPR_168(GPIO112, 0x1C0, GPIO, UART1_DTR, UART1, ONE_WIRE, SSP2, MSP, XD, KP_MKOUT),
  371. MFPR_168(GPIO113, 0x1C4, GPIO, NONE, NONE, NONE, NONE, NONE, AC97_SYSCLK, NONE),
  372. MFPR_168(GPIO114, 0x1C8, GPIO, SSP1, NONE, NONE, NONE, NONE, AC97, NONE),
  373. MFPR_168(GPIO115, 0x1CC, GPIO, SSP1, NONE, NONE, NONE, NONE, AC97, NONE),
  374. MFPR_168(GPIO116, 0x1D0, GPIO, SSP1_TX, SSP1, NONE, NONE, NONE, AC97, NONE),
  375. MFPR_168(GPIO117, 0x1D4, GPIO, SSP1, SSP1_TX, NONE, MMC2_CMD, NONE, AC97, NONE),
  376. MFPR_168(GPIO118, 0x1D8, GPIO, SSP2, NONE, NONE, MMC2_CLK, NONE, AC97, KP_MKIN),
  377. MFPR_168(GPIO119, 0x1DC, GPIO, SSP2, NONE, NONE, MMC2, NONE, AC97, KP_MKIN),
  378. MFPR_168(GPIO120, 0x1E0, GPIO, SSP2, SSP2_TX, NONE, MMC2, NONE, NONE, KP_MKIN),
  379. MFPR_168(GPIO121, 0x1E4, GPIO, SSP2_TX, SSP2, NONE, MMC2, NONE, NONE, KP_MKIN),
  380. MFPR_168(GPIO122, 0x1E8, GPIO, AC97_SYSCLK, SSP2, PWM, MMC2, NONE, NONE, NONE),
  381. MFPR_168(PWR_SCL, 0x1EC, PWRI2C, NONE, NONE, NONE, NONE, NONE, GPIO, MMC4),
  382. MFPR_168(PWR_SDA, 0x1F0, PWRI2C, NONE, NONE, NONE, NONE, NONE, GPIO, NONE),
  383. MFPR_168(TDI, 0x1F4, JTAG, PWM1, UART2, MMC4, SSP5, NONE, XD, MMC4),
  384. MFPR_168(TMS, 0x1F8, JTAG, PWM, UART2, NONE, SSP5, NONE, XD, MMC4),
  385. MFPR_168(TCK, 0x1FC, JTAG, PWM, UART2, UART2_TX, SSP5, NONE, XD, MMC4),
  386. MFPR_168(TDO, 0x200, JTAG, PWM, UART2_TX, UART2, SSP5_TX, NONE, XD, MMC4),
  387. MFPR_168(TRST, 0x204, JTAG, ONE_WIRE, SSP2, SSP3, AC97_SYSCLK, NONE, XD, MMC4),
  388. MFPR_168(WAKEUP, 0x208, WAKEUP, ONE_WIRE, PWM1, PWM, SSP2, NONE, GPIO, MMC4),
  389. };
  390. static const unsigned p168_jtag_pin1[] = {TDI, TMS, TCK, TDO, TRST};
  391. static const unsigned p168_wakeup_pin1[] = {WAKEUP};
  392. static const unsigned p168_ssp1rx_pin1[] = {GPIO114, GPIO115, GPIO116};
  393. static const unsigned p168_ssp1tx_pin1[] = {GPIO117};
  394. static const unsigned p168_ssp4rx_pin1[] = {GPIO102, GPIO103, GPIO104};
  395. static const unsigned p168_ssp4tx_pin1[] = {GPIO105};
  396. static const unsigned p168_ssp5rx_pin1[] = {GPIO86, GPIO88, GPIO89};
  397. static const unsigned p168_ssp5tx_pin1[] = {GPIO87};
  398. static const unsigned p168_i2c_pin1[] = {GPIO105, GPIO106};
  399. static const unsigned p168_pwri2c_pin1[] = {PWR_SCL, PWR_SDA};
  400. static const unsigned p168_mmc1_pin1[] = {GPIO40, GPIO41, GPIO43, GPIO46,
  401. GPIO49, GPIO51, GPIO52, GPIO53};
  402. static const unsigned p168_mmc2_data_pin1[] = {GPIO90, GPIO91, GPIO92, GPIO93};
  403. static const unsigned p168_mmc2_cmd_pin1[] = {GPIO94};
  404. static const unsigned p168_mmc2_clk_pin1[] = {GPIO95};
  405. static const unsigned p168_mmc3_data_pin1[] = {GPIO0, GPIO1, GPIO2, GPIO3,
  406. GPIO4, GPIO5, GPIO6, GPIO7};
  407. static const unsigned p168_mmc3_cmd_pin1[] = {GPIO9};
  408. static const unsigned p168_mmc3_clk_pin1[] = {GPIO8};
  409. static const unsigned p168_eth_pin1[] = {GPIO92, GPIO93, GPIO100, GPIO101,
  410. GPIO103};
  411. static const unsigned p168_ethtx_pin1[] = {GPIO86, GPIO87, GPIO88, GPIO89,
  412. GPIO90, GPIO91};
  413. static const unsigned p168_ethrx_pin1[] = {GPIO94, GPIO95, GPIO96, GPIO97,
  414. GPIO98, GPIO99};
  415. static const unsigned p168_uart1rx_pin1[] = {GPIO107};
  416. static const unsigned p168_uart1tx_pin1[] = {GPIO108};
  417. static const unsigned p168_uart3rx_pin1[] = {GPIO98, GPIO100, GPIO101};
  418. static const unsigned p168_uart3tx_pin1[] = {GPIO99};
  419. static const unsigned p168_msp_pin1[] = {GPIO40, GPIO41, GPIO42, GPIO43,
  420. GPIO44, GPIO50};
  421. static const unsigned p168_ccic_pin1[] = {GPIO37, GPIO38, GPIO39, GPIO40,
  422. GPIO41, GPIO42, GPIO44, GPIO45, GPIO46, GPIO48, GPIO54, GPIO55};
  423. static const unsigned p168_xd_pin1[] = {GPIO37, GPIO38, GPIO39, GPIO40,
  424. GPIO41, GPIO42, GPIO44, GPIO45, GPIO47, GPIO48, GPIO49, GPIO50,
  425. GPIO51, GPIO52};
  426. static const unsigned p168_lcd_pin1[] = {GPIO56, GPIO57, GPIO58, GPIO59,
  427. GPIO60, GPIO61, GPIO62, GPIO63, GPIO64, GPIO65, GPIO66, GPIO67,
  428. GPIO68, GPIO69, GPIO70, GPIO71, GPIO72, GPIO73, GPIO74, GPIO75,
  429. GPIO76, GPIO77, GPIO78, GPIO79, GPIO80, GPIO81, GPIO82, GPIO83};
  430. static const unsigned p168_dfio_pin1[] = {GPIO0, GPIO1, GPIO2, GPIO3,
  431. GPIO4, GPIO5, GPIO6, GPIO7, GPIO8, GPIO9, GPIO10, GPIO11, GPIO12,
  432. GPIO13, GPIO14, GPIO15};
  433. static const unsigned p168_nand_pin1[] = {GPIO16, GPIO17, GPIO21, GPIO22,
  434. GPIO24, GPIO26};
  435. static const unsigned p168_smc_pin1[] = {GPIO23, GPIO25, GPIO29, GPIO35,
  436. GPIO36};
  437. static const unsigned p168_smccs0_pin1[] = {GPIO18};
  438. static const unsigned p168_smccs1_pin1[] = {GPIO34};
  439. static const unsigned p168_smcrdy_pin1[] = {GPIO28};
  440. static const unsigned p168_ac97sysclk_pin1[] = {GPIO113};
  441. static const unsigned p168_ac97_pin1[] = {GPIO114, GPIO115, GPIO117, GPIO118,
  442. GPIO119};
  443. static const unsigned p168_cf_pin1[] = {GPIO19, GPIO20, GPIO23, GPIO25,
  444. GPIO28, GPIO29, GPIO30, GPIO31, GPIO32, GPIO33, GPIO34, GPIO35,
  445. GPIO36};
  446. static const unsigned p168_kpmkin_pin1[] = {GPIO109, GPIO110, GPIO121};
  447. static const unsigned p168_kpmkout_pin1[] = {GPIO111, GPIO112};
  448. static const unsigned p168_gpio86_pin1[] = {WAKEUP};
  449. static const unsigned p168_gpio86_pin2[] = {GPIO86};
  450. static const unsigned p168_gpio87_pin1[] = {GPIO87};
  451. static const unsigned p168_gpio87_pin2[] = {PWR_SDA};
  452. static const unsigned p168_gpio88_pin1[] = {GPIO88};
  453. static const unsigned p168_gpio88_pin2[] = {PWR_SCL};
  454. static struct pxa3xx_pin_group pxa168_grps[] = {
  455. GRP_168("uart1rx-1", UART1, p168_uart1rx_pin1),
  456. GRP_168("uart1tx-1", UART1_TX, p168_uart1tx_pin1),
  457. GRP_168("uart3rx-1", UART3, p168_uart3rx_pin1),
  458. GRP_168("uart3tx-1", UART3_TX, p168_uart3tx_pin1),
  459. GRP_168("ssp1rx-1", SSP1, p168_ssp1rx_pin1),
  460. GRP_168("ssp1tx-1", SSP1_TX, p168_ssp1tx_pin1),
  461. GRP_168("ssp4rx-1", SSP4, p168_ssp4rx_pin1),
  462. GRP_168("ssp4tx-1", SSP4_TX, p168_ssp4tx_pin1),
  463. GRP_168("ssp5rx-1", SSP5, p168_ssp5rx_pin1),
  464. GRP_168("ssp5tx-1", SSP5_TX, p168_ssp5tx_pin1),
  465. GRP_168("jtag", JTAG, p168_jtag_pin1),
  466. GRP_168("wakeup", WAKEUP, p168_wakeup_pin1),
  467. GRP_168("i2c", I2C, p168_i2c_pin1),
  468. GRP_168("pwri2c", PWRI2C, p168_pwri2c_pin1),
  469. GRP_168("mmc1 8p1", MMC1, p168_mmc1_pin1),
  470. GRP_168("mmc2 4p1", MMC2, p168_mmc2_data_pin1),
  471. GRP_168("mmc2 cmd1", MMC2_CMD, p168_mmc2_cmd_pin1),
  472. GRP_168("mmc2 clk1", MMC2_CLK, p168_mmc2_clk_pin1),
  473. GRP_168("mmc3 8p1", MMC3, p168_mmc3_data_pin1),
  474. GRP_168("mmc3 cmd1", MMC3_CMD, p168_mmc3_cmd_pin1),
  475. GRP_168("mmc3 clk1", MMC3_CLK, p168_mmc3_clk_pin1),
  476. GRP_168("eth", ETH, p168_eth_pin1),
  477. GRP_168("eth rx", ETH_RX, p168_ethrx_pin1),
  478. GRP_168("eth tx", ETH_TX, p168_ethtx_pin1),
  479. GRP_168("msp", MSP, p168_msp_pin1),
  480. GRP_168("ccic", CCIC, p168_ccic_pin1),
  481. GRP_168("xd", XD, p168_xd_pin1),
  482. GRP_168("lcd", LCD, p168_lcd_pin1),
  483. GRP_168("dfio", DFIO, p168_dfio_pin1),
  484. GRP_168("nand", NAND, p168_nand_pin1),
  485. GRP_168("smc", SMC, p168_smc_pin1),
  486. GRP_168("smc cs0", SMC_CS0, p168_smccs0_pin1),
  487. GRP_168("smc cs1", SMC_CS1, p168_smccs1_pin1),
  488. GRP_168("smc rdy", SMC_RDY, p168_smcrdy_pin1),
  489. GRP_168("ac97 sysclk", AC97_SYSCLK, p168_ac97sysclk_pin1),
  490. GRP_168("ac97", AC97, p168_ac97_pin1),
  491. GRP_168("cf", CF, p168_cf_pin1),
  492. GRP_168("kp mkin 3p1", KP_MKIN, p168_kpmkin_pin1),
  493. GRP_168("kp mkout 2p1", KP_MKOUT, p168_kpmkout_pin1),
  494. GRP_168("gpio86-1", GPIO, p168_gpio86_pin1),
  495. GRP_168("gpio86-2", GPIO, p168_gpio86_pin2),
  496. GRP_168("gpio87-1", GPIO, p168_gpio87_pin1),
  497. GRP_168("gpio87-2", GPIO, p168_gpio87_pin2),
  498. GRP_168("gpio88-1", GPIO, p168_gpio88_pin1),
  499. GRP_168("gpio88-2", GPIO, p168_gpio88_pin2),
  500. };
  501. static const char * const p168_uart1rx_grps[] = {"uart1rx-1"};
  502. static const char * const p168_uart1tx_grps[] = {"uart1tx-1"};
  503. static const char * const p168_uart3rx_grps[] = {"uart3rx-1"};
  504. static const char * const p168_uart3tx_grps[] = {"uart3tx-1"};
  505. static const char * const p168_ssp1rx_grps[] = {"ssp1rx-1"};
  506. static const char * const p168_ssp1tx_grps[] = {"ssp1tx-1"};
  507. static const char * const p168_ssp4rx_grps[] = {"ssp4rx-1"};
  508. static const char * const p168_ssp4tx_grps[] = {"ssp4tx-1"};
  509. static const char * const p168_ssp5rx_grps[] = {"ssp5rx-1"};
  510. static const char * const p168_ssp5tx_grps[] = {"ssp5tx-1"};
  511. static const char * const p168_i2c_grps[] = {"i2c"};
  512. static const char * const p168_pwri2c_grps[] = {"pwri2c"};
  513. static const char * const p168_mmc1_grps[] = {"mmc1 8p1"};
  514. static const char * const p168_mmc2_data_grps[] = {"mmc2 4p1"};
  515. static const char * const p168_mmc2_cmd_grps[] = {"mmc2 cmd1"};
  516. static const char * const p168_mmc2_clk_grps[] = {"mmc2 clk1"};
  517. static const char * const p168_mmc3_data_grps[] = {"mmc3 8p1"};
  518. static const char * const p168_mmc3_cmd_grps[] = {"mmc3 cmd1"};
  519. static const char * const p168_mmc3_clk_grps[] = {"mmc3 clk1"};
  520. static const char * const p168_eth_grps[] = {"eth"};
  521. static const char * const p168_ethrx_grps[] = {"eth rx"};
  522. static const char * const p168_ethtx_grps[] = {"eth tx"};
  523. static const char * const p168_msp_grps[] = {"msp"};
  524. static const char * const p168_ccic_grps[] = {"ccic"};
  525. static const char * const p168_xd_grps[] = {"xd"};
  526. static const char * const p168_lcd_grps[] = {"lcd"};
  527. static const char * const p168_dfio_grps[] = {"dfio"};
  528. static const char * const p168_nand_grps[] = {"nand"};
  529. static const char * const p168_smc_grps[] = {"smc"};
  530. static const char * const p168_smccs0_grps[] = {"smc cs0"};
  531. static const char * const p168_smccs1_grps[] = {"smc cs1"};
  532. static const char * const p168_smcrdy_grps[] = {"smc rdy"};
  533. static const char * const p168_ac97sysclk_grps[] = {"ac97 sysclk"};
  534. static const char * const p168_ac97_grps[] = {"ac97"};
  535. static const char * const p168_cf_grps[] = {"cf"};
  536. static const char * const p168_kpmkin_grps[] = {"kp mkin 3p1"};
  537. static const char * const p168_kpmkout_grps[] = {"kp mkout 2p1"};
  538. static const char * const p168_gpio86_grps[] = {"gpio86-1", "gpio86-2"};
  539. static const char * const p168_gpio87_grps[] = {"gpio87-1", "gpio87-2"};
  540. static const char * const p168_gpio88_grps[] = {"gpio88-1", "gpio88-2"};
  541. static struct pxa3xx_pmx_func pxa168_funcs[] = {
  542. {"uart1 rx", ARRAY_AND_SIZE(p168_uart1rx_grps)},
  543. {"uart1 tx", ARRAY_AND_SIZE(p168_uart1tx_grps)},
  544. {"uart3 rx", ARRAY_AND_SIZE(p168_uart3rx_grps)},
  545. {"uart3 tx", ARRAY_AND_SIZE(p168_uart3tx_grps)},
  546. {"ssp1 rx", ARRAY_AND_SIZE(p168_ssp1rx_grps)},
  547. {"ssp1 tx", ARRAY_AND_SIZE(p168_ssp1tx_grps)},
  548. {"ssp4 rx", ARRAY_AND_SIZE(p168_ssp4rx_grps)},
  549. {"ssp4 tx", ARRAY_AND_SIZE(p168_ssp4tx_grps)},
  550. {"ssp5 rx", ARRAY_AND_SIZE(p168_ssp5rx_grps)},
  551. {"ssp5 tx", ARRAY_AND_SIZE(p168_ssp5tx_grps)},
  552. {"i2c", ARRAY_AND_SIZE(p168_i2c_grps)},
  553. {"pwri2c", ARRAY_AND_SIZE(p168_pwri2c_grps)},
  554. {"mmc1", ARRAY_AND_SIZE(p168_mmc1_grps)},
  555. {"mmc2", ARRAY_AND_SIZE(p168_mmc2_data_grps)},
  556. {"mmc2 cmd", ARRAY_AND_SIZE(p168_mmc2_cmd_grps)},
  557. {"mmc2 clk", ARRAY_AND_SIZE(p168_mmc2_clk_grps)},
  558. {"mmc3", ARRAY_AND_SIZE(p168_mmc3_data_grps)},
  559. {"mmc3 cmd", ARRAY_AND_SIZE(p168_mmc3_cmd_grps)},
  560. {"mmc3 clk", ARRAY_AND_SIZE(p168_mmc3_clk_grps)},
  561. {"eth", ARRAY_AND_SIZE(p168_eth_grps)},
  562. {"eth rx", ARRAY_AND_SIZE(p168_ethrx_grps)},
  563. {"eth tx", ARRAY_AND_SIZE(p168_ethtx_grps)},
  564. {"msp", ARRAY_AND_SIZE(p168_msp_grps)},
  565. {"ccic", ARRAY_AND_SIZE(p168_ccic_grps)},
  566. {"xd", ARRAY_AND_SIZE(p168_xd_grps)},
  567. {"lcd", ARRAY_AND_SIZE(p168_lcd_grps)},
  568. {"dfio", ARRAY_AND_SIZE(p168_dfio_grps)},
  569. {"nand", ARRAY_AND_SIZE(p168_nand_grps)},
  570. {"smc", ARRAY_AND_SIZE(p168_smc_grps)},
  571. {"smc cs0", ARRAY_AND_SIZE(p168_smccs0_grps)},
  572. {"smc cs1", ARRAY_AND_SIZE(p168_smccs1_grps)},
  573. {"smc rdy", ARRAY_AND_SIZE(p168_smcrdy_grps)},
  574. {"ac97", ARRAY_AND_SIZE(p168_ac97_grps)},
  575. {"ac97 sysclk", ARRAY_AND_SIZE(p168_ac97sysclk_grps)},
  576. {"cf", ARRAY_AND_SIZE(p168_cf_grps)},
  577. {"kpmkin", ARRAY_AND_SIZE(p168_kpmkin_grps)},
  578. {"kpmkout", ARRAY_AND_SIZE(p168_kpmkout_grps)},
  579. {"gpio86", ARRAY_AND_SIZE(p168_gpio86_grps)},
  580. {"gpio87", ARRAY_AND_SIZE(p168_gpio87_grps)},
  581. {"gpio88", ARRAY_AND_SIZE(p168_gpio88_grps)},
  582. };
  583. static struct pinctrl_desc pxa168_pctrl_desc = {
  584. .name = "pxa168-pinctrl",
  585. .owner = THIS_MODULE,
  586. };
  587. static struct pxa3xx_pinmux_info pxa168_info = {
  588. .mfp = pxa168_mfp,
  589. .num_mfp = ARRAY_SIZE(pxa168_mfp),
  590. .grps = pxa168_grps,
  591. .num_grps = ARRAY_SIZE(pxa168_grps),
  592. .funcs = pxa168_funcs,
  593. .num_funcs = ARRAY_SIZE(pxa168_funcs),
  594. .num_gpio = 128,
  595. .desc = &pxa168_pctrl_desc,
  596. .pads = pxa168_pads,
  597. .num_pads = ARRAY_SIZE(pxa168_pads),
  598. .cputype = PINCTRL_PXA168,
  599. .ds_mask = PXA168_DS_MASK,
  600. .ds_shift = PXA168_DS_SHIFT,
  601. };
  602. static int __devinit pxa168_pinmux_probe(struct platform_device *pdev)
  603. {
  604. return pxa3xx_pinctrl_register(pdev, &pxa168_info);
  605. }
  606. static int __devexit pxa168_pinmux_remove(struct platform_device *pdev)
  607. {
  608. return pxa3xx_pinctrl_unregister(pdev);
  609. }
  610. static struct platform_driver pxa168_pinmux_driver = {
  611. .driver = {
  612. .name = "pxa168-pinmux",
  613. .owner = THIS_MODULE,
  614. },
  615. .probe = pxa168_pinmux_probe,
  616. .remove = __devexit_p(pxa168_pinmux_remove),
  617. };
  618. static int __init pxa168_pinmux_init(void)
  619. {
  620. return platform_driver_register(&pxa168_pinmux_driver);
  621. }
  622. core_initcall_sync(pxa168_pinmux_init);
  623. static void __exit pxa168_pinmux_exit(void)
  624. {
  625. platform_driver_unregister(&pxa168_pinmux_driver);
  626. }
  627. module_exit(pxa168_pinmux_exit);
  628. MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
  629. MODULE_DESCRIPTION("PXA3xx pin control driver");
  630. MODULE_LICENSE("GPL v2");