diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 323b47f..542e936 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -144,6 +144,13 @@ config MACH_YL9200 help Select this if you are using the ucDragon YL-9200 board. +config MACH_PORTUX920T + bool "taskit Portux920T" + depends on ARCH_AT91RM9200 + help + Select this if you are using taskit's Portux920T + + endif # ---------------------------------------------------------- diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index c69ff23..80c7f79 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_MACH_KAFA) += board-kafa.o obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o +obj-$(CONFIG_MACH_PORTUX920T) += board-portux920t.o # AT91SAM9260 board-specific support obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o diff --git a/arch/arm/mach-at91/board-portux920t.c b/arch/arm/mach-at91/board-portux920t.c new file mode 100644 index 0000000..7bcbc93 --- /dev/null +++ b/arch/arm/mach-at91/board-portux920t.c @@ -0,0 +1,199 @@ +/* + * linux/arch/arm/mach-at91/board-portux920t.c + * + * Copyright (C) 2007 taskit GmbH + * + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "generic.h" +#include "clock.h" + + +static void __init portux_map_io(void) +{ + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_PQFP); + + /* DBGU on ttyS0. (Rx & Tx only) */ + at91_register_uart(0, 0, 0); + + /* USART0 on ttyS1. (Rx, Tx only) */ + at91_register_uart(AT91RM9200_ID_US0, 1, 0); + + /* USART1 on ttyS2. (Rx, Tx only) */ + at91_register_uart(AT91RM9200_ID_US1, 2, 0); + + /* USART2 on ttyS3. (Rx, Tx only) */ + at91_register_uart(AT91RM9200_ID_US2, 3, 0); + + /* USART3 on ttyS4. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ + at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | ATMEL_UART_RTS + | ATMEL_UART_DTR | ATMEL_UART_DSR + | ATMEL_UART_DCD | ATMEL_UART_RI); + + /* set serial console to ttyS0 (ie, DBGU) */ + at91_set_serial_console(0); +} + +static void __init portux_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + +static struct at91_eth_data __initdata portux_eth_data = { + .phy_irq_pin = AT91_PIN_PC4, + .is_rmii = 1, +}; + +static struct at91_usbh_data __initdata portux_usbh_data = { + .ports = 1, +}; + +static struct at91_udc_data __initdata portux_udc_data = { + .vbus_pin = AT91_PIN_PC5, + .pullup_pin = AT91_PIN_PB17, +}; + + + +static struct at91_mmc_data __initdata portux_mmc_data = { + .slot_b = 0, + .wire4 = 0, +}; + + + +#define PORTUX_FLASH_BASE AT91_CHIPSELECT_0 +#define PORTUX_FLASH_SIZE 0x1000000 + +static struct physmap_flash_data portux_flash_data = { + .width = 2, +}; + +static struct resource portux_flash_resource = { + .start = PORTUX_FLASH_BASE, + .end = PORTUX_FLASH_BASE + PORTUX_FLASH_SIZE - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device portux_flash = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &portux_flash_data, + }, + .resource = &portux_flash_resource, + .num_resources = 1, +}; + + +#ifdef CONFIG_W1_MASTER_AT91GPIO +static struct at91_gpio_w1_data portux_w1_data = { + .pin = AT91_PIN_PB16, +}; + +static struct platform_device portux_w1_device = { + .name = "w1_at91gpio", + .id = -1, + .dev = { + .platform_data = &portux_w1_data, + }, + .num_resources = 0, +}; + +static void __init portux_add_w1(void) +{ + platform_device_register(&portux_w1_device); +} +#else +static void __init portux_add_w1(void) {} +#endif + +static struct spi_board_info portux_spi_devices[] = { + { /* User accessible spi - cs1 (1Mhz) */ + .modalias = "spidev", + .chip_select = 1, + .max_speed_hz = 1000 * 1000, + }, + { /* User accessible spi - cs2 (1MHz) */ + .modalias = "spidev", + .chip_select = 2, + .max_speed_hz = 1 * 1000 * 1000, + }, + { /* User accessible spi - cs3 (10MHz) */ + .modalias = "spidev", + .chip_select = 3, + .max_speed_hz = 10 * 1000 * 1000, + }, +}; + +static void __init portux_board_init(void) +{ + /* Serial */ + at91_add_device_serial(); + /* Ethernet */ + at91_add_device_eth(&portux_eth_data); + /* USB Host */ + at91_add_device_usbh(&portux_usbh_data); + /* USB Device */ + at91_add_device_udc(&portux_udc_data); + at91_set_multi_drive(portux_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */ + /* I2C */ + at91_add_device_i2c(NULL, 0); + /* SPI */ + at91_add_device_spi(portux_spi_devices, 3); + /* MMC */ + at91_add_device_mmc(0, &portux_mmc_data); + /* NOR Flash */ + platform_device_register(&portux_flash); + + portux_add_w1(); + +} + +MACHINE_START(PORTUX920T, "Portux920T") + /* Maintainer: taskit GmbH */ + .phys_io = AT91_BASE_SYS, + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, + .boot_params = AT91_SDRAM_BASE, + .timer = &at91rm9200_timer, + .map_io = portux_map_io, + .init_irq = portux_init_irq, + .init_machine = portux_board_init, +MACHINE_END