quec_pin_cfg_EC600G.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*================================================================
  2. Copyright (c) 2021, Quectel Wireless Solutions Co., Ltd. All rights reserved.
  3. Quectel Wireless Solutions Proprietary and Confidential.
  4. =================================================================*/
  5. /*=================================================================
  6. EDIT HISTORY FOR MODULE
  7. This section contains comments describing changes made to the module.
  8. Notice that changes are listed in reverse chronological order.
  9. WHEN WHO WHAT, WHERE, WHY
  10. ------------ ------- -------------------------------------------------------------------------------
  11. =================================================================*/
  12. /*===========================================================================
  13. * include files
  14. ===========================================================================*/
  15. #include "quec_pin_cfg.h"
  16. #include "hwregs.h"
  17. /*===========================================================================
  18. * GPIO Map
  19. ===========================================================================*/
  20. #ifdef CONFIG_QL_OPEN_EXPORT_PKG /* Open */
  21. const quec_pin_cfg_t quec_pin_cfg_map[] = /* pin initialize */
  22. { /* pin_num default_func gpio_func gpio_num gpio_dir gpio_pull gpio_lvl reg anareg drv_bits*/
  23. /*NET_MODE */{ 52 , 0, 0, GPIO_0, GPIO_OUTPUT, QUEC_PIN_NONE, LVL_LOW, &hwp_iomux->gpio_0, &hwp_iomux->pad_gpio_0, 4},
  24. /*SLEEP_IND */{ 53 , 0, 0, GPIO_1, GPIO_OUTPUT, QUEC_PIN_NONE, LVL_LOW, &hwp_iomux->gpio_1, &hwp_iomux->pad_gpio_1, 4},
  25. /*NET_STATUS */{ 54 , 5, 0, GPIO_2, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->gpio_2, &hwp_iomux->pad_gpio_2, 4},//pwm function
  26. /*W_DISABLE# */{ 51 , 0, 0, GPIO_3, GPIO_INPUT, PULL_DOWN, QUEC_PIN_NONE, &hwp_iomux->gpio_3, &hwp_iomux->pad_gpio_3, 4},
  27. /*USIM1_DET */{ 9 , 0, 0, GPIO_6, GPIO_INPUT, PULL_DOWN, QUEC_PIN_NONE, &hwp_iomux->gpio_6, &hwp_iomux->pad_gpio_6, 4},
  28. /*PSM_EXT_INT */{ 116, 0, 0, GPIO_7, GPIO_INPUT, PULL_DOWN, QUEC_PIN_NONE, &hwp_iomux->gpio_7, &hwp_iomux->pad_gpio_7, 4},
  29. /*KEYIN4 */{ 126, 0, 1, GPIO_8, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_4, &hwp_iomux->pad_keyin_4, 4},
  30. /*KEYIN5 */{ 125, 0, 1, GPIO_9, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_5, &hwp_iomux->pad_keyin_5, 4},
  31. /*KEYOUT4 */{ 104, 0, 1, GPIO_10, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_4, &hwp_iomux->pad_keyout_4, 4},
  32. /*KEYOUT5 */{ 103, 0, 1, GPIO_11, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_5, &hwp_iomux->pad_keyout_5, 4},
  33. /*MAIN_RXD */{ 31 , 0, 1, GPIO_12, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_1_rxd, &hwp_iomux->pad_uart_1_rxd, 4},
  34. /*MAIN_TXD */{ 32 , 0, 1, GPIO_13, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_1_txd, &hwp_iomux->pad_uart_1_txd, 4},
  35. /*MAIN_RTS */{ 34 , 0, 1, GPIO_14, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_1_cts, &hwp_iomux->pad_uart_1_cts, 4},
  36. /*MAIN_CTS */{ 33 , 0, 4, GPIO_15, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_1_rts, &hwp_iomux->pad_uart_1_rts, 4},
  37. /*SDIO1_CLK */{ 132, 0, 1, GPIO_16, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_clk, &hwp_iomux->pad_sdmmc1_clk, 4},
  38. /*MAIN_DCD */{ 48 , 1, 1, GPIO_17, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_cmd, &hwp_iomux->pad_sdmmc1_cmd, 4},
  39. /*MAIN_DTR */{ 39 , 1, 1, GPIO_18, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_0, &hwp_iomux->pad_sdmmc1_data_0, 4},
  40. /*CAM_SPI_CLK */{ 13 , 0, 2, GPIO_18, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_camera_sck, &hwp_iomux->pad_spi_camera_sck, 2},
  41. /*MAIN_RI */{ 40 , 1, 1, GPIO_19, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_1, &hwp_iomux->pad_sdmmc1_data_1, 4},
  42. /*PCM_CLK */{ 61 , 0, 2, GPIO_19, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2s1_bck, &hwp_iomux->pad_i2s1_bck, 2},
  43. /*PCM_SYNC */{ 58 , 0, 2, GPIO_20, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2s1_lrck, &hwp_iomux->pad_i2s1_lrck, 2},
  44. /*WAKEUP_IN */{ 49 , 1, 1, GPIO_20, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_2, &hwp_iomux->pad_sdmmc1_data_2, 4},
  45. /*AP_READY */{ 50 , 1, 1, GPIO_21, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_3, &hwp_iomux->pad_sdmmc1_data_3, 4},
  46. /*PCM_DIN */{ 59 , 0, 2, GPIO_21, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2s_sdat_i, &hwp_iomux->pad_i2s_sdat_i, 2},
  47. /*PCM_DOUT */{ 60 , 0, 2, GPIO_22, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2s1_sdat_o, &hwp_iomux->pad_i2s1_sdat_o, 2},
  48. /*SPI_CLK */{ 1 , 3, 1, GPIO_24, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sw_clk, &hwp_iomux->pad_sw_clk, 2},
  49. /*GPIO1 */{ 69 , 1, 1, GPIO_24, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_4, &hwp_iomux->pad_sdmmc1_data_4, 4},
  50. /*SPI_CS */{ 4 , 3, 1, GPIO_25, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sw_dio, &hwp_iomux->pad_sw_dio, 2},
  51. /*GPIO2 */{ 70 , 1, 1, GPIO_25, GPIO_INPUT, PULL_UP, QUEC_PIN_NONE, &hwp_iomux->sdmmc1_data_5, &hwp_iomux->pad_sdmmc1_data_5, 4},
  52. /*SPI_TXD */{ 3 , 3, 1, GPIO_26, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->debug_host_rx, &hwp_iomux->pad_debug_host_rx, 2},
  53. /*SPI_RXD */{ 2 , 3, 1, GPIO_27, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->debug_host_tx, &hwp_iomux->pad_debug_host_tx, 2},
  54. /*CAM_I2C_SCL */{ 11 , 0, 1, GPIO_29, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2c_m1_scl, &hwp_iomux->pad_i2c_m1_scl, 2},
  55. /*CAM_I2C_SDA */{ 12 , 0, 1, GPIO_30, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2c_m1_sda, &hwp_iomux->pad_i2c_m1_sda, 2},
  56. /*USIM2_CLK */{ 147, 0, 1, GPIO_30, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sim_1_clk, &hwp_iomux->pad_sim_1_clk, 4},
  57. /*USIM2_DATA */{ 146, 0, 1, GPIO_31, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sim_1_dio, &hwp_iomux->pad_sim_1_dio, 4},
  58. /*USIM2_RST */{ 145, 0, 1, GPIO_32, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->sim_1_rst, &hwp_iomux->pad_sim_1_rst, 4},
  59. /*UART2_RXD */{ 123, 0, 3, GPIO_31, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_2_rxd, &hwp_iomux->pad_uart_2_rxd, 2},
  60. /*KEYIN3 */{ 127, 0, 1, GPIO_31, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_3, &hwp_iomux->pad_keyin_3, 4},
  61. /*UART2_TXD */{ 124, 0, 3, GPIO_32, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_2_txd, &hwp_iomux->pad_uart_2_txd, 2},
  62. /*KEYOUT0 */{ 105, 0, 1, GPIO_32, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_0, &hwp_iomux->pad_keyout_0, 4},
  63. /*DBG_RXD */{ 72 , 4, 1, GPIO_33, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_2_cts, &hwp_iomux->pad_uart_2_cts, 2},
  64. /*KEYOUT1 */{ 106, 0, 1, GPIO_33, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_1, &hwp_iomux->pad_keyout_1, 4},
  65. /*DBG_TXD */{ 71 , 4, 1, GPIO_34, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->uart_2_rts, &hwp_iomux->pad_uart_2_rts, 2},
  66. /*KEYOUT2 */{ 107, 0, 1, GPIO_34, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_2, &hwp_iomux->pad_keyout_2, 4},
  67. /*LCD_SPI_DOUT */{ 66 , 0, 2, GPIO_35, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_lcd_sio, &hwp_iomux->pad_spi_lcd_sio, 4},
  68. /*KEYOUT3 */{ 108, 0, 1, GPIO_35, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyout_3, &hwp_iomux->pad_keyout_3, 4},
  69. /*LCD_SPI_RS */{ 63 , 0, 2, GPIO_36, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_lcd_sdc, &hwp_iomux->pad_spi_lcd_sdc, 4},
  70. /*LCD_SPI_CLK */{ 67 , 0, 2, GPIO_37, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_lcd_clk, &hwp_iomux->pad_spi_lcd_clk, 4},
  71. /*LCD_SPI_CS */{ 65 , 0, 2, GPIO_38, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_lcd_cs, &hwp_iomux->pad_spi_lcd_cs, 4},
  72. /*LCD_SEL */{ 137, 0, 2, GPIO_39, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_lcd_select, &hwp_iomux->pad_spi_lcd_select, 4},
  73. /*LCD_TE */{ 62 , 0, 2, GPIO_40, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->lcd_fmark, &hwp_iomux->pad_lcd_fmark, 4},
  74. /*LCD_RST */{ 64 , 0, 2, GPIO_41, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->lcd_rstb, &hwp_iomux->pad_lcd_rstb, 4},
  75. /*I2C_SCL */{ 57 , 0, 2, GPIO_42, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2c_m2_scl, &hwp_iomux->pad_i2c_m2_scl, 2},
  76. /*I2C_SDA */{ 56 , 0, 2, GPIO_43, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->i2c_m2_sda, &hwp_iomux->pad_i2c_m2_sda, 2},
  77. /*CAM__RST */{ 120, 0, 3, GPIO_44, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->camera_rst_l, &hwp_iomux->pad_camera_rst_l, 2},
  78. /*CAM_PWDN */{ 16 , 0, 3, GPIO_45, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->camera_pwdn, &hwp_iomux->pad_camera_pwdn, 2},
  79. /*CAM_MCLK */{ 10 , 0, 2, GPIO_46, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->camera_ref_clk, &hwp_iomux->pad_camera_ref_clk, 2},
  80. /*CAM_SPI_DATA0*/{ 14 , 0, 3, GPIO_47, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_camera_si_0, &hwp_iomux->pad_spi_camera_si_0, 2},
  81. //pinmux(not gpio part)
  82. /*USB_BOOT */{ 55 , 0, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_0, &hwp_iomux->pad_keyin_0, 0},
  83. /*CAM_SPI_DATA1*/{ 15 , 0, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->spi_camera_si_1, &hwp_iomux->pad_spi_camera_si_1, 0},
  84. /*KEYIN1 */{ 129, 0, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_1, &hwp_iomux->pad_keyin_1, 0},
  85. /*KEYIN2 */{ 128, 0, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, QUEC_PIN_NONE, &hwp_iomux->keyin_2, &hwp_iomux->pad_keyin_2, 0},
  86. // should before here!
  87. {QUEC_PIN_NONE,-1, -1, -1, -1, -1, -1},
  88. };
  89. #ifdef CONFIG_QUEC_PROJECT_FEATURE_PSM
  90. const quec_psm_pin_cfg_t quec_psm_pin_cfg[] =
  91. {
  92. {GPIO_0, LVL_HIGH, 0},
  93. {GPIO_1, LVL_HIGH, 0},
  94. {GPIO_2, LVL_HIGH, 0},
  95. {GPIO_3, LVL_HIGH, 0},
  96. {GPIO_4, LVL_HIGH, 0},
  97. {GPIO_5, LVL_HIGH, 0},
  98. {GPIO_6, LVL_HIGH, 0},
  99. {GPIO_7, LVL_HIGH, 0},
  100. {GPIO_MAX,LVL_HIGH, 0},
  101. };
  102. #endif
  103. #endif/* CONFIG_QL_OPEN_EXPORT_PKG */