summaryrefslogtreecommitdiff
path: root/target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch
diff options
context:
space:
mode:
authorJohn Voltz <john.voltz@gmail.com>2008-05-01 17:15:35 +0000
committerJohn Voltz <john.voltz@gmail.com>2008-05-01 17:15:35 +0000
commit4037d581631f9bb308e3430105dccc300b4c30c0 (patch)
treeb7f9395f0c1eedc1ae4d9f7e31ab1ec2df5c414e /target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch
parent804e373d06f78ab38a73979c5b72d4342358ea2f (diff)
update patches for atngw100_expanded
Diffstat (limited to 'target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch')
-rw-r--r--target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch148
1 files changed, 148 insertions, 0 deletions
diff --git a/target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch b/target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch
new file mode 100644
index 000000000..b2ef6600a
--- /dev/null
+++ b/target/device/Atmel/atngw100-expanded/kernel-patches/linux-2.6.24.4-200-atngw100-video.patch
@@ -0,0 +1,148 @@
+diff -Nrup linux-2.6.24/arch/avr32/boards/atngw100/setup.c linux-2.6.24-patched/arch/avr32/boards/atngw100/setup.c
+--- a/arch/avr32/boards/atngw100/setup.c 2008-01-31 10:47:55.000000000 -0500
++++ b/arch/avr32/boards/atngw100/setup.c 2008-01-31 10:28:00.000000000 -0500
+@@ -16,6 +16,8 @@
+ #include <linux/types.h>
+ #include <linux/leds.h>
+ #include <linux/spi/spi.h>
++#include <linux/fb.h>
++#include <video/atmel_lcdc.h>
+
+ #include <asm/io.h>
+ #include <asm/setup.h>
+@@ -28,9 +30,63 @@
+ /* Initialized by bootloader-specific startup code. */
+ struct tag *bootloader_tags __initdata;
+
++static struct fb_videomode __initdata video_modes[] = {
++ {
++ .name = "640x480@60",
++ .refresh = 60,
++ .xres = 640, .yres = 480,
++ .pixclock = KHZ2PICOS(23856),
++
++ .left_margin = 80, .right_margin = 16,
++ .upper_margin = 13, .lower_margin = 1,
++ .hsync_len = 64, .vsync_len = 3,
++
++ .sync = 0,
++ .vmode = FB_VMODE_NONINTERLACED,
++ },
++ {
++ .name = "320x240@117",
++ .refresh = 117,
++ .xres = 320, .yres = 240,
++ .pixclock = KHZ2PICOS(12074),
++
++ .left_margin = 40, .right_margin = 8,
++ .upper_margin = 14, .lower_margin = 1,
++ .hsync_len = 32, .vsync_len = 3,
++
++ .sync = 0,
++ .vmode = FB_VMODE_NONINTERLACED,
++ },
++};
++
++static struct fb_monspecs __initdata atngw100_default_monspecs = {
++ .manufacturer = "ATM",
++ .monitor = "GENERIC",
++ .modedb = video_modes,
++ .modedb_len = ARRAY_SIZE(video_modes),
++ .hfmin = 14820,
++ .hfmax = 32000,
++ .vfmin = 30,
++ .vfmax = 200,
++ .dclkmax = 30000000,
++};
++
++struct atmel_lcdfb_info __initdata atngw100_lcdc_data = {
++ .default_bpp = 16,
++ .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
++ .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
++ | ATMEL_LCDC_INVCLK
++ | ATMEL_LCDC_INVDVAL_NORMAL
++ | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
++ | ATMEL_LCDC_MEMOR_BIG),
++ .default_monspecs = &atngw100_default_monspecs,
++ .guard_time = 2,
++};
++
+ struct eth_addr {
+ u8 addr[6];
+ };
++
+ static struct eth_addr __initdata hw_addr[2];
+ static struct eth_platform_data __initdata eth_data[2];
+
+@@ -155,13 +211,14 @@ static int __init atngw100_init(void)
+ * ATNGW100 uses 16-bit SDRAM interface, so we don't need to
+ * reserve any pins for it.
+ */
++ at32_add_device_lcdc(1, &atngw100_lcdc_data, fbmem_start, fbmem_size);
+
+ at32_add_system_devices();
+
+ at32_add_device_usart(0);
+
+ set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
+- set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
++ //set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
+
+ at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
+ at32_add_device_mci(0, &mci0_data);
+diff -Nrup linux-2.6.24/arch/avr32/mach-at32ap/at32ap700x.c linux-2.6.24-patched/arch/avr32/mach-at32ap/at32ap700x.c
+--- a/arch/avr32/mach-at32ap/at32ap700x.c 2008-01-31 10:47:55.000000000 -0500
++++ b/arch/avr32/mach-at32ap/at32ap700x.c 2008-01-31 10:29:22.000000000 -0500
+@@ -1133,7 +1142,7 @@ at32_add_device_lcdc(unsigned int id, st
+ monspecs->modedb = modedb;
+
+ switch (id) {
+- case 0:
++ case 0: // STK1000 peripheral connections
+ pdev = &atmel_lcdfb0_device;
+ select_peripheral(PC(19), PERIPH_A, 0); /* CC */
+ select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */
+@@ -1170,6 +1179,43 @@ at32_add_device_lcdc(unsigned int id, st
+ clk_set_parent(&atmel_lcdfb0_pixclk, &pll0);
+ clk_set_rate(&atmel_lcdfb0_pixclk, clk_get_rate(&pll0));
+ break;
++ case 1: // NGW100 peripheral connections
++ pdev = &atmel_lcdfb0_device;
++ //select_peripheral(PC(19), PERIPH_B, 0); /* CC */
++ select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */
++ select_peripheral(PC(21), PERIPH_A, 0); /* PCLK */
++ select_peripheral(PC(22), PERIPH_A, 0); /* VSYNC */
++ select_peripheral(PE(1), PERIPH_B, 0); /* DVAL */
++ select_peripheral(PE(2), PERIPH_B, 0); /* MODE */
++ //select_peripheral(PC(25), PERIPH_A, 0); /* PWR */
++ select_peripheral(PE(3), PERIPH_B, 0); /* DATA0 */
++ select_peripheral(PE(4), PERIPH_B, 0); /* DATA1 */
++ select_peripheral(PE(5), PERIPH_B, 0); /* DATA2 */
++ select_peripheral(PE(6), PERIPH_B, 0); /* DATA3 */
++ select_peripheral(PE(7), PERIPH_B, 0); /* DATA4 */
++ select_peripheral(PC(31), PERIPH_A, 0); /* DATA5 */
++ select_peripheral(PD(0), PERIPH_A, 0); /* DATA6 */
++ select_peripheral(PD(1), PERIPH_A, 0); /* DATA7 */
++ select_peripheral(PE(8), PERIPH_B, 0); /* DATA8 */
++ select_peripheral(PE(9), PERIPH_B, 0); /* DATA9 */
++ select_peripheral(PE(10), PERIPH_B, 0); /* DATA10 */
++ select_peripheral(PE(11), PERIPH_B, 0); /* DATA11 */
++ select_peripheral(PE(12), PERIPH_B, 0); /* DATA12 */
++ select_peripheral(PD(7), PERIPH_A, 0); /* DATA13 */
++ select_peripheral(PD(8), PERIPH_A, 0); /* DATA14 */
++ select_peripheral(PD(9), PERIPH_A, 0); /* DATA15 */
++ select_peripheral(PE(13), PERIPH_B, 0); /* DATA16 */
++ select_peripheral(PE(14), PERIPH_B, 0); /* DATA17 */
++ select_peripheral(PE(15), PERIPH_B, 0); /* DATA18 */
++ select_peripheral(PE(16), PERIPH_B, 0); /* DATA19 */
++ select_peripheral(PE(17), PERIPH_B, 0); /* DATA20 */
++ select_peripheral(PE(18), PERIPH_B, 0); /* DATA21 */
++ select_peripheral(PD(16), PERIPH_A, 0); /* DATA22 */
++ select_peripheral(PD(17), PERIPH_A, 0); /* DATA23 */
++
++ clk_set_parent(&atmel_lcdfb0_pixclk, &pll0);
++ clk_set_rate(&atmel_lcdfb0_pixclk, clk_get_rate(&pll0));
++ break;
+
+ default:
+ goto err_invalid_id;