xref: /OK3568_Linux_fs/kernel/include/linux/platform_data/video_s3c.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __PLATFORM_DATA_VIDEO_S3C
3*4882a593Smuzhiyun #define __PLATFORM_DATA_VIDEO_S3C
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun /* S3C_FB_MAX_WIN
6*4882a593Smuzhiyun  * Set to the maximum number of windows that any of the supported hardware
7*4882a593Smuzhiyun  * can use. Since the platform data uses this for an array size, having it
8*4882a593Smuzhiyun  * set to the maximum of any version of the hardware can do is safe.
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun #define S3C_FB_MAX_WIN	(5)
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun /**
13*4882a593Smuzhiyun  * struct s3c_fb_pd_win - per window setup data
14*4882a593Smuzhiyun  * @xres     : The window X size.
15*4882a593Smuzhiyun  * @yres     : The window Y size.
16*4882a593Smuzhiyun  * @virtual_x: The virtual X size.
17*4882a593Smuzhiyun  * @virtual_y: The virtual Y size.
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun struct s3c_fb_pd_win {
20*4882a593Smuzhiyun 	unsigned short		default_bpp;
21*4882a593Smuzhiyun 	unsigned short		max_bpp;
22*4882a593Smuzhiyun 	unsigned short		xres;
23*4882a593Smuzhiyun 	unsigned short		yres;
24*4882a593Smuzhiyun 	unsigned short		virtual_x;
25*4882a593Smuzhiyun 	unsigned short		virtual_y;
26*4882a593Smuzhiyun };
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun /**
29*4882a593Smuzhiyun  * struct s3c_fb_platdata -  S3C driver platform specific information
30*4882a593Smuzhiyun  * @setup_gpio: Setup the external GPIO pins to the right state to transfer
31*4882a593Smuzhiyun  *		the data from the display system to the connected display
32*4882a593Smuzhiyun  *		device.
33*4882a593Smuzhiyun  * @vidcon0: The base vidcon0 values to control the panel data format.
34*4882a593Smuzhiyun  * @vidcon1: The base vidcon1 values to control the panel data output.
35*4882a593Smuzhiyun  * @vtiming: Video timing when connected to a RGB type panel.
36*4882a593Smuzhiyun  * @win: The setup data for each hardware window, or NULL for unused.
37*4882a593Smuzhiyun  * @display_mode: The LCD output display mode.
38*4882a593Smuzhiyun  *
39*4882a593Smuzhiyun  * The platform data supplies the video driver with all the information
40*4882a593Smuzhiyun  * it requires to work with the display(s) attached to the machine. It
41*4882a593Smuzhiyun  * controls the initial mode, the number of display windows (0 is always
42*4882a593Smuzhiyun  * the base framebuffer) that are initialised etc.
43*4882a593Smuzhiyun  *
44*4882a593Smuzhiyun  */
45*4882a593Smuzhiyun struct s3c_fb_platdata {
46*4882a593Smuzhiyun 	void	(*setup_gpio)(void);
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun 	struct s3c_fb_pd_win	*win[S3C_FB_MAX_WIN];
49*4882a593Smuzhiyun 	struct fb_videomode     *vtiming;
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun 	u32			 vidcon0;
52*4882a593Smuzhiyun 	u32			 vidcon1;
53*4882a593Smuzhiyun };
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun #endif
56