/*
 * ILI9320 Register Definitions
 */
#define	DRIVER_CODE_READ	0x00
#define	START_OSCILATION	0x00
#define		BIT_OSC			0x0001
#define	DRIVER_OUTPUT_CTRL	0x01
#define		BIT_SM			0x0400
#define		BIT_SS			0x0100
#define	LCD_DRIVING_CTRL	0x02
#define		BIT_BC0			0x0200
#define		BIT_EOR			0x0100
#define	ENTRY_MODE		0x03
#define		BIT_TRI			0x8000
#define		BIT_DFM			0x4000
#define		BIT_BGR			0x1000
#define		BIT_DACKE		0x0400
#define		BIT_HWM			0x0200
#define		BIT_ID1			0x0020
#define		BIT_ID0			0x0010
#define		BIT_AM			0x0008

#define	RESIZE_CTRL		0x04
#define		BIT_RCV1		0x0200
#define		BIT_RCV0		0x0100
#define		BIT_RCH1		0x0020
#define		BIT_RCH0		0x0010
#define		BIT_RSZ1		0x0002
#define		BIT_RSZ0		0x0001
#define	DISPLAY_CTRL1		0x07
#define		BIT_PTDE1		0x2000
#define		BIT_PTDE0		0x1000
#define		BIT_BASEE		0x0200
#define		BIT_GON			0x0020
#define		BIT_DTE			0x0010
#define		BIT_CL			0x0008
#define		BIT_D1			0x0002
#define		BIT_D0			0x0001
#define	DISPLAY_CTRL2		0x08
#define		BIT_FP3			0x0800
#define		BIT_FP2			0x0400
#define		BIT_FP1			0x0200
#define		BIT_FP0			0x0100
#define		BIT_BP3			0x0008
#define		BIT_BP2			0x0004
#define		BIT_BP1			0x0002
#define		BIT_BP0			0x0001
#define	DISPLAY_CTRL3		0x09
#define		BIT_PTS2		0x0400
#define		BIT_PTS1		0x0200
#define		BIT_PTS0		0x0100
#define		BIT_PTG1		0x0020
#define		BIT_PTG0		0x0010
#define		BIT_ISC3		0x0008
#define		BIT_ICS2		0x0004
#define		BIT_ICS1		0x0002
#define		BIT_ICS0		0x0001
#define	DISPLAY_CTRL4		0x0a
#define		BIT_FMARKOE		0x0008
#define		BIT_FMI2		0x0004
#define		BIT_FMI1		0x0002
#define		BIT_FMI0		0x0001
#define	RGB_DISPLAY_IF_CTRL1	0x0c
#define		BIT_ENC2		0x8000
#define		BIT_ENC1		0x4000
#define		BIT_ENC0		0x2000
#define		BIT_RM			0x0100
#define		BIT_DM1			0x0020
#define		BIT_DM0			0x0010
#define		BIT_RIM1		0x0002
#define		BIT_RIM0		0x0001
#define	FRAME_MAKER_POSITION	0x0d
#define	RGB_DISPLAY_IF_CTRL2	0x0f
#define	POWER_CONTROL1		0x10
#define	POWER_CONTROL2		0x11
#define	POWER_CONTROL3		0x12
#define	POWER_CONTROL4		0x13
#define	H_GRAM_ADDR_SET		0x20
#define	V_GRAM_ADDR_SET		0x21
#define	WRITE_DATA_TO_GRAM	0x22
#define	READ_DATA_FROM_GRAM	0x22
#define	POWER_CONTROL7		0x29
#define	FRAME_RATE		0x2b
#define	GAMMA_CTRL1		0x30
#define	GAMMA_CTRL2		0x31
#define	GAMMA_CTRL3		0x32
#define	GAMMA_CTRL4		0x35
#define	GAMMA_CTRL5		0x36
#define	GAMMA_CTRL6		0x37
#define	GAMMA_CTRL7		0x38
#define	GAMMA_CTRL8		0x39
#define	GAMMA_CTRL9		0x3c
#define	GAMMA_CTRL10		0x3d
#define	H_ADDR_START_POSITION	0x50
#define	H_ADDR_END_POSITION	0x51
#define	V_ADDR_START_POSITION	0x52
#define	V_ADDR_END_POSITION	0x53
#define	DRIVER_OUTPUT_CTRL2	0x60
#define	BASE_IMAGE_DISPLAY_CTRL	0x61
#define	V_SCROLL_CTRL		0x6a
#define	IMG1_DISP_POSITION	0x80
#define	IMG1_AREA_START		0x81
#define	IMG1_AREA_END		0x82
#define	IMG2_DISP_POSITION	0x83
#define	IMG2_AREA_START		0x84
#define	IMG2_AREA_END		0x85
#define	PANEL_IF_CTRL1		0x90
#define	PANEL_IF_CTRL2		0x92
#define	PANEL_IF_CTRL3		0x93
#define	PANEL_IF_CTRL4		0x95
#define	PANEL_IF_CTRL5		0x97
#define	PANEL_IF_CTRL6		0x98
