2 * Hardware definitions for HP iPAQ h5xxx Handheld Computers
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>
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.
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.
18 * Author: Jamey Hicks.
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>
41 static struct mtd_partition h5000_flash0_partitions
[] = {
46 .mask_flags
= MTD_WRITEABLE
,
50 .size
= MTDPART_SIZ_FULL
,
51 .offset
= MTDPART_OFS_APPEND
,
55 static struct mtd_partition h5000_flash1_partitions
[] = {
57 .name
= "second root",
58 .size
= SZ_16M
- 0x00040000,
63 .size
= MTDPART_SIZ_FULL
,
64 .offset
= MTDPART_OFS_APPEND
,
65 .mask_flags
= MTD_WRITEABLE
,
69 static struct physmap_flash_data h5000_flash0_data
= {
71 .parts
= h5000_flash0_partitions
,
72 .nr_parts
= ARRAY_SIZE(h5000_flash0_partitions
),
75 static struct physmap_flash_data h5000_flash1_data
= {
77 .parts
= h5000_flash1_partitions
,
78 .nr_parts
= ARRAY_SIZE(h5000_flash1_partitions
),
81 static 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
,
87 static 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
,
93 static struct platform_device h5000_flash
[] = {
95 .name
= "physmap-flash",
97 .resource
= &h5000_flash0_resources
,
100 .platform_data
= &h5000_flash0_data
,
104 .name
= "physmap-flash",
106 .resource
= &h5000_flash1_resources
,
109 .platform_data
= &h5000_flash1_data
,
115 * USB Device Controller
118 static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata
= {
119 .gpio_pullup
= H5000_GPIO_USB_PULLUP
,
126 static unsigned long h5000_pin_config
[] __initdata
= {
127 /* Crystal and Clock Signals */
130 /* SDRAM and Static Memory I/O Signals */
161 * CS1: MediaQ chip, select 16-bit bus and vlio;
165 static void fix_msc(void)
171 MDREFR
|= 0x02080000;
178 static struct platform_device
*devices
[] __initdata
= {
183 static void __init
h5000_init(void)
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
));
192 MACHINE_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
,
199 .init_machine
= h5000_init
,