#define ITE8181_CONF_OFFSET ((8192 -1) * 1024)
#define ITE8181_ID 0x00
#define ITE8181_DATA_ID 0x81811283
#define ITE8181_PRODUCT_ID 0x8181
#define ITE8181_VENDER_ID 0x1283
#define ITE8181_SCMD 0x04
#define ITE8181_CLASS 0x08
#define ITE8181_DATA_CLASS 0x03800000
#define ITE8181_CLASS_MASK 0xffff0000
#define ITE8181_REV_MASK 0x000000ff
#define ITE8181_MBA 0x10
#define ITE8181_GBA 0x14
#define ITE8181_SBA 0x18
#define ITE8181_TEST 0x40
#define ITE8181_STANDBY 0x44
#define ITE8181_DATA_PLL2_TEST 0xc0000
#define ITE8181_DATA_PLL1_TEST 0x30000
#define ITE8181_DATA_PLL2_RESET 0x8000
#define ITE8181_DATA_PLL1_RESET 0x4000
#define ITE8181_DATA_PLL2_PWDOWN 0x2000
#define ITE8181_DATA_PLL1_PWDOWN 0x1000
#define ITE8181_DATA_PALETTESTBY 0x0200
#define ITE8181_DATA_CURSORSTBY 0x0100
#define ITE8181_DATA_BITBLTSTBY 0x0080
#define ITE8181_DATA_LINESTBY 0x0040
#define ITE8181_DATA_DACCLKSTOP 0x0020
#define ITE8181_DATA_DACPOWERON 0x0010
#define ITE8181_DATA_GATEPLL2IN 0x0008
#define ITE8181_DATA_GATEPLL1IN 0x0004
#define ITE8181_DATA_CLOCKSTOP 0x0001
#define ITE8181_PLL1 0x48
#define ITE8181_PLL2 0x4c
#define ITE8181_GUI_BSLE 0x00
#define ITE8181_GUI_BDLS 0x04
#define ITE8181_GUI_BPOA 0x08
#define ITE8181_GUI_BWH 0x0c
#define ITE8181_GUI_BSO 0x10
#define ITE8181_GUI_FCR 0x14
#define ITE8181_GUI_BCR 0x18
#define ITE8181_GUI_BC 0x1c
#define ITE8181_GUI_BS 0x20
#define ITE8181_GUI_ASDS 0x24
#define ITE8181_GUI_LET 0x28
#define ITE8181_GUI_LST 0x2c
#define ITE8181_GUI_LSB 0x30
#define ITE8181_GUI_LSR 0x34
#define ITE8181_GUI_SSVS 0x38
#define ITE8181_GUI_MR 0x4c
#define ITE8181_GUI_PIO 0x40000
#define ITE8181_GUI_C1C 0x100
#define ITE8181_GUI_C1O 0x101
#define ITE8181_GUI_C1F 0x102
#define ITE8181_GUI_C1SAH 0x103
#define ITE8181_GUI_C1SAL 0x108
#define ITE8181_GUI_C1LPX 0x109
#define ITE8181_GUI_C1LPY 0x10a
#define ITE8181_GUI_CC0R0 0x110
#define ITE8181_GUI_CC0R1 0x111
#define ITE8181_GUI_CC0R2 0x112
#define ITE8181_GUI_CC0R3 0x113
#define ITE8181_GUI_CC1R0 0x114
#define ITE8181_GUI_CC1R1 0x115
#define ITE8181_GUI_CC1R2 0x116
#define ITE8181_GUI_CC1R3 0x117
#define ITE8181_GUI_CC2R0 0x118
#define ITE8181_GUI_CC2R1 0x119
#define ITE8181_GUI_CC2R2 0x11a
#define ITE8181_GUI_CC2R3 0x11b
#define ITE8181_GUI_C1XC0 0x120
#define ITE8181_GUI_C1XC1 0x121
#define ITE8181_GUI_C1YC0 0x122
#define ITE8181_GUI_C1YC1 0x123
#define ITE8181_EMA_EXAX 0x03d6
#define ITE8181_EMA_EXADATA 0x03d7
#define ITE8181_EMA_ENABLEEMA 0x0b
#define ITE8181_EMA_ENABLEPASS 0xec
#define ITE8181_EMA_DISABLEPASS 0xce
#define ITE8181_EMA_ENABLED 0x01
#define ITE8181_EMA_HSIZE 0x80
#define ITE8181_EMA_HALIGN 0x81
#define ITE8181_EMA_HRETRACE 0x82
#define ITE8181_EMA_HADJUST 0x83
#define ITE8181_EMA_HSYNCDELAY 0x84
#define ITE8181_EMA_VSIZE 0x85
#define ITE8181_EMA_VSYNC_DELAY 0x86
#define ITE8181_EMA_OVERFLOW 0x87
#define ITE8181_EMA_MODULATION 0x88
#define ITE8181_EMA_EXTMODE 0x89
#define ITE8181_EMA_VALIGNA 0x8a
#define ITE8181_EMA_VALIGNB 0x8b
#define ITE8181_EMA_VALIGNC 0x8c
#define ITE8181_EMA_VRETRACE 0x8d
#define ITE8181_EMA_VOVERFLOW 0x8e
#define ITE8181_EMA_TYPE 0x90
#define ITE8181_EMA_CONTROL 0x91
#define ITE8181_EMA_PINSEL 0x92
#define ITE8181_EMA_MISCCTL 0x93
#define ITE8181_EMA_LCDPOWER 0x98
#define ITE8181_LCDSTANDBY 0x20
#define ITE8181_EMA_LCDPOWERSEQ 0x9a
#define ITE8181_PUP2 0x80
#define ITE8181_PUP1 0x40
#define ITE8181_PUP0 0x20
#define ITE8181_PDP2 0x10
#define ITE8181_PDP1 0x08
#define ITE8181_PDP0 0x04
#define ITE8181_EMA_LCDPOWERSTAT 0x9b
#define ITE8181_PPTOBEMASK 0x01
#define ITE8181_PPTOBEON 0x01
#define ITE8181_PPTOBEOFF 0x00
#define ITE8181_LCDPON 0x08
#define ITE8181_LCDPSTANDBY 0x20
#define ITE8181_LCDPDOWN 0x40
#define ITE8181_LCDPUP 0x80
#define ITE8181_EMA_DITHERCTRL1 0xa0
#define ITE8181_DITHER_CMASK 0xa0
#define ITE8181_DITHER_DISABLE 0x00
#define ITE8181_DITHER_SOMEMODE 0x40
#define ITE8181_DITHER_ENABLE 0x80
#define ITE8181_DITHER_BCMASK 0x38
#define ITE8181_DITHER_BC1BIT 0x00
#define ITE8181_DITHER_BC2BIT 0x08
#define ITE8181_DITHER_BC3BIT 0x10
#define ITE8181_DITHER_BC4BIT 0x18
#define ITE8181_DITHER_BC5BIT 0x20
#define ITE8181_DITHER_BC6BIT 0x28
#define ITE8181_DITHER_BC7BIT 0x30
#define ITE8181_DITHER_BC8BIT 0x38
#define ITE8181_DITHER_BSMASK 0x03
#define ITE8181_DITHER_BS6BIT 0x00
#define ITE8181_DITHER_BS5BIT 0x01
#define ITE8181_DITHER_BS4BIT 0x02
#define ITE8181_DITHER_BS3BIT 0x03
#define ITE8181_DITHER_BS2BIT 0x04
#define ITE8181_DITHER_BS1BIT 0x05
#define ITE8181_DITHER_BS0BIT 0x06
#define ITE8181_EMA_DITHERCTRL2 0xa1
#define ITE8181_FMS_MASK 0x40
#define ITE8181_FMS_2 0x00
#define ITE8181_FMS_1 0x40
#define ITE8181_GRC_MASK 0x20
#define ITE8181_GRC_NOGREVERSE 0x00
#define ITE8181_GRC_GREVERSE 0x20
#define ITE8181_TRC_MASK 0x10
#define ITE8181_TRC_NOTREVERSE 0x00
#define ITE8181_TRC_TREVERSE 0x10
#define ITE8181_CM_MASK 0x01
#define ITE8181_CM_NTSC 0x00
#define ITE8181_CM_GREEN 0x01
#define ITE8181_EMA_FRCCOL 0xa2
#define ITE8181_FRCCOL_MASK 0x80
#define ITE8181_FRCCOL_8 0x80
#define ITE8181_FRCCOL_16 0x00
#define ITE8181_EMA_FRCPAT 0xa3
#define ITE8181_FRCPAT_PROGRAM 0x80
#define ITE8181_FRCPAT_CONSTANT 0x00
#define ITE8181_EMA_FBADDR1 0xa8
#define ITE8181_EMA_FBADDR2 0xa9
#define ITE8181_EMA_FBADDR3 0xaa
#define ITE8181_EMA_REDBCOLOR 0xaa
#define ITE8181_EMA_GREENBCOLOR 0xab
#define ITE8181_EMA_BLUEBCOLOR 0xac
#define ITE8181_EMA_DISPERSION1 0xb0
#define ITE8181_EMA_DISPERSION2 0xb8
#define ITE8181_EMA_FRCPAT0 0xc0
#define ITE8181_EMA_FRCPAT1 0xc2
#define ITE8181_EMA_FRCPAT2 0xc4
#define ITE8181_EMA_FRCPAT3 0xc6
#define ITE8181_EMA_FRCPAT4 0xc8
#define ITE8181_EMA_FRCPAT5 0xca
#define ITE8181_EMA_FRCPAT6 0xcc
#define ITE8181_EMA_FRCPAT7 0xce
#define ITE8181_EMA_FRCPAT8 0xd0
#define ITE8181_EMA_FRCPAT9 0xd2
#define ITE8181_EMA_FRCPAT10 0xd4
#define ITE8181_EMA_FRCPAT11 0xd6
#define ITE8181_EMA_FRCPAT12 0xd8
#define ITE8181_EMA_FRCPAT13 0xda
#define ITE8181_EMA_FRCPAT14 0xdc
#define ITE8181_EMA_FRCPAT15 0xde
#define ITE8181_EMB_EXBX 0x03ce
#define ITE8181_EMB_EXBDATA 0x03cf
#define ITE8181_EMA_ENABLEEMA 0x0b
#define ITE8181_EMB_ENABLEPASS 0xca
#define ITE8181_EMB_DISABLEPASS 0x35
#define ITE8181_EMB_ENABLED 0x01