aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2008-10-23 15:06:56 -0400
committerEric Miao <eric.miao@marvell.com>2008-12-02 01:43:50 -0500
commitbc2fd1c09c226ea47ab8301cde6dbcf9e5c78b73 (patch)
tree4353a52acd65006a122d1bd655be5b6f7d0ce4f1 /arch/arm/mach-pxa
parent431a2cff07446b0325ec063e5b401ca7c11e0058 (diff)
[ARM] pxa: add basic support for HP iPAQ h5000
This patch adds HP iPAQ h5000's (h5400, h5500) basic definitions. Kernel will able to boot, work via serial console, mount filesystems placed on flashes and run USB gadgets (g_ether by default). Other device drivers (frame buffer, LCD, touchscreen, backlight, bluetooth, w1/battery, ...) are depend on SAMCOP and MediaQ SoCs/MFDs, drivers to which will be submitted too, after massive cleanups. This machine will be used as "real user" for these new drivers. This is an updated version of the patch, which contains fixes proposed on linux-arm-kernel mailing list. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/Kconfig4
-rw-r--r--arch/arm/mach-pxa/Makefile1
-rw-r--r--arch/arm/mach-pxa/h5000.c200
-rw-r--r--arch/arm/mach-pxa/include/mach/h5000.h113
4 files changed, 318 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index c7fc05fe9758..8627e718a613 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -202,6 +202,10 @@ config MACH_E800
202config TRIZEPS_PXA 202config TRIZEPS_PXA
203 bool "PXA based Keith und Koep Trizeps DIMM-Modules" 203 bool "PXA based Keith und Koep Trizeps DIMM-Modules"
204 204
205config MACH_H5000
206 bool "HP iPAQ h5000"
207 select PXA25x
208
205config MACH_TRIZEPS4 209config MACH_TRIZEPS4
206 bool "Keith und Koep Trizeps4 DIMM-Module" 210 bool "Keith und Koep Trizeps4 DIMM-Module"
207 depends on TRIZEPS_PXA 211 depends on TRIZEPS_PXA
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index d64c68b232e3..dc184eae5109 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_MP900C) += mp900.o
35obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 35obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
36obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o 36obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
37obj-$(CONFIG_MACH_COLIBRI) += colibri.o 37obj-$(CONFIG_MACH_COLIBRI) += colibri.o
38obj-$(CONFIG_MACH_H5000) += h5000.o
38obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o 39obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o
39obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o 40obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
40obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o 41obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
new file mode 100644
index 000000000000..da6e4422c0f3
--- /dev/null
+++ b/arch/arm/mach-pxa/h5000.c
@@ -0,0 +1,200 @@
1/*
2 * Hardware definitions for HP iPAQ h5xxx Handheld Computers
3 *
4 * Copyright 2000-2003 Hewlett-Packard Company.
5 * Copyright 2002 Jamey Hicks <jamey.hicks@hp.com>
6 * Copyright 2004-2005 Phil Blundell <pb@handhelds.org>
7 * Copyright 2007-2008 Anton Vorontsov <cbouatmailru@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
15 * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
16 * FITNESS FOR ANY PARTICULAR PURPOSE.
17 *
18 * Author: Jamey Hicks.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/platform_device.h>
24#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h>
26#include <linux/mtd/physmap.h>
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/map.h>
30#include <mach/h5000.h>
31#include <mach/pxa-regs.h>
32#include <mach/pxa2xx-regs.h>
33#include <mach/mfp-pxa25x.h>
34#include <mach/udc.h>
35#include "generic.h"
36
37/*
38 * Flash
39 */
40
41static struct mtd_partition h5000_flash0_partitions[] = {
42 {
43 .name = "bootldr",
44 .size = 0x00040000,
45 .offset = 0,
46 .mask_flags = MTD_WRITEABLE,
47 },
48 {
49 .name = "root",
50 .size = MTDPART_SIZ_FULL,
51 .offset = MTDPART_OFS_APPEND,
52 },
53};
54
55static struct mtd_partition h5000_flash1_partitions[] = {
56 {
57 .name = "second root",
58 .size = SZ_16M - 0x00040000,
59 .offset = 0,
60 },
61 {
62 .name = "asset",
63 .size = MTDPART_SIZ_FULL,
64 .offset = MTDPART_OFS_APPEND,
65 .mask_flags = MTD_WRITEABLE,
66 },
67};
68
69static struct physmap_flash_data h5000_flash0_data = {
70 .width = 4,
71 .parts = h5000_flash0_partitions,
72 .nr_parts = ARRAY_SIZE(h5000_flash0_partitions),
73};
74
75static struct physmap_flash_data h5000_flash1_data = {
76 .width = 4,
77 .parts = h5000_flash1_partitions,
78 .nr_parts = ARRAY_SIZE(h5000_flash1_partitions),
79};
80
81static struct resource h5000_flash0_resources = {
82 .start = PXA_CS0_PHYS,
83 .end = PXA_CS0_PHYS + SZ_32M - 1,
84 .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
85};
86
87static struct resource h5000_flash1_resources = {
88 .start = PXA_CS0_PHYS + SZ_32M,
89 .end = PXA_CS0_PHYS + SZ_32M + SZ_16M - 1,
90 .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
91};
92
93static struct platform_device h5000_flash[] = {
94 {
95 .name = "physmap-flash",
96 .id = 0,
97 .resource = &h5000_flash0_resources,
98 .num_resources = 1,
99 .dev = {
100 .platform_data = &h5000_flash0_data,
101 },
102 },
103 {
104 .name = "physmap-flash",
105 .id = 1,
106 .resource = &h5000_flash1_resources,
107 .num_resources = 1,
108 .dev = {
109 .platform_data = &h5000_flash1_data,
110 },
111 },
112};
113
114/*
115 * USB Device Controller
116 */
117
118static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata = {
119 .gpio_pullup = H5000_GPIO_USB_PULLUP,
120};
121
122/*
123 * GPIO setup
124 */
125
126static unsigned long h5000_pin_config[] __initdata = {
127 /* Crystal and Clock Signals */
128 GPIO12_32KHz,
129
130 /* SDRAM and Static Memory I/O Signals */
131 GPIO15_nCS_1,
132 GPIO78_nCS_2,
133 GPIO79_nCS_3,
134 GPIO80_nCS_4,
135
136 /* FFUART */
137 GPIO34_FFUART_RXD,
138 GPIO35_FFUART_CTS,
139 GPIO36_FFUART_DCD,
140 GPIO37_FFUART_DSR,
141 GPIO38_FFUART_RI,
142 GPIO39_FFUART_TXD,
143 GPIO40_FFUART_DTR,
144 GPIO41_FFUART_RTS,
145
146 /* BTUART */
147 GPIO42_BTUART_RXD,
148 GPIO43_BTUART_TXD,
149 GPIO44_BTUART_CTS,
150 GPIO45_BTUART_RTS,
151
152 /* SSP1 */
153 GPIO23_SSP1_SCLK,
154 GPIO25_SSP1_TXD,
155 GPIO26_SSP1_RXD,
156};
157
158/*
159 * Localbus setup:
160 * CS0: Flash;
161 * CS1: MediaQ chip, select 16-bit bus and vlio;
162 * CS5: SAMCOP.
163 */
164
165static void fix_msc(void)
166{
167 MSC0 = 0x129c24f2;
168 MSC1 = 0x7ff424fa;
169 MSC2 = 0x7ff47ff4;
170
171 MDREFR |= 0x02080000;
172}
173
174/*
175 * Platform devices
176 */
177
178static struct platform_device *devices[] __initdata = {
179 &h5000_flash[0],
180 &h5000_flash[1],
181};
182
183static void __init h5000_init(void)
184{
185 fix_msc();
186
187 pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config));
188 pxa_set_udc_info(&h5000_udc_mach_info);
189 platform_add_devices(ARRAY_AND_SIZE(devices));
190}
191
192MACHINE_START(H5400, "HP iPAQ H5000")
193 .phys_io = 0x40000000,
194 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
195 .boot_params = 0xa0000100,
196 .map_io = pxa_map_io,
197 .init_irq = pxa25x_init_irq,
198 .timer = &pxa_timer,
199 .init_machine = h5000_init,
200MACHINE_END
diff --git a/arch/arm/mach-pxa/include/mach/h5000.h b/arch/arm/mach-pxa/include/mach/h5000.h
new file mode 100644
index 000000000000..2a5ae3802787
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/h5000.h
@@ -0,0 +1,113 @@
1/*
2 * Hardware definitions for HP iPAQ h5xxx Handheld Computers
3 *
4 * Copyright(20)02 Hewlett-Packard Company.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
12 * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
13 * FITNESS FOR ANY PARTICULAR PURPOSE.
14 *
15 * Author: Jamey Hicks
16 */
17
18#ifndef __ASM_ARCH_H5000_H
19#define __ASM_ARCH_H5000_H
20
21#include <mach/mfp-pxa25x.h>
22
23/*
24 * CPU GPIOs
25 */
26
27#define H5000_GPIO_POWER_BUTTON (0)
28#define H5000_GPIO_RESET_BUTTON_N (1)
29#define H5000_GPIO_OPT_INT (2)
30#define H5000_GPIO_BACKUP_POWER (3)
31#define H5000_GPIO_ACTION_BUTTON (4)
32#define H5000_GPIO_COM_DCD_SOMETHING (5) /* what is this really ? */
33/* 6 not connected */
34#define H5000_GPIO_RESET_BUTTON_AGAIN_N (7) /* connected to gpio 1 as well */
35/* 8 not connected */
36#define H5000_GPIO_RSO_N (9) /* reset output from max1702 which regulates 3.3 and 2.5 */
37#define H5000_GPIO_ASIC_INT_N (10) /* from companion asic */
38#define H5000_GPIO_BT_ENV_0 (11) /* to LMX9814, set to 1 according to regdump */
39/*(12) not connected */
40#define H5000_GPIO_BT_ENV_1 (13) /* to LMX9814, set to 1 according to regdump */
41#define H5000_GPIO_BT_WU (14) /* from LMX9814, Defined as HOST_WAKEUP in the LMX9820 data sheet */
42/*(15) is CS1# */
43/*(16) not connected */
44/*(17) not connected */
45/*(18) is pcmcia ready */
46/*(19) is dreq1 */
47/*(20) is dreq0 */
48#define H5000_GPIO_OE_RD_NWR (21) /* output enable on rd/nwr signal to companion asic */
49/*(22) is not connected */
50#define H5000_GPIO_OPT_SPI_CLK (23) /* to extension pack */
51#define H5000_GPIO_OPT_SPI_CS_N (24) /* to extension pack */
52#define H5000_GPIO_OPT_SPI_DOUT (25) /* to extension pack */
53#define H5000_GPIO_OPT_SPI_DIN (26) /* to extension pack */
54/*(27) not connected */
55#define H5000_GPIO_I2S_BITCLK (28) /* connected to AC97 codec */
56#define H5000_GPIO_I2S_DATAOUT (29) /* connected to AC97 codec */
57#define H5000_GPIO_I2S_DATAIN (30) /* connected to AC97 codec */
58#define H5000_GPIO_I2S_LRCLK (31) /* connected to AC97 codec */
59#define H5000_GPIO_I2S_SYSCLK (32) /* connected to AC97 codec */
60/*(33) is CS5# */
61#define H5000_GPIO_COM_RXD (34) /* connected to cradle/cable connector */
62#define H5000_GPIO_COM_CTS (35) /* connected to cradle/cable connector */
63#define H5000_GPIO_COM_DCD (36) /* connected to cradle/cable connector */
64#define H5000_GPIO_COM_DSR (37) /* connected to cradle/cable connector */
65#define H5000_GPIO_COM_RI (38) /* connected to cradle/cable connector */
66#define H5000_GPIO_COM_TXD (39) /* connected to cradle/cable connector */
67#define H5000_GPIO_COM_DTR (40) /* connected to cradle/cable connector */
68#define H5000_GPIO_COM_RTS (41) /* connected to cradle/cable connector */
69
70#define H5000_GPIO_BT_RXD (42) /* connected to BT (LMX9814) */
71#define H5000_GPIO_BT_TXD (43) /* connected to BT (LMX9814) */
72#define H5000_GPIO_BT_CTS (44) /* connected to BT (LMX9814) */
73#define H5000_GPIO_BT_RTS (45) /* connected to BT (LMX9814) */
74
75#define H5000_GPIO_IRDA_RXD (46)
76#define H5000_GPIO_IRDA_TXD (47)
77
78#define H5000_GPIO_POE_N (48) /* used for pcmcia */
79#define H5000_GPIO_PWE_N (49) /* used for pcmcia */
80#define H5000_GPIO_PIOR_N (50) /* used for pcmcia */
81#define H5000_GPIO_PIOW_N (51) /* used for pcmcia */
82#define H5000_GPIO_PCE1_N (52) /* used for pcmcia */
83#define H5000_GPIO_PCE2_N (53) /* used for pcmcia */
84#define H5000_GPIO_PSKTSEL (54) /* used for pcmcia */
85#define H5000_GPIO_PREG_N (55) /* used for pcmcia */
86#define H5000_GPIO_PWAIT_N (56) /* used for pcmcia */
87#define H5000_GPIO_IOIS16_N (57) /* used for pcmcia */
88
89#define H5000_GPIO_IRDA_SD (58) /* to hsdl3002 sd */
90/*(59) not connected */
91#define H5000_GPIO_POWER_SD_N (60) /* controls power to SD */
92#define H5000_GPIO_POWER_RS232_N (61) /* inverted FORCEON to rs232 transceiver */
93#define H5000_GPIO_POWER_ACCEL_N (62) /* controls power to accel */
94/*(63) is not connected */
95#define H5000_GPIO_OPT_NVRAM (64) /* controls power to expansion pack */
96#define H5000_GPIO_CHG_EN (65) /* to sc801 en */
97#define H5000_GPIO_USB_PULLUP (66) /* USB d+ pullup via 1.5K resistor */
98#define H5000_GPIO_BT_2V8_N (67) /* 2.8V used by bluetooth */
99#define H5000_GPIO_EXT_CHG_RATE (68) /* enables external charging rate */
100/*(69) is not connected */
101#define H5000_GPIO_CIR_RESET (70) /* consumer IR reset */
102#define H5000_GPIO_POWER_LIGHT_SENSOR_N (71)
103#define H5000_GPIO_BT_M_RESET (72)
104#define H5000_GPIO_STD_CHG_RATE (73)
105#define H5000_GPIO_SD_WP_N (74)
106#define H5000_GPIO_MOTOR_ON_N (75) /* external pullup on this */
107#define H5000_GPIO_HEADPHONE_DETECT (76)
108#define H5000_GPIO_USB_CHG_RATE (77) /* select rate for charging via usb */
109/*(78) is CS2# */
110/*(79) is CS3# */
111/*(80) is CS4# */
112
113#endif /* __ASM_ARCH_H5000_H */