]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap1/board-h6300.c
e2e93a2fca585891b5a13a1d1190ba92ce8992e1
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h6300.c
1 /*
2  * linux/arch/arm/mach-omap1/board-h6300.c
3  *
4  * Modified from board-innovator.c
5  *
6  * Board specific inits for OMAP-1510 based iPAQ h63xx series of mobile phones.
7  * (h6315, h6340 and h6365)
8  *
9  * Copyright (C) 2009 Mika Laitio
10  * Copyright (C) 2009 Husam Senussi
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2 as
14  * published by the Free Software Foundation.
15  */
16 #include <linux/kernel.h>
17 #include <linux/init.h>
18 #include <linux/platform_device.h>
19 #include <linux/delay.h>
20 #include <linux/input.h>
21
22 #include <asm/hardware.h>
23 #include <asm/mach-types.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26
27 #include <asm/arch/gpio.h>
28 #include <asm/arch/tc.h>
29 #include <asm/arch/usb.h>
30 #include <asm/arch/common.h>
31
32 static struct platform_device h6300_lcd_device = {
33         .name   = "lcd_h6300",
34         .id     = -1,
35 };
36
37 static struct platform_device *h6300_devices[] __initdata = {
38         &h6300_lcd_device,
39 };
40
41 static struct omap_lcd_config h6300_lcd_config __initdata = {
42         .ctrl_name      = "internal",
43 };
44
45 static struct omap_uart_config h6300_uart_config __initdata = {
46         .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
47 };
48
49 /* assume no Mini-AB port */
50 static struct omap_usb_config h6300_usb_config __initdata = {
51         .hmc_mode       = 0,
52         .register_dev   = 1,
53         .pins[0]        = 0,
54 };
55
56 static struct omap_mmc_config h6300_mmc_config __initdata = {
57         .mmc [0] = {
58                 .enabled        = 1,
59                 .wire4          = 1,
60                 .wp_pin         = OMAP_GPIO_IRQ(13),
61                 .power_pin      = -1, // tps65010 ?
62                 .switch_pin     = -1, // OMAP_MPUIO(1), // = -1, // ARMIO2?
63         },
64 };
65
66 static struct omap_board_config_kernel h6300_config[] = {
67         { OMAP_TAG_LCD,         &h6300_lcd_config },
68         { OMAP_TAG_UART,        &h6300_uart_config },
69         { OMAP_TAG_USB,         &h6300_usb_config },
70         { OMAP_TAG_MMC,         &h6300_mmc_config },
71 };
72
73 static void __init h6300_init_irq(void)
74 {
75         omap1_init_common_hw();
76         omap_init_irq();
77         omap_gpio_init();
78 /* touchscreen gpio setup is now done in the drivers/input/touschreen/omap/ts_hx.c
79         omap_request_gpio(2);
80         omap_set_gpio_direction(2, 0);
81         omap_set_gpio_dataout(2, 1);
82 */
83 }
84
85 static void __init h6300_init(void)
86 {
87         int ret;
88         
89         ret = platform_add_devices(h6300_devices, ARRAY_SIZE(h6300_devices));
90         if (ret) {
91                 printk(KERN_WARNING "Unable to add h6300 platform devices.");
92         }
93         omap_board_config       = h6300_config;
94         omap_board_config_size  = ARRAY_SIZE(h6300_config);
95         omap_serial_init();
96 }
97
98 static void __init h6300_map_io(void)
99 {
100         omap1_map_common_io();
101 }
102
103 MACHINE_START(OMAP_H6300, "HP iPAQ h6300")
104         /* MAINTAINER("Mika Laitio <lamikr at pilppa dot org>") */
105         .phys_io        = 0xfff00000,
106         .io_pg_offst    = ((0xfef00000) >> 18) & 0xfffc,
107         .boot_params    = 0x10000100,
108         .map_io         = h6300_map_io,
109         .init_irq       = h6300_init_irq,
110         .init_machine   = h6300_init,
111         .timer          = &omap_timer,
112 MACHINE_END