2 * KwikByte CAM60 (KB9260)
4 * based on board-sam9260ek.c
5 * Copyright (C) 2005 SAN People
6 * Copyright (C) 2006 Atmel
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <linux/types.h>
24 #include <linux/init.h>
26 #include <linux/module.h>
27 #include <linux/platform_device.h>
28 #include <linux/spi/spi.h>
29 #include <linux/spi/flash.h>
31 #include <mach/hardware.h>
32 #include <asm/setup.h>
33 #include <asm/mach-types.h>
36 #include <asm/mach/arch.h>
37 #include <asm/mach/map.h>
38 #include <asm/mach/irq.h>
40 #include <mach/board.h>
41 #include <mach/gpio.h>
46 static void __init
cam60_map_io(void)
48 /* Initialize processor: 10 MHz crystal */
49 at91sam9260_initialize(10000000);
51 /* DGBU on ttyS0. (Rx & Tx only) */
52 at91_register_uart(0, 0, 0);
54 /* set serial console to ttyS0 (ie, DBGU) */
55 at91_set_serial_console(0);
58 static void __init
cam60_init_irq(void)
60 at91sam9260_init_interrupts(NULL
);
67 static struct at91_usbh_data __initdata cam60_usbh_data
= {
75 #if defined(CONFIG_MTD_DATAFLASH)
76 static struct mtd_partition __initdata cam60_spi_partitions
[] = {
84 .offset
= MTDPART_OFS_NXTBLK
,
89 .offset
= MTDPART_OFS_NXTBLK
,
93 .name
= "file system",
94 .offset
= MTDPART_OFS_NXTBLK
,
95 .size
= MTDPART_SIZ_FULL
,
99 static struct flash_platform_data __initdata cam60_spi_flash_platform_data
= {
101 .parts
= cam60_spi_partitions
,
102 .nr_parts
= ARRAY_SIZE(cam60_spi_partitions
)
106 static struct spi_board_info cam60_spi_devices
[] = {
107 #if defined(CONFIG_MTD_DATAFLASH)
108 { /* DataFlash chip */
109 .modalias
= "mtd_dataflash",
111 .max_speed_hz
= 15 * 1000 * 1000,
113 .platform_data
= &cam60_spi_flash_platform_data
120 * MACB Ethernet device
122 static struct __initdata at91_eth_data cam60_macb_data
= {
123 .phy_irq_pin
= AT91_PIN_PB5
,
131 static struct mtd_partition __initdata cam60_nand_partition
[] = {
135 .size
= MTDPART_SIZ_FULL
,
139 static struct mtd_partition
* __init
nand_partitions(int size
, int *num_partitions
)
141 *num_partitions
= ARRAY_SIZE(cam60_nand_partition
);
142 return cam60_nand_partition
;
145 static struct atmel_nand_data __initdata cam60_nand_data
= {
148 // .det_pin = ... not there
149 .rdy_pin
= AT91_PIN_PA9
,
150 .enable_pin
= AT91_PIN_PA7
,
151 .partition_info
= nand_partitions
,
155 static void __init
cam60_board_init(void)
158 at91_add_device_serial();
160 at91_add_device_spi(cam60_spi_devices
, ARRAY_SIZE(cam60_spi_devices
));
162 at91_add_device_eth(&cam60_macb_data
);
164 /* enable USB power supply circuit */
165 at91_set_gpio_output(AT91_PIN_PB18
, 1);
166 at91_add_device_usbh(&cam60_usbh_data
);
168 at91_add_device_nand(&cam60_nand_data
);
171 MACHINE_START(CAM60
, "KwikByte CAM60")
172 /* Maintainer: KwikByte */
173 .phys_io
= AT91_BASE_SYS
,
174 .io_pg_offst
= (AT91_VA_BASE_SYS
>> 18) & 0xfffc,
175 .boot_params
= AT91_SDRAM_BASE
+ 0x100,
176 .timer
= &at91sam926x_timer
,
177 .map_io
= cam60_map_io
,
178 .init_irq
= cam60_init_irq
,
179 .init_machine
= cam60_board_init
,