am335x-fb.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2013-2018 Hannes Schmelzer <oe5hpm@oevsv.at> -
  4. * B&R Industrial Automation GmbH - http://www.br-automation.com
  5. */
  6. #ifndef AM335X_FB_H
  7. #define AM335X_FB_H
  8. #define HSVS_CONTROL (0x01 << 25) /*
  9. * 0 = lcd_lp and lcd_fp are driven on
  10. * opposite edges of pixel clock than
  11. * the lcd_pixel_o
  12. * 1 = lcd_lp and lcd_fp are driven
  13. * according to bit 24 Note that this
  14. * bit MUST be set to '0' for Passive
  15. * Matrix displays the edge timing is
  16. * fixed
  17. */
  18. #define HSVS_RISEFALL (0x01 << 24) /*
  19. * 0 = lcd_lp and lcd_fp are driven on
  20. * the rising edge of pixel clock (bit
  21. * 25 must be set to 1)
  22. * 1 = lcd_lp and lcd_fp are driven on
  23. * the falling edge of pixel clock (bit
  24. * 25 must be set to 1)
  25. */
  26. #define DE_INVERT (0x01 << 23) /*
  27. * 0 = DE is low-active
  28. * 1 = DE is high-active
  29. */
  30. #define PXCLK_INVERT (0x01 << 22) /*
  31. * 0 = pix-clk is high-active
  32. * 1 = pic-clk is low-active
  33. */
  34. #define HSYNC_INVERT (0x01 << 21) /*
  35. * 0 = HSYNC is active high
  36. * 1 = HSYNC is avtive low
  37. */
  38. #define VSYNC_INVERT (0x01 << 20) /*
  39. * 0 = VSYNC is active high
  40. * 1 = VSYNC is active low
  41. */
  42. struct am335x_lcdpanel {
  43. unsigned int hactive; /* Horizontal active area */
  44. unsigned int vactive; /* Vertical active area */
  45. unsigned int bpp; /* bits per pixel */
  46. unsigned int hfp; /* Horizontal front porch */
  47. unsigned int hbp; /* Horizontal back porch */
  48. unsigned int hsw; /* Horizontal Sync Pulse Width */
  49. unsigned int vfp; /* Vertical front porch */
  50. unsigned int vbp; /* Vertical back porch */
  51. unsigned int vsw; /* Vertical Sync Pulse Width */
  52. unsigned int pxl_clk; /* Pixel clock */
  53. unsigned int pol; /* polarity of sync, clock signals */
  54. unsigned int pup_delay; /*
  55. * time in ms after power on to
  56. * initialization of lcd-controller
  57. * (VCC ramp up time)
  58. */
  59. unsigned int pon_delay; /*
  60. * time in ms after initialization of
  61. * lcd-controller (pic stabilization)
  62. */
  63. void (*panel_power_ctrl)(int); /* fp for power on/off display */
  64. };
  65. int am335xfb_init(struct am335x_lcdpanel *panel);
  66. #endif /* AM335X_FB_H */