blob: 0fedf47fa502482a117dc9427d5067d11d8e3a3d [file] [log] [blame]
Ben Dooksc116c1d2010-01-29 09:02:12 +00001/* arch/arm/plat-samsung/include/plat/fb.h
Ben Dooks8f995cc2008-11-19 15:41:30 +00002 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
7 *
8 * S3C - FB platform data definitions
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __PLAT_S3C_FB_H
16#define __PLAT_S3C_FB_H __FILE__
17
Ben Dooksf077f3f2010-05-13 14:44:50 +090018/* S3C_FB_MAX_WIN
19 * Set to the maximum number of windows that any of the supported hardware
20 * can use. Since the platform data uses this for an array size, having it
21 * set to the maximum of any version of the hardware can do is safe.
22 */
23#define S3C_FB_MAX_WIN (5)
24
Ben Dooks8f995cc2008-11-19 15:41:30 +000025/**
26 * struct s3c_fb_pd_win - per window setup data
27 * @win_mode: The display parameters to initialise (not for window 0)
28 * @virtual_x: The virtual X size.
29 * @virtual_y: The virtual Y size.
30 */
31struct s3c_fb_pd_win {
32 struct fb_videomode win_mode;
33
34 unsigned short default_bpp;
35 unsigned short max_bpp;
36 unsigned short virtual_x;
37 unsigned short virtual_y;
38};
39
40/**
41 * struct s3c_fb_platdata - S3C driver platform specific information
42 * @setup_gpio: Setup the external GPIO pins to the right state to transfer
43 * the data from the display system to the connected display
44 * device.
InKi Daead044902010-08-10 18:02:31 -070045 * @default_win: default window layer number to be used for UI layer.
Ben Dooks8f995cc2008-11-19 15:41:30 +000046 * @vidcon0: The base vidcon0 values to control the panel data format.
47 * @vidcon1: The base vidcon1 values to control the panel data output.
48 * @win: The setup data for each hardware window, or NULL for unused.
49 * @display_mode: The LCD output display mode.
50 *
51 * The platform data supplies the video driver with all the information
52 * it requires to work with the display(s) attached to the machine. It
53 * controls the initial mode, the number of display windows (0 is always
54 * the base framebuffer) that are initialised etc.
55 *
56 */
57struct s3c_fb_platdata {
58 void (*setup_gpio)(void);
59
60 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
61
InKi Daead044902010-08-10 18:02:31 -070062 u32 default_win;
63
Ben Dooks8f995cc2008-11-19 15:41:30 +000064 u32 vidcon0;
65 u32 vidcon1;
66};
67
68/**
69 * s3c_fb_set_platdata() - Setup the FB device with platform data.
70 * @pd: The platform data to set. The data is copied from the passed structure
71 * so the machine data can mark the data __initdata so that any unused
72 * machines will end up dumping their data at runtime.
73 */
74extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
75
76/**
Jonghun Hane61b1702011-07-21 15:46:26 +090077 * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
78 * @pd: The platform data to set. The data is copied from the passed structure
79 * so the machine data can mark the data __initdata so that any unused
80 * machines will end up dumping their data at runtime.
81 */
82extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
83
84/**
Ben Dooks8f995cc2008-11-19 15:41:30 +000085 * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
86 *
87 * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
88 */
89extern void s3c64xx_fb_gpio_setup_24bpp(void);
90
Pawel Osciakedd6e3f2009-11-17 08:41:19 +010091/**
92 * s5pc100_fb_gpio_setup_24bpp() - S5PC100 setup function for 24bpp LCD
93 *
94 * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
95 */
96extern void s5pc100_fb_gpio_setup_24bpp(void);
97
Marek Szyprowski5b696a62010-05-20 08:13:04 +020098/**
99 * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD
100 *
101 * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
102 */
103extern void s5pv210_fb_gpio_setup_24bpp(void);
104
Jonghun Hane61b1702011-07-21 15:46:26 +0900105/**
106 * exynos4_fimd0_gpio_setup_24bpp() - Exynos4 setup function for 24bpp LCD0
107 *
108 * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
109 */
110extern void exynos4_fimd0_gpio_setup_24bpp(void);
111
Ajay Kumarc9f357e2011-09-27 07:46:57 +0900112/**
113 * s5p64x0_fb_gpio_setup_24bpp() - S5P6440/S5P6450 setup function for 24bpp LCD
114 *
115 * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
116 */
117extern void s5p64x0_fb_gpio_setup_24bpp(void);
118
Ben Dooks8f995cc2008-11-19 15:41:30 +0000119#endif /* __PLAT_S3C_FB_H */