pin_config.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #ifndef __PIN_CONFIG_H__
  2. #define __PIN_CONFIG_H__
  3. #include "gpio_pin_define.h"
  4. #include "customize.h"
  5. /* LED */
  6. #define GPIO_LED_G_ON_PIN GPIO_NOT_USE
  7. #define GPIO_PWM_LED_G_ON_PIN GPIO_NOT_USE
  8. #define GPIO_LED_R_ON_PIN GPIO_27
  9. #define GPIO_PWM_LED_R_ON_PIN GPIO_NOT_USE
  10. #define LED_OnStatus 0x80 /* Power On LED status bit 7: 1/0 ==> GREEN LED H/L bit 6: 1/0 ==> RED LED H/L bit [3:0] ==> 0x2ee0000 >> (15-bit[3:0]) */
  11. #define LED_OffStatus 0x40 /* Power Off LED status */
  12. #define LED_DisableStatus 0x00 /* Disable LED status */
  13. /* Panel */
  14. #define GPIO_PANEL_ON_PIN GPIO_43
  15. #ifdef CONFIG_PANEL_BACKLIGHT_DIM_REF
  16. #define GPIO_BL_ON_PIN GPIO_NOT_USE //GPIO_30
  17. #define PNL_REF_PWM_NO 2
  18. #define PNL_PWM_NO 3
  19. #elif defined(CONFIG_PANEL_BL_ON_BL_ADJ_SWAP_FUNCTION)
  20. #define GPIO_BL_ON_PIN GPIO_35
  21. #define PNL_REF_PWM_NO GPIO_BL_ON_PIN
  22. #define PNL_PWM_NO 2
  23. #else
  24. #define GPIO_BL_ON_PIN GPIO_30
  25. #define PNL_REF_PWM_NO GPIO_BL_ON_PIN
  26. #define PNL_PWM_NO 3
  27. #endif
  28. #ifdef CONFIG_PANEL_SEQE_POWEROFF_ADJ_GPIO_MODE
  29. #define GPIO_ADJ_PWM_PIN GPIO_35
  30. #endif
  31. /* I2C */
  32. //#define GPIO_I2C_SDA_PIN GPIO_16
  33. //#define GPIO_I2C_SCL_PIN GPIO_17
  34. #define GPIO_I2C_SDA_PIN GPIO_4
  35. #define GPIO_I2C_SCL_PIN GPIO_3
  36. /* Audio */
  37. #define GPIO_12V_EN GPIO_NOT_USE
  38. #define GPIO_AUDIO_CTL GPIO_NOT_USE
  39. #define GPIO_AMP_MUTE_PIN GPIO_6
  40. #define GPIO_AMP_EN_PIN GPIO_NOT_USE
  41. #define GPIO_HP_DETECTION_PIN GPIO_NOT_USE
  42. #define GPIO_AMP_STB_PIN GPIO_NOT_USE
  43. /* HDMI HPD */
  44. #define GPIO_HDMI_5VDET_PIN_A GPIO_NOT_USE
  45. #define GPIO_HDMI_5VDET_PIN_B GPIO_NOT_USE
  46. #define GPIO_HDMI_5VDET_PIN_C GPIO_NOT_USE
  47. /* Tuner */
  48. #define GPIO_TUNER_RESET GPIO_NOT_USE
  49. #define GPIO_DEMOD_RESET GPIO_NOT_USE
  50. #ifdef CONFIG_SUPPORT_ARC
  51. #define GPIO_ARC_DET GPIO_1
  52. #else
  53. #define GPIO_ARC_DET GPIO_NOT_USE
  54. #endif
  55. /* Debug */
  56. #define GPIO_DEBUG_0 GPIO_NOT_USE
  57. #define GPIO_DEBUG_1 GPIO_NOT_USE
  58. #define GPIO_DEBUG_2 GPIO_NOT_USE
  59. #define GPIO_DEBUG_3 GPIO_NOT_USE
  60. #define GPIO_DEBUG_4 GPIO_NOT_USE
  61. #define GPIO_DEBUG_5 GPIO_NOT_USE
  62. #define GPIO_DVD_IR_OUT GPIO_NOT_USE
  63. /* Flash Protect */
  64. #define GPIO_SPIPROTECT_PIN GPIO_NOT_USE
  65. #define GPIO_AMBIGLOW_LED_PIN GPIO_NOT_USE
  66. /* DVD */
  67. #define GPIO_DVD_IROUT GPIO_NOT_USE
  68. #define GPIO_DVD_ON_OFF GPIO_NOT_USE
  69. #define GPIO_DVD_STB GPIO_NOT_USE
  70. #define GPIO_DVD_AUTO GPIO_NOT_USE
  71. /* SWITCH */
  72. #define GPIO_YPBPRDVD_SWTICH_PIN GPIO_NOT_USE
  73. /* HDMI SWITCH GPIO I2C */
  74. #define GPIO_HDMISWITCH_SCL_PIN GPIO_NOT_USE
  75. #define GPIO_HDMISWITCH_SDA_PIN GPIO_NOT_USE
  76. /* MHL CD_SENSE */
  77. #ifdef CONFIG_HDMI_SUPPORT_MHL
  78. #define GPIO_MHL_CD_SENSE GPIO_0
  79. #endif
  80. /*PANELSET*/
  81. #ifdef CONFIG_SUPPORT_SET_PANELSET_BY_BATTERY_AND_GPIO
  82. #define GPIO_PANELSET_CONTROL GPIO_1
  83. #endif
  84. #ifdef CONFIG_USBVCC_USE_GPIO
  85. #define GPIO_USBEN_PIN CONFIG_GPIO_USB5V
  86. #define GPIO_USBEN_LEVEL CONFIG_GPIO_USB5V_LEVEL
  87. #else
  88. #define GPIO_USBEN_PIN GPIO_NOT_USE
  89. #define GPIO_USBEN_LEVEL GPIO_LEVEL_LOW
  90. #endif
  91. #ifdef CONFIG_EXTIC_DIGITALAMP
  92. #define I2S_SD0_PIN I2S_SET1 // for DAMP
  93. #define I2S_WS_PIN I2S_SET1
  94. #define I2S_MCK_PIN I2S_SET1
  95. #define I2S_SCK_PIN I2S_SET1
  96. #elif (CONFIG_CHIPID != 0x330) // It will be implement at boot/loader0.c (void I2S_BUS_Select(void))
  97. #define I2S_SD0_PIN I2S_NOT_USE // I2S_SET1, I2S_SET2, I2S_SET3, I2S_NOT_USE
  98. #define I2S_WS_PIN I2S_NOT_USE
  99. #define I2S_MCK_PIN I2S_NOT_USE
  100. #define I2S_SCK_PIN I2S_NOT_USE
  101. #endif
  102. //KEY0 as GPIO
  103. #ifdef CONFIG_SKIP_AC_POWERKEY
  104. #define GPIO_KEY0_PIN GPIO_11
  105. #endif
  106. #endif