Commit Graph

82 Commits

Author SHA1 Message Date
Haavard Skinnemoen fbe0b8d582 Merge branch 'avr32-arch' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2009-06-13 15:34:22 +02:00
Peter Ma 4024533e60 avr32: Add support for Mediama RMTx add-on board for ATNGW100
Signed-off-by: Peter Ma <pma@mediamatech.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-06-08 12:55:35 +02:00
Peter Ma a89ab11454 avr32: Change Atmel ATNGW100 config to add choice of add-on board
Signed-off-by: Peter Ma <pma@mediamatech.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-06-08 12:54:02 +02:00
Mark Jackson c878b7d604 Fix MIMC200 board LCD init
This patch updates the LCD init code for the MIMC200 board.

V2 fixes a .yres typo and corrects an incorrect setup value
in the call to at32_add_device_lcdc()

Without this patch, the lcd setup is wrong and won't display images
correctly (if at all !!)

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-06-03 15:10:04 +02:00
Jonas Larsson 7ebcfcf197 avr32: Solves problem with inverted MCI detect pin on Merisc board
Same patch as before, modified to use bool.

This patch solves the problem with the inverted mci detect pin on Merisc
boards.

Signed-off-by: Jonas Larsson <jonas.larsson@martinsson.se>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-08 20:48:02 +02:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Peter Ma bf4861cf3e avr32: add RTS/CTS/CLK pin selection for the USARTs
Adds extra parameter to AT32 at32_map_usart(), so as to reserve
RTS/CTS/CLK pins.

All boards under arch/avr32/boards have been updated (trivial change), but
not all have been tested.

Signed-off-by: Peter Ma <pma@mediamatech.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-01 16:13:45 +02:00
Jonas Larsson a6b6b5ff8f Add RTC support for Merisc boards
This patch adds RTC support for the Merisc boards.

Signed-off-by: Jonas Larsson <jonas.larsson@martinsson.se>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-30 17:17:58 +02:00
Hans-Christian Egtvedt 2f47c8c555 avr32: at32ap700x: setup DMA for AC97C in the machine code
This patch will adjust the setup the DMA controller for the AC97
Controller in the at32ap700x machine code. This setup matches the new
ALSA driver for the AC97C.

The struct ac97c_platform_data has been moved into its own header file
located in the sound include path.

Tested on ATSTK1006 + ATSTK1000.

This patch will setup the AC97 controller properly for the adjusted
machine code. Both EVKLCD10x and Hammerhead board has been updated.

Tested on EVKLCD10x, and copied to Hammerhead board.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
[haavard.skinnemoen@atmel.com: fold with board code update]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-27 16:15:39 +01:00
Hans-Christian Egtvedt 6b0c935142 avr32: at32ap700x: setup DMA for ABDAC in the machine code
This patch will adjust the setup the DMA controller for the Audio
Bistream DAC in the at32ap700x machine code. This setup matches the new
ALSA driver for the ABDAC.

Tested on ATSTK1006 + ATSTK1000.

This patch will setup the needed platform data for the Audio Bistream
DAC used by the Favr-32 board.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
[haavard.skinnemoen@atmel.com: fold board code update]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-27 16:15:39 +01:00
Jonas Larsson a16fffdd8e Add Merisc board support
Merisc is the family name for a range of AVR32-based boards.

The boards are designed to be used in a man-machine interfacing
environment, utilizing a touch-based graphical user interface. They host
a vast range of I/O peripherals as well as a large SDRAM & Flash memory
bank.

For more information see: http://www.martinsson.se/merisc

Signed-off-by: Jonas Larsson <jonas.larsson@martinsson.se>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-27 15:02:34 +01:00
Hans-Christian Egtvedt b2a49ed008 avr32: fix timing LCD parameters for EVKLCD10X boards
This patch adjusts the timing parameters for the Kyocera LCD panels
connected on the EVKLCD10X addon boards.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-26 14:58:58 +01:00
Hans-Christian Egtvedt 30754acf29 avr32: use GPIO line PB15 on EVKLCD10x boards for backlight
The PB15 GPIO line is used to control the enable and disable signal for
the backlight regulator on EVKLCD10x boards. This patch hands the I/O
line over to the LCDC driver, which will control when to enable and
disable the backlight.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
[haavard.skinnemoen@atmel.com: reverted ac97c change]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-26 14:58:28 +01:00
Hans-Christian Egtvedt fe272b5bd1 avr32: configure MCI detect and write protect pins for EVKLCD10x boards
This patch removes the special handling of MCI platform data for
EVKLCD10x boards. This is now possible since the pin mask for the LCD
controller is no longer reserving the I/O lines used for MCI card
detection and write protect.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-26 14:49:40 +01:00
Hans-Christian Egtvedt ecb1bd894e avr32: set pin mask to alternative 18 bpp for EVKLCD10x boards
This patch will set the pin mask to alternative 18 bits per pixel output
for EVKLCD10x boards.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-26 14:49:39 +01:00
Huang Weiyi 5201b0a47b avr32: remove duplicated #include
Remove duplicated #include in arch/avr32/boards/hammerhead/flash.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Alex Raimondi <mailinglist@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-24 09:16:51 +01:00
Haavard Skinnemoen 4209324a74 avr32: data param to at32_add_device_mci() must be non-NULL
at32_add_device_mci() will refuse to add the mci device if the data
parameter is NULL. Fix up the favr-32 and hammerhead boards so that this
doesn't happen.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Alex Raimondi <mailinglist@miromico.ch>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
2009-01-05 17:14:22 +01:00
Haavard Skinnemoen 0e49005090 Merge branch 'move-atmel-mci-h' into boards 2009-01-05 16:36:07 +01:00
Nicolas Ferre c42aa775cc atmel-mci: move atmel-mci.h file to include/linux
Needed to use the atmel-mci driver in an architecture
independant maner.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-01-05 16:35:31 +01:00
Alex Raimondi dd5e1339e5 avr32: Hammerhead board support
The Hammerhead platform is built around a AVR32 32-bit microcontroller
from Atmel.  It offers versatile peripherals, such as ethernet, usb
device, usb host etc.

The board also incooperates a power supply and is a Power over Ethernet
(PoE) Powered Device (PD).

Additonally, a Cyclone III FPGA from Altera is integrated on the board.
The FPGA is mapped into the 32-bit AVR memory bus. The FPGA offers two
DDR2 SDRAM interfaces, which will cover even the most exceptional need
of memory bandwidth. Together with the onboard video decoder the board
is ready for video processing.

This patch does include the basic support for the fpga device driver,
but not the device driver itself.

Signed-off-by: Alex Raimondi <mailinglist@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-01-05 15:52:04 +01:00
Haavard Skinnemoen bc08969fe6 Merge branch 'cleanups' into boards 2009-01-05 15:51:52 +01:00
Alex Raimondi adde42b583 avr32: Allow reserving multiple pins at once
at32_reserve_pin now takes an u32 bitmask rather than a single pin.
This allows to reserve multiple pins at once.

Remove (undocumented) SDCS (pin PE26) from reservation in board
setup code.

Signed-off-by: Alex Raimondi <raimondi@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-01-05 12:16:13 +01:00
Haavard Skinnemoen 45f926912f favr-32: Remove deprecated call
at32_add_system_devices() is deprecated, so remove the call to it.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-01-05 12:15:14 +01:00
Mark Jackson 8d3d3fb922 MIMC200: Remove deprecated call
This patch removes a call to the deprecated function
at32_add_system_devices().

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-01-05 11:35:16 +01:00
Haavard Skinnemoen 8983fdb508 avr32: favr-32 build fix
The favr-32 board code still refers to the old asm/arch header files
which were moved to mach/ some time ago.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-18 16:22:13 +01:00
Haavard Skinnemoen d9214556b1 Merge branches 'boards' and 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2008-10-23 15:24:10 +02:00
Haavard Skinnemoen e82c6106b0 avr32: Fix GPIO initcall breakage
Add essential system devices, including GPIO controllers, automatically
at core_initcall time. This ensures that the devices are there when the
PIO driver gets initialized at postcore_initcall, fixing a bug exposed
by commit d6634db8fe "avr32: Use
platform_driver_probe for pio platform driver".

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-23 15:18:33 +02:00
Mark Jackson 5b50c166b7 avr32: Add MIMC200 board support
Please consider the following patch which adds support for a new AVR32
based board.

The board is closely based on Atmel's NGW100 reference board, but has an
extra 8MByte FLASH and 128KByte FRAM.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-13 16:36:25 +02:00
Hans-Christian Egtvedt 45c349b58c avr32: add support for EarthLCD Favr-32 board
This patch adds support for the Favr-32 board made by EarthLCD.

This kit, which is also called ezLCD-101, has a 10.4" touch screen LCD panel,
16 MB 32-bit SDRAM, 8 MB parallel flash, Ethernet, audio out, USB device,
SD-card slot, USART and various other connectors for cennecting stuff to SPI,
I2C, GPIO, etc.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-13 16:01:18 +02:00
Hans-Christian Egtvedt a3bee42f05 avr32: Add support for EVKLCD10X addon boards
This patch lets the user enable support for EVKLCD100 and EVKLCD101
(refered to by EVKLCD10X). By enabling EVKLCD10X support the LCD
controller and AC97 controller platform devices are added.

The user can also choose between the EVKLCD100 (QVGA display) and the
EVKLCD101 (VGA display), this is added to automagically select the
correct panel timing and resolution parameters.

Enabling support for EVKLCD10X addon board will cripple the MCI platform
device a bit since they share two GPIO lines (detect and write-protect).
These two lines are disabled when EVKLCD10X is enabled.

The default configurations are based upon ATNGW100, but with added AC97C
and LCDC driver. Virtual terminal is also enabled by default for
EVKLCD10X boards.

Verified on hardware with a NGW100 + EVKLCD100/101.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-13 12:56:24 +02:00
Haavard Skinnemoen 6eb3ebe04d avr32: Fix build failures in board code
Fix a few instances of board code breakage introduced by the atmel-mci
platform interface changes.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-12 16:13:28 +02:00
Julien May caf18f19ee avr32: Allow selecting multiple pins at once
at32_select_periph() now takes an u32 bitmask rather than a single pin.
This allows to set multiple pins at once.

Signed-off-by: Alex Raimondi <mailinglist@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-12 15:54:00 +02:00
Haavard Skinnemoen 0d62950125 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/atmel-mci-2.6.28 2008-10-12 15:44:33 +02:00
Haavard Skinnemoen 6b918657b7 atmel-mci: Platform code for supporting multiple mmc slots
Add the necessary platform infrastructure to support multiple mmc/sdcard
slots all at once through a single controller. Currently, the driver
will use the first valid slot it finds and stick with that, but later
patches will add support for switching between several slots on the fly.

Extend the platform data structure with per-slot information: MMC/SDcard
bus width and card detect/write protect pins. This will affect the pin
muxing as well as the capabilities announced to the mmc core.

Note that board code is now required to supply a mci_platform_data
struct to at32_add_device_mci().

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-05 20:39:21 +02:00
David Brownell 96706600de ngw100: export J15 through sysfs
The NGW100 board has jumper J15 (near the reset button) which
is unused.  This patch exports it through the GPIO sysfs support
(as /sys/class/gpio/gpio62/value) so that it's easily queried
by boot scripts or whatever might want to know if the jumper
has been installed (value = 0) or not (value = 1, "default").

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
[haavard.skinnemoen@atmel.com: add missing include]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-22 09:51:01 +02:00
Julien May 7066412488 avr32: Allow fine-grained control over LCDC pins
This replaces the pin_config param with an u64 pin_mask in
at32_add_device_lcdc, allowing a board-maintainer to indivually select
specific lcdc pins.

Signed-off-by: Alex Raimondi <raimondi@miromico.ch>
Signed-off-by: Julien May <jmay@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-22 09:51:01 +02:00
Haavard Skinnemoen 7fb61a7b6f atstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y
The #ifdef surrounding the code adding the mmc controller had a typo,
causing it to be compiled even when mmc was supposed to be disabled.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-19 18:21:29 +02:00
Haavard Skinnemoen 33f197a603 avr32: Make atstk1006_nand_data definition static
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-08 12:44:56 +02:00
Haavard Skinnemoen 0fe9497e77 avr32: Reduce DataFlash bus speed to 8 MHz on ATNGW100
Doing this in combination with "atmel_spi: fix hang due to missed
interrupt" appears to eliminate the overruns I'm seeing when using
JFFS2-on-DataFlash as /usr filesystem on the ATNGW100.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-08 12:44:41 +02:00
Haavard Skinnemoen 3663b736a5 avr32: Use <mach/foo.h> instead of <asm/arch/foo.h>
Update all avr32-specific files to use the new platform-specific header
locations. Drivers shared with ARM are left alone for now.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-05 14:36:57 +02:00
David Brownell 3c26e17032 avr32: some mmc/sd cleanups
Minor cleanups for the MMC/SD support on avr32:

 - Make at32_add_device_mci() properly initialize "missing"
   platform data ... so boards like STK1002 won't try GPIO 0.

 - Switch over to gpio_is_valid() instead of testing for only
   one designated value.

 - Provide STK1002 platform data for the unlikely case that
   switches are set so first Ethernet controller isn't in use.
   (That's the only way to get card detect and writeprotect
   switch sensing on the STK1000.)

And get rid of one "unused variable" warning.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-07-27 13:57:36 +02:00
Haavard Skinnemoen eda3d8f560 Merge commit 'upstream/master' 2008-07-27 13:54:08 +02:00
David Woodhouse ff877ea80e Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 10:40:14 -04:00
Adrian Bunk 62fe8378d9 fix avr32 build errors
Commit 7d2be0749a
(atmel-mci: Driver for Atmel on-chip MMC controllers)
causes build errors like:

<--  snip  -->

...
  CC      arch/avr32/boards/atstk1000/atstk1003.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/avr32/boards/atstk1000/atstk1003.c: In function 'atstk1003_init':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/avr32/boards/atstk1000/atstk1003.c:157: error: too few arguments to function 'at32_add_device_mci'
make[2]: *** [arch/avr32/boards/atstk1000/atstk1003.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-07-17 21:01:34 +02:00
Haavard Skinnemoen 7d2be0749a atmel-mci: Driver for Atmel on-chip MMC controllers
This is a driver for the MMC controller on the AP7000 chips from
Atmel. It should in theory work on AT91 systems too with some
tweaking, but since the DMA interface is quite different, it's not
entirely clear if it's worth merging this with the at91_mci driver.

This driver has been around for a while in BSPs and kernel sources
provided by Atmel, but this particular version uses the generic DMA
Engine framework (with the slave extensions) instead of an
avr32-only DMA controller framework.

This driver can also use PIO transfers when no DMA channels are
available, and for transfers where using DMA may be difficult or
impractical for some reason (e.g. the DMA setup overhead is usually
not worth it for very short transfers, and badly aligned buffers or
lengths are difficult to handle.)

Currently, the driver only support PIO transfers. DMA support has been
split out to a separate patch to hopefully make it easier to review.

The driver has been tested using mmc-block and ext3fs on several SD,
SDHC and MMC+ cards. Reads and writes work fine, with read transfer
rates up to 3.5 MiB/s on fast cards with debugging disabled.

The driver has also been tested using the mmc_test module on the same
cards. All tests except 7, 9, 15 and 17 succeed. The first two are
unsupported by all the cards I have, so I don't know if the driver
handles this correctly. The last two fail because the hardware flags a
Data CRC Error instead of a Data Timeout error. I'm not sure how to deal
with that.

Documentation for this controller can be found in many data sheets from
Atmel, including the AT32AP7000 data sheet which can be found here:

http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15 14:14:49 +02:00
David Brownell 7ef31e9c4e avr32: improve NGW100 I2C/PMBus setup
Basic I2C initialization for the NGW100 board:

  - Provide empty i2c device table. Daughtercards may add devices,
    and the ATtiny24 could do stuff too.

  - Set up EXTINT(3) so the ATtiny24 can interrupt the AP7000.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-06-27 15:32:29 +02:00
Hans-Christian Egtvedt 47882cf620 avr32: Add pin configuration choice to LCDC peripheral
This patch lets the board code choose which pin out to use for the LCD
interface.

On AT32AP7000 the LCDC is wired to two sets of pins, which lets the user
choose between dual ethernet and 32-bit EBI. For the ATNGW100 board it
is vital to have the choice to select the alternative pinout since this
pinout is routed to the external headers.

Update ATSTK1002 and ATSTK1004 to use the new interface.

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-06-27 15:32:27 +02:00
Alex 60ed7951d0 avr32: Allow board to define oscillator rates
On our custom board we have other oscillator rates than on atngw100 and
atstk100x.

Currently these rates are hardcoded in arch/avr32/mach-at32ap/at32ap700x.c.

This patch moves them into board specific code.

Signed-off-by: Alex Raimondi <raimondi@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-06-27 15:07:16 +02:00
Håvard Skinnemoen e150d6e725 avr32: Add support for ATSTK1006
The ATSTK1006 is basically an upgraded version of ATSTK1002 with
128 MiB SDRAM and 256 MiB NAND flash on board.

Otherwise, the board is very similar to the ATSTK1002, so it uses the
same board support file.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:46:24 +01:00
Haavard Skinnemoen f059267e7f avr32: Use correct config symbol in atstk1004 board code
CONFIG_BOARD_ATSTK1002_SW2_CUSTOM should be
CONFIG_BOARD_ATSTK100X_SW2_CUSTOM.

Spotted by Robert P. J. Day.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-02-13 14:44:06 +01:00