regs-fb.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* arch/arm/mach-s5pc100/include/mach/regs-fb.h
  2. *
  3. * Copyright 2009 Samsung Electronics Co.
  4. * Pawel Osciak <p.osciak@samsung.com>
  5. *
  6. * Framebuffer register definitions for Samsung S5PC100.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __ASM_ARCH_REGS_FB_H
  13. #define __ASM_ARCH_REGS_FB_H __FILE__
  14. #include <plat/regs-fb-v4.h>
  15. /* VP1 interface timing control */
  16. #define VP1CON0 (0x118)
  17. #define VP1_RATECON_EN (1 << 31)
  18. #define VP1_CLKRATE_MASK (0xff)
  19. #define VP1CON1 (0x11c)
  20. #define VP1_VTREGCON_EN (1 << 31)
  21. #define VP1_VBPD_MASK (0xfff)
  22. #define VP1_VBPD_SHIFT (16)
  23. #define WPALCON_H (0x19c)
  24. #define WPALCON_L (0x1a0)
  25. /* Pallete contro for WPAL0 and WPAL1 is the same as in S3C64xx, but
  26. * different for WPAL2-4
  27. */
  28. /* In WPALCON_L (aka WPALCON) */
  29. #define WPALCON_W1PAL_32BPP_A888 (0x7 << 3)
  30. #define WPALCON_W0PAL_32BPP_A888 (0x7 << 0)
  31. /* To set W2PAL-W4PAL consist of one bit from WPALCON_L and two from WPALCON_H,
  32. * e.g. W2PAL[2..0] is made of (WPALCON_H[10..9], WPALCON_L[6]).
  33. */
  34. #define WPALCON_L_WxPAL_L_MASK (0x1)
  35. #define WPALCON_L_W2PAL_L_SHIFT (6)
  36. #define WPALCON_L_W3PAL_L_SHIFT (7)
  37. #define WPALCON_L_W4PAL_L_SHIFT (8)
  38. #define WPALCON_L_WxPAL_H_MASK (0x3)
  39. #define WPALCON_H_W2PAL_H_SHIFT (9)
  40. #define WPALCON_H_W3PAL_H_SHIFT (13)
  41. #define WPALCON_H_W4PAL_H_SHIFT (17)
  42. /* Per-window alpha value registers */
  43. /* For window 0 8-bit alpha values are in VIDW0ALPHAx,
  44. * for windows 1-4 alpha values consist of two parts, the 4 low bits are
  45. * taken from VIDWxALPHAx and 4 high bits are from VIDOSDxC,
  46. * e.g. WIN1_ALPHA0_B[7..0] = (VIDOSD1C[3..0], VIDW1ALPHA0[3..0])
  47. */
  48. #define VIDWxALPHA0(_win) (0x200 + (_win * 8))
  49. #define VIDWxALPHA1(_win) (0x204 + (_win * 8))
  50. /* Only for window 0 in VIDW0ALPHAx. */
  51. #define VIDW0ALPHAx_R(_x) ((_x) << 16)
  52. #define VIDW0ALPHAx_R_MASK (0xff << 16)
  53. #define VIDW0ALPHAx_R_SHIFT (16)
  54. #define VIDW0ALPHAx_G(_x) ((_x) << 8)
  55. #define VIDW0ALPHAx_G_MASK (0xff << 8)
  56. #define VIDW0ALPHAx_G_SHIFT (8)
  57. #define VIDW0ALPHAx_B(_x) ((_x) << 0)
  58. #define VIDW0ALPHAx_B_MASK (0xff << 0)
  59. #define VIDW0ALPHAx_B_SHIFT (0)
  60. /* Low 4 bits of alpha0-1 for windows 1-4 */
  61. #define VIDW14ALPHAx_R_L(_x) ((_x) << 16)
  62. #define VIDW14ALPHAx_R_L_MASK (0xf << 16)
  63. #define VIDW14ALPHAx_R_L_SHIFT (16)
  64. #define VIDW14ALPHAx_G_L(_x) ((_x) << 8)
  65. #define VIDW14ALPHAx_G_L_MASK (0xf << 8)
  66. #define VIDW14ALPHAx_G_L_SHIFT (8)
  67. #define VIDW14ALPHAx_B_L(_x) ((_x) << 0)
  68. #define VIDW14ALPHAx_B_L_MASK (0xf << 0)
  69. #define VIDW14ALPHAx_B_L_SHIFT (0)
  70. /* Per-window blending equation control registers */
  71. #define BLENDEQx(_win) (0x244 + ((_win) * 4))
  72. #define BLENDEQ1 (0x244)
  73. #define BLENDEQ2 (0x248)
  74. #define BLENDEQ3 (0x24c)
  75. #define BLENDEQ4 (0x250)
  76. #define BLENDEQx_Q_FUNC(_x) ((_x) << 18)
  77. #define BLENDEQx_Q_FUNC_MASK (0xf << 18)
  78. #define BLENDEQx_P_FUNC(_x) ((_x) << 12)
  79. #define BLENDEQx_P_FUNC_MASK (0xf << 12)
  80. #define BLENDEQx_B_FUNC(_x) ((_x) << 6)
  81. #define BLENDEQx_B_FUNC_MASK (0xf << 6)
  82. #define BLENDEQx_A_FUNC(_x) ((_x) << 0)
  83. #define BLENDEQx_A_FUNC_MASK (0xf << 0)
  84. #define BLENDCON (0x260)
  85. #define BLENDCON_8BIT_ALPHA (1 << 0)
  86. #endif /* __ASM_ARCH_REGS_FB_H */