]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-mx28/mxsfb.h
Unified codebase for TX28, TX48, TX51, TX53
[karo-tx-uboot.git] / arch / arm / include / asm / arch-mx28 / mxsfb.h
1 /*
2  * Copyright (C) 2012 Lothar Waßmann <LW@KARO-electronics.de>
3  *
4  * LCD driver for i.MX28
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * version 2 as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  */
16
17 #ifndef __MXSFB_H
18 #define __MXSFB_H
19
20 #include <linux/list.h>
21 #include <linux/fb.h>
22
23 #define fourcc(a, b, c, d)      (((__u32)(a) << 0) |                    \
24                                 ((__u32)(b) << 8) |                     \
25                                 ((__u32)(c) << 16) |                    \
26                                 ((__u32)(d) << 24))
27
28 /*
29  * Pixel formats are defined with ASCII FOURCC code. The pixel format codes are
30  * the same used by V4L2 API.
31  */
32
33 #define PIX_FMT_RGB332  fourcc('R', 'G', 'B', '1')  /*<  8  RGB-3-3-2    */
34 #define PIX_FMT_RGB555  fourcc('R', 'G', 'B', 'O')  /*< 16  RGB-5-5-5    */
35 #define PIX_FMT_RGB565  fourcc('R', 'G', 'B', 'P')  /*< 1 6  RGB-5-6-5   */
36 #define PIX_FMT_RGB666  fourcc('R', 'G', 'B', '6')  /*< 18  RGB-6-6-6    */
37 #define PIX_FMT_BGR666  fourcc('B', 'G', 'R', '6')  /*< 18  BGR-6-6-6    */
38 #define PIX_FMT_BGR24   fourcc('B', 'G', 'R', '3')  /*< 24  BGR-8-8-8    */
39 #define PIX_FMT_RGB24   fourcc('R', 'G', 'B', '3')  /*< 24  RGB-8-8-8    */
40
41 #define PIX_FMT_GREY    fourcc('G', 'R', 'E', 'Y')  /*< 8  Greyscale */
42
43 #define FB_SYNC_DATA_ENABLE_HIGH_ACT   (1 << 6)
44 #define FB_SYNC_DOTCLK_FALLING_ACT     (1 << 7) /* falling/negative edge sampling */
45
46 extern int mxsfb_init(struct fb_videomode *mode, uint32_t pixfmt, int bpp);
47 extern void mxsfb_disable(void);
48
49 #endif /* __MXSFB_H */