blob: 1410ad7e20b1b9ed5b8f3f09440f696b6336c0d4 [file] [log] [blame]
Ian Molton7dc96412008-08-19 12:14:21 +01001/*
2 * Hardware definitions for the Toshiba eseries PDAs
3 *
4 * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
5 *
6 * This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 *
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
Ian Molton0ec3cf62008-08-19 13:01:28 +010015#include <linux/device.h>
16#include <linux/platform_device.h>
17#include <linux/fb.h>
18
19#include <video/w100fb.h>
Ian Molton7dc96412008-08-19 12:14:21 +010020
21#include <asm/setup.h>
22#include <asm/mach/arch.h>
23#include <asm/mach-types.h>
24
25#include <mach/mfp-pxa25x.h>
26#include <mach/hardware.h>
Ian Moltonebcce7b2008-08-19 13:34:56 +010027#include <mach/udc.h>
Ian Molton36033422008-08-24 19:21:26 +010028#include <mach/irda.h>
Ian Molton7dc96412008-08-19 12:14:21 +010029
30#include "generic.h"
31#include "eseries.h"
32
Ian Molton0ec3cf62008-08-19 13:01:28 +010033/* ---------------------- E750 LCD definitions -------------------- */
34
35static struct w100_gen_regs e750_lcd_regs = {
36 .lcd_format = 0x00008003,
37 .lcdd_cntl1 = 0x00000000,
38 .lcdd_cntl2 = 0x0003ffff,
39 .genlcd_cntl1 = 0x00fff003,
40 .genlcd_cntl2 = 0x003c0f03,
41 .genlcd_cntl3 = 0x000143aa,
42};
43
44static struct w100_mode e750_lcd_mode = {
45 .xres = 240,
46 .yres = 320,
47 .left_margin = 21,
48 .right_margin = 22,
49 .upper_margin = 5,
50 .lower_margin = 4,
51 .crtc_ss = 0x80150014,
52 .crtc_ls = 0x8014000d,
53 .crtc_gs = 0xc1000005,
54 .crtc_vpos_gs = 0x00020147,
55 .crtc_rev = 0x0040010a,
56 .crtc_dclk = 0xa1700030,
57 .crtc_gclk = 0x80cc0015,
58 .crtc_goe = 0x80cc0015,
59 .crtc_ps1_active = 0x61060017,
60 .pll_freq = 57,
61 .pixclk_divider = 4,
62 .pixclk_divider_rotated = 4,
63 .pixclk_src = CLK_SRC_XTAL,
64 .sysclk_divider = 1,
65 .sysclk_src = CLK_SRC_PLL,
66};
67
68static struct w100_gpio_regs e750_w100_gpio_info = {
69 .init_data1 = 0x01192f1b,
70 .gpio_dir1 = 0xd5ffdeff,
71 .gpio_oe1 = 0x000020bf,
72 .init_data2 = 0x010f010f,
73 .gpio_dir2 = 0xffffffff,
74 .gpio_oe2 = 0x000001cf,
75};
76
77static struct w100fb_mach_info e750_fb_info = {
78 .modelist = &e750_lcd_mode,
79 .num_modes = 1,
80 .regs = &e750_lcd_regs,
81 .gpio = &e750_w100_gpio_info,
82 .xtal_freq = 14318000,
83 .xtal_dbl = 1,
84};
85
86static struct resource e750_fb_resources[] = {
87 [0] = {
88 .start = 0x0c000000,
89 .end = 0x0cffffff,
90 .flags = IORESOURCE_MEM,
91 },
92};
93
94static struct platform_device e750_fb_device = {
95 .name = "w100fb",
96 .id = -1,
97 .dev = {
98 .platform_data = &e750_fb_info,
99 },
100 .num_resources = ARRAY_SIZE(e750_fb_resources),
101 .resource = e750_fb_resources,
102};
103
104/* ----------------------------------------------------------------------- */
105
106static struct platform_device *devices[] __initdata = {
107 &e750_fb_device,
108};
109
110static void __init e750_init(void)
111{
112 platform_add_devices(devices, ARRAY_SIZE(devices));
Ian Moltonebcce7b2008-08-19 13:34:56 +0100113 pxa_set_udc_info(&e7xx_udc_mach_info);
Ian Molton36033422008-08-24 19:21:26 +0100114 e7xx_irda_init();
115 pxa_set_ficp_info(&e7xx_ficp_platform_data);
Ian Molton0ec3cf62008-08-19 13:01:28 +0100116}
117
Ian Molton7dc96412008-08-19 12:14:21 +0100118MACHINE_START(E750, "Toshiba e750")
119 /* Maintainer: Ian Molton (spyro@f2s.com) */
120 .phys_io = 0x40000000,
121 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
122 .boot_params = 0xa0000100,
123 .map_io = pxa_map_io,
124 .init_irq = pxa25x_init_irq,
125 .fixup = eseries_fixup,
Ian Molton0ec3cf62008-08-19 13:01:28 +0100126 .init_machine = e750_init,
Ian Molton7dc96412008-08-19 12:14:21 +0100127 .timer = &pxa_timer,
128MACHINE_END
129