Commit Graph

27 Commits

Author SHA1 Message Date
Hans-Christian Egtvedt 1c2f173796 [AVR32] Wire up AT73C213 sound driver on ATSTK1000 board
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:19:14 +02:00
David Brownell 82c54f864f [AVR32] ngw100 i2c-gpio tweaks
Make the NGW100 bitbang i2c use open drain signaling.

Also, speed it up, so it's closer to 100 kHz ... the code paths seem
to be long enough that the udelay isn't dominating bit times.  The
peak bit rate I observed was around 125 kHz, but that's with large
delays (usually before ACK/NAK) which hold the overall rate down to
around 80 kHz (call it 100 usec/byte on average).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11 13:32:55 +02:00
Kristoffer Nyborg Gregertsen af8184718a [AVR32] SMC configuration in clock cycles
This patch makes the SMC configuration take timings in clock cycles
instead of nanoseconds. A function to calculate timings in clock
cycles is added.

This patch removes the rounding troubles of the previous SMC
configuration method.

[hskinnemoen@atmel.com: fix atstk1002/atngw100 flash config]
Signed-off-by: Kristoffer Nyborg Gregertsen <gregerts@stud.ntnu.no>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11 13:32:49 +02:00
Haavard Skinnemoen 6fcf061511 [AVR32] Wire up USBA device
Implement at32_add_device_usba() and use it to wire up the USBA device
on ATSTK1000 and ATNGW100.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11 11:40:27 +02:00
Haavard Skinnemoen 54bb69e250 [AVR32] Wire up i2c-gpio on the ATNGW100 board
The NGW100 has a board controller which is hooked up to the TWI lines
on AP7000. Since the TWI driver isn't in mainline, use the i2c-gpio
driver in the mean time.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-08-15 16:36:55 +02:00
David Brownell ad93ab0a6e [AVR32] leds-gpio for stk1000
Add GPIO led support: J2 to either block of LEDs on the STK1000.

This uses the new LEDS_GPIO driver, and sets up a heartbeat trigger by
default ... either bright (!!) amber, or a more interesting purple.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-08-15 16:36:55 +02:00
Linus Torvalds d7f5e3df35 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Convert from struct class_device to struct device
  leds: leds-gpio for ngw100
  leds: Add warning printks in error paths
  leds: Fix trigger unregister_simple if register_simple fails
  leds: Use menuconfig objects II - LED
  leds: Teach leds-gpio to handle timer-unsafe GPIOs
  leds: Add generic GPIO LED driver
2007-07-22 11:22:01 -07:00
Haavard Skinnemoen 587ca7619a [AVR32] Initialize phy_mask for both macb devices
The STK1000 uses pullups on the MDIO lines to the PHY, but they are
too weak. This causes the PHY layer to detect PHYs on all possible MII
addresses. Mask out all but the correct address to prevent this from
happening.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18 20:47:04 +02:00
Kristoffer Nyborg Gregertsen d4003ba0a1 [AVR32] Don't wire up macb0 unless SW6 is in default position
If the user wants to sacrifice macb0 for more GPIOs, let him.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18 20:45:52 +02:00
Hans-Christian Egtvedt 95a42267cd [AVR32] Wire up SSC platform device 0 as TX on ATSTK1000 board
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18 20:45:52 +02:00
David Brownell a8e93ed8cb [AVR32] Make STK1000 mux settings configurable
This adds some STK1002-specific config options covering the jumper settings,
so the kernel can automatically be configured to include the relevant devices.

One of them replaces the previous internal SW2_DEFAULT setting; SPI config
is affected by two of the jumpers; and a fourth one switches between LCD and
the second Ethernet connector.  (There's more that to be done.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18 20:45:51 +02:00
David Brownell f9f451d9ca leds: leds-gpio for ngw100
Add GPIO leds to the NGW100 platform and its defconfig.
Access through /sys/class/leds/{a,b,sys}/* files; one
defaults to a heartbeat.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-16 01:15:51 +01:00
ben.nizette@iinet.net.au 7f8b9acae8 [AVR32] NGW100, Remove relics of the old USART mapping scheme
USART mapping used to be accomplished by the manual filling of
at32_usart_map[] and at32_nr_usarts.  This has now been replaced
with at32_map_usart() so we can remove these variables.

Signed-off-by: Ben Nizette <ben.nizette@iinet.net.au>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-06-23 14:52:58 +02:00
Haavard Skinnemoen 2fdfe8d9a2 [AVR32] STK1000: Set SPI_MODE_3 in the ltv350qv board info
In the latest incarnation of the ltv350qv driver the call to
spi_setup() has been removed. So we need to initialize things more
carefully in the board info struct.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-06-14 18:30:50 +02:00
Haavard Skinnemoen d0a2b7af27 [AVR32] Implement platform hooks for atmel_lcdfb driver
This modifies and extends the existing lcdc platform code to support
the new atmel_lcdfb driver. The ATSTK1000 board code is set up to use
the on-board Samsung LTV350QV LCD panel.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-05-15 14:13:27 +02:00
Haavard Skinnemoen 9ca20a8366 [AVR32] Board code for ATNGW100
Add board code and defconfig for the ATNGW100 Network Gateway kit.
For more information about this board, see

http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4102

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27 13:44:15 +02:00
Haavard Skinnemoen d80e2bb126 [AVR32] Get rid of board_setup_fbmem()
Since the core setup code takes care of both allocation and
reservation of framebuffer memory, there's no need for this board-
specific hook anymore. Replace it with two global variables,
fbmem_start and fbmem_size, which can be used directly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27 13:44:15 +02:00
Haavard Skinnemoen 41d8ca452f [AVR32] Use per-controller spi_board_info structures
Set up one spi_board_info array per controller and pass this to
at32_add_device_spi so that it can set up any GPIO pins for chip
selects based on this information.

Extracted from a patch by David Brownell and adapted slightly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-16 14:01:40 +01:00
Haavard Skinnemoen 3d60ee1b04 [AVR32] SPI platform code update
Move stuff in spi.c into ATSTK1002 board code and update SPI
platform device definitions according to the new GPIO API.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09 15:01:59 +01:00
Haavard Skinnemoen 7f9f467863 [AVR32] Add PIOE device and reserve SDRAM pins
The PIOE device was left out before because it muxes SDRAM pins (and
is therefore a bit dangerous to mess with) and because no existing
drivers had any use for it.

It is needed for CompactFlash, however, and now that we have a way
to protect the SDRAM pins, it can be safely added.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09 15:01:58 +01:00
David Brownell a3d912c8fa [AVR32] fix serial port setup on ATSTK1000
Fixes to USART setup on the stk-1000 ... don't configure USART 2, since
its TXD/RXD are used for INT-A and INT-B buttons; and configure USART 0
(for IRDA, and with corrected IRQ) iff SW2 has a non-default setting.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09 15:01:57 +01:00
Haavard Skinnemoen c164b90135 [AVR32] Remove mii_phy_addr and eth_addr from eth_platform_data
The macb driver will probe for the PHY chip and read the mac address
from the MACB registers, so we don't need them in eth_platform_data
anymore.

Since u-boot doesn't currently initialize the MACB registers with the
mac addresses, the tag parsing code is kept but instead of sticking
the information into eth_platform_data, it uses it to initialize
the MACB registers (in case the boot loader didn't do it.) This code
should be unnecessary at some point in the future.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08 13:06:19 +01:00
Haavard Skinnemoen a6f92f3dc8 [AVR32] Move ethernet tag parsing to board-specific code
By moving the ethernet tag parsing to the board-specific code we avoid
the issue of figuring out which device we're supposed to attach the
information to.  The board specific code knows this because it's
where the actual devices are instantiated.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08 13:06:19 +01:00
Haavard Skinnemoen e9a43850e6 AVR32: Get rid of board_early_init
board_early_init() is left over from some early prototyping work
where we had to initialize the SDRAM controller ourselves. This
depends on the kernel being loaded into static RAM, which just
isn't possible on any commercially available products today.

In order to run without a boot loader, we need to create a zImage
stub or have the debugger initialize the SDRAM for us (for really
low-level debugging)

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-11-06 10:43:23 +01:00
Haavard Skinnemoen c194588dba [PATCH] AVR32: Allow renumbering of serial devices
Allow the board to remap actual USART peripheral devices to serial
devices by calling at32_map_usart(hw_id, serial_line). This ensures
that even though ATSTK1002 uses USART1 as the first serial port, it
will still have a ttyS0 device.

This also adds a board-specific early setup hook and moves the
at32_setup_serial_console() call there from the platform code.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:06 -07:00
Haavard Skinnemoen 2514183dff [PATCH] AVR32 MTD: AT49BV6416 platform device for ATSTK1000
FRegister a platform device for the AT49BV6416 NOR flash chip on the ATSTK1000
development board for use by the physmap MTD driver.

The SMC timings are set up before the platform device is registered so that no
board-specific mapping driver is necessary.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 08:48:54 -07:00
Haavard Skinnemoen 5f97f7f940 [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 08:48:54 -07:00