1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Hardware definitions for HP iPAQ h5xxx Handheld Computers
5 * Copyright 2000-2003 Hewlett-Packard Company.
6 * Copyright 2002 Jamey Hicks <jamey.hicks@hp.com>
7 * Copyright 2004-2005 Phil Blundell <pb@handhelds.org>
8 * Copyright 2007-2008 Anton Vorontsov <cbouatmailru@gmail.com>
10 * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
11 * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
12 * FITNESS FOR ANY PARTICULAR PURPOSE.
14 * Author: Jamey Hicks.
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/platform_device.h>
20 #include <linux/mtd/mtd.h>
21 #include <linux/mtd/partitions.h>
22 #include <linux/mtd/physmap.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
32 #include <mach/smemc.h>
40 static struct mtd_partition h5000_flash0_partitions
[] = {
45 .mask_flags
= MTD_WRITEABLE
,
49 .size
= MTDPART_SIZ_FULL
,
50 .offset
= MTDPART_OFS_APPEND
,
54 static struct mtd_partition h5000_flash1_partitions
[] = {
56 .name
= "second root",
57 .size
= SZ_16M
- 0x00040000,
62 .size
= MTDPART_SIZ_FULL
,
63 .offset
= MTDPART_OFS_APPEND
,
64 .mask_flags
= MTD_WRITEABLE
,
68 static struct physmap_flash_data h5000_flash0_data
= {
70 .parts
= h5000_flash0_partitions
,
71 .nr_parts
= ARRAY_SIZE(h5000_flash0_partitions
),
74 static struct physmap_flash_data h5000_flash1_data
= {
76 .parts
= h5000_flash1_partitions
,
77 .nr_parts
= ARRAY_SIZE(h5000_flash1_partitions
),
80 static struct resource h5000_flash0_resources
= {
81 .start
= PXA_CS0_PHYS
,
82 .end
= PXA_CS0_PHYS
+ SZ_32M
- 1,
83 .flags
= IORESOURCE_MEM
| IORESOURCE_MEM_32BIT
,
86 static struct resource h5000_flash1_resources
= {
87 .start
= PXA_CS0_PHYS
+ SZ_32M
,
88 .end
= PXA_CS0_PHYS
+ SZ_32M
+ SZ_16M
- 1,
89 .flags
= IORESOURCE_MEM
| IORESOURCE_MEM_32BIT
,
92 static struct platform_device h5000_flash
[] = {
94 .name
= "physmap-flash",
96 .resource
= &h5000_flash0_resources
,
99 .platform_data
= &h5000_flash0_data
,
103 .name
= "physmap-flash",
105 .resource
= &h5000_flash1_resources
,
108 .platform_data
= &h5000_flash1_data
,
114 * USB Device Controller
117 static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata
= {
118 .gpio_pullup
= H5000_GPIO_USB_PULLUP
,
125 static unsigned long h5000_pin_config
[] __initdata
= {
126 /* Crystal and Clock Signals */
129 /* SDRAM and Static Memory I/O Signals */
157 GPIO28_I2S_BITCLK_OUT
,
159 GPIO30_I2S_SDATA_OUT
,
167 * CS1: MediaQ chip, select 16-bit bus and vlio;
171 static void fix_msc(void)
173 __raw_writel(0x129c24f2, MSC0
);
174 __raw_writel(0x7ff424fa, MSC1
);
175 __raw_writel(0x7ff47ff4, MSC2
);
177 __raw_writel(__raw_readl(MDREFR
) | 0x02080000, MDREFR
);
184 static struct platform_device
*devices
[] __initdata
= {
189 static void __init
h5000_init(void)
193 pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config
));
194 pxa_set_ffuart_info(NULL
);
195 pxa_set_btuart_info(NULL
);
196 pxa_set_stuart_info(NULL
);
197 pxa_set_udc_info(&h5000_udc_mach_info
);
198 platform_add_devices(ARRAY_AND_SIZE(devices
));
201 MACHINE_START(H5400
, "HP iPAQ H5000")
202 .atag_offset
= 0x100,
203 .map_io
= pxa25x_map_io
,
204 .nr_irqs
= PXA_NR_IRQS
,
205 .init_irq
= pxa25x_init_irq
,
206 .handle_irq
= pxa25x_handle_irq
,
207 .init_time
= pxa_timer_init
,
208 .init_machine
= h5000_init
,
209 .restart
= pxa_restart
,