panel_ft2308.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2020 Actions Technology Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef PANEL_FT2308_DRIVER_H__
  7. #define PANEL_FT2308_DRIVER_H__
  8. #define DDIC_CMD_NOP 0x00 /* No Operation */
  9. #define DDIC_CMD_SWRESET 0x01 /* Software Reset */
  10. #define DDIC_CMD_RDNUMED 0x05 /* Read Number of Errors on DSI */
  11. #define DDIC_CMD_RDDPM 0x0A /* Read Display Power Mode */
  12. #define DDIC_CMD_RDDCOLMOD 0x0C /* Read Display Pixel Format */
  13. #define DDIC_CMD_RDDIM 0x0D /* Read Display Image Mode */
  14. #define DDIC_CMD_RDDSM 0x0E /* Read Display Signal Mode */
  15. #define DDIC_CMD_RDDSDR 0x0F /* Read Display Self-Diagnostic Result */
  16. #define DDIC_CMD_SLPIN 0x10 /* Sleep In */
  17. #define DDIC_CMD_SLPOUT 0x11 /* Sleep Out */
  18. #define DDIC_CMD_PTLON 0x12 /* Partial Display Mode On */
  19. #define DDIC_CMD_NORON 0x13 /* Normal Display Mode On */
  20. #define DDIC_CMD_RAMZIP_SET 0x1C /* RAM Compression Setting */
  21. #define DDIC_CMD_GAMSET 0x26 /* Gamma Set */
  22. #define DDIC_CMD_DISPOFF 0x28 /* Display Off */
  23. #define DDIC_CMD_DISPON 0x29 /* Display On */
  24. #define DDIC_CMD_CASET 0x2A /* Column Address Set */
  25. #define DDIC_CMD_PASET 0x2B /* Page Address Set */
  26. #define DDIC_CMD_RAMWR 0x2C /* Memory Write Start */
  27. #define DDIC_CMD_RAMRD 0x2E /* Memory Read */
  28. #define DDIC_CMD_PTLAR 0x30 /* Partial Area Set */
  29. #define DDIC_CMD_VPTLAR 0x31 /* Vertical Partial Area Set */
  30. #define DDIC_CMD_TEOFF 0x34 /* Tearing Effect Line OFF */
  31. #define DDIC_CMD_TEON 0x35 /* Tearing Effect Line ON */
  32. #define DDIC_CMD_MADCTL 0x36 /* Memory Data Access Control */
  33. #define DDIC_CMD_IDMOFF 0x38 /* Idle Mode Off */
  34. #define DDIC_CMD_IDMON 0x39 /* Idle Mode On */
  35. #define DDIC_CMD_COLMOD 0x3A /* Control Interface Pixel Format */
  36. #define DDIC_CMD_RAMWRCNT 0x3C /* Memory Write Continue */
  37. #define DDIC_CMD_RAMRDCNT 0x3E /* Memory Read Continue */
  38. #define DDIC_CMD_WRDISBV 0x51 /* Write Display Brightness Value */
  39. #define DDIC_CMD_RDDISBV 0x52 /* Read Display Brightness Value */
  40. #define DDIC_CMD_WRCTRLD 0x53 /* Write CTRL Display */
  41. #define DDIC_CMD_RDCTRLD 0x54 /* Read CTRL Display */
  42. #define DDIC_CMD_WRACL 0x55 /* Auto Current Limit Control */
  43. #define DDIC_CMD_RDACL 0x56 /* Read Auto Current Limit */
  44. #define DDIC_CMD_FR_MANUAL 0x67 /* Frame Rate Control for Manual Mode */
  45. #define DDIC_CMD_FR_AUTO 0x68 /* Frame Rate Control for Auto Mode */
  46. #define DDIC_CMD_FR_LPF 0x69 /* Low Power Frame Setting */
  47. #define DDIC_CMD_FCC_WA 0x94 /* Focal CleverColor - White Balance Adjustment */
  48. #define DDIC_CMD_FCC_AOD_CLK 0x95 /* Focal CleverColor - AOD Clock */
  49. #define DDIC_CMD_FCC_CGM 0x96 /* Focal CleverColor - CGM */
  50. #define DDIC_CMD_RDDDBSTR 0xA1 /* Read DDB Start */
  51. #define DDIC_CMD_RDDDBCNT 0xA8 /* Read DDB Continue */
  52. #define DDIC_CMD_RESDEF 0xAC /* Read ESD Event Flag */
  53. #define DDIC_CMD_RDID1 0xDA /* Read ID1 */
  54. #define DDIC_CMD_RDID2 0xDB /* Read ID2 */
  55. #define DDIC_CMD_RDID3 0xDC /* Read ID3 */
  56. #define DDIC_QSPI_CMD_RD(cmd) ((0x03 << 24) | ((uint32_t)(cmd) << 8))
  57. #define DDIC_QSPI_CMD_WR(cmd) ((0x02 << 24) | ((uint32_t)(cmd)))
  58. #define DDIC_QSPI_CMD_RAMWR(cmd) ((0x32 << 24) | ((uint32_t)(cmd) << 8))
  59. #endif /* PANEL_FT2308_DRIVER_H__ */