1 --- a/arch/arm/mach-at91/Kconfig
2 +++ b/arch/arm/mach-at91/Kconfig
3 @@ -151,6 +151,12 @@ config MACH_TT9200
5 Select this if you are using Toptech's TT9200 board.
8 + bool "Figment Design Labs VersaLink"
9 + depends on ARCH_AT91RM9200
11 + Select this if you are using FDL's VersaLink board
15 # ----------------------------------------------------------
16 --- a/arch/arm/mach-at91/Makefile
17 +++ b/arch/arm/mach-at91/Makefile
18 @@ -29,6 +29,7 @@ obj-$(CONFIG_MACH_KB9200) += board-kb920
19 obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
20 obj-$(CONFIG_MACH_KAFA) += board-kafa.o
21 obj-$(CONFIG_MACH_CHUB) += board-chub.o
22 +obj-$(CONFIG_MACH_VLINK) += board-vlink.o
23 obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
24 obj-$(CONFIG_MACH_HOMEMATIC) += board-homematic.o
25 obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
27 +++ b/arch/arm/mach-at91/board-vlink.c
30 + * linux/arch/arm/mach-at91/board-vlink.c
32 + * Copyright (C) 2005 SAN People
33 + * Copyright (C) 2006,2007 Guthrie Consulting
36 + * This program is free software; you can redistribute it and/or modify
37 + * it under the terms of the GNU General Public License as published by
38 + * the Free Software Foundation; either version 2 of the License, or
39 + * (at your option) any later version.
41 + * This program is distributed in the hope that it will be useful,
42 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 + * GNU General Public License for more details.
46 + * You should have received a copy of the GNU General Public License
47 + * along with this program; if not, write to the Free Software
48 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 +#include <linux/types.h>
52 +#include <linux/init.h>
53 +#include <linux/mm.h>
54 +#include <linux/module.h>
55 +#include <linux/platform_device.h>
56 +#include <linux/spi/spi.h>
57 +#include <linux/mtd/physmap.h>
59 +#include <asm/hardware.h>
60 +#include <asm/setup.h>
61 +#include <asm/mach-types.h>
64 +#include <asm/mach/arch.h>
65 +#include <asm/mach/map.h>
66 +#include <asm/mach/irq.h>
68 +#include <asm/arch/board.h>
69 +#include <asm/arch/gpio.h>
70 +#include <asm/arch/at91rm9200_mc.h>
75 +static void __init vlink_map_io(void)
77 + /* Initialize processor: 18.432 MHz crystal */
78 + at91rm9200_initialize(18432000, AT91RM9200_PQFP);
80 + /* Setup the LEDs */
81 + at91_init_leds(AT91_PIN_PC14, AT91_PIN_PC15);
83 + /* Setup serial ports */
85 + /* DBGU on ttyS0. (RX and TX only) */
86 + at91_register_uart(0, 0, 0);
88 + /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DSR, DTR, DCD, RI) */
89 + at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS
90 + | ATMEL_UART_RTS | ATMEL_UART_DSR | ATMEL_UART_DTR
91 + | ATMEL_UART_DCD | ATMEL_UART_RI);
93 + /* USART0 on ttys2. (Rx, Tx, CTS, RTS, DTR, DCD, RI) */
94 + at91_register_uart(AT91RM9200_ID_US0, 2, ATMEL_UART_CTS
95 + | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
97 + /* USART3 on ttyS3. (Rx, Tx, CTS, RTS, DTR, DCD, RI) */
98 + at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS
99 + | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
101 + /* USART2 on ttyS4. (Rx and Tx only) */
102 + at91_register_uart(AT91RM9200_ID_US2, 4, 0);
104 + /* Console on ttyS0 (ie DBGU) */
105 + at91_set_serial_console(0);
108 +static void __init vlink_init_irq(void)
110 + at91rm9200_init_interrupts(NULL);
113 +static struct at91_eth_data __initdata vlink_eth_data = {
114 + .phy_irq_pin = AT91_PIN_PC4,
118 +static struct at91_usbh_data __initdata vlink_usbh_data = {
123 +static struct at91_udc_data __initdata vlink_udc_data = {
124 + .vbus_pin = AT91_PIN_PD4,
125 + .pullup_pin = AT91_PIN_PD5,
129 +static struct at91_mmc_data __initdata vlink_mmc_data = {
130 +// .det_pin = AT91_PIN_PB27,
133 +// .wp_pin = AT91_PIN_PA17,
136 +static struct spi_board_info vlink_spi_devices[] = {
137 + { /* DataFlash chip */
138 + .modalias = "mtd_dataflash",
140 + .max_speed_hz = 15 * 1000 * 1000,
142 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
143 + { /* DataFlash card */
144 + .modalias = "mtd_dataflash",
146 + .max_speed_hz = 15 * 1000 * 1000,
151 +/*static struct at91_gpio_led vlink_leds[] = {
154 + .gpio = AT91_PIN_PC14,
155 + .trigger = "heartbeat",
159 + .gpio = AT91_PIN_PC15,
160 + .trigger = "timer",
165 +static void __init vlink_board_init(void)
168 + at91_add_device_serial();
170 + at91_add_device_eth(&vlink_eth_data);
172 + at91_add_device_usbh(&vlink_usbh_data);
174 +// at91_add_device_udc(&vlink_udc_data);
175 +// at91_set_multi_drive(vlink_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
177 +// at91_add_device_i2c();
179 + at91_add_device_spi(vlink_spi_devices, ARRAY_SIZE(vlink_spi_devices));
180 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
181 + /* DataFlash card */
182 +// at91_set_gpio_output(AT91_PIN_PB22, 0);
185 +// at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
186 + at91_add_device_mmc(0, &vlink_mmc_data);
189 +// at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
192 + at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
193 + at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
194 + at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
195 + at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
196 + at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
197 + at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
200 + at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
201 + at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
202 + at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
204 +/* GSM Module Control */
205 + at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
207 +/* Test jig presence detection */
208 + at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
210 +/* Power indicator */
211 + at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
213 +/* USB Device control */
214 + at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
215 + at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
216 + at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
220 +MACHINE_START(VLINK, "FDL VersaLink")
221 + /* Maintainer: Guthrie Consulting */
222 + .phys_io = AT91_BASE_SYS,
223 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
224 + .boot_params = AT91_SDRAM_BASE + 0x100,
225 + .timer = &at91rm9200_timer,
226 + .map_io = vlink_map_io,
227 + .init_irq = vlink_init_irq,
228 + .init_machine = vlink_board_init,