0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef S1D13XXXFB_H
0014 #define S1D13XXXFB_H
0015
0016 #define S1D_PALETTE_SIZE 256
0017 #define S1D_FBID "S1D13xxx"
0018 #define S1D_DEVICENAME "s1d13xxxfb"
0019
0020
0021 #define S1D13505_PROD_ID 0x3
0022 #define S1D13506_PROD_ID 0x4
0023 #define S1D13806_PROD_ID 0x7
0024
0025
0026 #define S1DREG_REV_CODE 0x0000
0027 #define S1DREG_MISC 0x0001
0028 #define S1DREG_GPIO_CNF0 0x0004
0029 #define S1DREG_GPIO_CNF1 0x0005
0030 #define S1DREG_GPIO_CTL0 0x0008
0031 #define S1DREG_GPIO_CTL1 0x0009
0032 #define S1DREG_CNF_STATUS 0x000C
0033 #define S1DREG_CLK_CNF 0x0010
0034 #define S1DREG_LCD_CLK_CNF 0x0014
0035 #define S1DREG_CRT_CLK_CNF 0x0018
0036 #define S1DREG_MPLUG_CLK_CNF 0x001C
0037 #define S1DREG_CPU2MEM_WST_SEL 0x001E
0038 #define S1DREG_MEM_CNF 0x0020
0039 #define S1DREG_SDRAM_REF_RATE 0x0021
0040 #define S1DREG_SDRAM_TC0 0x002A
0041 #define S1DREG_SDRAM_TC1 0x002B
0042 #define S1DREG_PANEL_TYPE 0x0030
0043 #define S1DREG_MOD_RATE 0x0031
0044 #define S1DREG_LCD_DISP_HWIDTH 0x0032
0045 #define S1DREG_LCD_NDISP_HPER 0x0034
0046 #define S1DREG_TFT_FPLINE_START 0x0035
0047 #define S1DREG_TFT_FPLINE_PWIDTH 0x0036
0048 #define S1DREG_LCD_DISP_VHEIGHT0 0x0038
0049 #define S1DREG_LCD_DISP_VHEIGHT1 0x0039
0050 #define S1DREG_LCD_NDISP_VPER 0x003A
0051 #define S1DREG_TFT_FPFRAME_START 0x003B
0052 #define S1DREG_TFT_FPFRAME_PWIDTH 0x003C
0053 #define S1DREG_LCD_DISP_MODE 0x0040
0054 #define S1DREG_LCD_MISC 0x0041
0055 #define S1DREG_LCD_DISP_START0 0x0042
0056 #define S1DREG_LCD_DISP_START1 0x0043
0057 #define S1DREG_LCD_DISP_START2 0x0044
0058 #define S1DREG_LCD_MEM_OFF0 0x0046
0059 #define S1DREG_LCD_MEM_OFF1 0x0047
0060 #define S1DREG_LCD_PIX_PAN 0x0048
0061 #define S1DREG_LCD_DISP_FIFO_HTC 0x004A
0062 #define S1DREG_LCD_DISP_FIFO_LTC 0x004B
0063 #define S1DREG_CRT_DISP_HWIDTH 0x0050
0064 #define S1DREG_CRT_NDISP_HPER 0x0052
0065 #define S1DREG_CRT_HRTC_START 0x0053
0066 #define S1DREG_CRT_HRTC_PWIDTH 0x0054
0067 #define S1DREG_CRT_DISP_VHEIGHT0 0x0056
0068 #define S1DREG_CRT_DISP_VHEIGHT1 0x0057
0069 #define S1DREG_CRT_NDISP_VPER 0x0058
0070 #define S1DREG_CRT_VRTC_START 0x0059
0071 #define S1DREG_CRT_VRTC_PWIDTH 0x005A
0072 #define S1DREG_TV_OUT_CTL 0x005B
0073 #define S1DREG_CRT_DISP_MODE 0x0060
0074 #define S1DREG_CRT_DISP_START0 0x0062
0075 #define S1DREG_CRT_DISP_START1 0x0063
0076 #define S1DREG_CRT_DISP_START2 0x0064
0077 #define S1DREG_CRT_MEM_OFF0 0x0066
0078 #define S1DREG_CRT_MEM_OFF1 0x0067
0079 #define S1DREG_CRT_PIX_PAN 0x0068
0080 #define S1DREG_CRT_DISP_FIFO_HTC 0x006A
0081 #define S1DREG_CRT_DISP_FIFO_LTC 0x006B
0082 #define S1DREG_LCD_CUR_CTL 0x0070
0083 #define S1DREG_LCD_CUR_START 0x0071
0084 #define S1DREG_LCD_CUR_XPOS0 0x0072
0085 #define S1DREG_LCD_CUR_XPOS1 0x0073
0086 #define S1DREG_LCD_CUR_YPOS0 0x0074
0087 #define S1DREG_LCD_CUR_YPOS1 0x0075
0088 #define S1DREG_LCD_CUR_BCTL0 0x0076
0089 #define S1DREG_LCD_CUR_GCTL0 0x0077
0090 #define S1DREG_LCD_CUR_RCTL0 0x0078
0091 #define S1DREG_LCD_CUR_BCTL1 0x007A
0092 #define S1DREG_LCD_CUR_GCTL1 0x007B
0093 #define S1DREG_LCD_CUR_RCTL1 0x007C
0094 #define S1DREG_LCD_CUR_FIFO_HTC 0x007E
0095 #define S1DREG_CRT_CUR_CTL 0x0080
0096 #define S1DREG_CRT_CUR_START 0x0081
0097 #define S1DREG_CRT_CUR_XPOS0 0x0082
0098 #define S1DREG_CRT_CUR_XPOS1 0x0083
0099 #define S1DREG_CRT_CUR_YPOS0 0x0084
0100 #define S1DREG_CRT_CUR_YPOS1 0x0085
0101 #define S1DREG_CRT_CUR_BCTL0 0x0086
0102 #define S1DREG_CRT_CUR_GCTL0 0x0087
0103 #define S1DREG_CRT_CUR_RCTL0 0x0088
0104 #define S1DREG_CRT_CUR_BCTL1 0x008A
0105 #define S1DREG_CRT_CUR_GCTL1 0x008B
0106 #define S1DREG_CRT_CUR_RCTL1 0x008C
0107 #define S1DREG_CRT_CUR_FIFO_HTC 0x008E
0108 #define S1DREG_BBLT_CTL0 0x0100
0109 #define S1DREG_BBLT_CTL1 0x0101
0110 #define S1DREG_BBLT_CC_EXP 0x0102
0111 #define S1DREG_BBLT_OP 0x0103
0112 #define S1DREG_BBLT_SRC_START0 0x0104
0113 #define S1DREG_BBLT_SRC_START1 0x0105
0114 #define S1DREG_BBLT_SRC_START2 0x0106
0115 #define S1DREG_BBLT_DST_START0 0x0108
0116 #define S1DREG_BBLT_DST_START1 0x0109
0117 #define S1DREG_BBLT_DST_START2 0x010A
0118 #define S1DREG_BBLT_MEM_OFF0 0x010C
0119 #define S1DREG_BBLT_MEM_OFF1 0x010D
0120 #define S1DREG_BBLT_WIDTH0 0x0110
0121 #define S1DREG_BBLT_WIDTH1 0x0111
0122 #define S1DREG_BBLT_HEIGHT0 0x0112
0123 #define S1DREG_BBLT_HEIGHT1 0x0113
0124 #define S1DREG_BBLT_BGC0 0x0114
0125 #define S1DREG_BBLT_BGC1 0x0115
0126 #define S1DREG_BBLT_FGC0 0x0118
0127 #define S1DREG_BBLT_FGC1 0x0119
0128 #define S1DREG_LKUP_MODE 0x01E0
0129 #define S1DREG_LKUP_ADDR 0x01E2
0130 #define S1DREG_LKUP_DATA 0x01E4
0131 #define S1DREG_PS_CNF 0x01F0
0132 #define S1DREG_PS_STATUS 0x01F1
0133 #define S1DREG_CPU2MEM_WDOGT 0x01F4
0134 #define S1DREG_COM_DISP_MODE 0x01FC
0135
0136 #define S1DREG_DELAYOFF 0xFFFE
0137 #define S1DREG_DELAYON 0xFFFF
0138
0139 #define BBLT_SOLID_FILL 0x0c
0140
0141
0142
0143
0144
0145 struct s1d13xxxfb_regval {
0146 u16 addr;
0147 u8 value;
0148 };
0149
0150 struct s1d13xxxfb_par {
0151 void __iomem *regs;
0152 unsigned char display;
0153 unsigned char prod_id;
0154 unsigned char revision;
0155
0156 unsigned int pseudo_palette[16];
0157 #ifdef CONFIG_PM
0158 void *regs_save;
0159 void *disp_save;
0160 #endif
0161 };
0162
0163 struct s1d13xxxfb_pdata {
0164 const struct s1d13xxxfb_regval *initregs;
0165 const unsigned int initregssize;
0166 void (*platform_init_video)(void);
0167 #ifdef CONFIG_PM
0168 int (*platform_suspend_video)(void);
0169 int (*platform_resume_video)(void);
0170 #endif
0171 };
0172
0173 #endif
0174