From 7ebcfcf19723254ebe90cdf8718436b9955a9a01 Mon Sep 17 00:00:00 2001 From: Jonas Larsson Date: Tue, 31 Mar 2009 11:16:52 +0200 Subject: 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 Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/merisc/setup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/avr32') diff --git a/arch/avr32/boards/merisc/setup.c b/arch/avr32/boards/merisc/setup.c index 20b300cf105..623b077594f 100644 --- a/arch/avr32/boards/merisc/setup.c +++ b/arch/avr32/boards/merisc/setup.c @@ -94,9 +94,10 @@ static struct spi_board_info __initdata spi0_board_info[] = { static struct mci_platform_data __initdata mci0_data = { .slot[0] = { - .bus_width = 4, - .detect_pin = GPIO_PIN_PE(19), - .wp_pin = GPIO_PIN_PE(20), + .bus_width = 4, + .detect_pin = GPIO_PIN_PE(19), + .wp_pin = GPIO_PIN_PE(20), + .detect_is_active_high = true, }, }; -- cgit v1.2.3 From 334034c132017fa662716b70591b2297ed7f238c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 12 May 2009 13:37:11 -0700 Subject: avr32: remove obsolete hw_interrupt_type The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have been kept around for migration reasons. After more than two years it's time to remove them finally. This patch cleans up one of the remaining users. When all such patches hit mainline we can remove the defines and typedefs finally. Impact: cleanup Convert the last remaining users to struct irq_chip and remove the define. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Haavard Skinnemoen --- arch/avr32/include/asm/hw_irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/avr32') diff --git a/arch/avr32/include/asm/hw_irq.h b/arch/avr32/include/asm/hw_irq.h index 218b0a6bfd1..a36f9fcb8fc 100644 --- a/arch/avr32/include/asm/hw_irq.h +++ b/arch/avr32/include/asm/hw_irq.h @@ -1,7 +1,7 @@ #ifndef __ASM_AVR32_HW_IRQ_H #define __ASM_AVR32_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +static inline void hw_resend_irq(struct irq_chip *h, unsigned int i) { /* Nothing to do */ } -- cgit v1.2.3 From c076b9937f4912ffc09b30e155fe5246f002f21a Mon Sep 17 00:00:00 2001 From: Ben Nizette Date: Wed, 3 Jun 2009 11:38:20 +0200 Subject: avr32: Fix clash in ATMEL_USART_ flags At the moment ATMEL_USART_{RTS,CTS,CLK} have the values 1, 2 and 3 respectively. Given these are used in bitmasks, trying to turn on the CLK line will in fact turn on the RTS and CTS lines as well. Change the value of ATMEL_USART_CLK to 4. Signed-off-by: Ben Nizette Signed-off-by: Haavard Skinnemoen --- arch/avr32/mach-at32ap/include/mach/board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/avr32') diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index 0b816428189..ddedb471f33 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h @@ -29,7 +29,7 @@ extern struct platform_device *atmel_default_console_device; /* Flags for selecting USART extra pins */ #define ATMEL_USART_RTS 0x01 #define ATMEL_USART_CTS 0x02 -#define ATMEL_USART_CLK 0x03 +#define ATMEL_USART_CLK 0x04 struct atmel_uart_data { short use_dma_tx; /* use transmit DMA? */ -- cgit v1.2.3 From c878b7d60418a45c36d99c2dc876ebb76035d404 Mon Sep 17 00:00:00 2001 From: Mark Jackson Date: Wed, 3 Jun 2009 11:16:38 +0100 Subject: 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 Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/mimc200/setup.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'arch/avr32') diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c index c1b2175b4fe..523d8e183be 100644 --- a/arch/avr32/boards/mimc200/setup.c +++ b/arch/avr32/boards/mimc200/setup.c @@ -43,16 +43,16 @@ unsigned long at32_board_osc_rates[3] = { /* Initialized by bootloader-specific startup code. */ struct tag *bootloader_tags __initdata; -static struct fb_videomode __initdata tx14d14_modes[] = { +static struct fb_videomode __initdata pt0434827_modes[] = { { - .name = "640x480 @ 60", - .refresh = 60, - .xres = 640, .yres = 480, - .pixclock = KHZ2PICOS(11666), + .name = "480x272 @ 72", + .refresh = 72, + .xres = 480, .yres = 272, + .pixclock = KHZ2PICOS(10000), - .left_margin = 80, .right_margin = 1, - .upper_margin = 13, .lower_margin = 2, - .hsync_len = 64, .vsync_len = 1, + .left_margin = 1, .right_margin = 1, + .upper_margin = 12, .lower_margin = 1, + .hsync_len = 42, .vsync_len = 1, .sync = 0, .vmode = FB_VMODE_NONINTERLACED, @@ -60,14 +60,14 @@ static struct fb_videomode __initdata tx14d14_modes[] = { }; static struct fb_monspecs __initdata mimc200_default_monspecs = { - .manufacturer = "HIT", - .monitor = "TX14D14VM1BAB", - .modedb = tx14d14_modes, - .modedb_len = ARRAY_SIZE(tx14d14_modes), + .manufacturer = "PT", + .monitor = "PT0434827-A401", + .modedb = pt0434827_modes, + .modedb_len = ARRAY_SIZE(pt0434827_modes), .hfmin = 14820, .hfmax = 22230, .vfmin = 60, - .vfmax = 73.3, + .vfmax = 85, .dclkmax = 25200000, }; @@ -228,7 +228,8 @@ static int __init mimc200_init(void) i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info)); at32_add_device_lcdc(0, &mimc200_lcdc_data, - fbmem_start, fbmem_size, 1); + fbmem_start, fbmem_size, + ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_CONTROL | ATMEL_LCDC_ALT_24B_DATA); return 0; } -- cgit v1.2.3 From a89ab11454b476d2d9e8a10f903360a62e21bac8 Mon Sep 17 00:00:00 2001 From: Peter Ma Date: Mon, 8 Jun 2009 12:54:02 +0200 Subject: avr32: Change Atmel ATNGW100 config to add choice of add-on board Signed-off-by: Peter Ma Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/atngw100/Kconfig | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/avr32') diff --git a/arch/avr32/boards/atngw100/Kconfig b/arch/avr32/boards/atngw100/Kconfig index b3f99477bbe..f41c5335e6a 100644 --- a/arch/avr32/boards/atngw100/Kconfig +++ b/arch/avr32/boards/atngw100/Kconfig @@ -2,8 +2,15 @@ if BOARD_ATNGW100 +choice + prompt "Select an NGW100 add-on board to support" + default BOARD_ATNGW100_ADDON_NONE + +config BOARD_ATNGW100_ADDON_NONE + bool "None" + config BOARD_ATNGW100_EVKLCD10X - bool "Add support for EVKLCD10X addon board" + bool "EVKLCD10X addon board" help This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA) addon board for the NGW100. By enabling this the LCD controller and @@ -14,7 +21,7 @@ config BOARD_ATNGW100_EVKLCD10X The MCI pins can be reenabled by editing the "add device function" but this may break the setup for other displays that use these pins. - Choose 'Y' here if you have a EVKLCD100/101 connected to the NGW100. +endchoice choice prompt "LCD panel resolution on EVKLCD10X" -- cgit v1.2.3 From 4024533e60787a5507818b0c0fdb44ddb522cdf5 Mon Sep 17 00:00:00 2001 From: Peter Ma Date: Mon, 8 Jun 2009 12:55:35 +0200 Subject: avr32: Add support for Mediama RMTx add-on board for ATNGW100 Signed-off-by: Peter Ma Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/atngw100/Kconfig | 16 + arch/avr32/boards/atngw100/Kconfig_mrmt | 80 ++ arch/avr32/boards/atngw100/Makefile | 1 + arch/avr32/boards/atngw100/mrmt.c | 373 ++++++++ arch/avr32/boards/atngw100/setup.c | 5 + arch/avr32/configs/atngw100_mrmt_defconfig | 1363 ++++++++++++++++++++++++++++ 6 files changed, 1838 insertions(+) create mode 100644 arch/avr32/boards/atngw100/Kconfig_mrmt create mode 100644 arch/avr32/boards/atngw100/mrmt.c create mode 100644 arch/avr32/configs/atngw100_mrmt_defconfig (limited to 'arch/avr32') diff --git a/arch/avr32/boards/atngw100/Kconfig b/arch/avr32/boards/atngw100/Kconfig index f41c5335e6a..be27a0218ab 100644 --- a/arch/avr32/boards/atngw100/Kconfig +++ b/arch/avr32/boards/atngw100/Kconfig @@ -21,6 +21,18 @@ config BOARD_ATNGW100_EVKLCD10X The MCI pins can be reenabled by editing the "add device function" but this may break the setup for other displays that use these pins. +config BOARD_ATNGW100_MRMT + bool "Mediama RMT1/2 add-on board" + help + This enables support for the Mediama RMT1 or RMT2 board. + RMT provides LCD support, AC97 codec and other + optional peripherals to the Atmel NGW100. + + This choice disables the detect pin and the write-protect pin for the + MCI platform device, since it conflicts with the LCD platform device. + The MCI pins can be reenabled by editing the "add device function" but + this may break the setup for other displays that use these pins. + endchoice choice @@ -39,4 +51,8 @@ config BOARD_ATNGW100_EVKLCD10X_POW_QVGA endchoice +if BOARD_ATNGW100_MRMT +source "arch/avr32/boards/atngw100/Kconfig_mrmt" +endif + endif # BOARD_ATNGW100 diff --git a/arch/avr32/boards/atngw100/Kconfig_mrmt b/arch/avr32/boards/atngw100/Kconfig_mrmt new file mode 100644 index 00000000000..9a199a207f3 --- /dev/null +++ b/arch/avr32/boards/atngw100/Kconfig_mrmt @@ -0,0 +1,80 @@ +# RMT for NGW100 customization + +choice + prompt "RMT Version" + help + Select the RMTx board version. + +config BOARD_MRMT_REV1 + bool "RMT1" +config BOARD_MRMT_REV2 + bool "RMT2" + +endchoice + +config BOARD_MRMT_AC97 + bool "Enable AC97 CODEC" + help + Enable the UCB1400 AC97 CODEC driver. + +choice + prompt "Touchscreen Driver" + default BOARD_MRMT_ADS7846_TS + +config BOARD_MRMT_UCB1400_TS + bool "Use UCB1400 Touchscreen" + +config BOARD_MRMT_ADS7846_TS + bool "Use ADS7846 Touchscreen" + +endchoice + +choice + prompt "RMTx LCD Selection" + default BOARD_MRMT_LCD_DISABLE + +config BOARD_MRMT_LCD_DISABLE + bool "LCD Disabled" + +config BOARD_MRMT_LCD_LQ043T3DX0X + bool "Sharp LQ043T3DX0x or compatible" + help + If using RMT2, be sure to load the resistor pack selectors accordingly + +if BOARD_MRMT_REV2 +config BOARD_MRMT_LCD_KWH043GM08 + bool "Formike KWH043GM08 or compatible" + help + Be sure to load the RMT2 resistor pack selectors accordingly +endif + +endchoice + +if !BOARD_MRMT_LCD_DISABLE +config BOARD_MRMT_BL_PWM + bool "Use PWM control for LCD Backlight" + help + Use PWM driver for controlling LCD Backlight. + Otherwise, LCD Backlight is always on. +endif + +config BOARD_MRMT_RTC_I2C + bool "Use External RTC on I2C Bus" + help + RMT1 has an optional RTC device on the I2C bus. + It is a SII S35390A. Be sure to select the + matching RTC driver. + +choice + prompt "Wireless Module on ttyS2" + default BOARD_MRMT_WIRELESS_ZB + +config BOARD_MRMT_WIRELESS_ZB + bool "Use ZigBee/802.15.4 Module" + +config BOARD_MRMT_WIRELESS_BT + bool "Use Bluetooth (HCI) Module" + +config BOARD_MRMT_WIRELESS_NONE + bool "Not Installed" +endchoice diff --git a/arch/avr32/boards/atngw100/Makefile b/arch/avr32/boards/atngw100/Makefile index 6376f5322e4..f4ebe42a825 100644 --- a/arch/avr32/boards/atngw100/Makefile +++ b/arch/avr32/boards/atngw100/Makefile @@ -1,2 +1,3 @@ obj-y += setup.o flash.o obj-$(CONFIG_BOARD_ATNGW100_EVKLCD10X) += evklcd10x.o +obj-$(CONFIG_BOARD_ATNGW100_MRMT) += mrmt.o diff --git a/arch/avr32/boards/atngw100/mrmt.c b/arch/avr32/boards/atngw100/mrmt.c new file mode 100644 index 00000000000..bf78e516a85 --- /dev/null +++ b/arch/avr32/boards/atngw100/mrmt.c @@ -0,0 +1,373 @@ +/* + * Board-specific setup code for Remote Media Terminal 1 (RMT1) + * add-on board for the ATNGW100 Network Gateway + * + * Copyright (C) 2008 Mediama Technologies + * Based on ATNGW100 Network Gateway (Copyright (C) Atmel) + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include