mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
51c62982a3
Considering the header mess ATM, it is not always possible to include the correct header files within board code. Let's keep this simple: <mach/pxa25x.h> - for pxa25x based platforms <mach/pxa27x.h> - for pxa27x based platforms <mach/pxa300.h> - for pxa300 based platforms <mach/pxa320.h> - for pxa320 based platforms <mach/pxa930.h> - for pxa930 based platforms NOTE: 1. one header one board file, they are not compatible (i.e. they have conflicting definitions which won't compile if included together). 2. Unless strictly necessary, the following header files are considered to be SoC files use _only_, and is not recommended to be included in board code: <mach/hardware.h> <mach/pxa-regs.h> <mach/pxa2xx-regs.h> <mach/pxa3xx-regs.h> <mach/mfp.h> <mach/mfp-pxa2xx.h> <mach/mfp-pxa25x.h> <mach/mfp-pxa27x.h> <mach/mfp-pxa3xx.h> <mach/mfp-pxa300.h> <mach/mfp-pxa320.h> <mach/mfp-pxa930.h> Signed-off-by: Eric Miao <eric.miao@marvell.com>
211 lines
5.0 KiB
C
211 lines
5.0 KiB
C
/*
|
|
* 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>
|
|
#include <linux/device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/fb.h>
|
|
#include <linux/clk.h>
|
|
#include <linux/mfd/t7l66xb.h>
|
|
|
|
#include <video/w100fb.h>
|
|
|
|
#include <asm/setup.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <mach/pxa25x.h>
|
|
#include <mach/eseries-gpio.h>
|
|
#include <mach/udc.h>
|
|
#include <mach/irda.h>
|
|
#include <mach/irqs.h>
|
|
|
|
#include "generic.h"
|
|
#include "eseries.h"
|
|
#include "clock.h"
|
|
#include "devices.h"
|
|
|
|
/* ------------------------ e740 video support --------------------------- */
|
|
|
|
static struct w100_gen_regs e740_lcd_regs = {
|
|
.lcd_format = 0x00008023,
|
|
.lcdd_cntl1 = 0x0f000000,
|
|
.lcdd_cntl2 = 0x0003ffff,
|
|
.genlcd_cntl1 = 0x00ffff03,
|
|
.genlcd_cntl2 = 0x003c0f03,
|
|
.genlcd_cntl3 = 0x000143aa,
|
|
};
|
|
|
|
static struct w100_mode e740_lcd_mode = {
|
|
.xres = 240,
|
|
.yres = 320,
|
|
.left_margin = 20,
|
|
.right_margin = 28,
|
|
.upper_margin = 9,
|
|
.lower_margin = 8,
|
|
.crtc_ss = 0x80140013,
|
|
.crtc_ls = 0x81150110,
|
|
.crtc_gs = 0x80050005,
|
|
.crtc_vpos_gs = 0x000a0009,
|
|
.crtc_rev = 0x0040010a,
|
|
.crtc_dclk = 0xa906000a,
|
|
.crtc_gclk = 0x80050108,
|
|
.crtc_goe = 0x80050108,
|
|
.pll_freq = 57,
|
|
.pixclk_divider = 4,
|
|
.pixclk_divider_rotated = 4,
|
|
.pixclk_src = CLK_SRC_XTAL,
|
|
.sysclk_divider = 1,
|
|
.sysclk_src = CLK_SRC_PLL,
|
|
.crtc_ps1_active = 0x41060010,
|
|
};
|
|
|
|
static struct w100_gpio_regs e740_w100_gpio_info = {
|
|
.init_data1 = 0x21002103,
|
|
.gpio_dir1 = 0xffffdeff,
|
|
.gpio_oe1 = 0x03c00643,
|
|
.init_data2 = 0x003f003f,
|
|
.gpio_dir2 = 0xffffffff,
|
|
.gpio_oe2 = 0x000000ff,
|
|
};
|
|
|
|
static struct w100fb_mach_info e740_fb_info = {
|
|
.modelist = &e740_lcd_mode,
|
|
.num_modes = 1,
|
|
.regs = &e740_lcd_regs,
|
|
.gpio = &e740_w100_gpio_info,
|
|
.xtal_freq = 14318000,
|
|
.xtal_dbl = 1,
|
|
};
|
|
|
|
static struct resource e740_fb_resources[] = {
|
|
[0] = {
|
|
.start = 0x0c000000,
|
|
.end = 0x0cffffff,
|
|
.flags = IORESOURCE_MEM,
|
|
},
|
|
};
|
|
|
|
static struct platform_device e740_fb_device = {
|
|
.name = "w100fb",
|
|
.id = -1,
|
|
.dev = {
|
|
.platform_data = &e740_fb_info,
|
|
},
|
|
.num_resources = ARRAY_SIZE(e740_fb_resources),
|
|
.resource = e740_fb_resources,
|
|
};
|
|
|
|
/* --------------------------- MFP Pin config -------------------------- */
|
|
|
|
static unsigned long e740_pin_config[] __initdata = {
|
|
/* Chip selects */
|
|
GPIO15_nCS_1, /* CS1 - Flash */
|
|
GPIO79_nCS_3, /* CS3 - IMAGEON */
|
|
GPIO80_nCS_4, /* CS4 - TMIO */
|
|
|
|
/* Clocks */
|
|
GPIO12_32KHz,
|
|
|
|
/* BTUART */
|
|
GPIO42_BTUART_RXD,
|
|
GPIO43_BTUART_TXD,
|
|
GPIO44_BTUART_CTS,
|
|
|
|
/* TMIO controller */
|
|
GPIO19_GPIO, /* t7l66xb #PCLR */
|
|
GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
|
|
|
|
/* UDC */
|
|
GPIO13_GPIO,
|
|
GPIO3_GPIO,
|
|
|
|
/* IrDA */
|
|
GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
|
|
|
|
/* PC Card */
|
|
GPIO8_GPIO, /* CD0 */
|
|
GPIO44_GPIO, /* CD1 */
|
|
GPIO11_GPIO, /* IRQ0 */
|
|
GPIO6_GPIO, /* IRQ1 */
|
|
GPIO27_GPIO, /* RST0 */
|
|
GPIO24_GPIO, /* RST1 */
|
|
GPIO20_GPIO, /* PWR0 */
|
|
GPIO23_GPIO, /* PWR1 */
|
|
GPIO48_nPOE,
|
|
GPIO49_nPWE,
|
|
GPIO50_nPIOR,
|
|
GPIO51_nPIOW,
|
|
GPIO52_nPCE_1,
|
|
GPIO53_nPCE_2,
|
|
GPIO54_nPSKTSEL,
|
|
GPIO55_nPREG,
|
|
GPIO56_nPWAIT,
|
|
GPIO57_nIOIS16,
|
|
|
|
/* wakeup */
|
|
GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
|
|
};
|
|
|
|
/* -------------------- e740 t7l66xb parameters -------------------- */
|
|
|
|
static struct t7l66xb_platform_data e740_t7l66xb_info = {
|
|
.irq_base = IRQ_BOARD_START,
|
|
.enable = &eseries_tmio_enable,
|
|
.suspend = &eseries_tmio_suspend,
|
|
.resume = &eseries_tmio_resume,
|
|
};
|
|
|
|
static struct platform_device e740_t7l66xb_device = {
|
|
.name = "t7l66xb",
|
|
.id = -1,
|
|
.dev = {
|
|
.platform_data = &e740_t7l66xb_info,
|
|
},
|
|
.num_resources = 2,
|
|
.resource = eseries_tmio_resources,
|
|
};
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
static struct platform_device *devices[] __initdata = {
|
|
&e740_fb_device,
|
|
&e740_t7l66xb_device,
|
|
};
|
|
|
|
static void __init e740_init(void)
|
|
{
|
|
pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
|
|
eseries_register_clks();
|
|
clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev,
|
|
"UDCCLK", &pxa25x_device_udc.dev),
|
|
eseries_get_tmio_gpios();
|
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
|
pxa_set_udc_info(&e7xx_udc_mach_info);
|
|
e7xx_irda_init();
|
|
pxa_set_ficp_info(&e7xx_ficp_platform_data);
|
|
}
|
|
|
|
MACHINE_START(E740, "Toshiba e740")
|
|
/* 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,
|
|
.init_machine = e740_init,
|
|
.timer = &pxa_timer,
|
|
MACHINE_END
|
|
|