panel_st77916.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (c) 2020 Actions Technology Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef PANEL_ST77916_DRIVER_H__
  7. #define PANEL_ST77916_DRIVER_H__
  8. #define DDIC_CMD_NOP 0x00
  9. #define DDIC_CMD_SWRESET 0x01 /* Software Reset */
  10. #define DDIC_CMD_RDDID 0x04 /* Read Display ID */
  11. #define DDIC_CMD_RDNUMED 0x05 /* Read Number of Errors on DSI */
  12. #define DDIC_CMD_RDDPM 0x0A /* Read Display Power Mode */
  13. #define DDIC_CMD_RDDMADCTR 0x0B /* Read Display MADCTR */
  14. #define DDIC_CMD_RDDCOLMOD 0x0C /* Read Display Pixel Format */
  15. #define DDIC_CMD_RDDIM 0x0D /* Read Display Image Mode */
  16. #define DDIC_CMD_RDDSM 0x0E /* Read Display Signal Mode */
  17. #define DDIC_CMD_RDDSDR 0x0F /* Read Display Self-Diagnostic Result */
  18. #define DDIC_CMD_SLPIN 0x10 /* Sleep In */
  19. #define DDIC_CMD_SLPOUT 0x11 /* Sleep Out */
  20. #define DDIC_CMD_PTLON 0x12 /* Partial Display Mode On */
  21. #define DDIC_CMD_NORON 0x13 /* Normal Display Mode On */
  22. #define DDIC_CMD_INVOFF 0x20 /* Display Inversion Off */
  23. #define DDIC_CMD_INVON 0x21 /* Display Inversion On */
  24. #define DDIC_CMD_ALLPOFF 0x22 /* All Pixel Off */
  25. #define DDIC_CMD_ALLPON 0x23 /* All Pixel On */
  26. #define DDIC_CMD_DISPOFF 0x28 /* Display Off */
  27. #define DDIC_CMD_DISPON 0x29 /* Display On */
  28. #define DDIC_CMD_CASET 0x2A /* Set Column Start Address */
  29. #define DDIC_CMD_RASET 0x2B /* Set Row Start Address */
  30. #define DDIC_CMD_RAMWR 0x2C /* Memory Write */
  31. #define DDIC_CMD_PTLAR 0x30 /* Partial Area */
  32. #define DDIC_CMD_VPTLAR 0x31 /* Vertical Partial Area */
  33. #define DDIC_CMD_TEOFF 0x34 /* Tearing Effect Line OFF */
  34. #define DDIC_CMD_TEON 0x35 /* Tearing Effect Line ON */
  35. #define DDIC_CMD_MADCTR 0x36 /* Scan Direction Control */
  36. #define DDIC_CMD_IDMOFF 0x38 /* Idle Mode Off */
  37. #define DDIC_CMD_IDMON 0x39 /* Idle Mode On */
  38. #define DDIC_CMD_COLMOD 0x3A /* Interface Pixel Format */
  39. #define DDIC_CMD_RAMWRC 0x3C /* Memory Continuous Write */
  40. #define DDIC_CMD_STESL 0x44 /* Set Tear Scanline */
  41. #define DDIC_CMD_GSL 0x45 /* Get Scanline */
  42. #define DDIC_CMD_DSTBON 0x4F /* Deep Standby Mode On */
  43. #define DDIC_CMD_WRDISBV 0x51 /* Write Display Brightness */
  44. #define DDIC_CMD_RDDISBV 0x52 /* Read Display Brightness */
  45. #define DDIC_CMD_WRCTRLD 0x53 /* Write Display Control */
  46. #define DDIC_CMD_RDCTRLD 0x54 /* Read Display Control */
  47. #define DDIC_CMD_WRRADACL 0x55 /* RAD_ACL Control */
  48. #define DDIC_CMD_SCE 0x58 /* Set Color Enhance */
  49. #define DDIC_CMD_GCE 0x59 /* Read Color Enhance */
  50. #define DDIC_CMD_WRHBMDISBV 0x63 /* Write HBM Display Brightness */
  51. #define DDIC_CMD_RDHBMDISBV 0x64 /* Read HBM Display Brightness */
  52. #define DDIC_CMD_HBM 0x66 /* Set HBM Mode */
  53. #define DDIC_CMD_DEEPIDM 0x67 /* Set Deep Idle Mode */
  54. #define DDIC_CMD_COLSET 0x70 /* Interface Pixel Format Set */
  55. #define DDIC_CMD_COLOPT 0x80 /* Interface Pixel Format Option */
  56. #define DDIC_CMD_RDDDBS 0xA1 /* Read DDB Start */
  57. #define DDIC_CMD_RDDDBC 0xA8 /* Read DDB Continous */
  58. #define DDIC_CMD_RDFCS 0xAA /* Read First Checksum */
  59. #define DDIC_CMD_RDCCS 0xAF /* Read Continue Checksum */
  60. #define DDIC_CMD_SETDISPMOD 0xC2 /* Set DISP Mode */
  61. #define DDIC_CMD_SETDSPIMOD 0xC4 /* Set DSPI Mode */
  62. #define DDIC_CMD_RDID1 0xDA /* Read ID1 */
  63. #define DDIC_CMD_RDID2 0xDB /* Read ID2 */
  64. #define DDIC_CMD_RDID3 0xDC /* Read ID3 */
  65. #define DDIC_CMD_MAUCCTR 0xFE /* CMD Mode Switch */
  66. #define DDIC_CMD_RDMAUCCTR 0xFF /* Read CMD Status */
  67. #define ST77916_RD_CMD(cmd) ((0x33 << 24) | ((uint32_t)(cmd) << 8))
  68. #define ST77916_WR_CMD(cmd) ((0x32 << 24) | ((uint32_t)(cmd) << 8))
  69. #endif /* PANEL_ST77916_DRIVER_H__ */