1 ================================
2 Driver for EP93xx LCD controller
3 ================================
5 The EP93xx LCD controller can drive both standard desktop monitors and
6 embedded LCD displays. If you have a standard desktop monitor then you
7 can use the standard Linux video mode database. In your board file::
9 static struct ep93xxfb_mach_info some_board_fb_info = {
10 .num_modes = EP93XXFB_USE_MODEDB,
14 If you have an embedded LCD display then you need to define a video
15 mode for it as follows::
17 static struct fb_videomode some_board_video_modes[] = {
19 .name = "some_lcd_name",
20 /* Pixel clock, porches, etc */
24 Note that the pixel clock value is in pico-seconds. You can use the
25 KHZ2PICOS macro to convert the pixel clock value. Most other values
26 are in pixel clocks. See Documentation/fb/framebuffer.rst for further
29 The ep93xxfb_mach_info structure for your board should look like the
32 static struct ep93xxfb_mach_info some_board_fb_info = {
33 .num_modes = ARRAY_SIZE(some_board_video_modes),
34 .modes = some_board_video_modes,
35 .default_mode = &some_board_video_modes[0],
39 The framebuffer device can be registered by adding the following to
40 your board initialisation function::
42 ep93xx_register_fb(&some_board_fb_info);
48 The ep93xxfb_mach_info structure has a flags field which can be used
49 to configure the controller. The video attributes flags are fully
50 documented in section 7 of the EP93xx users' guide. The following
53 =============================== ==========================================
54 EP93XXFB_PCLK_FALLING Clock data on the falling edge of the
55 pixel clock. The default is to clock
56 data on the rising edge.
58 EP93XXFB_SYNC_BLANK_HIGH Blank signal is active high. By
59 default the blank signal is active low.
61 EP93XXFB_SYNC_HORIZ_HIGH Horizontal sync is active high. By
62 default the horizontal sync is active low.
64 EP93XXFB_SYNC_VERT_HIGH Vertical sync is active high. By
65 default the vertical sync is active high.
66 =============================== ==========================================
68 The physical address of the framebuffer can be controlled using the
71 =============================== ======================================
72 EP93XXFB_USE_SDCSN0 Use SDCSn[0] for the framebuffer. This
73 is the default setting.
75 EP93XXFB_USE_SDCSN1 Use SDCSn[1] for the framebuffer.
77 EP93XXFB_USE_SDCSN2 Use SDCSn[2] for the framebuffer.
79 EP93XXFB_USE_SDCSN3 Use SDCSn[3] for the framebuffer.
80 =============================== ======================================
86 The EP93xx framebuffer driver supports three optional platform
87 callbacks: setup, teardown and blank. The setup and teardown functions
88 are called when the framebuffer driver is installed and removed
89 respectively. The blank function is called whenever the display is
92 The setup and teardown devices pass the platform_device structure as
93 an argument. The fb_info and ep93xxfb_mach_info structures can be
96 static int some_board_fb_setup(struct platform_device *pdev)
98 struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data;
99 struct fb_info *fb_info = platform_get_drvdata(pdev);
101 /* Board specific framebuffer setup */
104 ======================
105 Setting the video mode
106 ======================
108 The video mode is set using the following syntax::
110 video=XRESxYRES[-BPP][@REFRESH]
112 If the EP93xx video driver is built-in then the video mode is set on
113 the Linux kernel command line, for example::
115 video=ep93xx-fb:800x600-16@60
117 If the EP93xx video driver is built as a module then the video mode is
118 set when the module is installed::
120 modprobe ep93xx-fb video=320x240
126 At least on the EP9315 there is a silicon bug which causes bit 27 of
127 the VIDSCRNPAGE (framebuffer physical offset) to be tied low. There is
128 an unofficial errata for this bug at::
130 http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2
132 By default the EP93xx framebuffer driver checks if the allocated physical
133 address has bit 27 set. If it does, then the memory is freed and an
134 error is returned. The check can be disabled by adding the following
135 option when loading the driver::
137 ep93xx-fb.check_screenpage_bug=0
139 In some cases it may be possible to reconfigure your SDRAM layout to
140 avoid this bug. See section 13 of the EP93xx users' guide for details.