diff options
| -rw-r--r-- | arch/arm/mach-at91/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/mach-at91/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-foxg20.c | 274 |
3 files changed, 281 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index c015b684b4fe..06fb66d53203 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
| @@ -362,6 +362,12 @@ config MACH_CPU9G20 | |||
| 362 | Select this if you are using a Eukrea Electromatique's | 362 | Select this if you are using a Eukrea Electromatique's |
| 363 | CPU9G20 Board <http://www.eukrea.com/> | 363 | CPU9G20 Board <http://www.eukrea.com/> |
| 364 | 364 | ||
| 365 | config MACH_ACMENETUSFOXG20 | ||
| 366 | bool "Acme Systems srl FOX Board G20" | ||
| 367 | help | ||
| 368 | Select this if you are using Acme Systems | ||
| 369 | FOX Board G20 <http://www.acmesystems.it> | ||
| 370 | |||
| 365 | config MACH_PORTUXG20 | 371 | config MACH_PORTUXG20 |
| 366 | bool "taskit PortuxG20" | 372 | bool "taskit PortuxG20" |
| 367 | help | 373 | help |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index d13add71f72a..5ef548ee58b4 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
| @@ -63,6 +63,7 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o | |||
| 63 | # AT91SAM9G20 board-specific support | 63 | # AT91SAM9G20 board-specific support |
| 64 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o | 64 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o |
| 65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o | 65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o |
| 66 | obj-$(CONFIG_MACH_ACMENETUSFOXG20) += board-foxg20.o | ||
| 66 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o | 67 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o |
| 67 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o | 68 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o |
| 68 | obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o | 69 | obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c new file mode 100644 index 000000000000..dfc7dfe738e4 --- /dev/null +++ b/arch/arm/mach-at91/board-foxg20.c | |||
| @@ -0,0 +1,274 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005 SAN People | ||
| 3 | * Copyright (C) 2008 Atmel | ||
| 4 | * Copyright (C) 2010 Lee McLoughlin - lee@lmmrtech.com | ||
| 5 | * Copyright (C) 2010 Sergio Tanzilli - tanzilli@acmesystems.it | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | #include <linux/spi/spi.h> | ||
| 28 | #include <linux/spi/at73c213.h> | ||
| 29 | #include <linux/gpio.h> | ||
| 30 | #include <linux/gpio_keys.h> | ||
| 31 | #include <linux/input.h> | ||
| 32 | #include <linux/clk.h> | ||
| 33 | #include <linux/w1-gpio.h> | ||
| 34 | |||
| 35 | #include <mach/hardware.h> | ||
| 36 | #include <asm/setup.h> | ||
| 37 | #include <asm/mach-types.h> | ||
| 38 | #include <asm/irq.h> | ||
| 39 | |||
| 40 | #include <asm/mach/arch.h> | ||
| 41 | #include <asm/mach/map.h> | ||
| 42 | #include <asm/mach/irq.h> | ||
| 43 | |||
| 44 | #include <mach/board.h> | ||
| 45 | #include <mach/at91sam9_smc.h> | ||
| 46 | |||
| 47 | #include "sam9_smc.h" | ||
| 48 | #include "generic.h" | ||
| 49 | |||
| 50 | /* | ||
| 51 | * The FOX Board G20 hardware comes as the "Netus G20" board with | ||
| 52 | * just the cpu, ram, dataflash and two header connectors. | ||
| 53 | * This is plugged into the FOX Board which provides the ethernet, | ||
| 54 | * usb, rtc, leds, switch, ... | ||
| 55 | * | ||
| 56 | * For more info visit: http://www.acmesystems.it/foxg20 | ||
| 57 | */ | ||
| 58 | |||
| 59 | |||
| 60 | static void __init foxg20_map_io(void) | ||
| 61 | { | ||
| 62 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 63 | at91sam9260_initialize(18432000); | ||
| 64 | |||
| 65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 66 | at91_register_uart(0, 0, 0); | ||
| 67 | |||
| 68 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 69 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
| 70 | ATMEL_UART_CTS | ||
| 71 | | ATMEL_UART_RTS | ||
| 72 | | ATMEL_UART_DTR | ||
| 73 | | ATMEL_UART_DSR | ||
| 74 | | ATMEL_UART_DCD | ||
| 75 | | ATMEL_UART_RI); | ||
| 76 | |||
| 77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
| 78 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
| 79 | ATMEL_UART_CTS | ||
| 80 | | ATMEL_UART_RTS); | ||
| 81 | |||
| 82 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
| 83 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
| 84 | |||
| 85 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
| 86 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
| 87 | ATMEL_UART_CTS | ||
| 88 | | ATMEL_UART_RTS); | ||
| 89 | |||
| 90 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
| 91 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
| 92 | |||
| 93 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
| 94 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
| 95 | |||
| 96 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
| 97 | at91_set_serial_console(0); | ||
| 98 | |||
| 99 | /* Set the internal pull-up resistor on DRXD */ | ||
| 100 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
| 101 | |||
| 102 | } | ||
| 103 | |||
| 104 | static void __init foxg20_init_irq(void) | ||
| 105 | { | ||
| 106 | at91sam9260_init_interrupts(NULL); | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
| 110 | /* | ||
| 111 | * USB Host port | ||
| 112 | */ | ||
| 113 | static struct at91_usbh_data __initdata foxg20_usbh_data = { | ||
| 114 | .ports = 2, | ||
| 115 | }; | ||
| 116 | |||
| 117 | /* | ||
| 118 | * USB Device port | ||
| 119 | */ | ||
| 120 | static struct at91_udc_data __initdata foxg20_udc_data = { | ||
| 121 | .vbus_pin = AT91_PIN_PC6, | ||
| 122 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
| 123 | }; | ||
| 124 | |||
| 125 | |||
| 126 | /* | ||
| 127 | * SPI devices. | ||
| 128 | */ | ||
| 129 | static struct spi_board_info foxg20_spi_devices[] = { | ||
| 130 | #if !defined(CONFIG_MMC_AT91) | ||
| 131 | { | ||
| 132 | .modalias = "mtd_dataflash", | ||
| 133 | .chip_select = 1, | ||
| 134 | .max_speed_hz = 15 * 1000 * 1000, | ||
| 135 | .bus_num = 0, | ||
| 136 | }, | ||
| 137 | #endif | ||
| 138 | }; | ||
| 139 | |||
| 140 | |||
| 141 | /* | ||
| 142 | * MACB Ethernet device | ||
| 143 | */ | ||
| 144 | static struct at91_eth_data __initdata foxg20_macb_data = { | ||
| 145 | .phy_irq_pin = AT91_PIN_PA7, | ||
| 146 | .is_rmii = 1, | ||
| 147 | }; | ||
| 148 | |||
| 149 | /* | ||
| 150 | * MCI (SD/MMC) | ||
| 151 | * det_pin, wp_pin and vcc_pin are not connected | ||
| 152 | */ | ||
| 153 | static struct at91_mmc_data __initdata foxg20_mmc_data = { | ||
| 154 | .slot_b = 1, | ||
| 155 | .wire4 = 1, | ||
| 156 | }; | ||
| 157 | |||
| 158 | |||
| 159 | /* | ||
| 160 | * LEDs | ||
| 161 | */ | ||
| 162 | static struct gpio_led foxg20_leds[] = { | ||
| 163 | { /* user led, red */ | ||
| 164 | .name = "user_led", | ||
| 165 | .gpio = AT91_PIN_PC7, | ||
| 166 | .active_low = 0, | ||
| 167 | .default_trigger = "heartbeat", | ||
| 168 | |||
