aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/Kconfig7
-rw-r--r--arch/arm/mach-at91/Makefile1
-rw-r--r--arch/arm/mach-at91/board-cpuat91.c185
3 files changed, 193 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 83a89720ada9..a24d824c428b 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -156,6 +156,13 @@ config MACH_YL9200
156 help 156 help
157 Select this if you are using the ucDragon YL-9200 board. 157 Select this if you are using the ucDragon YL-9200 board.
158 158
159config MACH_CPUAT91
160 bool "Eukrea CPUAT91"
161 depends on ARCH_AT91RM9200
162 help
163 Select this if you are using the Eukrea Electromatique's
164 CPUAT91 board <http://www.eukrea.com/>.
165
159endif 166endif
160 167
161# ---------------------------------------------------------- 168# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index b2ea2e5a8817..a6ed015d82ed 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_MACH_KAFA) += board-kafa.o
34obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o 34obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
35obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o 35obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
36obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o 36obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o
37obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o
37 38
38# AT91SAM9260 board-specific support 39# AT91SAM9260 board-specific support
39obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o 40obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
new file mode 100644
index 000000000000..a28d99656190
--- /dev/null
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -0,0 +1,185 @@
1/*
2 * linux/arch/arm/mach-at91/board-cpuat91.c
3 *
4 * Copyright (C) 2009 Eric Benard - eric@eukrea.com
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/types.h>
22#include <linux/init.h>
23#include <linux/mm.h>
24#include <linux/module.h>
25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h>
27#include <linux/mtd/plat-ram.h>
28
29#include <mach/hardware.h>
30#include <asm/setup.h>
31#include <asm/mach-types.h>
32#include <asm/irq.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37
38#include <mach/board.h>
39#include <mach/gpio.h>
40#include <mach/at91rm9200_mc.h>
41
42#include "generic.h"
43
44static struct gpio_led cpuat91_leds[] = {
45 {
46 .name = "led1",
47 .default_trigger = "heartbeat",
48 .active_low = 1,
49 .gpio = AT91_PIN_PC0,
50 },
51};
52
53static void __init cpuat91_map_io(void)
54{
55 /* Initialize processor: 18.432 MHz crystal */
56 at91rm9200_initialize(18432000, AT91RM9200_PQFP);
57
58 /* DBGU on ttyS0. (Rx & Tx only) */
59 at91_register_uart(0, 0, 0);
60
61 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
62 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
63 ATMEL_UART_RTS);
64
65 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
66 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
67 ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
68 ATMEL_UART_DCD | ATMEL_UART_RI);
69
70 /* USART2 on ttyS3 (Rx, Tx) */
71 at91_register_uart(AT91RM9200_ID_US2, 3, 0);
72
73 /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
74 at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
75 ATMEL_UART_RTS);
76
77 /* set serial console to ttyS0 (ie, DBGU) */
78 at91_set_serial_console(0);
79}
80
81static void __init cpuat91_init_irq(void)
82{
83 at91rm9200_init_interrupts(NULL);
84}
85
86static struct at91_eth_data __initdata cpuat91_eth_data = {
87 .is_rmii = 1,
88};
89
90static struct at91_usbh_data __initdata cpuat91_usbh_data = {
91 .ports = 1,
92};
93
94static struct at91_udc_data __initdata cpuat91_udc_data = {
95 .vbus_pin = AT91_PIN_PC15,
96 .pullup_pin = AT91_PIN_PC14,
97};
98
99static struct at91_mmc_data __initdata cpuat91_mmc_data = {
100 .det_pin = AT91_PIN_PC2,
101 .wire4 = 1,
102};
103
104static struct physmap_flash_data cpuat91_flash_data = {
105 .width = 2,
106};
107
108static struct resource cpuat91_flash_resource = {
109 .start = AT91_CHIPSELECT_0,
110 .end = AT91_CHIPSELECT_0 + SZ_16M - 1,
111 .flags = IORESOURCE_MEM,
112};
113
114static struct platform_device cpuat91_norflash = {
115 .name = "physmap-flash",
116 .id = 0,
117 .dev = {
118 .platform_data = &cpuat91_flash_data,
119 },
120 .resource = &cpuat91_flash_resource,
121 .num_resources = 1,
122};
123
124#ifdef CONFIG_MTD_PLATRAM
125struct platdata_mtd_ram at91_sram_pdata = {
126 .mapname = "SRAM",
127 .bankwidth = 2,
128};
129
130static struct resource at91_sram_resource[] = {
131 [0] = {
132 .start = AT91RM9200_SRAM_BASE,
133 .end = AT91RM9200_SRAM_BASE + AT91RM9200_SRAM_SIZE - 1,
134 .flags = IORESOURCE_MEM,
135 },
136};
137
138static struct platform_device at91_sram = {
139 .name = "mtd-ram",
140 .id = 0,
141 .resource = at91_sram_resource,
142 .num_resources = ARRAY_SIZE(at91_sram_resource),
143 .dev = {
144 .platform_data = &at91_sram_pdata,
145 },
146};
147#endif /* MTD_PLATRAM */
148
149static struct platform_device *platform_devices[] __initdata = {
150 &cpuat91_norflash,
151#ifdef CONFIG_MTD_PLATRAM
152 &at91_sram,
153#endif /* CONFIG_MTD_PLATRAM */
154};
155
156static void __init cpuat91_board_init(void)
157{
158 /* Serial */
159 at91_add_device_serial();
160 /* LEDs. */
161 at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds));
162 /* Ethernet */
163 at91_add_device_eth(&cpuat91_eth_data);
164 /* USB Host */
165 at91_add_device_usbh(&cpuat91_usbh_data);
166 /* USB Device */
167 at91_add_device_udc(&cpuat91_udc_data);
168 /* MMC */
169 at91_add_device_mmc(0, &cpuat91_mmc_data);
170 /* I2C */
171 at91_add_device_i2c(NULL, 0);
172 /* Platform devices */
173 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
174}
175
176MACHINE_START(CPUAT91, "Eukrea")
177 /* Maintainer: Eric Benard - EUKREA Electromatique */
178 .phys_io = AT91_BASE_SYS,
179 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
180 .boot_params = AT91_SDRAM_BASE + 0x100,
181 .timer = &at91rm9200_timer,
182 .map_io = cpuat91_map_io,
183 .init_irq = cpuat91_init_irq,
184 .init_machine = cpuat91_board_init,
185MACHINE_END