pxa_lcd.h 2.2 KB

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