26#ifndef _ULTIBO_PL110_H
27#define _ULTIBO_PL110_H
36#define PL110_FRAMEBUFFER_DESCRIPTION "ARM PrimeCell PL110 Color LCD"
38#define PL110_MAX_PHYSICALWIDTH 1024
39#define PL110_MAX_PHYSICALHEIGHT 1024
42#define PL110_MODE_UNKNOWN 0
43#define PL110_MODE_VGA 1
44#define PL110_MODE_SVGA 2
45#define PL110_MODE_TFT 3
46#define PL110_MODE_STN 4
49#define PL110_CLCD_TIMING0 0x00000000
50#define PL110_CLCD_TIMING1 0x00000004
51#define PL110_CLCD_TIMING2 0x00000008
52#define PL110_CLCD_TIMING3 0x0000000c
53#define PL110_CLCD_UPBASE 0x00000010
54#define PL110_CLCD_LPBASE 0x00000014
55#define PL110_CLCD_CONTROL 0x00000018
56#define PL110_CLCD_IMSC 0x0000001c
57#define PL110_CLCD_RIS 0x00000020
58#define PL110_CLCD_MIS 0x00000024
59#define PL110_CLCD_ICR 0x00000028
60#define PL110_CLCD_UPCURR 0x0000002C
61#define PL110_CLCD_LPCURR 0x00000030
62#define PL110_CLCD_PALETTE 0x00000200
65#define PL110_CLCD_TIMING0_HBP (0xFF << 24)
66#define PL110_CLCD_TIMING0_HFP (0xFF << 16)
67#define PL110_CLCD_TIMING0_HSW (0xFF << 8)
68#define PL110_CLCD_TIMING0_PPL (0xFC << 2)
71#define PL110_CLCD_TIMING1_VBP (0xFF << 24)
72#define PL110_CLCD_TIMING1_VFP (0xFF << 16)
73#define PL110_CLCD_TIMING1_VSW (0xFC << 10)
74#define PL110_CLCD_TIMING1_LPP (0x3FF << 0)
77#define PL110_CLCD_TIMING2_PCD_HI (0x1F << 27)
78#define PL110_CLCD_TIMING2_BCD (1 << 26)
79#define PL110_CLCD_TIMING2_CPL (0x3FF << 16)
80#define PL110_CLCD_TIMING2_IOE (1 << 14)
81#define PL110_CLCD_TIMING2_IPC (1 << 13)
82#define PL110_CLCD_TIMING2_IHS (1 << 12)
83#define PL110_CLCD_TIMING2_IVS (1 << 11)
84#define PL110_CLCD_TIMING2_ACB (0x1F << 6)
85#define PL110_CLCD_TIMING2_CLKSEL (1 << 5)
86#define PL110_CLCD_TIMING2_PCD_LO (0x1F << 0)
89#define PL110_CLCD_TIMING3_LEE (1 << 16)
90#define PL110_CLCD_TIMING3_LED (0x3F << 0)
93#define PL110_CLCD_CONTROL_LCDEN (1 << 0)
94#define PL110_CLCD_CONTROL_LCDBPP1 (0 << 1)
95#define PL110_CLCD_CONTROL_LCDBPP2 (1 << 1)
96#define PL110_CLCD_CONTROL_LCDBPP4 (2 << 1)
97#define PL110_CLCD_CONTROL_LCDBPP8 (3 << 1)
98#define PL110_CLCD_CONTROL_LCDBPP16 (4 << 1)
99#define PL110_CLCD_CONTROL_LCDBPP16_565 (6 << 1)
100#define PL110_CLCD_CONTROL_LCDBPP16_444 (7 << 1)
101#define PL110_CLCD_CONTROL_LCDBPP24 (5 << 1)
102#define PL110_CLCD_CONTROL_LCDBW (1 << 4)
103#define PL110_CLCD_CONTROL_LCDTFT (1 << 5)
104#define PL110_CLCD_CONTROL_LCDMONO8 (1 << 6)
105#define PL110_CLCD_CONTROL_LCDDUAL (1 << 7)
106#define PL110_CLCD_CONTROL_BGR (1 << 8)
107#define PL110_CLCD_CONTROL_BEBO (1 << 9)
108#define PL110_CLCD_CONTROL_BEPO (1 << 10)
109#define PL110_CLCD_CONTROL_LCDPWR (1 << 11)
110#define PL110_CLCD_CONTROL_LCDVCOMP_VSYNC (0 << 12)
111#define PL110_CLCD_CONTROL_LCDVCOMP_BPORCH (1 << 12)
112#define PL110_CLCD_CONTROL_LCDVCOMP_VIDEO (2 << 12)
113#define PL110_CLCD_CONTROL_LCDVCOMP_FPORCH (3 << 12)
114#define PL110_CLCD_CONTROL_LDMAFIFOTIME (1 << 15)
115#define PL110_CLCD_CONTROL_WATERMARK (1 << 16)
118#define PL110_CONTROL_VGA PL110_CLCD_CONTROL_LCDTFT | PL110_CLCD_CONTROL_LCDVCOMP_BPORCH
119#define PL110_CONTROL_SVGA PL110_CLCD_CONTROL_LCDTFT | PL110_CLCD_CONTROL_LCDVCOMP_BPORCH
122#define PL110_TIMING0_VGA 0x3F1F3F9C
123#define PL110_TIMING0_SVGA 0x1313A4C4
126#define PL110_TIMING1_VGA 0x090B61DF
127#define PL110_TIMING1_SVGA 0x0505F657
130#define PL110_TIMING2_VGA 0x067F1800
131#define PL110_TIMING2_SVGA 0x071F1800
struct _FRAMEBUFFER_DEVICE FRAMEBUFFER_DEVICE
Definition framebuffer.h:112
#define STDCALL
Definition globaltypes.h:45
FRAMEBUFFER_DEVICE *STDCALL pl110_framebuffer_create_svga(size_t address, char *name, uint32_t rotation, uint32_t width, uint32_t height, uint32_t depth)
Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuf...
FRAMEBUFFER_DEVICE *STDCALL pl110_framebuffer_create_vga(size_t address, char *name, uint32_t rotation, uint32_t width, uint32_t height, uint32_t depth)
Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuf...
struct _PL110_FRAMEBUFFER PL110_FRAMEBUFFER
Definition pl110.h:155
struct _PL110_CLCD_REGISTERS PL110_CLCD_REGISTERS
Definition pl110.h:135
uint32_t STDCALL pl110_framebuffer_destroy(FRAMEBUFFER_DEVICE *framebuffer)
Release, deregister and destroy a PL110 Framebuffer device created by this driver.
uint32_t timing3
Line End Control Register.
Definition pl110.h:141
uint32_t upcurr
Upper Panel Current Address Value Registers.
Definition pl110.h:149
uint32_t ris
Raw Interrupt Status Register.
Definition pl110.h:146
uint32_t lpcurr
Lower Panel Current Address Value Registers.
Definition pl110.h:150
uint32_t timing1
Vertical Axis Panel Control Register.
Definition pl110.h:139
uint32_t imsc
Interrupt Mask Set/Clear Register.
Definition pl110.h:145
uint32_t lpbase
Lower Panel Frame Base Address Registers.
Definition pl110.h:143
uint32_t timing0
Horizontal Axis Panel Control Register.
Definition pl110.h:138
uint32_t icr
Interrupt Clear Register.
Definition pl110.h:148
uint32_t upbase
Upper Panel Frame Base Address Registers.
Definition pl110.h:142
uint32_t timing2
Clock and Signal Polarity Control Register.
Definition pl110.h:140
uint32_t control
Control Register.
Definition pl110.h:144
uint32_t mis
Masked Interrupt Status Register.
Definition pl110.h:147
uint32_t timing3
Preset Timing2 register value.
Definition pl110.h:171
uint32_t width
Framebuffer width in pixels.
Definition pl110.h:163
uint32_t timing1
Preset Timing1 register value.
Definition pl110.h:169
uint32_t height
Framebuffer height in pixels.
Definition pl110.h:164
uint32_t mode
PL110 framebuffer mode (eg PL110_MODE_TFT).
Definition pl110.h:161
uint32_t timing0
Preset Timing0 register value.
Definition pl110.h:168
FRAMEBUFFER_DEVICE framebuffer
Definition pl110.h:159
PL110_CLCD_REGISTERS * registers
PL110 registers.
Definition pl110.h:172
uint32_t rotation
Framebuffer rotation (eg FRAMEBUFFER_ROTATION_180).
Definition pl110.h:165
uint32_t timing2
Preset Timing2 register value.
Definition pl110.h:170
uint32_t depth
Framebuffer color depth (eg FRAMEBUFFER_DEPTH_16).
Definition pl110.h:162
uint32_t control
Preset Control register value.
Definition pl110.h:167