blob: b3edc3cccf52f4c152ce9008e4d92fcc157c1584 [file] [log] [blame]
wanzongshun936fbe92009-08-21 07:08:24 +01001/*
2 * linux/arch/arm/mach-w90x900/mach-nuc950evb.c
3 *
4 * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche
5 *
6 * Copyright (C) 2008 Nuvoton technology corporation.
7 *
8 * Wan ZongShun <mcuos.com@gmail.com>
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation;version 2 of the License.
Wang Qiang86619702010-03-10 15:21:47 -080013 * history:
14 * Wang Qiang (rurality.linux@gmail.com) add LCD support
wanzongshun936fbe92009-08-21 07:08:24 +010015 *
16 */
17
18#include <linux/platform_device.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/map.h>
21#include <asm/mach-types.h>
22#include <mach/map.h>
Wang Qiang86619702010-03-10 15:21:47 -080023#include <mach/regs-ldm.h>
24#include <mach/fb.h>
wanzongshun936fbe92009-08-21 07:08:24 +010025
26#include "nuc950.h"
27
Wang Qiang86619702010-03-10 15:21:47 -080028#ifdef CONFIG_FB_NUC900
29/* LCD Controller */
30static struct nuc900fb_display __initdata nuc950_lcd_info[] = {
31 /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
32 [0] = {
33 .type = LCM_DCCS_VA_SRC_RGB565,
34 .width = 320,
35 .height = 240,
36 .xres = 320,
37 .yres = 240,
38 .bpp = 16,
39 .pixclock = 200000,
40 .left_margin = 34,
41 .right_margin = 54,
42 .hsync_len = 10,
43 .upper_margin = 18,
44 .lower_margin = 4,
45 .vsync_len = 1,
46 .dccs = 0x8e00041a,
47 .devctl = 0x060800c0,
48 .fbctrl = 0x00a000a0,
49 .scale = 0x04000400,
50 },
51};
52
53static struct nuc900fb_mach_info nuc950_fb_info __initdata = {
54#if defined(CONFIG_GPM1040A0_320X240)
55 .displays = &nuc950_lcd_info[0],
56#else
57 .displays = nuc950_lcd_info,
58#endif
59 .num_displays = ARRAY_SIZE(nuc950_lcd_info),
60 .default_display = 0,
61 .gpio_dir = 0x00000004,
62 .gpio_dir_mask = 0xFFFFFFFD,
63 .gpio_data = 0x00000004,
64 .gpio_data_mask = 0xFFFFFFFD,
65};
66#endif
67
wanzongshun936fbe92009-08-21 07:08:24 +010068static void __init nuc950evb_map_io(void)
69{
70 nuc950_map_io();
71 nuc950_init_clocks();
72}
73
74static void __init nuc950evb_init(void)
75{
76 nuc950_board_init();
Wang Qiang86619702010-03-10 15:21:47 -080077#ifdef CONFIG_FB_NUC900
78 nuc900_fb_set_platdata(&nuc950_fb_info);
79#endif
wanzongshun936fbe92009-08-21 07:08:24 +010080}
81
82MACHINE_START(W90P950EVB, "W90P950EVB")
83 /* Maintainer: Wan ZongShun */
84 .phys_io = W90X900_PA_UART,
85 .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc,
86 .boot_params = 0,
87 .map_io = nuc950evb_map_io,
88 .init_irq = nuc900_init_irq,
89 .init_machine = nuc950evb_init,
90 .timer = &nuc900_timer,
91MACHINE_END