2 * linux/arch/arm/mach-mmp/aspenite.c
4 * Support for the Marvell PXA168-based Aspenite and Zylonite2
5 * Development Platform.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * publishhed by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/kernel.h>
14 #include <linux/platform_device.h>
15 #include <linux/smc91x.h>
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/partitions.h>
18 #include <linux/mtd/nand.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <mach/addr-map.h>
23 #include <mach/mfp-pxa168.h>
24 #include <mach/pxa168.h>
25 #include <mach/gpio.h>
26 #include <video/pxa168fb.h>
30 static unsigned long common_pin_config[] __initdata = {
31 /* Data Flash Interface */
49 /* Static Memory Controller */
58 GPIO27_GPIO, /* Ethernet IRQ */
102 static struct smc91x_platdata smc91x_info = {
103 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
106 static struct resource smc91x_resources[] = {
108 .start = SMC_CS1_PHYS_BASE + 0x300,
109 .end = SMC_CS1_PHYS_BASE + 0xfffff,
110 .flags = IORESOURCE_MEM,
113 .start = gpio_to_irq(27),
114 .end = gpio_to_irq(27),
115 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
119 static struct platform_device smc91x_device = {
123 .platform_data = &smc91x_info,
125 .num_resources = ARRAY_SIZE(smc91x_resources),
126 .resource = smc91x_resources,
129 static struct mtd_partition aspenite_nand_partitions[] = {
131 .name = "bootloader",
134 .mask_flags = MTD_WRITEABLE,
137 .offset = MTDPART_OFS_APPEND,
139 .mask_flags = MTD_WRITEABLE,
142 .offset = MTDPART_OFS_APPEND,
144 .mask_flags = MTD_WRITEABLE,
147 .offset = MTDPART_OFS_APPEND,
148 .size = (SZ_2M + SZ_1M),
151 .name = "filesystem",
152 .offset = MTDPART_OFS_APPEND,
158 static struct pxa3xx_nand_platform_data aspenite_nand_info = {
160 .parts = aspenite_nand_partitions,
161 .nr_parts = ARRAY_SIZE(aspenite_nand_partitions),
164 static struct i2c_board_info aspenite_i2c_info[] __initdata = {
165 { I2C_BOARD_INFO("wm8753", 0x1b), },
168 static struct fb_videomode video_modes[] = {
180 .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
184 struct pxa168fb_mach_info aspenite_lcd_info = {
185 .id = "Graphic Frame",
186 .modes = video_modes,
187 .num_modes = ARRAY_SIZE(video_modes),
188 .pix_fmt = PIX_FMT_RGB565,
189 .io_pin_allocation_mode = PIN_MODE_DUMB_24,
190 .dumb_mode = DUMB_MODE_RGB888,
193 .invert_pixclock = 0,
196 static void __init common_init(void)
198 mfp_config(ARRAY_AND_SIZE(common_pin_config));
200 /* on-chip devices */
202 pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_i2c_info));
204 pxa168_add_nand(&aspenite_nand_info);
205 pxa168_add_fb(&aspenite_lcd_info);
207 /* off-chip devices */
208 platform_device_register(&smc91x_device);
211 MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
212 .phys_io = APB_PHYS_BASE,
213 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
214 .map_io = mmp_map_io,
215 .init_irq = pxa168_init_irq,
216 .timer = &pxa168_timer,
217 .init_machine = common_init,
220 MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
221 .phys_io = APB_PHYS_BASE,
222 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
223 .map_io = mmp_map_io,
224 .init_irq = pxa168_init_irq,
225 .timer = &pxa168_timer,
226 .init_machine = common_init,