aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-06-20 08:35:32 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-08-05 02:32:20 -0400
commite478fe4cd50b86e95fadc415438b63fa94060b7d (patch)
tree20746778b4fd49cd29aa5014c69097262ca5de7a
parent09a5358d1ed3e023313e551599bb547edfbf1cbf (diff)
[ARM] pxa: merge all eseries board code into eseries.c
Cc: Ian Molton <spyro@f2s.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-pxa/Makefile6
-rw-r--r--arch/arm/mach-pxa/e330.c78
-rw-r--r--arch/arm/mach-pxa/e350.c79
-rw-r--r--arch/arm/mach-pxa/e400.c155
-rw-r--r--arch/arm/mach-pxa/e740.c225
-rw-r--r--arch/arm/mach-pxa/e750.c226
-rw-r--r--arch/arm/mach-pxa/e800.c229
-rw-r--r--arch/arm/mach-pxa/eseries.c809
8 files changed, 809 insertions, 998 deletions
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 3f72218462a8..cb408efef618 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -86,12 +86,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o
86obj-$(CONFIG_MACH_TOSA) += tosa.o 86obj-$(CONFIG_MACH_TOSA) += tosa.o
87obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o 87obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
88obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o 88obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
89obj-$(CONFIG_MACH_E330) += e330.o
90obj-$(CONFIG_MACH_E350) += e350.o
91obj-$(CONFIG_MACH_E740) += e740.o
92obj-$(CONFIG_MACH_E750) += e750.o
93obj-$(CONFIG_MACH_E400) += e400.o
94obj-$(CONFIG_MACH_E800) += e800.o
95obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o 89obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o
96obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o 90obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o
97obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o 91obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
diff --git a/arch/arm/mach-pxa/e330.c b/arch/arm/mach-pxa/e330.c
deleted file mode 100644
index 8fde3387279d..000000000000
--- a/arch/arm/mach-pxa/e330.c
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * Hardware definitions for the Toshiba e330 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>
15#include <linux/clk.h>
16#include <linux/platform_device.h>
17#include <linux/mfd/tc6387xb.h>
18
19#include <asm/setup.h>
20#include <asm/mach/arch.h>
21#include <asm/mach-types.h>
22
23#include <mach/pxa25x.h>
24#include <mach/eseries-gpio.h>
25#include <mach/udc.h>
26
27#include "generic.h"
28#include "eseries.h"
29#include "clock.h"
30
31/* -------------------- e330 tc6387xb parameters -------------------- */
32
33static struct tc6387xb_platform_data e330_tc6387xb_info = {
34 .enable = &eseries_tmio_enable,
35 .disable = &eseries_tmio_disable,
36 .suspend = &eseries_tmio_suspend,
37 .resume = &eseries_tmio_resume,
38};
39
40static struct platform_device e330_tc6387xb_device = {
41 .name = "tc6387xb",
42 .id = -1,
43 .dev = {
44 .platform_data = &e330_tc6387xb_info,
45 },
46 .num_resources = 2,
47 .resource = eseries_tmio_resources,
48};
49
50/* --------------------------------------------------------------- */
51
52static struct platform_device *devices[] __initdata = {
53 &e330_tc6387xb_device,
54};
55
56static void __init e330_init(void)
57{
58 pxa_set_ffuart_info(NULL);
59 pxa_set_btuart_info(NULL);
60 pxa_set_stuart_info(NULL);
61 eseries_register_clks();
62 eseries_get_tmio_gpios();
63 platform_add_devices(devices, ARRAY_SIZE(devices));
64 pxa_set_udc_info(&e7xx_udc_mach_info);
65}
66
67MACHINE_START(E330, "Toshiba e330")
68 /* Maintainer: Ian Molton (spyro@f2s.com) */
69 .phys_io = 0x40000000,
70 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
71 .boot_params = 0xa0000100,
72 .map_io = pxa_map_io,
73 .init_irq = pxa25x_init_irq,
74 .fixup = eseries_fixup,
75 .init_machine = e330_init,
76 .timer = &pxa_timer,
77MACHINE_END
78
diff --git a/arch/arm/mach-pxa/e350.c b/arch/arm/mach-pxa/e350.c
deleted file mode 100644
index f50f055f5720..000000000000
--- a/arch/arm/mach-pxa/e350.c
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Hardware definitions for the Toshiba e350 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>
15#include <linux/clk.h>
16#include <linux/platform_device.h>
17#include <linux/mfd/t7l66xb.h>
18
19#include <asm/setup.h>
20#include <asm/mach/arch.h>
21#include <asm/mach-types.h>
22
23#include <mach/irqs.h>
24#include <mach/pxa25x.h>
25#include <mach/eseries-gpio.h>
26#include <mach/udc.h>
27
28#include "generic.h"
29#include "eseries.h"
30#include "clock.h"
31
32/* -------------------- e350 t7l66xb parameters -------------------- */
33
34static struct t7l66xb_platform_data e350_t7l66xb_info = {
35 .irq_base = IRQ_BOARD_START,
36 .enable = &eseries_tmio_enable,
37 .suspend = &eseries_tmio_suspend,
38 .resume = &eseries_tmio_resume,
39};
40
41static struct platform_device e350_t7l66xb_device = {
42 .name = "t7l66xb",
43 .id = -1,
44 .dev = {
45 .platform_data = &e350_t7l66xb_info,
46 },
47 .num_resources = 2,
48 .resource = eseries_tmio_resources,
49};
50
51/* ---------------------------------------------------------- */
52
53static struct platform_device *devices[] __initdata = {
54 &e350_t7l66xb_device,
55};
56
57static void __init e350_init(void)
58{
59 pxa_set_ffuart_info(NULL);
60 pxa_set_btuart_info(NULL);
61 pxa_set_stuart_info(NULL);
62 eseries_register_clks();
63 eseries_get_tmio_gpios();
64 platform_add_devices(devices, ARRAY_SIZE(devices));
65 pxa_set_udc_info(&e7xx_udc_mach_info);
66}
67
68MACHINE_START(E350, "Toshiba e350")
69 /* Maintainer: Ian Molton (spyro@f2s.com) */
70 .phys_io = 0x40000000,
71 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
72 .boot_params = 0xa0000100,
73 .map_io = pxa_map_io,
74 .init_irq = pxa25x_init_irq,
75 .fixup = eseries_fixup,
76 .init_machine = e350_init,
77 .timer = &pxa_timer,
78MACHINE_END
79
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c
deleted file mode 100644
index 55b950f12844..000000000000
--- a/arch/arm/mach-pxa/e400.c
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
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>
15#include <linux/clk.h>
16#include <linux/platform_device.h>
17#include <linux/mfd/t7l66xb.h>
18#include <linux/mtd/nand.h>
19#include <linux/mtd/partitions.h>
20
21#include <asm/setup.h>
22#include <asm/mach/arch.h>
23#include <asm/mach-types.h>
24
25#include <mach/pxa25x.h>
26#include <mach/eseries-gpio.h>
27#include <mach/pxafb.h>
28#include <mach/udc.h>
29#include <mach/irqs.h>
30
31#include "generic.h"
32#include "eseries.h"
33#include "clock.h"
34
35/* ------------------------ E400 LCD definitions ------------------------ */
36
37static struct pxafb_mode_info e400_pxafb_mode_info = {
38 .pixclock = 140703,
39 .xres = 240,
40 .yres = 320,
41 .bpp = 16,
42 .hsync_len = 4,
43 .left_margin = 28,
44 .right_margin = 8,
45 .vsync_len = 3,
46 .upper_margin = 5,
47 .lower_margin = 6,
48 .sync = 0,
49};
50
51static struct pxafb_mach_info e400_pxafb_mach_info = {
52 .modes = &e400_pxafb_mode_info,
53 .num_modes = 1,
54 .lcd_conn = LCD_COLOR_TFT_16BPP,
55 .lccr3 = 0,
56 .pxafb_backlight_power = NULL,
57};
58
59/* ------------------------ E400 MFP config ----------------------------- */
60
61static unsigned long e400_pin_config[] __initdata = {
62 /* Chip selects */
63 GPIO15_nCS_1, /* CS1 - Flash */
64 GPIO80_nCS_4, /* CS4 - TMIO */
65
66 /* Clocks */
67 GPIO12_32KHz,
68
69 /* BTUART */
70 GPIO42_BTUART_RXD,
71 GPIO43_BTUART_TXD,
72 GPIO44_BTUART_CTS,
73
74 /* TMIO controller */
75 GPIO19_GPIO, /* t7l66xb #PCLR */
76 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
77
78 /* wakeup */
79 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
80};
81
82/* ---------------------------------------------------------------------- */
83
84static struct mtd_partition partition_a = {
85 .name = "Internal NAND flash",
86 .offset = 0,
87 .size = MTDPART_SIZ_FULL,
88};
89
90static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
91
92static struct nand_bbt_descr e400_t7l66xb_nand_bbt = {
93 .options = 0,
94 .offs = 4,
95 .len = 2,
96 .pattern = scan_ff_pattern
97};
98
99static struct tmio_nand_data e400_t7l66xb_nand_config = {
100 .num_partitions = 1,
101 .partition = &partition_a,
102 .badblock_pattern = &e400_t7l66xb_nand_bbt,
103};
104
105static struct t7l66xb_platform_data e400_t7l66xb_info = {
106 .irq_base = IRQ_BOARD_START,
107 .enable = &eseries_tmio_enable,
108 .suspend = &eseries_tmio_suspend,
109 .resume = &eseries_tmio_resume,
110
111 .nand_data = &e400_t7l66xb_nand_config,
112};
113
114static struct platform_device e400_t7l66xb_device = {
115 .name = "t7l66xb",
116 .id = -1,
117 .dev = {
118 .platform_data = &e400_t7l66xb_info,
119 },
120 .num_resources = 2,
121 .resource = eseries_tmio_resources,
122};
123
124/* ---------------------------------------------------------- */
125
126static struct platform_device *devices[] __initdata = {
127 &e400_t7l66xb_device,
128};
129
130static void __init e400_init(void)
131{
132 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
133 pxa_set_ffuart_info(NULL);
134 pxa_set_btuart_info(NULL);
135 pxa_set_stuart_info(NULL);
136 /* Fixme - e400 may have a switched clock */
137 eseries_register_clks();
138 eseries_get_tmio_gpios();
139 set_pxa_fb_info(&e400_pxafb_mach_info);
140 platform_add_devices(devices, ARRAY_SIZE(devices));
141 pxa_set_udc_info(&e7xx_udc_mach_info);
142}
143
144MACHINE_START(E400, "Toshiba e400")
145 /* Maintainer: Ian Molton (spyro@f2s.com) */
146 .phys_io = 0x40000000,
147 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
148 .boot_params = 0xa0000100,
149 .map_io = pxa_map_io,
150 .init_irq = pxa25x_init_irq,
151 .fixup = eseries_fixup,
152 .init_machine = e400_init,
153 .timer = &pxa_timer,
154MACHINE_END
155
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c
deleted file mode 100644
index d578021d1a10..000000000000
--- a/arch/arm/mach-pxa/e740.c
+++ /dev/null
@@ -1,225 +0,0 @@
1/*
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>
15#include <linux/device.h>
16#include <linux/platform_device.h>
17#include <linux/fb.h>
18#include <linux/clk.h>
19#include <linux/mfd/t7l66xb.h>
20
21#include <video/w100fb.h>
22
23#include <asm/setup.h>
24#include <asm/mach/arch.h>
25#include <asm/mach-types.h>
26
27#include <mach/pxa25x.h>
28#include <mach/eseries-gpio.h>
29#include <mach/udc.h>
30#include <mach/irda.h>
31#include <mach/irqs.h>
32#include <mach/audio.h>
33
34#include "generic.h"
35#include "eseries.h"
36#include "clock.h"
37#include "devices.h"
38
39/* ------------------------ e740 video support --------------------------- */
40
41static struct w100_gen_regs e740_lcd_regs = {
42 .lcd_format = 0x00008023,
43 .lcdd_cntl1 = 0x0f000000,
44 .lcdd_cntl2 = 0x0003ffff,
45 .genlcd_cntl1 = 0x00ffff03,
46 .genlcd_cntl2 = 0x003c0f03,
47 .genlcd_cntl3 = 0x000143aa,
48};
49
50static struct w100_mode e740_lcd_mode = {
51 .xres = 240,
52 .yres = 320,
53 .left_margin = 20,
54 .right_margin = 28,
55 .upper_margin = 9,
56 .lower_margin = 8,
57 .crtc_ss = 0x80140013,
58 .crtc_ls = 0x81150110,
59 .crtc_gs = 0x80050005,
60 .crtc_vpos_gs = 0x000a0009,
61 .crtc_rev = 0x0040010a,
62 .crtc_dclk = 0xa906000a,
63 .crtc_gclk = 0x80050108,
64 .crtc_goe = 0x80050108,
65 .pll_freq = 57,
66 .pixclk_divider = 4,
67 .pixclk_divider_rotated = 4,
68 .pixclk_src = CLK_SRC_XTAL,
69 .sysclk_divider = 1,
70 .sysclk_src = CLK_SRC_PLL,
71 .crtc_ps1_active = 0x41060010,
72};
73
74static struct w100_gpio_regs e740_w100_gpio_info = {
75 .init_data1 = 0x21002103,
76 .gpio_dir1 = 0xffffdeff,
77 .gpio_oe1 = 0x03c00643,
78 .init_data2 = 0x003f003f,
79 .gpio_dir2 = 0xffffffff,
80 .gpio_oe2 = 0x000000ff,
81};
82
83static struct w100fb_mach_info e740_fb_info = {
84 .modelist = &e740_lcd_mode,
85 .num_modes = 1,
86 .regs = &e740_lcd_regs,
87 .gpio = &e740_w100_gpio_info,
88 .xtal_freq = 14318000,
89 .xtal_dbl = 1,
90};
91
92static struct resource e740_fb_resources[] = {
93 [0] = {
94 .start = 0x0c000000,
95 .end = 0x0cffffff,
96 .flags = IORESOURCE_MEM,
97 },
98};
99
100static struct platform_device e740_fb_device = {
101 .name = "w100fb",
102 .id = -1,
103 .dev = {
104 .platform_data = &e740_fb_info,
105 },
106 .num_resources = ARRAY_SIZE(e740_fb_resources),
107 .resource = e740_fb_resources,
108};
109
110/* --------------------------- MFP Pin config -------------------------- */
111
112static unsigned long e740_pin_config[] __initdata = {
113 /* Chip selects */
114 GPIO15_nCS_1, /* CS1 - Flash */
115 GPIO79_nCS_3, /* CS3 - IMAGEON */
116 GPIO80_nCS_4, /* CS4 - TMIO */
117
118 /* Clocks */
119 GPIO12_32KHz,
120
121 /* BTUART */
122 GPIO42_BTUART_RXD,
123 GPIO43_BTUART_TXD,
124 GPIO44_BTUART_CTS,
125
126 /* TMIO controller */
127 GPIO19_GPIO, /* t7l66xb #PCLR */
128 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
129
130 /* UDC */
131 GPIO13_GPIO,
132 GPIO3_GPIO,
133
134 /* IrDA */
135 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
136
137 /* AC97 */
138 GPIO28_AC97_BITCLK,
139 GPIO29_AC97_SDATA_IN_0,
140 GPIO30_AC97_SDATA_OUT,
141 GPIO31_AC97_SYNC,
142
143 /* Audio power control */
144 GPIO16_GPIO, /* AC97 codec AVDD2 supply (analogue power) */
145 GPIO40_GPIO, /* Mic amp power */
146 GPIO41_GPIO, /* Headphone amp power */
147
148 /* PC Card */
149 GPIO8_GPIO, /* CD0 */
150 GPIO44_GPIO, /* CD1 */
151 GPIO11_GPIO, /* IRQ0 */
152 GPIO6_GPIO, /* IRQ1 */
153 GPIO27_GPIO, /* RST0 */
154 GPIO24_GPIO, /* RST1 */
155 GPIO20_GPIO, /* PWR0 */
156 GPIO23_GPIO, /* PWR1 */
157 GPIO48_nPOE,
158 GPIO49_nPWE,
159 GPIO50_nPIOR,
160 GPIO51_nPIOW,
161 GPIO52_nPCE_1,
162 GPIO53_nPCE_2,
163 GPIO54_nPSKTSEL,
164 GPIO55_nPREG,
165 GPIO56_nPWAIT,
166 GPIO57_nIOIS16,
167
168 /* wakeup */
169 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
170};
171
172/* -------------------- e740 t7l66xb parameters -------------------- */
173
174static struct t7l66xb_platform_data e740_t7l66xb_info = {
175 .irq_base = IRQ_BOARD_START,
176 .enable = &eseries_tmio_enable,
177 .suspend = &eseries_tmio_suspend,
178 .resume = &eseries_tmio_resume,
179};
180
181static struct platform_device e740_t7l66xb_device = {
182 .name = "t7l66xb",
183 .id = -1,
184 .dev = {
185 .platform_data = &e740_t7l66xb_info,
186 },
187 .num_resources = 2,
188 .resource = eseries_tmio_resources,
189};
190
191/* ----------------------------------------------------------------------- */
192
193static struct platform_device *devices[] __initdata = {
194 &e740_fb_device,
195 &e740_t7l66xb_device,
196};
197
198static void __init e740_init(void)
199{
200 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
201 pxa_set_ffuart_info(NULL);
202 pxa_set_btuart_info(NULL);
203 pxa_set_stuart_info(NULL);
204 eseries_register_clks();
205 clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
206 "UDCCLK", &pxa25x_device_udc.dev),
207 eseries_get_tmio_gpios();
208 platform_add_devices(devices, ARRAY_SIZE(devices));
209 pxa_set_udc_info(&e7xx_udc_mach_info);
210 pxa_set_ac97_info(NULL);
211 pxa_set_ficp_info(&e7xx_ficp_platform_data);
212}
213
214MACHINE_START(E740, "Toshiba e740")
215 /* Maintainer: Ian Molton (spyro@f2s.com) */
216 .phys_io = 0x40000000,
217 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
218 .boot_params = 0xa0000100,
219 .map_io = pxa_map_io,
220 .init_irq = pxa25x_init_irq,
221 .fixup = eseries_fixup,
222 .init_machine = e740_init,
223 .timer = &pxa_timer,
224MACHINE_END
225
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c
deleted file mode 100644
index af83caa52dd4..000000000000
--- a/arch/arm/mach-pxa/e750.c
+++ /dev/null
@@ -1,226 +0,0 @@
1/*
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>
15#include <linux/device.h>
16#include <linux/platform_device.h>
17#include <linux/fb.h>
18#include <linux/mfd/tc6393xb.h>
19
20#include <video/w100fb.h>
21
22#include <asm/setup.h>
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25
26#include <mach/pxa25x.h>
27#include <mach/eseries-gpio.h>
28#include <mach/udc.h>
29#include <mach/irda.h>
30#include <mach/irqs.h>
31#include <mach/audio.h>
32
33#include "generic.h"
34#include "eseries.h"
35#include "clock.h"
36
37/* ---------------------- E750 LCD definitions -------------------- */
38
39static struct w100_gen_regs e750_lcd_regs = {
40 .lcd_format = 0x00008003,
41 .lcdd_cntl1 = 0x00000000,
42 .lcdd_cntl2 = 0x0003ffff,
43 .genlcd_cntl1 = 0x00fff003,
44 .genlcd_cntl2 = 0x003c0f03,
45 .genlcd_cntl3 = 0x000143aa,
46};
47
48static struct w100_mode e750_lcd_mode = {
49 .xres = 240,
50 .yres = 320,
51 .left_margin = 21,
52 .right_margin = 22,
53 .upper_margin = 5,
54 .lower_margin = 4,
55 .crtc_ss = 0x80150014,
56 .crtc_ls = 0x8014000d,
57 .crtc_gs = 0xc1000005,
58 .crtc_vpos_gs = 0x00020147,
59 .crtc_rev = 0x0040010a,
60 .crtc_dclk = 0xa1700030,
61 .crtc_gclk = 0x80cc0015,
62 .crtc_goe = 0x80cc0015,
63 .crtc_ps1_active = 0x61060017,
64 .pll_freq = 57,
65 .pixclk_divider = 4,
66 .pixclk_divider_rotated = 4,
67 .pixclk_src = CLK_SRC_XTAL,
68 .sysclk_divider = 1,
69 .sysclk_src = CLK_SRC_PLL,
70};
71
72static struct w100_gpio_regs e750_w100_gpio_info = {
73 .init_data1 = 0x01192f1b,
74 .gpio_dir1 = 0xd5ffdeff,
75 .gpio_oe1 = 0x000020bf,
76 .init_data2 = 0x010f010f,
77 .gpio_dir2 = 0xffffffff,
78 .gpio_oe2 = 0x000001cf,
79};
80
81static struct w100fb_mach_info e750_fb_info = {
82 .modelist = &e750_lcd_mode,
83 .num_modes = 1,
84 .regs = &e750_lcd_regs,
85 .gpio = &e750_w100_gpio_info,
86 .xtal_freq = 14318000,
87 .xtal_dbl = 1,
88};
89
90static struct resource e750_fb_resources[] = {
91 [0] = {
92 .start = 0x0c000000,
93 .end = 0x0cffffff,
94 .flags = IORESOURCE_MEM,
95 },
96};
97
98static struct platform_device e750_fb_device = {
99 .name = "w100fb",
100 .id = -1,
101 .dev = {
102 .platform_data = &e750_fb_info,
103 },
104 .num_resources = ARRAY_SIZE(e750_fb_resources),
105 .resource = e750_fb_resources,
106};
107
108/* -------------------- e750 MFP parameters -------------------- */
109
110static unsigned long e750_pin_config[] __initdata = {
111 /* Chip selects */
112 GPIO15_nCS_1, /* CS1 - Flash */
113 GPIO79_nCS_3, /* CS3 - IMAGEON */
114 GPIO80_nCS_4, /* CS4 - TMIO */
115
116 /* Clocks */
117 GPIO11_3_6MHz,
118
119 /* BTUART */
120 GPIO42_BTUART_RXD,
121 GPIO43_BTUART_TXD,
122 GPIO44_BTUART_CTS,
123
124 /* TMIO controller */
125 GPIO19_GPIO, /* t7l66xb #PCLR */
126 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
127
128 /* UDC */
129 GPIO13_GPIO,
130 GPIO3_GPIO,
131
132 /* IrDA */
133 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
134
135 /* AC97 */
136 GPIO28_AC97_BITCLK,
137 GPIO29_AC97_SDATA_IN_0,
138 GPIO30_AC97_SDATA_OUT,
139 GPIO31_AC97_SYNC,
140
141 /* Audio power control */
142 GPIO4_GPIO, /* Headphone amp power */
143 GPIO7_GPIO, /* Speaker amp power */
144 GPIO37_GPIO, /* Headphone detect */
145
146 /* PC Card */
147 GPIO8_GPIO, /* CD0 */
148 GPIO44_GPIO, /* CD1 */
149 GPIO11_GPIO, /* IRQ0 */
150 GPIO6_GPIO, /* IRQ1 */
151 GPIO27_GPIO, /* RST0 */
152 GPIO24_GPIO, /* RST1 */
153 GPIO20_GPIO, /* PWR0 */
154 GPIO23_GPIO, /* PWR1 */
155 GPIO48_nPOE,
156 GPIO49_nPWE,
157 GPIO50_nPIOR,
158 GPIO51_nPIOW,
159 GPIO52_nPCE_1,
160 GPIO53_nPCE_2,
161 GPIO54_nPSKTSEL,
162 GPIO55_nPREG,
163 GPIO56_nPWAIT,
164 GPIO57_nIOIS16,
165
166 /* wakeup */
167 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
168};
169
170/* ----------------- e750 tc6393xb parameters ------------------ */
171
172static struct tc6393xb_platform_data e750_tc6393xb_info = {
173 .irq_base = IRQ_BOARD_START,
174 .scr_pll2cr = 0x0cc1,
175 .scr_gper = 0,
176 .gpio_base = -1,
177 .suspend = &eseries_tmio_suspend,
178 .resume = &eseries_tmio_resume,
179 .enable = &eseries_tmio_enable,
180 .disable = &eseries_tmio_disable,
181};
182
183static struct platform_device e750_tc6393xb_device = {
184 .name = "tc6393xb",
185 .id = -1,
186 .dev = {
187 .platform_data = &e750_tc6393xb_info,
188 },
189 .num_resources = 2,
190 .resource = eseries_tmio_resources,
191};
192
193/* ------------------------------------------------------------- */
194
195static struct platform_device *devices[] __initdata = {
196 &e750_fb_device,
197 &e750_tc6393xb_device,
198};
199
200static void __init e750_init(void)
201{
202 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
203 pxa_set_ffuart_info(NULL);
204 pxa_set_btuart_info(NULL);
205 pxa_set_stuart_info(NULL);
206 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
207 "GPIO11_CLK", NULL),
208 eseries_get_tmio_gpios();
209 platform_add_devices(devices, ARRAY_SIZE(devices));
210 pxa_set_udc_info(&e7xx_udc_mach_info);
211 pxa_set_ac97_info(NULL);
212 pxa_set_ficp_info(&e7xx_ficp_platform_data);
213}
214
215MACHINE_START(E750, "Toshiba e750")
216 /* Maintainer: Ian Molton (spyro@f2s.com) */
217 .phys_io = 0x40000000,
218 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
219 .boot_params = 0xa0000100,
220 .map_io = pxa_map_io,
221 .init_irq = pxa25x_init_irq,
222 .fixup = eseries_fixup,
223 .init_machine = e750_init,
224 .timer = &pxa_timer,
225MACHINE_END
226
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c
deleted file mode 100644
index 8ea97bf53fe1..000000000000
--- a/arch/arm/mach-pxa/e800.c
+++ /dev/null
@@ -1,229 +0,0 @@
1/*
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>
15#include <linux/device.h>
16#include <linux/platform_device.h>
17#include <linux/fb.h>
18#include <linux/mfd/tc6393xb.h>
19
20#include <video/w100fb.h>
21
22#include <asm/setup.h>
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25
26#include <mach/pxa25x.h>
27#include <mach/eseries-gpio.h>
28#include <mach/udc.h>
29#include <mach/irqs.h>
30#include <mach/audio.h>
31
32#include "generic.h"
33#include "eseries.h"
34#include "clock.h"
35
36/* ------------------------ e800 LCD definitions ------------------------- */
37
38static unsigned long e800_pin_config[] __initdata = {
39 /* AC97 */
40 GPIO28_AC97_BITCLK,
41 GPIO29_AC97_SDATA_IN_0,
42 GPIO30_AC97_SDATA_OUT,
43 GPIO31_AC97_SYNC,
44};
45
46static struct w100_gen_regs e800_lcd_regs = {
47 .lcd_format = 0x00008003,
48 .lcdd_cntl1 = 0x02a00000,
49 .lcdd_cntl2 = 0x0003ffff,
50 .genlcd_cntl1 = 0x000ff2a3,
51 .genlcd_cntl2 = 0x000002a3,
52 .genlcd_cntl3 = 0x000102aa,
53};
54
55static struct w100_mode e800_lcd_mode[2] = {
56 [0] = {
57 .xres = 480,
58 .yres = 640,
59 .left_margin = 52,
60 .right_margin = 148,
61 .upper_margin = 2,
62 .lower_margin = 6,
63 .crtc_ss = 0x80350034,
64 .crtc_ls = 0x802b0026,
65 .crtc_gs = 0x80160016,
66 .crtc_vpos_gs = 0x00020003,
67 .crtc_rev = 0x0040001d,
68 .crtc_dclk = 0xe0000000,
69 .crtc_gclk = 0x82a50049,
70 .crtc_goe = 0x80ee001c,
71 .crtc_ps1_active = 0x00000000,
72 .pll_freq = 128,
73 .pixclk_divider = 4,
74 .pixclk_divider_rotated = 6,
75 .pixclk_src = CLK_SRC_PLL,
76 .sysclk_divider = 0,
77 .sysclk_src = CLK_SRC_PLL,
78 },
79 [1] = {
80 .xres = 240,
81 .yres = 320,
82 .left_margin = 15,
83 .right_margin = 88,
84 .upper_margin = 0,
85 .lower_margin = 7,
86 .crtc_ss = 0xd010000f,
87 .crtc_ls = 0x80070003,
88 .crtc_gs = 0x80000000,
89 .crtc_vpos_gs = 0x01460147,
90 .crtc_rev = 0x00400003,
91 .crtc_dclk = 0xa1700030,
92 .crtc_gclk = 0x814b0008,
93 .crtc_goe = 0x80cc0015,
94 .crtc_ps1_active = 0x00000000,
95 .pll_freq = 100,
96 .pixclk_divider = 6, /* Wince uses 14 which gives a */
97 .pixclk_divider_rotated = 6, /* 7MHz Pclk. We use a 14MHz one */
98 .pixclk_src = CLK_SRC_PLL,
99 .sysclk_divider = 0,
100 .sysclk_src = CLK_SRC_PLL,
101 }
102};
103
104
105static struct w100_gpio_regs e800_w100_gpio_info = {
106 .init_data1 = 0xc13fc019,
107 .gpio_dir1 = 0x3e40df7f,
108 .gpio_oe1 = 0x003c3000,
109 .init_data2 = 0x00000000,
110 .gpio_dir2 = 0x00000000,
111 .gpio_oe2 = 0x00000000,
112};
113
114static struct w100_mem_info e800_w100_mem_info = {
115 .ext_cntl = 0x09640011,
116 .sdram_mode_reg = 0x00600021,
117 .ext_timing_cntl = 0x10001545,
118 .io_cntl = 0x7ddd7333,
119 .size = 0x1fffff,
120};
121
122static void e800_tg_change(struct w100fb_par *par)
123{
124 unsigned long tmp;
125
126 tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
127 if (par->mode->xres == 480)
128 tmp |= 0x100;
129 else
130 tmp &= ~0x100;
131 w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
132}
133
134static struct w100_tg_info e800_tg_info = {
135 .change = e800_tg_change,
136};
137
138static struct w100fb_mach_info e800_fb_info = {
139 .modelist = e800_lcd_mode,
140 .num_modes = 2,
141 .regs = &e800_lcd_regs,
142 .gpio = &e800_w100_gpio_info,
143 .mem = &e800_w100_mem_info,
144 .tg = &e800_tg_info,
145 .xtal_freq = 16000000,
146};
147
148static struct resource e800_fb_resources[] = {
149 [0] = {
150 .start = 0x0c000000,
151 .end = 0x0cffffff,
152 .flags = IORESOURCE_MEM,
153 },
154};
155
156static struct platform_device e800_fb_device = {
157 .name = "w100fb",
158 .id = -1,
159 .dev = {
160 .platform_data = &e800_fb_info,
161 },
162 .num_resources = ARRAY_SIZE(e800_fb_resources),
163 .resource = e800_fb_resources,
164};
165
166/* --------------------------- UDC definitions --------------------------- */
167
168static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
169 .gpio_vbus = GPIO_E800_USB_DISC,
170 .gpio_pullup = GPIO_E800_USB_PULLUP,
171 .gpio_pullup_inverted = 1
172};
173
174/* ----------------- e800 tc6393xb parameters ------------------ */
175
176static struct tc6393xb_platform_data e800_tc6393xb_info = {
177 .irq_base = IRQ_BOARD_START,
178 .scr_pll2cr = 0x0cc1,
179 .scr_gper = 0,
180 .gpio_base = -1,
181 .suspend = &eseries_tmio_suspend,
182 .resume = &eseries_tmio_resume,
183 .enable = &eseries_tmio_enable,
184 .disable = &eseries_tmio_disable,
185};
186
187static struct platform_device e800_tc6393xb_device = {
188 .name = "tc6393xb",
189 .id = -1,
190 .dev = {
191 .platform_data = &e800_tc6393xb_info,
192 },
193 .num_resources = 2,
194 .resource = eseries_tmio_resources,
195};
196
197/* ----------------------------------------------------------------------- */
198
199static struct platform_device *devices[] __initdata = {
200 &e800_fb_device,
201 &e800_tc6393xb_device,
202};
203
204static void __init e800_init(void)
205{
206 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config));
207 pxa_set_ffuart_info(NULL);
208 pxa_set_btuart_info(NULL);
209 pxa_set_stuart_info(NULL);
210 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
211 "GPIO11_CLK", NULL),
212 eseries_get_tmio_gpios();
213 platform_add_devices(devices, ARRAY_SIZE(devices));
214 pxa_set_udc_info(&e800_udc_mach_info);
215 pxa_set_ac97_info(NULL);
216}
217
218MACHINE_START(E800, "Toshiba e800")
219 /* Maintainer: Ian Molton (spyro@f2s.com) */
220 .phys_io = 0x40000000,
221 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
222 .boot_params = 0xa0000100,
223 .map_io = pxa_map_io,
224 .init_irq = pxa25x_init_irq,
225 .fixup = eseries_fixup,
226 .init_machine = e800_init,
227 .timer = &pxa_timer,
228MACHINE_END
229
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index 96ed13081639..1d67f027bea7 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -15,6 +15,13 @@
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/mfd/tc6387xb.h>
19#include <linux/mfd/tc6393xb.h>
20#include <linux/mfd/t7l66xb.h>
21#include <linux/mtd/nand.h>
22#include <linux/mtd/partitions.h>
23
24#include <video/w100fb.h>
18 25
19#include <asm/setup.h> 26#include <asm/setup.h>
20#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -22,9 +29,12 @@
22 29
23#include <mach/pxa25x.h> 30#include <mach/pxa25x.h>
24#include <mach/eseries-gpio.h> 31#include <mach/eseries-gpio.h>
32#include <mach/audio.h>
33#include <mach/pxafb.h>
25#include <mach/udc.h> 34#include <mach/udc.h>
26#include <mach/irda.h> 35#include <mach/irda.h>
27 36
37#include "devices.h"
28#include "generic.h" 38#include "generic.h"
29#include "clock.h" 39#include "clock.h"
30 40
@@ -131,3 +141,802 @@ void eseries_register_clks(void)
131 clkdev_add_table(eseries_clkregs, ARRAY_SIZE(eseries_clkregs)); 141 clkdev_add_table(eseries_clkregs, ARRAY_SIZE(eseries_clkregs));
132} 142}
133 143
144#ifdef CONFIG_MACH_E330
145/* -------------------- e330 tc6387xb parameters -------------------- */
146
147static struct tc6387xb_platform_data e330_tc6387xb_info = {
148 .enable = &eseries_tmio_enable,
149 .disable = &eseries_tmio_disable,
150 .suspend = &eseries_tmio_suspend,
151 .resume = &eseries_tmio_resume,
152};
153
154static struct platform_device e330_tc6387xb_device = {
155 .name = "tc6387xb",
156 .id = -1,
157 .dev = {
158 .platform_data = &e330_tc6387xb_info,
159 },
160 .num_resources = 2,
161 .resource = eseries_tmio_resources,
162};
163
164/* --------------------------------------------------------------- */
165
166static struct platform_device *e330_devices[] __initdata = {
167 &e330_tc6387xb_device,
168};
169
170static void __init e330_init(void)
171{
172 pxa_set_ffuart_info(NULL);
173 pxa_set_btuart_info(NULL);
174 pxa_set_stuart_info(NULL);
175 eseries_register_clks();
176 eseries_get_tmio_gpios();
177 platform_add_devices(ARRAY_AND_SIZE(e330_devices));
178 pxa_set_udc_info(&e7xx_udc_mach_info);
179}
180
181MACHINE_START(E330, "Toshiba e330")
182 /* Maintainer: Ian Molton (spyro@f2s.com) */
183 .phys_io = 0x40000000,
184 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
185 .boot_params = 0xa0000100,
186 .map_io = pxa_map_io,
187 .init_irq = pxa25x_init_irq,
188 .fixup = eseries_fixup,
189 .init_machine = e330_init,
190 .timer = &pxa_timer,
191MACHINE_END
192#endif
193
194#ifdef CONFIG_MACH_E350
195/* -------------------- e350 t7l66xb parameters -------------------- */
196
197static struct t7l66xb_platform_data e350_t7l66xb_info = {
198 .irq_base = IRQ_BOARD_START,
199 .enable = &eseries_tmio_enable,
200 .suspend = &eseries_tmio_suspend,
201 .resume = &eseries_tmio_resume,
202};
203
204static struct platform_device e350_t7l66xb_device = {
205 .name = "t7l66xb",
206 .id = -1,
207 .dev = {
208 .platform_data = &e350_t7l66xb_info,
209 },
210 .num_resources = 2,
211 .resource = eseries_tmio_resources,
212};
213
214/* ---------------------------------------------------------- */
215
216static struct platform_device *e350_devices[] __initdata = {
217 &e350_t7l66xb_device,
218};
219
220static void __init e350_init(void)
221{
222 pxa_set_ffuart_info(NULL);
223 pxa_set_btuart_info(NULL);
224 pxa_set_stuart_info(NULL);
225 eseries_register_clks();
226 eseries_get_tmio_gpios();
227 platform_add_devices(ARRAY_AND_SIZE(e350_devices));
228 pxa_set_udc_info(&e7xx_udc_mach_info);
229}
230
231MACHINE_START(E350, "Toshiba e350")
232 /* Maintainer: Ian Molton (spyro@f2s.com) */
233 .phys_io = 0x40000000,
234 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
235 .boot_params = 0xa0000100,
236 .map_io = pxa_map_io,
237 .init_irq = pxa25x_init_irq,
238 .fixup = eseries_fixup,
239 .init_machine = e350_init,
240 .timer = &pxa_timer,
241MACHINE_END
242#endif
243
244#ifdef CONFIG_MACH_E400
245/* ------------------------ E400 LCD definitions ------------------------ */
246
247static struct pxafb_mode_info e400_pxafb_mode_info = {
248 .pixclock = 140703,
249 .xres = 240,
250 .yres = 320,
251 .bpp = 16,
252 .hsync_len = 4,
253 .left_margin = 28,
254 .right_margin = 8,
255 .vsync_len = 3,
256 .upper_margin = 5,
257 .lower_margin = 6,
258 .sync = 0,
259};
260
261static struct pxafb_mach_info e400_pxafb_mach_info = {
262 .modes = &e400_pxafb_mode_info,
263 .num_modes = 1,
264 .lcd_conn = LCD_COLOR_TFT_16BPP,
265 .lccr3 = 0,
266 .pxafb_backlight_power = NULL,
267};
268
269/* ------------------------ E400 MFP config ----------------------------- */
270
271static unsigned long e400_pin_config[] __initdata = {
272 /* Chip selects */
273 GPIO15_nCS_1, /* CS1 - Flash */
274 GPIO80_nCS_4, /* CS4 - TMIO */
275
276 /* Clocks */
277 GPIO12_32KHz,
278
279 /* BTUART */
280 GPIO42_BTUART_RXD,
281 GPIO43_BTUART_TXD,
282 GPIO44_BTUART_CTS,
283
284 /* TMIO controller */
285 GPIO19_GPIO, /* t7l66xb #PCLR */
286 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
287
288 /* wakeup */
289 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
290};
291
292/* ---------------------------------------------------------------------- */
293
294static struct mtd_partition partition_a = {
295 .name = "Internal NAND flash",
296 .offset = 0,
297 .size = MTDPART_SIZ_FULL,
298};
299
300static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
301
302static struct nand_bbt_descr e400_t7l66xb_nand_bbt = {
303 .options = 0,
304 .offs = 4,
305 .len = 2,
306 .pattern = scan_ff_pattern
307};
308
309static struct tmio_nand_data e400_t7l66xb_nand_config = {
310 .num_partitions = 1,
311 .partition = &partition_a,
312 .badblock_pattern = &e400_t7l66xb_nand_bbt,
313};
314
315static struct t7l66xb_platform_data e400_t7l66xb_info = {
316 .irq_base = IRQ_BOARD_START,
317 .enable = &eseries_tmio_enable,
318 .suspend = &eseries_tmio_suspend,
319 .resume = &eseries_tmio_resume,
320
321 .nand_data = &e400_t7l66xb_nand_config,
322};
323
324static struct platform_device e400_t7l66xb_device = {
325 .name = "t7l66xb",
326 .id = -1,
327 .dev = {
328 .platform_data = &e400_t7l66xb_info,
329 },
330 .num_resources = 2,
331 .resource = eseries_tmio_resources,
332};
333
334/* ---------------------------------------------------------- */
335
336static struct platform_device *e400_devices[] __initdata = {
337 &e400_t7l66xb_device,
338};
339
340static void __init e400_init(void)
341{
342 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
343 pxa_set_ffuart_info(NULL);
344 pxa_set_btuart_info(NULL);
345 pxa_set_stuart_info(NULL);
346 /* Fixme - e400 may have a switched clock */
347 eseries_register_clks();
348 eseries_get_tmio_gpios();
349 set_pxa_fb_info(&e400_pxafb_mach_info);
350 platform_add_devices(ARRAY_AND_SIZE(e400_devices));
351 pxa_set_udc_info(&e7xx_udc_mach_info);
352}
353
354MACHINE_START(E400, "Toshiba e400")
355 /* Maintainer: Ian Molton (spyro@f2s.com) */
356 .phys_io = 0x40000000,
357 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
358 .boot_params = 0xa0000100,
359 .map_io = pxa_map_io,
360 .init_irq = pxa25x_init_irq,
361 .fixup = eseries_fixup,
362 .init_machine = e400_init,
363 .timer = &pxa_timer,
364MACHINE_END
365#endif
366
367#ifdef CONFIG_MACH_E740
368/* ------------------------ e740 video support --------------------------- */
369
370static struct w100_gen_regs e740_lcd_regs = {
371 .lcd_format = 0x00008023,
372 .lcdd_cntl1 = 0x0f000000,
373 .lcdd_cntl2 = 0x0003ffff,
374 .genlcd_cntl1 = 0x00ffff03,
375 .genlcd_cntl2 = 0x003c0f03,
376 .genlcd_cntl3 = 0x000143aa,
377};
378
379static struct w100_mode e740_lcd_mode = {
380 .xres = 240,
381 .yres = 320,
382 .left_margin = 20,
383 .right_margin = 28,
384 .upper_margin = 9,
385 .lower_margin = 8,
386 .crtc_ss = 0x80140013,
387 .crtc_ls = 0x81150110,
388 .crtc_gs = 0x80050005,
389 .crtc_vpos_gs = 0x000a0009,
390 .crtc_rev = 0x0040010a,
391 .crtc_dclk = 0xa906000a,
392 .crtc_gclk = 0x80050108,
393 .crtc_goe = 0x80050108,
394 .pll_freq = 57,
395 .pixclk_divider = 4,
396 .pixclk_divider_rotated = 4,
397 .pixclk_src = CLK_SRC_XTAL,
398 .sysclk_divider = 1,
399 .sysclk_src = CLK_SRC_PLL,
400 .crtc_ps1_active = 0x41060010,
401};
402
403static struct w100_gpio_regs e740_w100_gpio_info = {
404 .init_data1 = 0x21002103,
405 .gpio_dir1 = 0xffffdeff,
406 .gpio_oe1 = 0x03c00643,
407 .init_data2 = 0x003f003f,
408 .gpio_dir2 = 0xffffffff,
409 .gpio_oe2 = 0x000000ff,
410};
411
412static struct w100fb_mach_info e740_fb_info = {
413 .modelist = &e740_lcd_mode,
414 .num_modes = 1,
415 .regs = &e740_lcd_regs,
416 .gpio = &e740_w100_gpio_info,
417 .xtal_freq = 14318000,
418 .xtal_dbl = 1,
419};
420
421static struct resource e740_fb_resources[] = {
422 [0] = {
423 .start = 0x0c000000,
424 .end = 0x0cffffff,
425 .flags = IORESOURCE_MEM,
426 },
427};
428
429static struct platform_device e740_fb_device = {
430 .name = "w100fb",
431 .id = -1,
432 .dev = {
433 .platform_data = &e740_fb_info,
434 },
435 .num_resources = ARRAY_SIZE(e740_fb_resources),
436 .resource = e740_fb_resources,
437};
438
439/* --------------------------- MFP Pin config -------------------------- */
440
441static unsigned long e740_pin_config[] __initdata = {
442 /* Chip selects */
443 GPIO15_nCS_1, /* CS1 - Flash */
444 GPIO79_nCS_3, /* CS3 - IMAGEON */
445 GPIO80_nCS_4, /* CS4 - TMIO */
446
447 /* Clocks */
448 GPIO12_32KHz,
449
450 /* BTUART */
451 GPIO42_BTUART_RXD,
452 GPIO43_BTUART_TXD,
453 GPIO44_BTUART_CTS,
454
455 /* TMIO controller */
456 GPIO19_GPIO, /* t7l66xb #PCLR */
457 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
458
459 /* UDC */
460 GPIO13_GPIO,
461 GPIO3_GPIO,
462
463 /* IrDA */
464 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
465
466 /* AC97 */
467 GPIO28_AC97_BITCLK,
468 GPIO29_AC97_SDATA_IN_0,
469 GPIO30_AC97_SDATA_OUT,
470 GPIO31_AC97_SYNC,
471
472 /* Audio power control */
473 GPIO16_GPIO, /* AC97 codec AVDD2 supply (analogue power) */
474 GPIO40_GPIO, /* Mic amp power */
475 GPIO41_GPIO, /* Headphone amp power */
476
477 /* PC Card */
478 GPIO8_GPIO, /* CD0 */
479 GPIO44_GPIO, /* CD1 */
480 GPIO11_GPIO, /* IRQ0 */
481 GPIO6_GPIO, /* IRQ1 */
482 GPIO27_GPIO, /* RST0 */
483 GPIO24_GPIO, /* RST1 */
484 GPIO20_GPIO, /* PWR0 */
485 GPIO23_GPIO, /* PWR1 */
486 GPIO48_nPOE,
487 GPIO49_nPWE,
488 GPIO50_nPIOR,
489 GPIO51_nPIOW,
490 GPIO52_nPCE_1,
491 GPIO53_nPCE_2,
492 GPIO54_nPSKTSEL,
493 GPIO55_nPREG,
494 GPIO56_nPWAIT,
495 GPIO57_nIOIS16,
496
497 /* wakeup */
498 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
499};
500
501/* -------------------- e740 t7l66xb parameters -------------------- */
502
503static struct t7l66xb_platform_data e740_t7l66xb_info = {
504 .irq_base = IRQ_BOARD_START,
505 .enable = &eseries_tmio_enable,
506 .suspend = &eseries_tmio_suspend,
507 .resume = &eseries_tmio_resume,
508};
509
510static struct platform_device e740_t7l66xb_device = {
511 .name = "t7l66xb",
512 .id = -1,
513 .dev = {
514 .platform_data = &e740_t7l66xb_info,
515 },
516 .num_resources = 2,
517 .resource = eseries_tmio_resources,
518};
519
520/* ----------------------------------------------------------------------- */
521
522static struct platform_device *e740_devices[] __initdata = {
523 &e740_fb_device,
524 &e740_t7l66xb_device,
525};
526
527static void __init e740_init(void)
528{
529 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
530 pxa_set_ffuart_info(NULL);
531 pxa_set_btuart_info(NULL);
532 pxa_set_stuart_info(NULL);
533 eseries_register_clks();
534 clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
535 "UDCCLK", &pxa25x_device_udc.dev),
536 eseries_get_tmio_gpios();
537 platform_add_devices(ARRAY_AND_SIZE(e740_devices));
538 pxa_set_udc_info(&e7xx_udc_mach_info);
539 pxa_set_ac97_info(NULL);
540 pxa_set_ficp_info(&e7xx_ficp_platform_data);
541}
542
543MACHINE_START(E740, "Toshiba e740")
544 /* Maintainer: Ian Molton (spyro@f2s.com) */
545 .phys_io = 0x40000000,
546 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
547 .boot_params = 0xa0000100,
548 .map_io = pxa_map_io,
549 .init_irq = pxa25x_init_irq,
550 .fixup = eseries_fixup,
551 .init_machine = e740_init,
552 .timer = &pxa_timer,
553MACHINE_END
554#endif
555
556#ifdef CONFIG_MACH_E750
557/* ---------------------- E750 LCD definitions -------------------- */
558
559static struct w100_gen_regs e750_lcd_regs = {
560 .lcd_format = 0x00008003,
561 .lcdd_cntl1 = 0x00000000,
562 .lcdd_cntl2 = 0x0003ffff,
563 .genlcd_cntl1 = 0x00fff003,
564 .genlcd_cntl2 = 0x003c0f03,
565 .genlcd_cntl3 = 0x000143aa,
566};
567
568static struct w100_mode e750_lcd_mode = {
569 .xres = 240,
570 .yres = 320,
571 .left_margin = 21,
572 .right_margin = 22,
573 .upper_margin = 5,
574 .lower_margin = 4,
575 .crtc_ss = 0x80150014,
576 .crtc_ls = 0x8014000d,
577 .crtc_gs = 0xc1000005,
578 .crtc_vpos_gs = 0x00020147,
579 .crtc_rev = 0x0040010a,
580 .crtc_dclk = 0xa1700030,
581 .crtc_gclk = 0x80cc0015,
582 .crtc_goe = 0x80cc0015,
583 .crtc_ps1_active = 0x61060017,
584 .pll_freq = 57,
585 .pixclk_divider = 4,
586 .pixclk_divider_rotated = 4,
587 .pixclk_src = CLK_SRC_XTAL,
588 .sysclk_divider = 1,
589 .sysclk_src = CLK_SRC_PLL,
590};
591
592static struct w100_gpio_regs e750_w100_gpio_info = {
593 .init_data1 = 0x01192f1b,
594 .gpio_dir1 = 0xd5ffdeff,
595 .gpio_oe1 = 0x000020bf,
596 .init_data2 = 0x010f010f,
597 .gpio_dir2 = 0xffffffff,
598 .gpio_oe2 = 0x000001cf,
599};
600
601static struct w100fb_mach_info e750_fb_info = {
602 .modelist = &e750_lcd_mode,
603 .num_modes = 1,
604 .regs = &e750_lcd_regs,
605 .gpio = &e750_w100_gpio_info,
606 .xtal_freq = 14318000,
607 .xtal_dbl = 1,
608};
609
610static struct resource e750_fb_resources[] = {
611 [0] = {
612 .start = 0x0c000000,
613 .end = 0x0cffffff,
614 .flags = IORESOURCE_MEM,
615 },
616};
617
618static struct platform_device e750_fb_device = {
619 .name = "w100fb",
620 .id = -1,
621 .dev = {
622 .platform_data = &e750_fb_info,
623 },
624 .num_resources = ARRAY_SIZE(e750_fb_resources),
625 .resource = e750_fb_resources,
626};
627
628/* -------------------- e750 MFP parameters -------------------- */
629
630static unsigned long e750_pin_config[] __initdata = {
631 /* Chip selects */
632 GPIO15_nCS_1, /* CS1 - Flash */
633 GPIO79_nCS_3, /* CS3 - IMAGEON */
634 GPIO80_nCS_4, /* CS4 - TMIO */
635
636 /* Clocks */
637 GPIO11_3_6MHz,
638
639 /* BTUART */
640 GPIO42_BTUART_RXD,
641 GPIO43_BTUART_TXD,
642 GPIO44_BTUART_CTS,
643
644 /* TMIO controller */
645 GPIO19_GPIO, /* t7l66xb #PCLR */
646 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
647
648 /* UDC */
649 GPIO13_GPIO,
650 GPIO3_GPIO,
651
652 /* IrDA */
653 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
654
655 /* AC97 */
656 GPIO28_AC97_BITCLK,
657 GPIO29_AC97_SDATA_IN_0,
658 GPIO30_AC97_SDATA_OUT,
659 GPIO31_AC97_SYNC,
660
661 /* Audio power control */
662 GPIO4_GPIO, /* Headphone amp power */
663 GPIO7_GPIO, /* Speaker amp power */
664 GPIO37_GPIO, /* Headphone detect */
665
666 /* PC Card */
667 GPIO8_GPIO, /* CD0 */
668 GPIO44_GPIO, /* CD1 */
669 GPIO11_GPIO, /* IRQ0 */
670 GPIO6_GPIO, /* IRQ1 */
671 GPIO27_GPIO, /* RST0 */
672 GPIO24_GPIO, /* RST1 */
673 GPIO20_GPIO, /* PWR0 */
674 GPIO23_GPIO, /* PWR1 */
675 GPIO48_nPOE,
676 GPIO49_nPWE,
677 GPIO50_nPIOR,
678 GPIO51_nPIOW,
679 GPIO52_nPCE_1,
680 GPIO53_nPCE_2,
681 GPIO54_nPSKTSEL,
682 GPIO55_nPREG,
683 GPIO56_nPWAIT,
684 GPIO57_nIOIS16,
685
686 /* wakeup */
687 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
688};
689
690/* ----------------- e750 tc6393xb parameters ------------------ */
691
692static struct tc6393xb_platform_data e750_tc6393xb_info = {
693 .irq_base = IRQ_BOARD_START,
694 .scr_pll2cr = 0x0cc1,
695 .scr_gper = 0,
696 .gpio_base = -1,
697 .suspend = &eseries_tmio_suspend,
698 .resume = &eseries_tmio_resume,
699 .enable = &eseries_tmio_enable,
700 .disable = &eseries_tmio_disable,
701};
702
703static struct platform_device e750_tc6393xb_device = {
704 .name = "tc6393xb",
705 .id = -1,
706 .dev = {
707 .platform_data = &e750_tc6393xb_info,
708 },
709 .num_resources = 2,
710 .resource = eseries_tmio_resources,
711};
712
713/* ------------------------------------------------------------- */
714
715static struct platform_device *e750_devices[] __initdata = {
716 &e750_fb_device,
717 &e750_tc6393xb_device,
718};
719
720static void __init e750_init(void)
721{
722 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
723 pxa_set_ffuart_info(NULL);
724 pxa_set_btuart_info(NULL);
725 pxa_set_stuart_info(NULL);
726 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
727 "GPIO11_CLK", NULL),
728 eseries_get_tmio_gpios();
729 platform_add_devices(ARRAY_AND_SIZE(e750_devices));
730 pxa_set_udc_info(&e7xx_udc_mach_info);
731 pxa_set_ac97_info(NULL);
732 pxa_set_ficp_info(&e7xx_ficp_platform_data);
733}
734
735MACHINE_START(E750, "Toshiba e750")
736 /* Maintainer: Ian Molton (spyro@f2s.com) */
737 .phys_io = 0x40000000,
738 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
739 .boot_params = 0xa0000100,
740 .map_io = pxa_map_io,
741 .init_irq = pxa25x_init_irq,
742 .fixup = eseries_fixup,
743 .init_machine = e750_init,
744 .timer = &pxa_timer,
745MACHINE_END
746#endif
747
748#ifdef CONFIG_MACH_E800
749/* ------------------------ e800 LCD definitions ------------------------- */
750
751static unsigned long e800_pin_config[] __initdata = {
752 /* AC97 */
753 GPIO28_AC97_BITCLK,
754 GPIO29_AC97_SDATA_IN_0,
755 GPIO30_AC97_SDATA_OUT,
756 GPIO31_AC97_SYNC,
757};
758
759static struct w100_gen_regs e800_lcd_regs = {
760 .lcd_format = 0x00008003,
761 .lcdd_cntl1 = 0x02a00000,
762 .lcdd_cntl2 = 0x0003ffff,
763 .genlcd_cntl1 = 0x000ff2a3,
764 .genlcd_cntl2 = 0x000002a3,
765 .genlcd_cntl3 = 0x000102aa,
766};
767
768static struct w100_mode e800_lcd_mode[2] = {
769 [0] = {
770 .xres = 480,
771 .yres = 640,
772 .left_margin = 52,
773 .right_margin = 148,
774 .upper_margin = 2,
775 .lower_margin = 6,
776 .crtc_ss = 0x80350034,
777 .crtc_ls = 0x802b0026,
778 .crtc_gs = 0x80160016,
779 .crtc_vpos_gs = 0x00020003,
780 .crtc_rev = 0x0040001d,
781 .crtc_dclk = 0xe0000000,
782 .crtc_gclk = 0x82a50049,
783 .crtc_goe = 0x80ee001c,
784 .crtc_ps1_active = 0x00000000,
785 .pll_freq = 128,
786 .pixclk_divider = 4,
787 .pixclk_divider_rotated = 6,
788 .pixclk_src = CLK_SRC_PLL,
789 .sysclk_divider = 0,
790 .sysclk_src = CLK_SRC_PLL,
791 },
792 [1] = {
793 .xres = 240,
794 .yres = 320,
795 .left_margin = 15,
796 .right_margin = 88,
797 .upper_margin = 0,
798 .lower_margin = 7,
799 .crtc_ss = 0xd010000f,
800 .crtc_ls = 0x80070003,
801 .crtc_gs = 0x80000000,
802 .crtc_vpos_gs = 0x01460147,
803 .crtc_rev = 0x00400003,
804 .crtc_dclk = 0xa1700030,
805 .crtc_gclk = 0x814b0008,
806 .crtc_goe = 0x80cc0015,
807 .crtc_ps1_active = 0x00000000,
808 .pll_freq = 100,
809 .pixclk_divider = 6, /* Wince uses 14 which gives a */
810 .pixclk_divider_rotated = 6, /* 7MHz Pclk. We use a 14MHz one */
811 .pixclk_src = CLK_SRC_PLL,
812 .sysclk_divider = 0,
813 .sysclk_src = CLK_SRC_PLL,
814 }
815};
816
817
818static struct w100_gpio_regs e800_w100_gpio_info = {
819 .init_data1 = 0xc13fc019,
820 .gpio_dir1 = 0x3e40df7f,
821 .gpio_oe1 = 0x003c3000,
822 .init_data2 = 0x00000000,
823 .gpio_dir2 = 0x00000000,
824 .gpio_oe2 = 0x00000000,
825};
826
827static struct w100_mem_info e800_w100_mem_info = {
828 .ext_cntl = 0x09640011,
829 .sdram_mode_reg = 0x00600021,
830 .ext_timing_cntl = 0x10001545,
831 .io_cntl = 0x7ddd7333,
832 .size = 0x1fffff,
833};
834
835static void e800_tg_change(struct w100fb_par *par)
836{
837 unsigned long tmp;
838
839 tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
840 if (par->mode->xres == 480)
841 tmp |= 0x100;
842 else
843 tmp &= ~0x100;
844 w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
845}
846
847static struct w100_tg_info e800_tg_info = {
848 .change = e800_tg_change,
849};
850
851static struct w100fb_mach_info e800_fb_info = {
852 .modelist = e800_lcd_mode,
853 .num_modes = 2,
854 .regs = &e800_lcd_regs,
855 .gpio = &e800_w100_gpio_info,
856 .mem = &e800_w100_mem_info,
857 .tg = &e800_tg_info,
858 .xtal_freq = 16000000,
859};
860
861static struct resource e800_fb_resources[] = {
862 [0] = {
863 .start = 0x0c000000,
864 .end = 0x0cffffff,
865 .flags = IORESOURCE_MEM,
866 },
867};
868
869static struct platform_device e800_fb_device = {
870 .name = "w100fb",
871 .id = -1,
872 .dev = {
873 .platform_data = &e800_fb_info,
874 },
875 .num_resources = ARRAY_SIZE(e800_fb_resources),
876 .resource = e800_fb_resources,
877};
878
879/* --------------------------- UDC definitions --------------------------- */
880
881static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
882 .gpio_vbus = GPIO_E800_USB_DISC,
883 .gpio_pullup = GPIO_E800_USB_PULLUP,
884 .gpio_pullup_inverted = 1
885};
886
887/* ----------------- e800 tc6393xb parameters ------------------ */
888
889static struct tc6393xb_platform_data e800_tc6393xb_info = {
890 .irq_base = IRQ_BOARD_START,
891 .scr_pll2cr = 0x0cc1,
892 .scr_gper = 0,
893 .gpio_base = -1,
894 .suspend = &eseries_tmio_suspend,
895 .resume = &eseries_tmio_resume,
896 .enable = &eseries_tmio_enable,
897 .disable = &eseries_tmio_disable,
898};
899
900static struct platform_device e800_tc6393xb_device = {
901 .name = "tc6393xb",
902 .id = -1,
903 .dev = {
904 .platform_data = &e800_tc6393xb_info,
905 },
906 .num_resources = 2,
907 .resource = eseries_tmio_resources,
908};
909
910/* ----------------------------------------------------------------------- */
911
912static struct platform_device *e800_devices[] __initdata = {
913 &e800_fb_device,
914 &e800_tc6393xb_device,
915};
916
917static void __init e800_init(void)
918{
919 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config));
920 pxa_set_ffuart_info(NULL);
921 pxa_set_btuart_info(NULL);
922 pxa_set_stuart_info(NULL);
923 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
924 "GPIO11_CLK", NULL),
925 eseries_get_tmio_gpios();
926 platform_add_devices(ARRAY_AND_SIZE(e800_devices));
927 pxa_set_udc_info(&e800_udc_mach_info);
928 pxa_set_ac97_info(NULL);
929}
930
931MACHINE_START(E800, "Toshiba e800")
932 /* Maintainer: Ian Molton (spyro@f2s.com) */
933 .phys_io = 0x40000000,
934 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
935 .boot_params = 0xa0000100,
936 .map_io = pxa_map_io,
937 .init_irq = pxa25x_init_irq,
938 .fixup = eseries_fixup,
939 .init_machine = e800_init,
940 .timer = &pxa_timer,
941MACHINE_END
942#endif