aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-pxa/pxafb.h26
-rw-r--r--include/asm-arm/arch-pxa/regs-lcd.h34
2 files changed, 56 insertions, 4 deletions
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h
index 41a6c2297f9f..bbd22396841a 100644
--- a/include/asm-arm/arch-pxa/pxafb.h
+++ b/include/asm-arm/arch-pxa/pxafb.h
@@ -48,6 +48,7 @@
48#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) 48#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
49#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) 49#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
50#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) 50#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
51#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
51#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL) 52#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
52#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL) 53#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
53 54
@@ -69,6 +70,10 @@ struct pxafb_mode_info {
69 u_short yres; 70 u_short yres;
70 71
71 u_char bpp; 72 u_char bpp;
73 u_int cmap_greyscale:1,
74 unused:31;
75
76 /* Parallel Mode Timing */
72 u_char hsync_len; 77 u_char hsync_len;
73 u_char left_margin; 78 u_char left_margin;
74 u_char right_margin; 79 u_char right_margin;
@@ -78,8 +83,20 @@ struct pxafb_mode_info {
78 u_char lower_margin; 83 u_char lower_margin;
79 u_char sync; 84 u_char sync;
80 85
81 u_int cmap_greyscale:1, 86 /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details
82 unused:31; 87 * Note:
88 * 1. all parameters in nanosecond (ns)
89 * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits
90 * in pxa27x and pxa3xx, initialize them to the same value or
91 * the larger one will be used
92 * 3. same to {rd,wr}_pulse_width
93 */
94 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
95 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
96 unsigned wr_pulse_width; /* L_PCLK_WR pulse width */
97 unsigned rd_pulse_width; /* L_FCLK_RD pulse width */
98 unsigned cmd_inh_time; /* Command Inhibit time between two writes */
99 unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */
83}; 100};
84 101
85struct pxafb_mach_info { 102struct pxafb_mach_info {
@@ -123,8 +140,11 @@ struct pxafb_mach_info {
123 u_int lccr4; 140 u_int lccr4;
124 void (*pxafb_backlight_power)(int); 141 void (*pxafb_backlight_power)(int);
125 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); 142 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
126 143 void (*smart_update)(struct fb_info *);
127}; 144};
128void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); 145void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
129void set_pxa_fb_parent(struct device *parent_dev); 146void set_pxa_fb_parent(struct device *parent_dev);
130unsigned long pxafb_get_hsync_time(struct device *dev); 147unsigned long pxafb_get_hsync_time(struct device *dev);
148
149extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
150extern int pxafb_smart_flush(struct fb_info *info);
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h
index f84dd47be28a..f762493f5141 100644
--- a/include/asm-arm/arch-pxa/regs-lcd.h
+++ b/include/asm-arm/arch-pxa/regs-lcd.h
@@ -7,7 +7,8 @@
7#define LCCR1 (0x004) /* LCD Controller Control Register 1 */ 7#define LCCR1 (0x004) /* LCD Controller Control Register 1 */
8#define LCCR2 (0x008) /* LCD Controller Control Register 2 */ 8#define LCCR2 (0x008) /* LCD Controller Control Register 2 */
9#define LCCR3 (0x00C) /* LCD Controller Control Register 3 */ 9#define LCCR3 (0x00C) /* LCD Controller Control Register 3 */
10#define LCCR4 (0x010) /* LCD Controller Control Register 3 */ 10#define LCCR4 (0x010) /* LCD Controller Control Register 4 */
11#define LCCR5 (0x014) /* LCD Controller Control Register 5 */
11#define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */ 12#define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */
12#define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */ 13#define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */
13#define LCSR (0x038) /* LCD Controller Status Register */ 14#define LCSR (0x038) /* LCD Controller Status Register */
@@ -15,6 +16,9 @@
15#define TMEDRGBR (0x040) /* TMED RGB Seed Register */ 16#define TMEDRGBR (0x040) /* TMED RGB Seed Register */
16#define TMEDCR (0x044) /* TMED Control Register */ 17#define TMEDCR (0x044) /* TMED Control Register */
17 18
19#define CMDCR (0x100) /* Command Control Register */
20#define PRSR (0x104) /* Panel Read Status Register */
21
18#define LCCR3_1BPP (0 << 24) 22#define LCCR3_1BPP (0 << 24)
19#define LCCR3_2BPP (1 << 24) 23#define LCCR3_2BPP (1 << 24)
20#define LCCR3_4BPP (2 << 24) 24#define LCCR3_4BPP (2 << 24)
@@ -39,6 +43,9 @@
39#define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */ 43#define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */
40#define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */ 44#define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */
41#define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */ 45#define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */
46#define FDADR6 (0x260) /* DMA Channel 6 Frame Descriptor Address Register */
47#define FSADR6 (0x264) /* DMA Channel 6 Frame Source Address Register */
48#define FIDR6 (0x268) /* DMA Channel 6 Frame ID Register */
42 49
43#define LCCR0_ENB (1 << 0) /* LCD Controller enable */ 50#define LCCR0_ENB (1 << 0) /* LCD Controller enable */
44#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */ 51#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */
@@ -122,6 +129,11 @@
122#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* VSP Active High */ 129#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* VSP Active High */
123#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* VSP Active Low */ 130#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* VSP Active Low */
124 131
132#define LCCR5_IUM(x) (1 << ((x) + 23)) /* input underrun mask */
133#define LCCR5_BSM(x) (1 << ((x) + 15)) /* branch mask */
134#define LCCR5_EOFM(x) (1 << ((x) + 7)) /* end of frame mask */
135#define LCCR5_SOFM(x) (1 << ((x) + 0)) /* start of frame mask */
136
125#define LCSR_LDD (1 << 0) /* LCD Disable Done */ 137#define LCSR_LDD (1 << 0) /* LCD Disable Done */
126#define LCSR_SOF (1 << 1) /* Start of frame */ 138#define LCSR_SOF (1 << 1) /* Start of frame */
127#define LCSR_BER (1 << 2) /* Bus error */ 139#define LCSR_BER (1 << 2) /* Bus error */
@@ -133,7 +145,27 @@
133#define LCSR_EOF (1 << 8) /* end of frame */ 145#define LCSR_EOF (1 << 8) /* end of frame */
134#define LCSR_BS (1 << 9) /* branch status */ 146#define LCSR_BS (1 << 9) /* branch status */
135#define LCSR_SINT (1 << 10) /* subsequent interrupt */ 147#define LCSR_SINT (1 << 10) /* subsequent interrupt */
148#define LCSR_RD_ST (1 << 11) /* read status */
149#define LCSR_CMD_INT (1 << 12) /* command interrupt */
136 150
137#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */ 151#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
138 152
153/* smartpanel related */
154#define PRSR_DATA(x) ((x) & 0xff) /* Panel Data */
155#define PRSR_A0 (1 << 8) /* Read Data Source */
156#define PRSR_ST_OK (1 << 9) /* Status OK */
157#define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
158
159#define SMART_CMD_A0 (0x1 << 8)
160#define SMART_CMD_READ_STATUS_REG (0x0 << 9)
161#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
162#define SMART_CMD_WRITE_COMMAND (0x1 << 9)
163#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
164#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
165#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
166#define SMART_CMD_NOOP (0x4 << 9)
167#define SMART_CMD_INTERRUPT (0x5 << 9)
168
169#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
170#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
139#endif /* __ASM_ARCH_REGS_LCD_H */ 171#endif /* __ASM_ARCH_REGS_LCD_H */