2008-08-19 13:14:21 +02:00
|
|
|
/*
|
|
|
|
* Hardware definitions for the Toshiba eseries PDAs
|
|
|
|
*
|
|
|
|
* Copyright (c) 2003 Ian Molton <spyro@f2s.com>
|
|
|
|
*
|
|
|
|
* This file is licensed under
|
|
|
|
* the terms of the GNU General Public License version 2. This program
|
|
|
|
* is licensed "as is" without any warranty of any kind, whether express
|
|
|
|
* or implied.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
2008-08-19 14:01:28 +02:00
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/fb.h>
|
2008-09-26 14:38:59 +02:00
|
|
|
#include <linux/mfd/tc6393xb.h>
|
2008-08-19 14:01:28 +02:00
|
|
|
|
|
|
|
#include <video/w100fb.h>
|
2008-08-19 13:14:21 +02:00
|
|
|
|
|
|
|
#include <asm/setup.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
2009-01-02 16:17:22 +01:00
|
|
|
#include <mach/pxa25x.h>
|
2008-08-19 14:34:56 +02:00
|
|
|
#include <mach/eseries-gpio.h>
|
|
|
|
#include <mach/udc.h>
|
[ARM] fix AT91, davinci, h720x, ks8695, msm, mx2, mx3, netx, omap1, omap2, pxa, s3c
arch/arm/mach-at91/at91cap9.c:337: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91rm9200.c:301: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9260.c:351: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9261.c:287: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9263.c:312: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9rl.c:304: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-h720x/h7202-eval.c:38: error: implicit declaration of function 'IRQ_CHAINED_GPIOB'
arch/arm/mach-ks8695/devices.c:46: error: 'KS8695_IRQ_WAN_RX_STATUS' undeclared here (not in a function)
arch/arm/mach-msm/devices.c:28: error: 'INT_UART1' undeclared here (not in a function)
arch/arm/mach-mx2/devices.c:233: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-mx3/devices.c:128: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:140: error: 'INT_730_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:165: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:200: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap2/board-apollon.c:286: error: implicit declaration of function 'omap_set_gpio_direction'
arch/arm/mach-omap2/mcbsp.c:154: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-omap2/mcbsp.c:181: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-pxa/e350.c:36: error: 'IRQ_BOARD_START' undeclared here (not in a function)
arch/arm/plat-s3c/dev-i2c0.c:32: error: 'IRQ_IIC' undeclared here (not in a function)
...
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-08 11:01:47 +01:00
|
|
|
#include <mach/irqs.h>
|
2009-04-03 13:45:49 +02:00
|
|
|
#include <mach/audio.h>
|
2008-08-19 13:14:21 +02:00
|
|
|
|
|
|
|
#include "generic.h"
|
|
|
|
#include "eseries.h"
|
2008-09-26 14:38:59 +02:00
|
|
|
#include "clock.h"
|
2008-08-19 13:14:21 +02:00
|
|
|
|
2008-08-19 14:01:28 +02:00
|
|
|
/* ------------------------ e800 LCD definitions ------------------------- */
|
|
|
|
|
2010-01-04 10:00:13 +01:00
|
|
|
static unsigned long e800_pin_config[] __initdata = {
|
|
|
|
/* AC97 */
|
|
|
|
GPIO28_AC97_BITCLK,
|
|
|
|
GPIO29_AC97_SDATA_IN_0,
|
|
|
|
GPIO30_AC97_SDATA_OUT,
|
|
|
|
GPIO31_AC97_SYNC,
|
|
|
|
};
|
|
|
|
|
2008-08-19 14:01:28 +02:00
|
|
|
static struct w100_gen_regs e800_lcd_regs = {
|
|
|
|
.lcd_format = 0x00008003,
|
|
|
|
.lcdd_cntl1 = 0x02a00000,
|
|
|
|
.lcdd_cntl2 = 0x0003ffff,
|
|
|
|
.genlcd_cntl1 = 0x000ff2a3,
|
|
|
|
.genlcd_cntl2 = 0x000002a3,
|
|
|
|
.genlcd_cntl3 = 0x000102aa,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct w100_mode e800_lcd_mode[2] = {
|
|
|
|
[0] = {
|
|
|
|
.xres = 480,
|
|
|
|
.yres = 640,
|
|
|
|
.left_margin = 52,
|
|
|
|
.right_margin = 148,
|
|
|
|
.upper_margin = 2,
|
|
|
|
.lower_margin = 6,
|
|
|
|
.crtc_ss = 0x80350034,
|
|
|
|
.crtc_ls = 0x802b0026,
|
|
|
|
.crtc_gs = 0x80160016,
|
|
|
|
.crtc_vpos_gs = 0x00020003,
|
|
|
|
.crtc_rev = 0x0040001d,
|
|
|
|
.crtc_dclk = 0xe0000000,
|
|
|
|
.crtc_gclk = 0x82a50049,
|
|
|
|
.crtc_goe = 0x80ee001c,
|
|
|
|
.crtc_ps1_active = 0x00000000,
|
|
|
|
.pll_freq = 128,
|
|
|
|
.pixclk_divider = 4,
|
|
|
|
.pixclk_divider_rotated = 6,
|
|
|
|
.pixclk_src = CLK_SRC_PLL,
|
|
|
|
.sysclk_divider = 0,
|
|
|
|
.sysclk_src = CLK_SRC_PLL,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.xres = 240,
|
|
|
|
.yres = 320,
|
|
|
|
.left_margin = 15,
|
|
|
|
.right_margin = 88,
|
|
|
|
.upper_margin = 0,
|
|
|
|
.lower_margin = 7,
|
|
|
|
.crtc_ss = 0xd010000f,
|
|
|
|
.crtc_ls = 0x80070003,
|
|
|
|
.crtc_gs = 0x80000000,
|
|
|
|
.crtc_vpos_gs = 0x01460147,
|
|
|
|
.crtc_rev = 0x00400003,
|
|
|
|
.crtc_dclk = 0xa1700030,
|
|
|
|
.crtc_gclk = 0x814b0008,
|
|
|
|
.crtc_goe = 0x80cc0015,
|
|
|
|
.crtc_ps1_active = 0x00000000,
|
|
|
|
.pll_freq = 100,
|
|
|
|
.pixclk_divider = 6, /* Wince uses 14 which gives a */
|
|
|
|
.pixclk_divider_rotated = 6, /* 7MHz Pclk. We use a 14MHz one */
|
|
|
|
.pixclk_src = CLK_SRC_PLL,
|
|
|
|
.sysclk_divider = 0,
|
|
|
|
.sysclk_src = CLK_SRC_PLL,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static struct w100_gpio_regs e800_w100_gpio_info = {
|
|
|
|
.init_data1 = 0xc13fc019,
|
|
|
|
.gpio_dir1 = 0x3e40df7f,
|
|
|
|
.gpio_oe1 = 0x003c3000,
|
|
|
|
.init_data2 = 0x00000000,
|
|
|
|
.gpio_dir2 = 0x00000000,
|
|
|
|
.gpio_oe2 = 0x00000000,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct w100_mem_info e800_w100_mem_info = {
|
|
|
|
.ext_cntl = 0x09640011,
|
|
|
|
.sdram_mode_reg = 0x00600021,
|
|
|
|
.ext_timing_cntl = 0x10001545,
|
|
|
|
.io_cntl = 0x7ddd7333,
|
|
|
|
.size = 0x1fffff,
|
|
|
|
};
|
|
|
|
|
|
|
|
static void e800_tg_change(struct w100fb_par *par)
|
|
|
|
{
|
|
|
|
unsigned long tmp;
|
|
|
|
|
|
|
|
tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
|
|
|
|
if (par->mode->xres == 480)
|
|
|
|
tmp |= 0x100;
|
|
|
|
else
|
|
|
|
tmp &= ~0x100;
|
|
|
|
w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct w100_tg_info e800_tg_info = {
|
|
|
|
.change = e800_tg_change,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct w100fb_mach_info e800_fb_info = {
|
|
|
|
.modelist = e800_lcd_mode,
|
|
|
|
.num_modes = 2,
|
|
|
|
.regs = &e800_lcd_regs,
|
|
|
|
.gpio = &e800_w100_gpio_info,
|
|
|
|
.mem = &e800_w100_mem_info,
|
|
|
|
.tg = &e800_tg_info,
|
|
|
|
.xtal_freq = 16000000,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource e800_fb_resources[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = 0x0c000000,
|
|
|
|
.end = 0x0cffffff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device e800_fb_device = {
|
|
|
|
.name = "w100fb",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = &e800_fb_info,
|
|
|
|
},
|
|
|
|
.num_resources = ARRAY_SIZE(e800_fb_resources),
|
|
|
|
.resource = e800_fb_resources,
|
|
|
|
};
|
|
|
|
|
2008-08-19 14:34:56 +02:00
|
|
|
/* --------------------------- UDC definitions --------------------------- */
|
|
|
|
|
|
|
|
static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
|
|
|
|
.gpio_vbus = GPIO_E800_USB_DISC,
|
|
|
|
.gpio_pullup = GPIO_E800_USB_PULLUP,
|
|
|
|
.gpio_pullup_inverted = 1
|
|
|
|
};
|
|
|
|
|
2008-09-26 14:38:59 +02:00
|
|
|
/* ----------------- e800 tc6393xb parameters ------------------ */
|
|
|
|
|
|
|
|
static struct tc6393xb_platform_data e800_tc6393xb_info = {
|
|
|
|
.irq_base = IRQ_BOARD_START,
|
|
|
|
.scr_pll2cr = 0x0cc1,
|
|
|
|
.scr_gper = 0,
|
|
|
|
.gpio_base = -1,
|
|
|
|
.suspend = &eseries_tmio_suspend,
|
|
|
|
.resume = &eseries_tmio_resume,
|
|
|
|
.enable = &eseries_tmio_enable,
|
|
|
|
.disable = &eseries_tmio_disable,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device e800_tc6393xb_device = {
|
|
|
|
.name = "tc6393xb",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = &e800_tc6393xb_info,
|
|
|
|
},
|
|
|
|
.num_resources = 2,
|
|
|
|
.resource = eseries_tmio_resources,
|
|
|
|
};
|
|
|
|
|
2008-08-19 14:01:28 +02:00
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
static struct platform_device *devices[] __initdata = {
|
|
|
|
&e800_fb_device,
|
2008-09-26 14:38:59 +02:00
|
|
|
&e800_tc6393xb_device,
|
2008-08-19 14:01:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static void __init e800_init(void)
|
|
|
|
{
|
2010-01-04 10:00:13 +01:00
|
|
|
pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config));
|
2009-11-09 06:34:08 +01:00
|
|
|
pxa_set_ffuart_info(NULL);
|
|
|
|
pxa_set_btuart_info(NULL);
|
|
|
|
pxa_set_stuart_info(NULL);
|
2009-03-05 16:17:53 +01:00
|
|
|
clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
|
2008-09-26 14:38:59 +02:00
|
|
|
"GPIO11_CLK", NULL),
|
|
|
|
eseries_get_tmio_gpios();
|
2008-08-19 14:01:28 +02:00
|
|
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
2008-08-19 14:34:56 +02:00
|
|
|
pxa_set_udc_info(&e800_udc_mach_info);
|
2009-04-03 13:45:49 +02:00
|
|
|
pxa_set_ac97_info(NULL);
|
2008-08-19 14:01:28 +02:00
|
|
|
}
|
|
|
|
|
2008-08-19 13:14:21 +02:00
|
|
|
MACHINE_START(E800, "Toshiba e800")
|
|
|
|
/* Maintainer: Ian Molton (spyro@f2s.com) */
|
|
|
|
.phys_io = 0x40000000,
|
|
|
|
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
|
|
|
.boot_params = 0xa0000100,
|
|
|
|
.map_io = pxa_map_io,
|
|
|
|
.init_irq = pxa25x_init_irq,
|
|
|
|
.fixup = eseries_fixup,
|
2008-08-19 14:01:28 +02:00
|
|
|
.init_machine = e800_init,
|
2008-08-19 13:14:21 +02:00
|
|
|
.timer = &pxa_timer,
|
|
|
|
MACHINE_END
|
|
|
|
|