pxa_lcd.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * pxa_lcd.h - PXA LCD Controller structures
  3. *
  4. * (C) Copyright 2001
  5. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef _PXA_LCD_H_
  10. #define _PXA_LCD_H_
  11. /*
  12. * PXA LCD DMA descriptor
  13. */
  14. struct pxafb_dma_descriptor {
  15. u_long fdadr; /* Frame descriptor address register */
  16. u_long fsadr; /* Frame source address register */
  17. u_long fidr; /* Frame ID register */
  18. u_long ldcmd; /* Command register */
  19. };
  20. /*
  21. * PXA LCD info
  22. */
  23. struct pxafb_info {
  24. /* Misc registers */
  25. u_long reg_lccr3;
  26. u_long reg_lccr2;
  27. u_long reg_lccr1;
  28. u_long reg_lccr0;
  29. u_long fdadr0;
  30. u_long fdadr1;
  31. /* DMA descriptors */
  32. struct pxafb_dma_descriptor *dmadesc_fblow;
  33. struct pxafb_dma_descriptor *dmadesc_fbhigh;
  34. struct pxafb_dma_descriptor *dmadesc_palette;
  35. u_long screen; /* physical address of frame buffer */
  36. u_long palette; /* physical address of palette memory */
  37. u_int palette_size;
  38. };
  39. /*
  40. * LCD controller stucture for PXA CPU
  41. */
  42. typedef struct vidinfo {
  43. ushort vl_col; /* Number of columns (i.e. 640) */
  44. ushort vl_row; /* Number of rows (i.e. 480) */
  45. ushort vl_rot; /* Rotation of Display (0, 1, 2, 3) */
  46. ushort vl_width; /* Width of display area in millimeters */
  47. ushort vl_height; /* Height of display area in millimeters */
  48. /* LCD configuration register */
  49. u_char vl_clkp; /* Clock polarity */
  50. u_char vl_oep; /* Output Enable polarity */
  51. u_char vl_hsp; /* Horizontal Sync polarity */
  52. u_char vl_vsp; /* Vertical Sync polarity */
  53. u_char vl_dp; /* Data polarity */
  54. u_char vl_bpix;/* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
  55. u_char vl_lbw; /* LCD Bus width, 0 = 4, 1 = 8 */
  56. u_char vl_splt;/* Split display, 0 = single-scan, 1 = dual-scan */
  57. u_char vl_clor; /* Color, 0 = mono, 1 = color */
  58. u_char vl_tft; /* 0 = passive, 1 = TFT */
  59. /* Horizontal control register. Timing from data sheet */
  60. ushort vl_hpw; /* Horz sync pulse width */
  61. u_char vl_blw; /* Wait before of line */
  62. u_char vl_elw; /* Wait end of line */
  63. /* Vertical control register. */
  64. u_char vl_vpw; /* Vertical sync pulse width */
  65. u_char vl_bfw; /* Wait before of frame */
  66. u_char vl_efw; /* Wait end of frame */
  67. /* PXA LCD controller params */
  68. struct pxafb_info pxa;
  69. } vidinfo_t;
  70. #endif