123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- /*
- * linux/arch/arm/mach-pxa/zylonite.c
- *
- * Support for the PXA3xx Development Platform (aka Zylonite)
- *
- * Copyright (C) 2006 Marvell International Ltd.
- *
- * 2007-09-04: eric miao <eric.miao@marvell.com>
- * rewrite to align with latest kernel
- *
- * 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/module.h>
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/init.h>
- #include <linux/platform_device.h>
- #include <linux/gpio.h>
- #include <linux/pwm_backlight.h>
- #include <linux/smc91x.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <mach/pxa3xx.h>
- #include <mach/audio.h>
- #include <linux/platform_data/video-pxafb.h>
- #include <mach/zylonite.h>
- #include <linux/platform_data/mmc-pxamci.h>
- #include <linux/platform_data/usb-ohci-pxa27x.h>
- #include <linux/platform_data/keypad-pxa27x.h>
- #include <linux/platform_data/mtd-nand-pxa3xx.h>
- #include "devices.h"
- #include "generic.h"
- int gpio_eth_irq;
- int gpio_debug_led1;
- int gpio_debug_led2;
- int wm9713_irq;
- int lcd_id;
- int lcd_orientation;
- struct platform_device pxa_device_wm9713_audio = {
- .name = "wm9713-codec",
- .id = -1,
- };
- static void __init zylonite_init_wm9713_audio(void)
- {
- platform_device_register(&pxa_device_wm9713_audio);
- }
- static struct resource smc91x_resources[] = {
- [0] = {
- .start = ZYLONITE_ETH_PHYS + 0x300,
- .end = ZYLONITE_ETH_PHYS + 0xfffff,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = -1, /* for run-time assignment */
- .end = -1,
- .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
- }
- };
- static struct smc91x_platdata zylonite_smc91x_info = {
- .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT |
- SMC91X_NOWAIT | SMC91X_USE_DMA,
- };
- static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
- .dev = {
- .platform_data = &zylonite_smc91x_info,
- },
- };
- #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
- static struct gpio_led zylonite_debug_leds[] = {
- [0] = {
- .name = "zylonite:yellow:1",
- .default_trigger = "heartbeat",
- },
- [1] = {
- .name = "zylonite:yellow:2",
- .default_trigger = "default-on",
- },
- };
- static struct gpio_led_platform_data zylonite_debug_leds_info = {
- .leds = zylonite_debug_leds,
- .num_leds = ARRAY_SIZE(zylonite_debug_leds),
- };
- static struct platform_device zylonite_device_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &zylonite_debug_leds_info,
- }
- };
- static void __init zylonite_init_leds(void)
- {
- zylonite_debug_leds[0].gpio = gpio_debug_led1;
- zylonite_debug_leds[1].gpio = gpio_debug_led2;
- platform_device_register(&zylonite_device_leds);
- }
- #else
- static inline void zylonite_init_leds(void) {}
- #endif
- #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
- static struct platform_pwm_backlight_data zylonite_backlight_data = {
- .pwm_id = 3,
- .max_brightness = 100,
- .dft_brightness = 100,
- .pwm_period_ns = 10000,
- };
- static struct platform_device zylonite_backlight_device = {
- .name = "pwm-backlight",
- .dev = {
- .parent = &pxa27x_device_pwm1.dev,
- .platform_data = &zylonite_backlight_data,
- },
- };
- static struct pxafb_mode_info toshiba_ltm035a776c_mode = {
- .pixclock = 110000,
- .xres = 240,
- .yres = 320,
- .bpp = 16,
- .hsync_len = 4,
- .left_margin = 6,
- .right_margin = 4,
- .vsync_len = 2,
- .upper_margin = 2,
- .lower_margin = 3,
- .sync = FB_SYNC_VERT_HIGH_ACT,
- };
- static struct pxafb_mode_info toshiba_ltm04c380k_mode = {
- .pixclock = 50000,
- .xres = 640,
- .yres = 480,
- .bpp = 16,
- .hsync_len = 1,
- .left_margin = 0x9f,
- .right_margin = 1,
- .vsync_len = 44,
- .upper_margin = 0,
- .lower_margin = 0,
- .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
- };
- static struct pxafb_mach_info zylonite_toshiba_lcd_info = {
- .num_modes = 1,
- .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
- };
|