[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
/*
|
|
|
|
* ATSTK1000 board-specific setup code.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005-2006 Atmel Corporation
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
#include <linux/bootmem.h>
|
2007-03-22 01:08:49 +08:00
|
|
|
#include <linux/fb.h>
|
[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
#include <linux/init.h>
|
2007-10-29 23:02:51 +08:00
|
|
|
#include <linux/platform_device.h>
|
[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
|
2007-03-22 01:08:49 +08:00
|
|
|
#include <video/atmel_lcdc.h>
|
[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
|
2007-03-22 01:08:49 +08:00
|
|
|
#include <asm/setup.h>
|
2007-10-29 23:02:51 +08:00
|
|
|
|
2008-08-05 19:57:38 +08:00
|
|
|
#include <mach/at32ap700x.h>
|
|
|
|
#include <mach/board.h>
|
|
|
|
#include <mach/portmux.h>
|
[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
|
2007-03-22 01:08:49 +08:00
|
|
|
#include "atstk1000.h"
|
|
|
|
|
[PATCH] avr32 architecture
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
CPU and the AT32STK1000 development board.
AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
cost-sensitive embedded applications, with particular emphasis on low power
consumption and high code density. The AVR32 architecture is not binary
compatible with earlier 8-bit AVR architectures.
The AVR32 architecture, including the instruction set, is described by the
AVR32 Architecture Manual, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf
The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
features a 7-stage pipeline, 16KB instruction and data caches and a full
Memory Management Unit. It also comes with a large set of integrated
peripherals, many of which are shared with the AT91 ARM-based controllers from
Atmel.
Full data sheet is available from
http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
while the CPU core implementation including caches and MMU is documented by
the AVR32 AP Technical Reference, available from
http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
Information about the AT32STK1000 development board can be found at
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918
including a BSP CD image with an earlier version of this patch, development
tools (binaries and source/patches) and a root filesystem image suitable for
booting from SD card.
Alternatively, there's a preliminary "getting started" guide available at
http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
to the sources and patches you will need in order to set up a cross-compiling
environment for avr32-linux.
This patch, as well as the other patches included with the BSP and the
toolchain patches, is actively supported by Atmel Corporation.
[dmccr@us.ibm.com: Fix more pxx_page macro locations]
[bunk@stusta.de: fix `make defconfig']
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave McCracken <dmccr@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 14:32:13 +08:00
|
|
|
/* Initialized by bootloader-specific startup code. */
|
|
|
|
struct tag *bootloader_tags __initdata;
|
2007-03-22 01:08:49 +08:00
|
|
|
|
|
|
|
static struct fb_videomode __initdata ltv350qv_modes[] = {
|
|
|
|
{
|
|
|
|
.name = "320x240 @ 75",
|
|
|
|
.refresh = 75,
|
|
|
|
.xres = 320, .yres = 240,
|
|
|
|
.pixclock = KHZ2PICOS(6891),
|
|
|
|
|
|
|
|
.left_margin = 17, .right_margin = 33,
|
|
|
|
.upper_margin = 10, .lower_margin = 10,
|
|
|
|
.hsync_len = 16, .vsync_len = 1,
|
|
|
|
|
|
|
|
.sync = 0,
|
|
|
|
.vmode = FB_VMODE_NONINTERLACED,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct fb_monspecs __initdata atstk1000_default_monspecs = {
|
|
|
|
.manufacturer = "SNG",
|
|
|
|
.monitor = "LTV350QV",
|
|
|
|
.modedb = ltv350qv_modes,
|
|
|
|
.modedb_len = ARRAY_SIZE(ltv350qv_modes),
|
|
|
|
.hfmin = 14820,
|
|
|
|
.hfmax = 22230,
|
|
|
|
.vfmin = 60,
|
|
|
|
.vfmax = 90,
|
|
|
|
.dclkmax = 30000000,
|
|
|
|
};
|
|
|
|
|
2013-03-28 22:53:42 +08:00
|
|
|
struct atmel_lcdfb_pdata __initdata atstk1000_lcdc_data = {
|
2007-03-22 01:08:49 +08:00
|
|
|
.default_bpp = 24,
|
|
|
|
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
|
|
|
|
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
|
|
|
|
| ATMEL_LCDC_INVCLK
|
|
|
|
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
|
|
|
|
| ATMEL_LCDC_MEMOR_BIG),
|
|
|
|
.default_monspecs = &atstk1000_default_monspecs,
|
|
|
|
.guard_time = 2,
|
|
|
|
};
|
2007-10-29 23:02:51 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_BOARD_ATSTK1000_J2_LED
|
|
|
|
#include <linux/leds.h>
|
|
|
|
|
|
|
|
static struct gpio_led stk1000_j2_led[] = {
|
|
|
|
#ifdef CONFIG_BOARD_ATSTK1000_J2_LED8
|
|
|
|
#define LEDSTRING "J2 jumpered to LED8"
|
|
|
|
{ .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), },
|
|
|
|
{ .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), },
|
|
|
|
{ .name = "led2:amber", .gpio = GPIO_PIN_PB(10), },
|
|
|
|
{ .name = "led3:amber", .gpio = GPIO_PIN_PB(13), },
|
|
|
|
{ .name = "led4:amber", .gpio = GPIO_PIN_PB(14), },
|
|
|
|
{ .name = "led5:amber", .gpio = GPIO_PIN_PB(15), },
|
|
|
|
{ .name = "led6:amber", .gpio = GPIO_PIN_PB(16), },
|
|
|
|
{ .name = "led7:amber", .gpio = GPIO_PIN_PB(30),
|
|
|
|
.default_trigger = "heartbeat", },
|
|
|
|
#else /* RGB */
|
|
|
|
#define LEDSTRING "J2 jumpered to RGB LEDs"
|
|
|
|
{ .name = "r1:red", .gpio = GPIO_PIN_PB( 8), },
|
|
|
|
{ .name = "g1:green", .gpio = GPIO_PIN_PB(10), },
|
|
|
|
{ .name = "b1:blue", .gpio = GPIO_PIN_PB(14), },
|
|
|
|
|
|
|
|
{ .name = "r2:red", .gpio = GPIO_PIN_PB( 9),
|
|
|
|
.default_trigger = "heartbeat", },
|
|
|
|
{ .name = "g2:green", .gpio = GPIO_PIN_PB(13), },
|
|
|
|
{ .name = "b2:blue", .gpio = GPIO_PIN_PB(15),
|
|
|
|
.default_trigger = "heartbeat", },
|
|
|
|
/* PB16, PB30 unused */
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct gpio_led_platform_data stk1000_j2_led_data = {
|
|
|
|
.num_leds = ARRAY_SIZE(stk1000_j2_led),
|
|
|
|
.leds = stk1000_j2_led,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device stk1000_j2_led_dev = {
|
|
|
|
.name = "leds-gpio",
|
|
|
|
.id = 2, /* gpio block J2 */
|
|
|
|
.dev = {
|
|
|
|
.platform_data = &stk1000_j2_led_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
void __init atstk1000_setup_j2_leds(void)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(stk1000_j2_led); i++)
|
|
|
|
at32_select_gpio(stk1000_j2_led[i].gpio, AT32_GPIOF_OUTPUT);
|
|
|
|
|
|
|
|
printk("STK1000: " LEDSTRING "\n");
|
|
|
|
platform_device_register(&stk1000_j2_led_dev);
|
|
|
|
}
|
|
|
|
#else /* CONFIG_BOARD_ATSTK1000_J2_LED */
|
|
|
|
void __init atstk1000_setup_j2_leds(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_BOARD_ATSTK1000_J2_LED */
|