quec_pin_index.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. 
  2. /*================================================================
  3. Copyright (c) 2021, Quectel Wireless Solutions Co., Ltd. All rights reserved.
  4. Quectel Wireless Solutions Proprietary and Confidential.
  5. =================================================================*/
  6. /*=================================================================
  7. EDIT HISTORY FOR MODULE
  8. This section contains comments describing changes made to the module.
  9. Notice that changes are listed in reverse chronological order.
  10. WHEN WHO WHAT, WHERE, WHY
  11. ------------ ------- -------------------------------------------------------------------------------
  12. =================================================================*/
  13. #ifndef QUEC_PIN_INDEX_H
  14. #define QUEC_PIN_INDEX_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define QUEC_PIN_NONE 0xff
  19. //后为定制两个型号,800G,600G,使用的引脚不同
  20. //QDORIND_PIN---给对端mcu信号的引脚
  21. //QDORIND_WAKEUP_PIN---唤醒引脚,但唤醒逻辑与公版的相反
  22. #ifndef CONFIG_QL_OPEN_EXPORT_PKG
  23. #ifdef __QUEC_OEM_VER_HW__
  24. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  25. #define QDORIND_PIN 20
  26. #define QDORIND_WAKEUP_PIN 86
  27. #else
  28. #define QDORIND_PIN 50
  29. #define QDORIND_WAKEUP_PIN 49
  30. #endif
  31. #endif
  32. #endif
  33. /*===========================================================================
  34. * Pin Number
  35. ===========================================================================*/
  36. /************ GPIO Default Name ************/
  37. /************ use Function0 Name ************///don't change
  38. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  39. #define QUEC_GPIO_DNAME_GPIO_0 0
  40. #define QUEC_GPIO_DNAME_GPIO_1 1
  41. #define QUEC_GPIO_DNAME_GPIO_2 2
  42. #define QUEC_GPIO_DNAME_GPIO_3 3
  43. #define QUEC_GPIO_DNAME_GPIO_4 4
  44. #define QUEC_GPIO_DNAME_GPIO_6 6
  45. #define QUEC_GPIO_DNAME_GPIO_7 7
  46. #define QUEC_GPIO_DNAME_KEYIN_4 8
  47. #define QUEC_GPIO_DNAME_KEYOUT_4 10
  48. #define QUEC_GPIO_DNAME_UART_1_RXD 12
  49. #define QUEC_GPIO_DNAME_UART_1_TXD 13
  50. #define QUEC_GPIO_DNAME_UART_1_CTS 14
  51. #define QUEC_GPIO_DNAME_UART_1_RTS 15
  52. #define QUEC_GPIO_DNAME_GPIO_16 16
  53. #define QUEC_GPIO_DNAME_GPIO_17 17
  54. #define QUEC_GPIO_DNAME_GPIO_18 18
  55. #define QUEC_GPIO_DNAME_SPI_CAMERA_SCK 18
  56. #define QUEC_GPIO_DNAME_GPIO_19 19
  57. #define QUEC_GPIO_DNAME_I2S1_BCK 19
  58. #define QUEC_GPIO_DNAME_I2S1_LRCK 20
  59. #define QUEC_GPIO_DNAME_GPIO_20 20
  60. #define QUEC_GPIO_DNAME_GPIO_21 21
  61. #define QUEC_GPIO_DNAME_I2S_SDAT_I 21
  62. #define QUEC_GPIO_DNAME_GPIO_22 22
  63. #define QUEC_GPIO_DNAME_I2S1_SDAT_O 22
  64. #define QUEC_GPIO_DNAME_GPIO_23 23
  65. #define QUEC_GPIO_DNAME_KEYIN_0 28
  66. #define QUEC_GPIO_DNAME_I2C_M1_SCL 29
  67. #define QUEC_GPIO_DNAME_KEYIN_1 29
  68. #define QUEC_GPIO_DNAME_I2C_M1_SDA 30
  69. #define QUEC_GPIO_DNAME_SIM_1_CLK 30
  70. #define QUEC_GPIO_DNAME_KEYIN_2 30
  71. #define QUEC_GPIO_DNAME_SIM_1_DIO 31
  72. #define QUEC_GPIO_DNAME_KEYIN_3 31
  73. #define QUEC_GPIO_DNAME_UART_2_RXD 31
  74. #define QUEC_GPIO_DNAME_SIM_1_RST 32
  75. #define QUEC_GPIO_DNAME_KEYOUT_0 32
  76. #define QUEC_GPIO_DNAME_UART_2_TXD 32
  77. #define QUEC_GPIO_DNAME_UART_2_CTS 33
  78. #define QUEC_GPIO_DNAME_KEYOUT_1 33
  79. #define QUEC_GPIO_DNAME_UART_2_RTS 34
  80. #define QUEC_GPIO_DNAME_KEYOUT_2 34
  81. #define QUEC_GPIO_DNAME_SPI_LCD_SIO 35
  82. #define QUEC_GPIO_DNAME_KEYOUT_3 35
  83. #define QUEC_GPIO_DNAME_SPI_LCD_SDC 36
  84. #define QUEC_GPIO_DNAME_SPI_LCD_CLK 37
  85. #define QUEC_GPIO_DNAME_SPI_LCD_CS 38
  86. #define QUEC_GPIO_DNAME_LCD_FMARK 40
  87. #define QUEC_GPIO_DNAME_LCD_RSTB 41
  88. #define QUEC_GPIO_DNAME_I2C_M2_SCL 42
  89. #define QUEC_GPIO_DNAME_I2C_M2_SDA 43
  90. #define QUEC_GPIO_DNAME_CAMERA_RST_L 44
  91. #define QUEC_GPIO_DNAME_CAMERA_PWDN 45
  92. #define QUEC_GPIO_DNAME_CAMERA_REF_CLK 46
  93. #define QUEC_GPIO_DNAME_SPI_CAMERA_SI_0 47
  94. /*********** EC800G End ***********/
  95. #elif defined CONFIG_QL_PROJECT_DEF_EC600G
  96. #define QUEC_GPIO_DNAME_GPIO_0 0
  97. #define QUEC_GPIO_DNAME_GPIO_1 1
  98. #define QUEC_GPIO_DNAME_GPIO_2 2
  99. #define QUEC_GPIO_DNAME_GPIO_3 3
  100. #define QUEC_GPIO_DNAME_GPIO_6 6
  101. #define QUEC_GPIO_DNAME_GPIO_7 7
  102. #define QUEC_GPIO_DNAME_KEYIN_4 8
  103. #define QUEC_GPIO_DNAME_KEYIN_5 9
  104. #define QUEC_GPIO_DNAME_KEYOUT_4 10
  105. #define QUEC_GPIO_DNAME_KEYOUT_5 11
  106. #define QUEC_GPIO_DNAME_UART_1_RXD 12
  107. #define QUEC_GPIO_DNAME_UART_1_TXD 13
  108. #define QUEC_GPIO_DNAME_UART_1_CTS 14
  109. #define QUEC_GPIO_DNAME_UART_1_RTS 15
  110. #define QUEC_GPIO_DNAME_SDMMC1_CLK 16
  111. #define QUEC_GPIO_DNAME_SDMMC1_CMD 17
  112. #define QUEC_GPIO_DNAME_SPI_CAMERA_SCK 18
  113. #define QUEC_GPIO_DNAME_SDMMC1_DATA_0 18
  114. #define QUEC_GPIO_DNAME_SDMMC1_DATA_1 19
  115. #define QUEC_GPIO_DNAME_I2S1_BCK 19
  116. #define QUEC_GPIO_DNAME_I2S1_LRCK 20
  117. #define QUEC_GPIO_DNAME_SDMMC1_DATA_2 20
  118. #define QUEC_GPIO_DNAME_I2S_SDAT_I 21
  119. #define QUEC_GPIO_DNAME_SDMMC1_DATA_3 21
  120. #define QUEC_GPIO_DNAME_I2S1_SDAT_O 22
  121. #define QUEC_GPIO_DNAME_SW_CLK 24
  122. #define QUEC_GPIO_DNAME_SDMMC1_DATA_4 24
  123. #define QUEC_GPIO_DNAME_SW_DIO 25
  124. #define QUEC_GPIO_DNAME_SDMMC1_DATA_5 25
  125. #define QUEC_GPIO_DNAME_DEBUG_HOST_RX 26
  126. #define QUEC_GPIO_DNAME_DEBUG_HOST_TX 27
  127. #define QUEC_GPIO_DNAME_KEYIN_0 28
  128. #define QUEC_GPIO_DNAME_I2C_M1_SCL 29
  129. #define QUEC_GPIO_DNAME_KEYIN_1 29
  130. #define QUEC_GPIO_DNAME_I2C_M1_SDA 30
  131. #define QUEC_GPIO_DNAME_SIM_1_CLK 30
  132. #define QUEC_GPIO_DNAME_KEYIN_2 30
  133. #define QUEC_GPIO_DNAME_SIM_1_DIO 31
  134. #define QUEC_GPIO_DNAME_KEYIN_3 31
  135. #define QUEC_GPIO_DNAME_UART_2_RXD 31
  136. #define QUEC_GPIO_DNAME_SIM_1_RST 32
  137. #define QUEC_GPIO_DNAME_KEYOUT_0 32
  138. #define QUEC_GPIO_DNAME_UART_2_TXD 32
  139. #define QUEC_GPIO_DNAME_UART_2_CTS 33
  140. #define QUEC_GPIO_DNAME_KEYOUT_1 33
  141. #define QUEC_GPIO_DNAME_UART_2_RTS 34
  142. #define QUEC_GPIO_DNAME_KEYOUT_2 34
  143. #define QUEC_GPIO_DNAME_SPI_LCD_SIO 35
  144. #define QUEC_GPIO_DNAME_KEYOUT_3 35
  145. #define QUEC_GPIO_DNAME_SPI_LCD_SDC 36
  146. #define QUEC_GPIO_DNAME_SPI_LCD_CLK 37
  147. #define QUEC_GPIO_DNAME_SPI_LCD_CS 38
  148. #define QUEC_GPIO_DNAME_SPI_LCD_SELECT 39
  149. #define QUEC_GPIO_DNAME_LCD_FMARK 40
  150. #define QUEC_GPIO_DNAME_LCD_RSTB 41
  151. #define QUEC_GPIO_DNAME_I2C_M2_SCL 42
  152. #define QUEC_GPIO_DNAME_I2C_M2_SDA 43
  153. #define QUEC_GPIO_DNAME_CAMERA_RST_L 44
  154. #define QUEC_GPIO_DNAME_CAMERA_PWDN 45
  155. #define QUEC_GPIO_DNAME_CAMERA_REF_CLK 46
  156. #define QUEC_GPIO_DNAME_SPI_CAMERA_SI_0 47
  157. /*********** EC600G End ***********/
  158. #elif defined CONFIG_QL_PROJECT_DEF_EG700G
  159. #define QUEC_GPIO_DNAME_GPIO_0 0
  160. #define QUEC_GPIO_DNAME_GPIO_1 1
  161. #define QUEC_GPIO_DNAME_GPIO_2 2
  162. #define QUEC_GPIO_DNAME_GPIO_3 3
  163. #define QUEC_GPIO_DNAME_GPIO_4 4
  164. #define QUEC_GPIO_DNAME_GPIO_5 5
  165. #define QUEC_GPIO_DNAME_GPIO_6 6
  166. #define QUEC_GPIO_DNAME_GPIO_7 7
  167. #define QUEC_GPIO_DNAME_KEYIN_4 8
  168. #define QUEC_GPIO_DNAME_KEYIN_5 9
  169. #define QUEC_GPIO_DNAME_KEYOUT_4 10
  170. #define QUEC_GPIO_DNAME_KEYOUT_5 11
  171. #define QUEC_GPIO_DNAME_UART_1_RXD 12
  172. #define QUEC_GPIO_DNAME_UART_1_TXD 13
  173. #define QUEC_GPIO_DNAME_UART_1_CTS 14
  174. #define QUEC_GPIO_DNAME_UART_1_RTS 15
  175. #define QUEC_GPIO_DNAME_SDMMC1_CLK 16
  176. #define QUEC_GPIO_DNAME_SDMMC1_CMD 17
  177. #define QUEC_GPIO_DNAME_SPI_CAMERA_SCK 18
  178. #define QUEC_GPIO_DNAME_GPIO_18 18
  179. #define QUEC_GPIO_DNAME_SDMMC1_DATA_0 18
  180. #define QUEC_GPIO_DNAME_GPIO_19 19
  181. #define QUEC_GPIO_DNAME_SDMMC1_DATA_1 19
  182. #define QUEC_GPIO_DNAME_GPIO_20 20
  183. #define QUEC_GPIO_DNAME_SDMMC1_DATA_2 20
  184. #define QUEC_GPIO_DNAME_GPIO_21 21
  185. #define QUEC_GPIO_DNAME_SDMMC1_DATA_3 21
  186. #define QUEC_GPIO_DNAME_GPIO_22 22
  187. #define QUEC_GPIO_DNAME_GPIO_23 23
  188. #define QUEC_GPIO_DNAME_KEYIN_0 28
  189. #define QUEC_GPIO_DNAME_I2C_M1_SCL 29
  190. #define QUEC_GPIO_DNAME_I2C_M1_SDA 30
  191. #define QUEC_GPIO_DNAME_KEYOUT_0 32
  192. #define QUEC_GPIO_DNAME_UART_2_TXD 32
  193. #define QUEC_GPIO_DNAME_UART_2_CTS 33
  194. #define QUEC_GPIO_DNAME_KEYOUT_1 33
  195. #define QUEC_GPIO_DNAME_UART_2_RTS 34
  196. #define QUEC_GPIO_DNAME_SPI_LCD_SIO 35
  197. #define QUEC_GPIO_DNAME_SPI_LCD_SDC 36
  198. #define QUEC_GPIO_DNAME_SPI_LCD_CLK 37
  199. #define QUEC_GPIO_DNAME_SPI_LCD_CS 38
  200. #define QUEC_GPIO_DNAME_SPI_LCD_SELECT 39
  201. #define QUEC_GPIO_DNAME_LCD_FMARK 40
  202. #define QUEC_GPIO_DNAME_LCD_RSTB 41
  203. #define QUEC_GPIO_DNAME_I2C_M2_SCL 42
  204. #define QUEC_GPIO_DNAME_I2C_M2_SDA 43
  205. #define QUEC_GPIO_DNAME_CAMERA_RST_L 44
  206. #define QUEC_GPIO_DNAME_CAMERA_PWDN 45
  207. #define QUEC_GPIO_DNAME_CAMERA_REF_CLK 46
  208. #define QUEC_GPIO_DNAME_SPI_CAMERA_SI_0 47
  209. /*********** EG700G End ***********/
  210. #elif defined CONFIG_QL_PROJECT_DEF_EC200G
  211. #define QUEC_GPIO_DNAME_GPIO_0 0
  212. #define QUEC_GPIO_DNAME_GPIO_1 1
  213. #define QUEC_GPIO_DNAME_GPIO_2 2
  214. #define QUEC_GPIO_DNAME_GPIO_3 3
  215. #define QUEC_GPIO_DNAME_KEYIN_4 8
  216. #define QUEC_GPIO_DNAME_KEYIN_5 9
  217. #define QUEC_GPIO_DNAME_KEYOUT_4 10
  218. #define QUEC_GPIO_DNAME_KEYOUT_5 11
  219. #define QUEC_GPIO_DNAME_UART_1_RXD 12
  220. #define QUEC_GPIO_DNAME_UART_1_TXD 13
  221. #define QUEC_GPIO_DNAME_UART_1_CTS 14
  222. #define QUEC_GPIO_DNAME_UART_1_RTS 15
  223. #define QUEC_GPIO_DNAME_SDMMC1_CLK 16
  224. #define QUEC_GPIO_DNAME_SDMMC1_CMD 17
  225. #define QUEC_GPIO_DNAME_SPI_CAMERA_SCK 18
  226. #define QUEC_GPIO_DNAME_GPIO_18 18
  227. #define QUEC_GPIO_DNAME_SDMMC1_DATA_0 18
  228. #define QUEC_GPIO_DNAME_I2S1_BCK 19
  229. #define QUEC_GPIO_DNAME_GPIO_19 19
  230. #define QUEC_GPIO_DNAME_SDMMC1_DATA_1 19
  231. #define QUEC_GPIO_DNAME_I2S1_LRCK 20
  232. #define QUEC_GPIO_DNAME_GPIO_20 20
  233. #define QUEC_GPIO_DNAME_SDMMC1_DATA_2 20
  234. #define QUEC_GPIO_DNAME_GPIO_21 21
  235. #define QUEC_GPIO_DNAME_I2S_SDAT_I 21
  236. #define QUEC_GPIO_DNAME_SDMMC1_DATA_3 21
  237. #define QUEC_GPIO_DNAME_GPIO_22 22
  238. #define QUEC_GPIO_DNAME_I2S1_SDAT_O 22
  239. #define QUEC_GPIO_DNAME_GPIO_23 23
  240. #define QUEC_GPIO_DNAME_SW_CLK 24
  241. #define QUEC_GPIO_DNAME_SDMMC1_DATA_4 24
  242. #define QUEC_GPIO_DNAME_SW_DIO 25
  243. #define QUEC_GPIO_DNAME_SDMMC1_DATA_5 25
  244. #define QUEC_GPIO_DNAME_DEBUG_HOST_RX 26
  245. #define QUEC_GPIO_DNAME_SDMMC1_DATA_6 26
  246. #define QUEC_GPIO_DNAME_DEBUG_HOST_TX 27
  247. #define QUEC_GPIO_DNAME_SDMMC1_DATA_7 27
  248. #define QUEC_GPIO_DNAME_KEYIN_0 28
  249. #define QUEC_GPIO_DNAME_I2C_M1_SCL 29
  250. #define QUEC_GPIO_DNAME_KEYIN_1 29
  251. #define QUEC_GPIO_DNAME_I2C_M1_SDA 30
  252. #define QUEC_GPIO_DNAME_SIM_1_CLK 30
  253. #define QUEC_GPIO_DNAME_KEYIN_2 30
  254. #define QUEC_GPIO_DNAME_SIM_1_DIO 31
  255. #define QUEC_GPIO_DNAME_KEYIN_3 31
  256. #define QUEC_GPIO_DNAME_SIM_1_RST 32
  257. #define QUEC_GPIO_DNAME_KEYOUT_0 32
  258. #define QUEC_GPIO_DNAME_UART_2_TXD 32
  259. #define QUEC_GPIO_DNAME_UART_2_CTS 33
  260. #define QUEC_GPIO_DNAME_KEYOUT_1 33
  261. #define QUEC_GPIO_DNAME_UART_2_RTS 34
  262. #define QUEC_GPIO_DNAME_KEYOUT_2 34
  263. #define QUEC_GPIO_DNAME_SPI_LCD_SIO 35
  264. #define QUEC_GPIO_DNAME_KEYOUT_3 35
  265. #define QUEC_GPIO_DNAME_SPI_LCD_SDC 36
  266. #define QUEC_GPIO_DNAME_SPI_LCD_CLK 37
  267. #define QUEC_GPIO_DNAME_SPI_LCD_CS 38
  268. #define QUEC_GPIO_DNAME_SPI_LCD_SELECT 39
  269. #define QUEC_GPIO_DNAME_LCD_FMARK 40
  270. #define QUEC_GPIO_DNAME_LCD_RSTB 41
  271. #define QUEC_GPIO_DNAME_I2C_M2_SCL 42
  272. #define QUEC_GPIO_DNAME_I2C_M2_SDA 43
  273. #define QUEC_GPIO_DNAME_CAMERA_RST_L 44
  274. #define QUEC_GPIO_DNAME_CAMERA_PWDN 45
  275. #define QUEC_GPIO_DNAME_CAMERA_REF_CLK 46
  276. #define QUEC_GPIO_DNAME_SPI_CAMERA_SI_0 47
  277. /*********** EC200G End ***********/
  278. #endif
  279. /************ End of GPIO Default Name ************/
  280. /************ Pin Default Name ************/
  281. /************ use Function0 Name ************///add pin number for each project
  282. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  283. /************* Pin Max **************/
  284. #define QUEC_PIN_CFG_MAX (55) /* multiple pins amount */
  285. #define QUEC_PIN_DNAME_GPIO_0 25
  286. #define QUEC_PIN_DNAME_GPIO_1 20
  287. #define QUEC_PIN_DNAME_GPIO_2 16
  288. #define QUEC_PIN_DNAME_GPIO_3 21
  289. #define QUEC_PIN_DNAME_GPIO_4 19
  290. #define QUEC_PIN_DNAME_GPIO_6 28
  291. #define QUEC_PIN_DNAME_GPIO_7 29
  292. #define QUEC_PIN_DNAME_KEYIN_4 84
  293. #define QUEC_PIN_DNAME_KEYOUT_4 85
  294. #define QUEC_PIN_DNAME_UART_1_RXD 17
  295. #define QUEC_PIN_DNAME_UART_1_TXD 18
  296. #define QUEC_PIN_DNAME_UART_1_CTS 23
  297. #define QUEC_PIN_DNAME_UART_1_RTS 22
  298. #define QUEC_PIN_DNAME_GPIO_16 68
  299. #define QUEC_PIN_DNAME_GPIO_17 69
  300. #define QUEC_PIN_DNAME_GPIO_18 101
  301. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 80
  302. #define QUEC_PIN_DNAME_GPIO_19 79
  303. #define QUEC_PIN_DNAME_I2S1_BCK 30
  304. #define QUEC_PIN_DNAME_I2S1_LRCK 31
  305. #define QUEC_PIN_DNAME_GPIO_20 100
  306. #define QUEC_PIN_DNAME_GPIO_21 108
  307. #define QUEC_PIN_DNAME_I2S_SDAT_I 32
  308. #define QUEC_PIN_DNAME_GPIO_22 109
  309. #define QUEC_PIN_DNAME_I2S1_SDAT_O 33
  310. #define QUEC_PIN_DNAME_GPIO_23 107
  311. #define QUEC_PIN_DNAME_KEYIN_0 82
  312. #define QUEC_PIN_DNAME_KEYIN_1 87
  313. #define QUEC_PIN_DNAME_SIM_1_CLK 62
  314. #define QUEC_PIN_DNAME_KEYIN_2 77
  315. #define QUEC_PIN_DNAME_SIM_1_DIO 64
  316. #define QUEC_PIN_DNAME_KEYIN_3 75
  317. #define QUEC_PIN_DNAME_UART_2_RXD 57
  318. #define QUEC_PIN_DNAME_SIM_1_RST 63
  319. #define QUEC_PIN_DNAME_KEYOUT_0 83
  320. #define QUEC_PIN_DNAME_UART_2_TXD 58
  321. #define QUEC_PIN_DNAME_UART_2_CTS 38
  322. #define QUEC_PIN_DNAME_KEYOUT_1 86
  323. #define QUEC_PIN_DNAME_UART_2_RTS 39
  324. #define QUEC_PIN_DNAME_KEYOUT_2 76
  325. #define QUEC_PIN_DNAME_SPI_LCD_SIO 50
  326. #define QUEC_PIN_DNAME_KEYOUT_3 74
  327. #define QUEC_PIN_DNAME_SPI_LCD_SDC 51
  328. #define QUEC_PIN_DNAME_SPI_LCD_CLK 53
  329. #define QUEC_PIN_DNAME_SPI_LCD_CS 52
  330. #define QUEC_PIN_DNAME_LCD_FMARK 78
  331. #define QUEC_PIN_DNAME_LCD_RSTB 49
  332. #define QUEC_PIN_DNAME_I2C_M2_SCL 67
  333. #define QUEC_PIN_DNAME_I2C_M2_SDA 66
  334. #define QUEC_PIN_DNAME_CAMERA_RST_L 103
  335. #define QUEC_PIN_DNAME_CAMERA_PWDN 81
  336. #define QUEC_PIN_DNAME_CAMERA_REF_CLK 54
  337. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_0 55
  338. //pinmux(not gpio part)
  339. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_1 56
  340. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 80
  341. /*************** Pin ****************/
  342. #define QUEC_PIN_UART2_RXD QUEC_PIN_NONE
  343. #define QUEC_PIN_UART2_TXD QUEC_PIN_NONE
  344. #define QUEC_PIN_UART3_RXD QUEC_PIN_DNAME_GPIO_6
  345. #define QUEC_PIN_UART3_TXD QUEC_PIN_DNAME_GPIO_7
  346. #define QUEC_PIN_UART6_RXD QUEC_GPIO_DNAME_KEYOUT_0
  347. #define QUEC_PIN_UART6_TXD QUEC_GPIO_DNAME_KEYOUT_1
  348. #define QUEC_PIN_SPI6_CLK_PIN QUEC_PIN_DNAME_GPIO_18
  349. #define QUEC_PIN_SPI6_CS_PIN QUEC_PIN_DNAME_GPIO_19
  350. #define QUEC_PIN_SPI6_SIO0_PIN QUEC_PIN_DNAME_GPIO_20
  351. #define QUEC_PIN_SPI6_SIO1_PIN QUEC_PIN_DNAME_GPIO_21
  352. #define QUEC_PIN_SPI6_SIO2_PIN QUEC_PIN_DNAME_GPIO_22
  353. #define QUEC_PIN_SPI6_SIO3_PIN QUEC_PIN_DNAME_GPIO_23
  354. /*********** EC800G End ***********/
  355. #elif defined CONFIG_QL_PROJECT_DEF_EC600G
  356. /************* Pin Max **************/
  357. #define QUEC_PIN_CFG_MAX (63) /* multiple pins amount */
  358. #define QUEC_PIN_DNAME_GPIO_0 52
  359. #define QUEC_PIN_DNAME_GPIO_1 53
  360. #define QUEC_PIN_DNAME_GPIO_2 54
  361. #define QUEC_PIN_DNAME_GPIO_3 51
  362. #define QUEC_PIN_DNAME_GPIO_6 9
  363. #define QUEC_PIN_DNAME_GPIO_7 116
  364. #define QUEC_PIN_DNAME_KEYIN_4 126
  365. #define QUEC_PIN_DNAME_KEYIN_5 125
  366. #define QUEC_PIN_DNAME_KEYOUT_4 104
  367. #define QUEC_PIN_DNAME_KEYOUT_5 103
  368. #define QUEC_PIN_DNAME_UART_1_RXD 31
  369. #define QUEC_PIN_DNAME_UART_1_TXD 32
  370. #define QUEC_PIN_DNAME_UART_1_CTS 34
  371. #define QUEC_PIN_DNAME_UART_1_RTS 33
  372. #define QUEC_PIN_DNAME_SDMMC1_CLK 132
  373. #define QUEC_PIN_DNAME_SDMMC1_CMD 48
  374. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 13
  375. #define QUEC_PIN_DNAME_SDMMC1_DATA_0 39
  376. #define QUEC_PIN_DNAME_I2S1_BCK 61
  377. #define QUEC_PIN_DNAME_SDMMC1_DATA_1 40
  378. #define QUEC_PIN_DNAME_I2S1_LRCK 58
  379. #define QUEC_PIN_DNAME_SDMMC1_DATA_2 49
  380. #define QUEC_PIN_DNAME_I2S_SDAT_I 59
  381. #define QUEC_PIN_DNAME_SDMMC1_DATA_3 50
  382. #define QUEC_PIN_DNAME_I2S1_SDAT_O 60
  383. #define QUEC_PIN_DNAME_SW_CLK 1
  384. #define QUEC_PIN_DNAME_SDMMC1_DATA_4 69
  385. #define QUEC_PIN_DNAME_SW_DIO 4
  386. #define QUEC_PIN_DNAME_SDMMC1_DATA_5 70
  387. #define QUEC_PIN_DNAME_DEBUG_HOST_RX 3
  388. #define QUEC_PIN_DNAME_DEBUG_HOST_TX 2
  389. #define QUEC_PIN_DNAME_KEYIN_0 55
  390. #define QUEC_PIN_DNAME_I2C_M1_SCL 11
  391. #define QUEC_PIN_DNAME_KEYIN_1 129
  392. #define QUEC_PIN_DNAME_I2C_M1_SDA 12
  393. #define QUEC_PIN_DNAME_SIM_1_CLK 147
  394. #define QUEC_PIN_DNAME_KEYIN_2 128
  395. #define QUEC_PIN_DNAME_SIM_1_DIO 146
  396. #define QUEC_PIN_DNAME_KEYIN_3 127
  397. #define QUEC_PIN_DNAME_UART_2_RXD 123
  398. #define QUEC_PIN_DNAME_SIM_1_RST 145
  399. #define QUEC_PIN_DNAME_KEYOUT_0 105
  400. #define QUEC_PIN_DNAME_UART_2_TXD 124
  401. #define QUEC_PIN_DNAME_UART_2_CTS 72
  402. #define QUEC_PIN_DNAME_KEYOUT_1 106
  403. #define QUEC_PIN_DNAME_UART_2_RTS 71
  404. #define QUEC_PIN_DNAME_KEYOUT_2 107
  405. #define QUEC_PIN_DNAME_SPI_LCD_SIO 66
  406. #define QUEC_PIN_DNAME_KEYOUT_3 108
  407. #define QUEC_PIN_DNAME_SPI_LCD_SDC 63
  408. #define QUEC_PIN_DNAME_SPI_LCD_CLK 67
  409. #define QUEC_PIN_DNAME_SPI_LCD_CS 65
  410. #define QUEC_PIN_DNAME_SPI_LCD_SELECT 137
  411. #define QUEC_PIN_DNAME_LCD_FMARK 62
  412. #define QUEC_PIN_DNAME_LCD_RSTB 64
  413. #define QUEC_PIN_DNAME_I2C_M2_SCL 57
  414. #define QUEC_PIN_DNAME_I2C_M2_SDA 56
  415. #define QUEC_PIN_DNAME_CAMERA_RST_L 120
  416. #define QUEC_PIN_DNAME_CAMERA_PWDN 16
  417. #define QUEC_PIN_DNAME_CAMERA_REF_CLK 10
  418. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_0 14
  419. //pinmux(not gpio part)
  420. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_1 15
  421. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 13
  422. /*************** Pin ****************/
  423. #define QUEC_PIN_UART2_RXD QUEC_PIN_DNAME_UART_2_RXD
  424. #define QUEC_PIN_UART2_TXD QUEC_PIN_DNAME_UART_2_TXD
  425. #define QUEC_PIN_UART3_RXD QUEC_PIN_NONE
  426. #define QUEC_PIN_UART3_TXD QUEC_PIN_NONE
  427. #define QUEC_PIN_UART6_RXD QUEC_GPIO_DNAME_KEYOUT_0
  428. #define QUEC_PIN_UART6_TXD QUEC_GPIO_DNAME_KEYOUT_1
  429. //这几个pin脚没有开放
  430. #define QUEC_PIN_SPI6_CLK_PIN QUEC_PIN_NONE
  431. #define QUEC_PIN_SPI6_CS_PIN QUEC_PIN_NONE
  432. #define QUEC_PIN_SPI6_SIO0_PIN QUEC_PIN_NONE
  433. #define QUEC_PIN_SPI6_SIO1_PIN QUEC_PIN_NONE
  434. #define QUEC_PIN_SPI6_SIO2_PIN QUEC_PIN_NONE
  435. #define QUEC_PIN_SPI6_SIO3_PIN QUEC_PIN_NONE
  436. /*********** EC600G End ***********/
  437. #elif defined CONFIG_QL_PROJECT_DEF_EG700G
  438. /************* Pin Max **************/
  439. #define QUEC_PIN_CFG_MAX (52) /* multiple pins amount */
  440. #define QUEC_PIN_DNAME_GPIO_0 17
  441. #define QUEC_PIN_DNAME_GPIO_1 16
  442. #define QUEC_PIN_DNAME_GPIO_2 19
  443. #define QUEC_PIN_DNAME_GPIO_3 18
  444. #define QUEC_PIN_DNAME_GPIO_4 55
  445. #define QUEC_PIN_DNAME_GPIO_5 45
  446. #define QUEC_PIN_DNAME_GPIO_6 64
  447. #define QUEC_PIN_DNAME_GPIO_7 63
  448. #define QUEC_PIN_DNAME_KEYIN_4 26
  449. #define QUEC_PIN_DNAME_KEYIN_5 22
  450. #define QUEC_PIN_DNAME_KEYOUT_4 24
  451. #define QUEC_PIN_DNAME_KEYOUT_5 23
  452. #define QUEC_PIN_DNAME_UART_1_RXD 92
  453. #define QUEC_PIN_DNAME_UART_1_TXD 91
  454. #define QUEC_PIN_DNAME_UART_1_CTS 1
  455. #define QUEC_PIN_DNAME_UART_1_RTS 90
  456. #define QUEC_PIN_DNAME_SDMMC1_CLK 61
  457. #define QUEC_PIN_DNAME_SDMMC1_CMD 21
  458. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 101
  459. #define QUEC_PIN_DNAME_GPIO_18 34
  460. #define QUEC_PIN_DNAME_SDMMC1_DATA_0 72
  461. #define QUEC_PIN_DNAME_GPIO_19 35
  462. #define QUEC_PIN_DNAME_SDMMC1_DATA_1 73
  463. #define QUEC_PIN_DNAME_GPIO_20 77
  464. #define QUEC_PIN_DNAME_SDMMC1_DATA_2 69
  465. #define QUEC_PIN_DNAME_GPIO_21 78
  466. #define QUEC_PIN_DNAME_SDMMC1_DATA_3 68
  467. #define QUEC_PIN_DNAME_GPIO_22 79
  468. #define QUEC_PIN_DNAME_GPIO_23 80
  469. #define QUEC_PIN_DNAME_KEYIN_0 27
  470. #define QUEC_PIN_DNAME_I2C_M1_SCL 28
  471. #define QUEC_PIN_DNAME_I2C_M1_SDA 29
  472. #define QUEC_PIN_DNAME_KEYOUT_0 25
  473. #define QUEC_PIN_DNAME_UART_2_TXD 20
  474. #define QUEC_PIN_DNAME_UART_2_CTS 95
  475. #define QUEC_PIN_DNAME_KEYOUT_1 46
  476. #define QUEC_PIN_DNAME_UART_2_RTS 94
  477. #define QUEC_PIN_DNAME_SPI_LCD_SIO 84
  478. #define QUEC_PIN_DNAME_SPI_LCD_SDC 85
  479. #define QUEC_PIN_DNAME_SPI_LCD_CLK 43
  480. #define QUEC_PIN_DNAME_SPI_LCD_CS 42
  481. #define QUEC_PIN_DNAME_SPI_LCD_SELECT 81
  482. #define QUEC_PIN_DNAME_LCD_FMARK 82
  483. #define QUEC_PIN_DNAME_LCD_RSTB 44
  484. #define QUEC_PIN_DNAME_I2C_M2_SCL 86
  485. #define QUEC_PIN_DNAME_I2C_M2_SDA 87
  486. #define QUEC_PIN_DNAME_CAMERA_RST_L 75
  487. #define QUEC_PIN_DNAME_CAMERA_PWDN 98
  488. #define QUEC_PIN_DNAME_CAMERA_REF_CLK 99
  489. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_0 76
  490. //pinmux(not gpio part)
  491. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_1 100
  492. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 101
  493. /*************** Pin ****************/
  494. #define QUEC_PIN_UART2_RXD QUEC_PIN_NONE
  495. #define QUEC_PIN_UART2_TXD QUEC_PIN_NONE
  496. #define QUEC_PIN_UART3_RXD QUEC_PIN_NONE
  497. #define QUEC_PIN_UART3_TXD QUEC_PIN_NONE
  498. #define QUEC_PIN_UART6_RXD QUEC_GPIO_DNAME_GPIO_6
  499. #define QUEC_PIN_UART6_TXD QUEC_GPIO_DNAME_GPIO_7
  500. #define QUEC_PIN_SPI6_CLK_PIN QUEC_PIN_DNAME_GPIO_18
  501. #define QUEC_PIN_SPI6_CS_PIN QUEC_PIN_DNAME_GPIO_19
  502. #define QUEC_PIN_SPI6_SIO0_PIN QUEC_PIN_DNAME_GPIO_20
  503. #define QUEC_PIN_SPI6_SIO1_PIN QUEC_PIN_DNAME_GPIO_21
  504. #define QUEC_PIN_SPI6_SIO2_PIN QUEC_PIN_DNAME_GPIO_22
  505. #define QUEC_PIN_SPI6_SIO3_PIN QUEC_PIN_DNAME_GPIO_23
  506. /*********** EG700G End ***********/
  507. #elif defined CONFIG_QL_PROJECT_DEF_EC200G
  508. /************* Pin Max **************/
  509. #define QUEC_PIN_CFG_MAX (71) /* multiple pins amount */
  510. #define QUEC_PIN_DNAME_GPIO_0 5
  511. #define QUEC_PIN_DNAME_GPIO_1 3
  512. #define QUEC_PIN_DNAME_GPIO_2 6
  513. #define QUEC_PIN_DNAME_GPIO_3 13
  514. #define QUEC_PIN_DNAME_KEYIN_4 137
  515. #define QUEC_PIN_DNAME_KEYIN_5 138
  516. #define QUEC_PIN_DNAME_KEYOUT_4 83
  517. #define QUEC_PIN_DNAME_KEYOUT_5 84
  518. #define QUEC_PIN_DNAME_UART_1_RXD 68
  519. #define QUEC_PIN_DNAME_UART_1_TXD 67
  520. #define QUEC_PIN_DNAME_UART_1_CTS 65
  521. #define QUEC_PIN_DNAME_UART_1_RTS 64
  522. #define QUEC_PIN_DNAME_SDMMC1_CLK 32
  523. #define QUEC_PIN_DNAME_SDMMC1_CMD 33
  524. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 23
  525. #define QUEC_PIN_DNAME_GPIO_18 133
  526. #define QUEC_PIN_DNAME_SDMMC1_DATA_0 31
  527. #define QUEC_PIN_DNAME_I2S1_BCK 27
  528. #define QUEC_PIN_DNAME_GPIO_19 134
  529. #define QUEC_PIN_DNAME_SDMMC1_DATA_1 30
  530. #define QUEC_PIN_DNAME_I2S1_LRCK 26
  531. #define QUEC_PIN_DNAME_GPIO_20 132
  532. #define QUEC_PIN_DNAME_SDMMC1_DATA_2 29
  533. #define QUEC_PIN_DNAME_GPIO_21 24
  534. #define QUEC_PIN_DNAME_I2S_SDAT_I 131
  535. #define QUEC_PIN_DNAME_SDMMC1_DATA_3 28
  536. #define QUEC_PIN_DNAME_GPIO_22 25
  537. #define QUEC_PIN_DNAME_I2S1_SDAT_O 130
  538. #define QUEC_PIN_DNAME_GPIO_23 129
  539. #define QUEC_PIN_DNAME_SW_CLK 40
  540. #define QUEC_PIN_DNAME_SDMMC1_DATA_4 135
  541. #define QUEC_PIN_DNAME_SW_DIO 37
  542. #define QUEC_PIN_DNAME_SDMMC1_DATA_5 127
  543. #define QUEC_PIN_DNAME_DEBUG_HOST_RX 38
  544. #define QUEC_PIN_DNAME_SDMMC1_DATA_6 136
  545. #define QUEC_PIN_DNAME_DEBUG_HOST_TX 39
  546. #define QUEC_PIN_DNAME_SDMMC1_DATA_7 139
  547. #define QUEC_PIN_DNAME_KEYIN_0 115
  548. #define QUEC_PIN_DNAME_I2C_M1_SCL 41
  549. #define QUEC_PIN_DNAME_KEYIN_1 78
  550. #define QUEC_PIN_DNAME_I2C_M1_SDA 42
  551. #define QUEC_PIN_DNAME_SIM_1_CLK 1
  552. #define QUEC_PIN_DNAME_KEYIN_2 79
  553. #define QUEC_PIN_DNAME_SIM_1_DIO 2
  554. #define QUEC_PIN_DNAME_KEYIN_3 80
  555. #define QUEC_PIN_DNAME_SIM_1_RST 4
  556. #define QUEC_PIN_DNAME_KEYOUT_0 81
  557. #define QUEC_PIN_DNAME_UART_2_TXD 126
  558. #define QUEC_PIN_DNAME_UART_2_CTS 11
  559. #define QUEC_PIN_DNAME_KEYOUT_1 82
  560. #define QUEC_PIN_DNAME_UART_2_RTS 12
  561. #define QUEC_PIN_DNAME_KEYOUT_2 113
  562. #define QUEC_PIN_DNAME_SPI_LCD_SIO 125
  563. #define QUEC_PIN_DNAME_KEYOUT_3 114
  564. #define QUEC_PIN_DNAME_SPI_LCD_SDC 124
  565. #define QUEC_PIN_DNAME_SPI_LCD_CLK 123
  566. #define QUEC_PIN_DNAME_SPI_LCD_CS 122
  567. #define QUEC_PIN_DNAME_SPI_LCD_SELECT 121
  568. #define QUEC_PIN_DNAME_LCD_FMARK 119
  569. #define QUEC_PIN_DNAME_LCD_RSTB 120
  570. #define QUEC_PIN_DNAME_I2C_M2_SCL 141
  571. #define QUEC_PIN_DNAME_I2C_M2_SDA 142
  572. #define QUEC_PIN_DNAME_CAMERA_RST_L 61
  573. #define QUEC_PIN_DNAME_CAMERA_PWDN 62
  574. #define QUEC_PIN_DNAME_CAMERA_REF_CLK 63
  575. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_0 66
  576. //pinmux(not gpio part)
  577. #define QUEC_PIN_DNAME_SPI_CAMERA_SI_1 55
  578. #define QUEC_PIN_DNAME_SPI_CAMERA_SCK 23
  579. #define QUEC_PIN_DNAME_UART_3_RXD 200
  580. #define QUEC_PIN_DNAME_UART_3_TXD 201
  581. /*************** Pin ****************/
  582. #define QUEC_PIN_UART2_RXD QUEC_PIN_NONE
  583. #define QUEC_PIN_UART2_TXD QUEC_PIN_NONE
  584. //URAT3 内部BT占用!!
  585. #define QUEC_PIN_UART3_RXD QUEC_PIN_DNAME_UART_3_RXD
  586. #define QUEC_PIN_UART3_TXD QUEC_PIN_DNAME_UART_3_TXD
  587. #define QUEC_PIN_UART6_RXD QUEC_PIN_NONE
  588. #define QUEC_PIN_UART6_TXD QUEC_PIN_NONE
  589. #define QUEC_PIN_UART5_RXD QUEC_GPIO_DNAME_KEYIN_4
  590. #define QUEC_PIN_UART5_TXD QUEC_GPIO_DNAME_KEYIN_5
  591. #define QUEC_PIN_SPI6_CLK_PIN QUEC_PIN_DNAME_GPIO_18
  592. #define QUEC_PIN_SPI6_CS_PIN QUEC_PIN_DNAME_GPIO_19
  593. #define QUEC_PIN_SPI6_SIO0_PIN QUEC_PIN_DNAME_GPIO_20
  594. #define QUEC_PIN_SPI6_SIO1_PIN QUEC_PIN_DNAME_GPIO_21
  595. #define QUEC_PIN_SPI6_SIO2_PIN QUEC_PIN_DNAME_GPIO_22
  596. #define QUEC_PIN_SPI6_SIO3_PIN QUEC_PIN_DNAME_GPIO_23
  597. /*********** EC200G End ***********/
  598. #endif
  599. /************ End of Pin Default Name ************/
  600. /************ Multiple Function Name ************/
  601. /************ use Quec Function Name ************///add location:name for applicaiton
  602. #define QUEC_PIN_LCD_SPI_SIO QUEC_PIN_DNAME_SPI_LCD_SIO
  603. #define QUEC_PIN_LCD_SPI_SDC QUEC_PIN_DNAME_SPI_LCD_SDC
  604. #define QUEC_PIN_LCD_SPI_CLK QUEC_PIN_DNAME_SPI_LCD_CLK
  605. #define QUEC_PIN_LCD_SPI_CS QUEC_PIN_DNAME_SPI_LCD_CS
  606. #define QUEC_PIN_LCD_SPI_SEL QUEC_PIN_NONE
  607. #define QUEC_PIN_LCD_FMARK QUEC_PIN_DNAME_LCD_FMARK
  608. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  609. #define QUEC_PIN_CAM_I2C_SCL QUEC_PIN_DNAME_UART_2_RXD
  610. #define QUEC_PIN_CAM_I2C_SDA QUEC_PIN_DNAME_UART_2_TXD
  611. #elif defined (CONFIG_QL_PROJECT_DEF_EC600G) || defined(CONFIG_QL_PROJECT_DEF_EG700G) || defined (CONFIG_QL_PROJECT_DEF_EC200G)
  612. #define QUEC_PIN_CAM_I2C_SCL QUEC_PIN_DNAME_I2C_M1_SCL
  613. #define QUEC_PIN_CAM_I2C_SDA QUEC_PIN_DNAME_I2C_M1_SDA
  614. #endif
  615. #define QUEC_PIN_CAM_RSTL QUEC_PIN_DNAME_CAMERA_RST_L
  616. #define QUEC_PIN_CAM_PWDN QUEC_PIN_DNAME_CAMERA_PWDN
  617. #define QUEC_PIN_CAM_REFCLK QUEC_PIN_DNAME_CAMERA_REF_CLK
  618. #define QUEC_PIN_CAM_SPI_DATA0 QUEC_PIN_DNAME_SPI_CAMERA_SI_0
  619. #define QUEC_PIN_CAM_SPI_DATA1 QUEC_PIN_DNAME_SPI_CAMERA_SI_1
  620. #define QUEC_PIN_CAM_SPI_SCK QUEC_PIN_DNAME_SPI_CAMERA_SCK
  621. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  622. #define QUEC_PIN_SPI1_CLK QUEC_PIN_NONE
  623. #define QUEC_PIN_SPI1_CS QUEC_PIN_NONE
  624. #define QUEC_PIN_SPI1_MOSI QUEC_PIN_NONE
  625. #define QUEC_PIN_SPI1_MISO QUEC_PIN_NONE
  626. #define QUEC_PIN_SPI1_FUNC 0x00
  627. /*
  628. #define QUEC_PIN_SPI2_CLK QUEC_PIN_DNAME_GPIO_0
  629. #define QUEC_PIN_SPI2_CS QUEC_PIN_DNAME_GPIO_1
  630. #define QUEC_PIN_SPI2_MOSI QUEC_PIN_DNAME_GPIO_2
  631. #define QUEC_PIN_SPI2_MISO QUEC_PIN_DNAME_GPIO_3
  632. #define QUEC_PIN_SPI2_FUNC 0x01
  633. */
  634. #define QUEC_PIN_SPI2_CLK QUEC_PIN_DNAME_GPIO_18
  635. #define QUEC_PIN_SPI2_CS QUEC_PIN_DNAME_GPIO_19
  636. #define QUEC_PIN_SPI2_MOSI QUEC_PIN_DNAME_GPIO_20
  637. #define QUEC_PIN_SPI2_MISO QUEC_PIN_DNAME_GPIO_21
  638. #define QUEC_PIN_SPI2_FUNC 0x02
  639. #elif (defined CONFIG_QL_PROJECT_DEF_EC600G)
  640. #define QUEC_PIN_SPI1_CLK QUEC_PIN_DNAME_SW_CLK
  641. #define QUEC_PIN_SPI1_CS QUEC_PIN_DNAME_SW_DIO
  642. #define QUEC_PIN_SPI1_MOSI QUEC_PIN_DNAME_DEBUG_HOST_RX
  643. #define QUEC_PIN_SPI1_MISO QUEC_PIN_DNAME_DEBUG_HOST_TX
  644. #define QUEC_PIN_SPI1_FUNC 0x03
  645. #define QUEC_PIN_SPI2_CLK QUEC_PIN_DNAME_GPIO_0
  646. #define QUEC_PIN_SPI2_CS QUEC_PIN_DNAME_GPIO_1
  647. #define QUEC_PIN_SPI2_MOSI QUEC_PIN_DNAME_GPIO_2
  648. #define QUEC_PIN_SPI2_MISO QUEC_PIN_DNAME_GPIO_3
  649. #define QUEC_PIN_SPI2_FUNC 0x01
  650. #elif (defined CONFIG_QL_PROJECT_DEF_EG700G)
  651. #define QUEC_PIN_SPI1_CLK QUEC_PIN_NONE
  652. #define QUEC_PIN_SPI1_CS QUEC_PIN_NONE
  653. #define QUEC_PIN_SPI1_MOSI QUEC_PIN_NONE
  654. #define QUEC_PIN_SPI1_MISO QUEC_PIN_NONE
  655. #define QUEC_PIN_SPI1_FUNC 0x00
  656. #define QUEC_PIN_SPI2_CLK QUEC_PIN_DNAME_GPIO_0
  657. #define QUEC_PIN_SPI2_CS QUEC_PIN_DNAME_GPIO_1
  658. #define QUEC_PIN_SPI2_MOSI QUEC_PIN_DNAME_GPIO_2
  659. #define QUEC_PIN_SPI2_MISO QUEC_PIN_DNAME_GPIO_3
  660. #define QUEC_PIN_SPI2_FUNC 0x01
  661. #elif (defined CONFIG_QL_PROJECT_DEF_EC200G)
  662. #define QUEC_PIN_SPI1_CLK QUEC_PIN_DNAME_SW_CLK
  663. #define QUEC_PIN_SPI1_CS QUEC_PIN_DNAME_SW_DIO
  664. #define QUEC_PIN_SPI1_MOSI QUEC_PIN_DNAME_DEBUG_HOST_RX
  665. #define QUEC_PIN_SPI1_MISO QUEC_PIN_DNAME_DEBUG_HOST_TX
  666. #define QUEC_PIN_SPI1_FUNC 0x03
  667. #define QUEC_PIN_SPI2_CLK QUEC_PIN_DNAME_GPIO_0
  668. #define QUEC_PIN_SPI2_CS QUEC_PIN_DNAME_GPIO_1
  669. #define QUEC_PIN_SPI2_MOSI QUEC_PIN_DNAME_GPIO_2
  670. #define QUEC_PIN_SPI2_MISO QUEC_PIN_DNAME_GPIO_3
  671. #define QUEC_PIN_SPI2_FUNC 0x01
  672. #endif
  673. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  674. //default cplog uart2 tx pin
  675. #define QUEC_CP_ZSP_UART_PORT0_PIN QUEC_PIN_DNAME_UART_1_CTS
  676. #define QUEC_CP_ZSP_UART_PORT0_PIN_FUNC 3
  677. //reserve cplog uart2 tx pin
  678. #define QUEC_CP_ZSP_UART_PORT1_PIN QUEC_PIN_DNAME_UART_2_TXD
  679. #define QUEC_CP_ZSP_UART_PORT1_PIN_FUNC 0
  680. #elif defined (CONFIG_QL_PROJECT_DEF_EC600G) || defined (CONFIG_QL_PROJECT_DEF_EG700G) || defined (CONFIG_QL_PROJECT_DEF_EC200G)
  681. //default cplog uart2 tx pin
  682. #define QUEC_CP_ZSP_UART_PORT0_PIN QUEC_PIN_DNAME_UART_2_TXD
  683. #define QUEC_CP_ZSP_UART_PORT0_PIN_FUNC 0
  684. //reserve cplog uart2 tx pin
  685. #define QUEC_CP_ZSP_UART_PORT1_PIN QUEC_PIN_DNAME_UART_1_CTS
  686. #define QUEC_CP_ZSP_UART_PORT1_PIN_FUNC 3
  687. #endif
  688. //KEYPAD PIN
  689. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  690. #define QUEC_PIN_KP_OUT0 QUEC_PIN_DNAME_KEYOUT_0
  691. #define QUEC_PIN_KP_OUT1 QUEC_PIN_DNAME_KEYOUT_1
  692. #define QUEC_PIN_KP_OUT2 QUEC_PIN_DNAME_KEYOUT_2
  693. #define QUEC_PIN_KP_OUT3 QUEC_PIN_DNAME_KEYOUT_3
  694. #define QUEC_PIN_KP_OUT4 QUEC_PIN_DNAME_KEYOUT_4
  695. #define QUEC_PIN_KP_OUT5 QUEC_PIN_NONE
  696. #define QUEC_PIN_KP_IN0 QUEC_PIN_DNAME_KEYIN_0
  697. #define QUEC_PIN_KP_IN1 QUEC_PIN_DNAME_KEYIN_1
  698. #define QUEC_PIN_KP_IN2 QUEC_PIN_DNAME_KEYIN_2
  699. #define QUEC_PIN_KP_IN3 QUEC_PIN_DNAME_KEYIN_3
  700. #define QUEC_PIN_KP_IN4 QUEC_PIN_DNAME_KEYIN_4
  701. #define QUEC_PIN_KP_IN5 QUEC_PIN_NONE
  702. #elif (defined CONFIG_QL_PROJECT_DEF_EC600G)
  703. #define QUEC_PIN_KP_OUT0 QUEC_PIN_DNAME_KEYOUT_0
  704. #define QUEC_PIN_KP_OUT1 QUEC_PIN_DNAME_KEYOUT_1
  705. #define QUEC_PIN_KP_OUT2 QUEC_PIN_DNAME_KEYOUT_2
  706. #define QUEC_PIN_KP_OUT3 QUEC_PIN_DNAME_KEYOUT_3
  707. #define QUEC_PIN_KP_OUT4 QUEC_PIN_DNAME_KEYOUT_4
  708. #define QUEC_PIN_KP_OUT5 QUEC_PIN_DNAME_KEYOUT_5
  709. #define QUEC_PIN_KP_IN0 QUEC_PIN_DNAME_KEYIN_0
  710. #define QUEC_PIN_KP_IN1 QUEC_PIN_DNAME_KEYIN_1
  711. #define QUEC_PIN_KP_IN2 QUEC_PIN_DNAME_KEYIN_2
  712. #define QUEC_PIN_KP_IN3 QUEC_PIN_DNAME_KEYIN_3
  713. #define QUEC_PIN_KP_IN4 QUEC_PIN_DNAME_KEYIN_4
  714. #define QUEC_PIN_KP_IN5 QUEC_PIN_DNAME_KEYIN_5
  715. #elif (defined CONFIG_QL_PROJECT_DEF_EG700G)
  716. #define QUEC_PIN_KP_OUT0 QUEC_PIN_DNAME_KEYOUT_0
  717. #define QUEC_PIN_KP_OUT1 QUEC_PIN_NONE
  718. #define QUEC_PIN_KP_OUT2 QUEC_PIN_NONE
  719. #define QUEC_PIN_KP_OUT3 QUEC_PIN_NONE
  720. #define QUEC_PIN_KP_OUT4 QUEC_PIN_DNAME_KEYOUT_4
  721. #define QUEC_PIN_KP_OUT5 QUEC_PIN_DNAME_KEYOUT_5
  722. #define QUEC_PIN_KP_IN0 QUEC_PIN_DNAME_KEYIN_0
  723. #define QUEC_PIN_KP_IN1 QUEC_PIN_NONE
  724. #define QUEC_PIN_KP_IN2 QUEC_PIN_NONE
  725. #define QUEC_PIN_KP_IN3 QUEC_PIN_NONE
  726. #define QUEC_PIN_KP_IN4 QUEC_PIN_DNAME_KEYIN_4
  727. #define QUEC_PIN_KP_IN5 QUEC_PIN_NONE
  728. #elif (defined CONFIG_QL_PROJECT_DEF_EC200G)
  729. #define QUEC_PIN_KP_OUT0 QUEC_PIN_DNAME_KEYOUT_0
  730. #define QUEC_PIN_KP_OUT1 QUEC_PIN_DNAME_KEYOUT_1
  731. #define QUEC_PIN_KP_OUT2 QUEC_PIN_DNAME_KEYOUT_2
  732. #define QUEC_PIN_KP_OUT3 QUEC_PIN_DNAME_KEYOUT_3
  733. #define QUEC_PIN_KP_OUT4 QUEC_PIN_DNAME_KEYOUT_4
  734. #define QUEC_PIN_KP_OUT5 QUEC_PIN_DNAME_KEYOUT_5
  735. #define QUEC_PIN_KP_IN0 QUEC_PIN_DNAME_KEYIN_0
  736. #define QUEC_PIN_KP_IN1 QUEC_PIN_DNAME_KEYIN_1
  737. #define QUEC_PIN_KP_IN2 QUEC_PIN_DNAME_KEYIN_2
  738. #define QUEC_PIN_KP_IN3 QUEC_PIN_DNAME_KEYIN_3
  739. #define QUEC_PIN_KP_IN4 QUEC_PIN_DNAME_KEYIN_4
  740. #define QUEC_PIN_KP_IN5 QUEC_PIN_DNAME_KEYIN_5
  741. #endif
  742. /************ for open ************/
  743. #ifdef CONFIG_QL_OPEN_EXPORT_PKG
  744. // open sdmmc detect pin :default QUEC_PIN_DNAME_I2C_M2_SDA:J20
  745. // customer can modify
  746. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  747. #define QUEC_PIN_SD_DET QUEC_PIN_NONE
  748. #define QUEC_PIN_SDMMC_CMD QUEC_PIN_NONE
  749. #define QUEC_PIN_SDMMC_DATA_0 QUEC_PIN_NONE
  750. #define QUEC_PIN_SDMMC_DATA_1 QUEC_PIN_NONE
  751. #define QUEC_PIN_SDMMC_DATA_2 QUEC_PIN_NONE
  752. #define QUEC_PIN_SDMMC_DATA_3 QUEC_PIN_NONE
  753. #define QUEC_PIN_SDMMC_CLK QUEC_PIN_NONE
  754. #elif (defined CONFIG_QL_PROJECT_DEF_EC600G) || (defined CONFIG_QL_PROJECT_DEF_EG700G)
  755. #define QUEC_PIN_SD_DET QUEC_PIN_DNAME_I2C_M2_SDA
  756. #define QUEC_PIN_SDMMC_CMD QUEC_PIN_DNAME_SDMMC1_CMD
  757. #define QUEC_PIN_SDMMC_DATA_0 QUEC_PIN_DNAME_SDMMC1_DATA_0
  758. #define QUEC_PIN_SDMMC_DATA_1 QUEC_PIN_DNAME_SDMMC1_DATA_1
  759. #define QUEC_PIN_SDMMC_DATA_2 QUEC_PIN_DNAME_SDMMC1_DATA_2
  760. #define QUEC_PIN_SDMMC_DATA_3 QUEC_PIN_DNAME_SDMMC1_DATA_3
  761. #define QUEC_PIN_SDMMC_CLK QUEC_PIN_DNAME_SDMMC1_CLK
  762. #elif (defined CONFIG_QL_PROJECT_DEF_EC200G)
  763. #define QUEC_PIN_SD_DET QUEC_PIN_DNAME_I2C_M2_SDA
  764. #define QUEC_PIN_SDMMC_CMD QUEC_PIN_DNAME_SDMMC1_CMD
  765. #define QUEC_PIN_SDMMC_DATA_0 QUEC_PIN_DNAME_SDMMC1_DATA_0
  766. #define QUEC_PIN_SDMMC_DATA_1 QUEC_PIN_DNAME_SDMMC1_DATA_1
  767. #define QUEC_PIN_SDMMC_DATA_2 QUEC_PIN_DNAME_SDMMC1_DATA_2
  768. #define QUEC_PIN_SDMMC_DATA_3 QUEC_PIN_DNAME_SDMMC1_DATA_3
  769. #define QUEC_PIN_SDMMC_CLK QUEC_PIN_DNAME_SDMMC1_CLK
  770. #endif
  771. #endif
  772. /************ for standard ************/
  773. #ifndef CONFIG_QL_OPEN_EXPORT_PKG
  774. #if defined(CONFIG_QL_PROJECT_DEF_EC800G) || defined(CONFIG_QL_PROJECT_DEF_EG800G)
  775. /*************** Pin ****************/
  776. #define QUEC_PIN_NET_STATUS QUEC_PIN_DNAME_GPIO_2 //for Standard:net status lamp
  777. #define QUEC_PIN_NET_STATUS_FUNC 0x05
  778. #define QUEC_PIN_SD_DET QUEC_PIN_NONE
  779. #define QUEC_PIN_MAIN_RI QUEC_PIN_DNAME_GPIO_1 //for Standard:advanced initialization
  780. #define QUEC_PIN_NET_MODE QUEC_PIN_NONE
  781. #define QUEC_PIN_SLEEP_IND QUEC_PIN_NONE
  782. #ifndef __QUEC_OEM_VER_HW__
  783. #define QUEC_PIN_WAKEUP_IN QUEC_PIN_NONE
  784. #define QUEC_PIN_AP_READY QUEC_PIN_NONE
  785. #else
  786. #define QUEC_PIN_WAKEUP_IN 86
  787. #define QUEC_PIN_AP_READY 20
  788. #endif
  789. #define QUEC_PIN_W_DISABLE QUEC_PIN_NONE
  790. /*************** GPIO ***************/
  791. #define QUEC_GPIO_SD_DET QUEC_PIN_NONE
  792. #define QUEC_GPIO_SLEEP_IND QUEC_PIN_NONE
  793. #ifndef __QUEC_OEM_VER_HW__
  794. #define QUEC_GPIO_WAKEUP_IN QUEC_PIN_NONE
  795. #define QUEC_GPIO_AP_READY QUEC_PIN_NONE
  796. #else
  797. #define QUEC_GPIO_WAKEUP_IN 33
  798. #define QUEC_GPIO_AP_READY 1
  799. #endif
  800. #define QUEC_GPIO_W_DISABLE QUEC_PIN_NONE
  801. #define QUEC_GPIO_NET_STATUS QUEC_GPIO_DNAME_GPIO_2
  802. #define QUEC_GPIO_NET_MODE QUEC_PIN_NONE
  803. #define QUEC_GPIO_MAIN_RI QUEC_GPIO_DNAME_GPIO_1
  804. #define QUEC_GPIO_MAIN_DTR QUEC_GPIO_DNAME_GPIO_4
  805. #define QUEC_GPIO_MAIN_DCD QUEC_GPIO_DNAME_GPIO_3
  806. /*********** EC800G End ***********/
  807. #elif (defined CONFIG_QL_PROJECT_DEF_EC600G)
  808. /*************** Pin ****************/
  809. #define QUEC_PIN_NET_STATUS QUEC_PIN_DNAME_GPIO_2 //for Standard:net status lamp
  810. #define QUEC_PIN_NET_STATUS_FUNC 0x05
  811. #define QUEC_PIN_SD_DET QUEC_PIN_DNAME_I2C_M2_SDA
  812. #define QUEC_PIN_MAIN_RI QUEC_PIN_DNAME_SDMMC1_DATA_1 //for Standard:advanced initialization
  813. #define QUEC_PIN_NET_MODE QUEC_PIN_DNAME_GPIO_0
  814. #define QUEC_PIN_SLEEP_IND QUEC_PIN_DNAME_GPIO_1
  815. #define QUEC_PIN_WAKEUP_IN QUEC_PIN_DNAME_SDMMC1_DATA_2
  816. #define QUEC_PIN_AP_READY QUEC_PIN_DNAME_SDMMC1_DATA_3
  817. #define QUEC_PIN_W_DISABLE QUEC_PIN_DNAME_GPIO_3
  818. /*************** GPIO ***************/
  819. #define QUEC_GPIO_SD_DET QUEC_GPIO_DNAME_I2C_M2_SDA
  820. #define QUEC_GPIO_SLEEP_IND QUEC_GPIO_DNAME_GPIO_1
  821. #define QUEC_GPIO_WAKEUP_IN QUEC_GPIO_DNAME_SDMMC1_DATA_2
  822. #define QUEC_GPIO_AP_READY QUEC_GPIO_DNAME_SDMMC1_DATA_3
  823. #define QUEC_GPIO_W_DISABLE QUEC_GPIO_DNAME_GPIO_3
  824. #define QUEC_GPIO_NET_STATUS QUEC_GPIO_DNAME_GPIO_2
  825. #define QUEC_GPIO_NET_MODE QUEC_GPIO_DNAME_GPIO_0
  826. #define QUEC_GPIO_MAIN_RI QUEC_GPIO_DNAME_SDMMC1_DATA_1
  827. #define QUEC_GPIO_MAIN_DTR QUEC_GPIO_DNAME_SDMMC1_DATA_0
  828. #define QUEC_GPIO_MAIN_DCD QUEC_GPIO_DNAME_SDMMC1_CMD
  829. /*********** EC600G End ***********/
  830. #elif (defined CONFIG_QL_PROJECT_DEF_EG700G)
  831. /*************** Pin ****************/
  832. #define QUEC_PIN_NET_STATUS QUEC_PIN_DNAME_GPIO_5 //for Standard:net status lamp
  833. #define QUEC_PIN_NET_STATUS_FUNC 0x01
  834. #define QUEC_PIN_SD_DET QUEC_PIN_DNAME_SPI_LCD_CS
  835. #define QUEC_PIN_MAIN_RI QUEC_PIN_DNAME_I2C_M2_SDA //for Standard:advanced initialization
  836. #define QUEC_PIN_NET_MODE QUEC_PIN_DNAME_SPI_LCD_SELECT
  837. #define QUEC_PIN_SLEEP_IND QUEC_PIN_DNAME_LCD_FMARK
  838. #define QUEC_PIN_WAKEUP_IN QUEC_PIN_DNAME_SPI_LCD_CLK
  839. #define QUEC_PIN_AP_READY QUEC_PIN_DNAME_SPI_LCD_CS
  840. #define QUEC_PIN_W_DISABLE QUEC_PIN_DNAME_SPI_LCD_SIO
  841. /*************** GPIO ***************/
  842. #define QUEC_GPIO_SD_DET QUEC_GPIO_DNAME_SPI_LCD_CS
  843. #define QUEC_GPIO_SLEEP_IND QUEC_GPIO_DNAME_LCD_FMARK
  844. #define QUEC_GPIO_WAKEUP_IN QUEC_GPIO_DNAME_SPI_LCD_CLK
  845. #define QUEC_GPIO_AP_READY QUEC_GPIO_DNAME_SPI_LCD_CS
  846. #define QUEC_GPIO_W_DISABLE QUEC_GPIO_DNAME_SPI_LCD_SIO
  847. #define QUEC_GPIO_NET_STATUS QUEC_GPIO_DNAME_GPIO_5
  848. #define QUEC_GPIO_NET_MODE QUEC_GPIO_DNAME_SPI_LCD_SELECT
  849. #define QUEC_GPIO_MAIN_RI QUEC_GPIO_DNAME_I2C_M2_SDA
  850. #define QUEC_GPIO_MAIN_DTR QUEC_GPIO_DNAME_GPIO_4
  851. #define QUEC_GPIO_MAIN_DCD QUEC_GPIO_DNAME_I2C_M2_SCL
  852. /*********** EG700G End ***********/
  853. #elif (defined CONFIG_QL_PROJECT_DEF_EC200G)
  854. /*************** Pin ****************/
  855. #define QUEC_PIN_NET_STATUS QUEC_PIN_DNAME_GPIO_2 //for Standard:net status lamp
  856. #define QUEC_PIN_NET_STATUS_FUNC 0x05
  857. #define QUEC_PIN_SD_DET QUEC_PIN_DNAME_SPI_CAMERA_SCK
  858. #define QUEC_PIN_MAIN_RI QUEC_PIN_DNAME_CAMERA_PWDN //for Standard:advanced initialization
  859. #define QUEC_PIN_NET_MODE QUEC_PIN_DNAME_GPIO_0
  860. #define QUEC_PIN_SLEEP_IND QUEC_PIN_DNAME_GPIO_1
  861. #define QUEC_PIN_WAKEUP_IN QUEC_PIN_DNAME_SIM_1_CLK
  862. #define QUEC_PIN_AP_READY QUEC_PIN_DNAME_SIM_1_DIO
  863. #define QUEC_PIN_W_DISABLE QUEC_PIN_DNAME_SIM_1_RST
  864. /*************** GPIO ***************/
  865. #define QUEC_GPIO_SD_DET QUEC_GPIO_DNAME_SPI_CAMERA_SCK
  866. #define QUEC_GPIO_SLEEP_IND QUEC_GPIO_DNAME_GPIO_1
  867. #define QUEC_GPIO_WAKEUP_IN QUEC_GPIO_DNAME_SIM_1_CLK
  868. #define QUEC_GPIO_AP_READY QUEC_GPIO_DNAME_SIM_1_DIO
  869. #define QUEC_GPIO_W_DISABLE QUEC_GPIO_DNAME_SIM_1_RST
  870. #define QUEC_GPIO_NET_STATUS QUEC_GPIO_DNAME_GPIO_2
  871. #define QUEC_GPIO_NET_MODE QUEC_GPIO_DNAME_GPIO_0
  872. #define QUEC_GPIO_MAIN_RI QUEC_GPIO_DNAME_CAMERA_PWDN
  873. #define QUEC_GPIO_MAIN_DTR QUEC_GPIO_DNAME_SPI_CAMERA_SI_0
  874. #define QUEC_GPIO_MAIN_DCD QUEC_GPIO_DNAME_CAMERA_REF_CLK
  875. /*********** EC200G End ***********/
  876. #endif
  877. #endif
  878. #ifdef __cplusplus
  879. } /*"C" */
  880. #endif
  881. #endif /* QUEC_PIN_INDEX_H */