dev_leopard.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Copyright (c) 2020 Linaro Limited
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. #ifndef DEV_LEOPARD_H_
  6. #define DEV_LEOPARD_H_
  7. /*
  8. dma cfg
  9. */
  10. #define CONFIG_DMA_0_NAME "DMA_0"
  11. #define CONFIG_DMA_0_PCHAN_NUM 10
  12. #define CONFIG_DMA_0_VCHAN_NUM 10
  13. #define CONFIG_DMA_0_VCHAN_PCHAN_NUM 6
  14. #define CONFIG_DMA_0_VCHAN_PCHAN_START 4
  15. /*
  16. pwm cfg
  17. */
  18. #define CONFIG_PWM_CHANS 4
  19. /*
  20. DSP cfg
  21. */
  22. #define CONFIG_DSP_NAME "DSP"
  23. /*
  24. BTC cfg
  25. */
  26. #define CONFIG_BTC_NAME "BTC"
  27. /*
  28. * Audio cfg
  29. */
  30. #ifndef CONFIG_AUDIO_OUT_ACTS_DEV_NAME
  31. #define CONFIG_AUDIO_OUT_ACTS_DEV_NAME "audio_out"
  32. #endif
  33. #ifndef CONFIG_AUDIO_IN_ACTS_DEV_NAME
  34. #define CONFIG_AUDIO_IN_ACTS_DEV_NAME "audio_in"
  35. #endif
  36. /*
  37. * DSP cfg
  38. */
  39. #ifndef CONFIG_DSP_ACTS_DEV_NAME
  40. #define CONFIG_DSP_ACTS_DEV_NAME "dsp_acts"
  41. #endif
  42. /*
  43. PMUADC cfg
  44. */
  45. #define PMUADC_ID_CHARGI (0)
  46. #define PMUADC_ID_BATV (1)
  47. #define PMUADC_ID_DC5V (2)
  48. #define PMUADC_ID_SENSOR (3)
  49. #define PMUADC_ID_SVCC (4)
  50. #define PMUADC_ID_LRADC1 (5)
  51. #define PMUADC_ID_VCCI (6)
  52. #define PMUADC_ID_LRADC2 (7)
  53. #define PMUADC_ID_LRADC3 (8)
  54. #define PMUADC_ID_LRADC4 (9)
  55. #define PMUADC_ID_LRADC5 (10)
  56. #define PMUADC_ID_LRADC6 (11)
  57. /**
  58. * LCD panel cfg (sync drivers/display/display_controller.h and drivers/display.h)
  59. */
  60. /* Enumeration with possible display major port type */
  61. #define PANEL_PORT_Unknown (0)
  62. #define PANEL_PORT_MCU (1)
  63. #define PANEL_PORT_TR (2)
  64. #define PANEL_PORT_SPI (4)
  65. /* Enumeration with possible display mcu port type */
  66. #define PANEL_MCU_8080 (0) /* Intel 8080 */
  67. #define PANEL_MCU_6800 (1) /* Moto 6800 */
  68. /* Enumeration with possible display spi port type */
  69. #define PANEL_SPI_3LINE_1 (0)
  70. #define PANEL_SPI_3LINE_2 (1)
  71. #define PANEL_SPI_4LINE_1 (2)
  72. #define PANEL_SPI_4LINE_2 (3)
  73. #define PANEL_QSPI (4)
  74. #define PANEL_QSPI_SYNC (5)
  75. #define PANEL_QSPI_DDR_0 (6)
  76. #define PANEL_QSPI_DDR_1 (7)
  77. #define PANEL_QSPI_DDR_2 (8)
  78. /* Enumeration of full port type */
  79. #define PANEL_PORT_TYPE(major, minor) (((major) << 8) | (minor))
  80. #define PANEL_PORT_MCU_8080 PANEL_PORT_TYPE(PANEL_PORT_MCU, PANEL_MCU_8080)
  81. #define PANEL_PORT_MCU_6800 PANEL_PORT_TYPE(PANEL_PORT_MCU, PANEL_MCU_6800)
  82. #define PANEL_PORT_SPI_3LINE_1 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_SPI_3LINE_1)
  83. #define PANEL_PORT_SPI_3LINE_2 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_SPI_3LINE_2)
  84. #define PANEL_PORT_SPI_4LINE_1 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_SPI_4LINE_1)
  85. #define PANEL_PORT_SPI_4LINE_2 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_SPI_4LINE_2)
  86. #define PANEL_PORT_QSPI PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_QSPI)
  87. #define PANEL_PORT_QSPI_SYNC PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_QSPI_SYNC)
  88. #define PANEL_PORT_QSPI_DDR_0 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_QSPI_DDR_0)
  89. #define PANEL_PORT_QSPI_DDR_1 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_QSPI_DDR_1)
  90. #define PANEL_PORT_QSPI_DDR_2 PANEL_PORT_TYPE(PANEL_PORT_SPI, PANEL_QSPI_DDR_2)
  91. /* Enumeration with possible display TR port type */
  92. #define PANEL_PORT_TR_LCD PANEL_PORT_TYPE(PANEL_PORT_TR, 0)
  93. /* Display pixel format enumeration. */
  94. #define PANEL_PIXEL_FORMAT_RGB_888 (0x1 << 0)
  95. #define PANEL_PIXEL_FORMAT_ARGB_8888 (0x1 << 3)
  96. #define PANEL_PIXEL_FORMAT_RGB_565 (0x1 << 4)
  97. #define PANEL_PIXEL_FORMAT_BGR_565 (0x1 << 5)
  98. #define PANEL_PIXEL_FORMAT_BGR_888 (0x1 << 6)
  99. #define PANEL_PIXEL_FORMAT_XRGB_8888 (0x1 << 7)
  100. #endif /* DEV_LEOPARD_H_ */