2 * Support for HP iPAQ hx4700 PDAs.
4 * Copyright (c) 2008-2009 Philipp Zabel
7 * Copyright (c) 2004 Hewlett-Packard Company.
8 * Copyright (c) 2005 SDG Systems, LLC
9 * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/platform_device.h>
20 #include <linux/delay.h>
22 #include <linux/gpio.h>
23 #include <linux/gpio_keys.h>
24 #include <linux/input.h>
25 #include <linux/lcd.h>
26 #include <linux/mfd/htc-egpio.h>
27 #include <linux/mfd/asic3.h>
28 #include <linux/mtd/physmap.h>
29 #include <linux/pda_power.h>
30 #include <linux/pwm_backlight.h>
31 #include <linux/regulator/bq24022.h>
32 #include <linux/regulator/machine.h>
33 #include <linux/regulator/max1586.h>
34 #include <linux/spi/ads7846.h>
35 #include <linux/spi/spi.h>
36 #include <linux/usb/gpio_vbus.h>
38 #include <mach/hardware.h>
39 #include <asm/mach-types.h>
40 #include <asm/mach/arch.h>
42 #include <mach/pxa27x.h>
43 #include <mach/hx4700.h>
45 #include <mach/irda.h>
46 #include <mach/pxa2xx_spi.h>
48 #include <video/platform_lcd.h>
49 #include <video/w100fb.h>
54 /* Physical address space information */
56 #define ATI_W3220_PHYS PXA_CS2_PHYS /* ATI Imageon 3220 Graphics */
57 #define ASIC3_PHYS PXA_CS3_PHYS
58 #define ASIC3_SD_PHYS (PXA_CS3_PHYS + 0x02000000)
60 static unsigned long hx4700_pin_config
[] __initdata
= {
62 /* SDRAM and Static Memory I/O Signals */
66 GPIO78_nCS_2
, /* W3220 */
67 GPIO79_nCS_3
, /* ASIC3 */
69 GPIO33_nCS_5
, /* EGPIO, WLAN */
103 /* PWM 1 (Backlight) */
107 GPIO28_I2S_BITCLK_OUT
,
109 GPIO30_I2S_SDATA_OUT
,
113 /* SSP 1 (NavPoint) */
119 /* SSP 2 (TSC2046) */
125 /* HX4700 specific input GPIOs */
126 GPIO12_GPIO
, /* ASIC3_IRQ */
127 GPIO13_GPIO
, /* W3220_IRQ */
128 GPIO14_GPIO
, /* nWLAN_IRQ */
130 GPIO10_GPIO
, /* GSM_IRQ */
131 GPIO13_GPIO
, /* CPLD_IRQ */
132 GPIO107_GPIO
, /* DS1WM_IRQ */
133 GPIO108_GPIO
, /* GSM_READY */
134 GPIO58_GPIO
, /* TSC2046_nPENIRQ */
135 GPIO66_GPIO
, /* nSDIO_IRQ */
138 #define HX4700_GPIO_IN(num, _desc) \
139 { .gpio = (num), .dir = 0, .desc = (_desc) }
140 #define HX4700_GPIO_OUT(num, _init, _desc) \
141 { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) }
149 static int hx4700_gpio_request(struct gpio_ress
*gpios
, int size
)
155 for (i
= 0; (!rc
) && (i
< size
); i
++) {
156 gpio
= gpios
[i
].gpio
;
158 rc
= gpio_request(gpio
, gpios
[i
].desc
);
160 pr_err("Error requesting GPIO %d(%s) : %d\n",
161 gpio
, gpios
[i
].desc
, rc
);
165 gpio_direction_output(gpio
, gpios
[i
].init
);
167 gpio_direction_input(gpio
);
169 while ((rc
) && (--i
>= 0))
170 gpio_free(gpios
[i
].gpio
);
178 static void irda_transceiver_mode(struct device
*dev
, int mode
)
180 gpio_set_value(GPIO105_HX4700_nIR_ON
, mode
& IR_OFF
);
183 static struct pxaficp_platform_data ficp_info
= {
184 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
185 .transceiver_mode
= irda_transceiver_mode
,
192 #define INIT_KEY(_code, _gpio, _active_low, _desc) \
194 .code = KEY_##_code, \
196 .active_low = _active_low, \
202 static struct gpio_keys_button gpio_keys_buttons
[] = {
203 INIT_KEY(POWER
, GPIO0_HX4700_nKEY_POWER
, 1, "Power button"),
204 INIT_KEY(MAIL
, GPIO94_HX4700_KEY_MAIL
, 0, "Mail button"),
205 INIT_KEY(ADDRESSBOOK
, GPIO99_HX4700_KEY_CONTACTS
,0, "Contacts button"),
206 INIT_KEY(RECORD
, GPIOD6_nKEY_RECORD
, 1, "Record button"),
207 INIT_KEY(CALENDAR
, GPIOD1_nKEY_CALENDAR
, 1, "Calendar button"),
208 INIT_KEY(HOMEPAGE
, GPIOD3_nKEY_HOME
, 1, "Home button"),
211 static struct gpio_keys_platform_data gpio_keys_data
= {
212 .buttons
= gpio_keys_buttons
,
213 .nbuttons
= ARRAY_SIZE(gpio_keys_buttons
),
216 static struct platform_device gpio_keys
= {
219 .platform_data
= &gpio_keys_data
,
228 static u16 asic3_gpio_config
[] = {
229 /* ASIC3 GPIO banks A and B along with some of C and D
230 implement the buffering for the CF slot. */
231 ASIC3_CONFIG_GPIO(0, 1, 1, 0),
232 ASIC3_CONFIG_GPIO(1, 1, 1, 0),
233 ASIC3_CONFIG_GPIO(2, 1, 1, 0),
234 ASIC3_CONFIG_GPIO(3, 1, 1, 0),
235 ASIC3_CONFIG_GPIO(4, 1, 1, 0),
236 ASIC3_CONFIG_GPIO(5, 1, 1, 0),
237 ASIC3_CONFIG_GPIO(6, 1, 1, 0),
238 ASIC3_CONFIG_GPIO(7, 1, 1, 0),
239 ASIC3_CONFIG_GPIO(8, 1, 1, 0),
240 ASIC3_CONFIG_GPIO(9, 1, 1, 0),
241 ASIC3_CONFIG_GPIO(10, 1, 1, 0),
242 ASIC3_CONFIG_GPIO(11, 1, 1, 0),
243 ASIC3_CONFIG_GPIO(12, 1, 1, 0),
244 ASIC3_CONFIG_GPIO(13, 1, 1, 0),
245 ASIC3_CONFIG_GPIO(14, 1, 1, 0),
246 ASIC3_CONFIG_GPIO(15, 1, 1, 0),
248 ASIC3_CONFIG_GPIO(16, 1, 1, 0),
249 ASIC3_CONFIG_GPIO(17, 1, 1, 0),
250 ASIC3_CONFIG_GPIO(18, 1, 1, 0),
251 ASIC3_CONFIG_GPIO(19, 1, 1, 0),
252 ASIC3_CONFIG_GPIO(20, 1, 1, 0),
253 ASIC3_CONFIG_GPIO(21, 1, 1, 0),
254 ASIC3_CONFIG_GPIO(22, 1, 1, 0),
255 ASIC3_CONFIG_GPIO(23, 1, 1, 0),
256 ASIC3_CONFIG_GPIO(24, 1, 1, 0),
257 ASIC3_CONFIG_GPIO(25, 1, 1, 0),
258 ASIC3_CONFIG_GPIO(26, 1, 1, 0),
259 ASIC3_CONFIG_GPIO(27, 1, 1, 0),
260 ASIC3_CONFIG_GPIO(28, 1, 1, 0),
261 ASIC3_CONFIG_GPIO(29, 1, 1, 0),
262 ASIC3_CONFIG_GPIO(30, 1, 1, 0),
263 ASIC3_CONFIG_GPIO(31, 1, 1, 0),
265 /* GPIOC - CF, LEDs, SD */
266 ASIC3_GPIOC0_LED0
, /* red */
267 ASIC3_GPIOC1_LED1
, /* green */
268 ASIC3_GPIOC2_LED2
, /* blue */
276 ASIC3_GPIOC11_PSKTSEL
,
278 ASIC3_GPIOC13_nPWAIT
,
279 ASIC3_GPIOC14_nPIOIS16
,
282 /* GPIOD: input GPIOs, CF */
283 ASIC3_GPIOD11_nCIOIS16
,
284 ASIC3_GPIOD12_nCWAIT
,
288 static struct resource asic3_resources
[] = {
292 .end
= ASIC3_PHYS
+ ASIC3_MAP_SIZE_16BIT
- 1,
293 .flags
= IORESOURCE_MEM
,
296 .start
= gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ
),
297 .end
= gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ
),
298 .flags
= IORESOURCE_IRQ
,
302 .start
= ASIC3_SD_PHYS
,
303 .end
= ASIC3_SD_PHYS
+ ASIC3_MAP_SIZE_16BIT
- 1,
304 .flags
= IORESOURCE_MEM
,
307 .start
= gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ
),
308 .end
= gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ
),
309 .flags
= IORESOURCE_IRQ
,
313 static struct asic3_platform_data asic3_platform_data
= {
314 .gpio_config
= asic3_gpio_config
,
315 .gpio_config_num
= ARRAY_SIZE(asic3_gpio_config
),
316 .irq_base
= IRQ_BOARD_START
,
317 .gpio_base
= HX4700_ASIC3_GPIO_BASE
,
320 static struct platform_device asic3
= {
323 .resource
= asic3_resources
,
324 .num_resources
= ARRAY_SIZE(asic3_resources
),
326 .platform_data
= &asic3_platform_data
,
334 static struct resource egpio_resources
[] = {
336 .start
= PXA_CS5_PHYS
,
337 .end
= PXA_CS5_PHYS
+ 0x4 - 1,
338 .flags
= IORESOURCE_MEM
,
342 static struct htc_egpio_chip egpio_chips
[] = {
345 .gpio_base
= HX4700_EGPIO_BASE
,
347 .direction
= HTC_EGPIO_OUTPUT
,
351 static struct htc_egpio_platform_data egpio_info
= {
355 .num_chips
= ARRAY_SIZE(egpio_chips
),
358 static struct platform_device egpio
= {
361 .resource
= egpio_resources
,
362 .num_resources
= ARRAY_SIZE(egpio_resources
),
364 .platform_data
= &egpio_info
,
369 * LCD - Sony display connected to ATI Imageon w3220
372 static void sony_lcd_init(void)
374 gpio_set_value(GPIO84_HX4700_LCD_SQN
, 1);
375 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON
, 0);
376 gpio_set_value(GPIO111_HX4700_LCD_AVDD_3V3_ON
, 0);
377 gpio_set_value(GPIO70_HX4700_LCD_SLIN1
, 0);
378 gpio_set_value(GPIO62_HX4700_LCD_nRESET
, 0);
380 gpio_set_value(GPIO59_HX4700_LCD_PC1
, 0);
381 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON
, 0);
384 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON
, 1);
386 gpio_set_value(GPIO111_HX4700_LCD_AVDD_3V3_ON
, 1);
388 /* FIXME: init w3220 registers here */
391 gpio_set_value(GPIO70_HX4700_LCD_SLIN1
, 1);
393 gpio_set_value(GPIO62_HX4700_LCD_nRESET
, 1);
395 gpio_set_value(GPIO59_HX4700_LCD_PC1
, 1);
397 gpio_set_value(GPIO112_HX4700_LCD_N2V7_7V3_ON
, 1);
400 static void sony_lcd_off(void)
402 gpio_set_value(GPIO59_HX4700_LCD_PC1
, 0);
403 gpio_set_value(GPIO62_HX4700_LCD_nRESET
, 0);
405 gpio_set_value(GPIO112_HX4700_LCD_N2V7_7V3_ON
, 0);
407 gpio_set_value(GPIO111_HX4700_LCD_AVDD_3V3_ON
, 0);
409 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON
, 0);
413 static void w3220_lcd_suspend(struct w100fb_par
*wfb
)
418 static void w3220_lcd_resume(struct w100fb_par
*wfb
)
423 #define w3220_lcd_resume NULL
424 #define w3220_lcd_suspend NULL
427 static struct w100_tg_info w3220_tg_info
= {
428 .suspend
= w3220_lcd_suspend
,
429 .resume
= w3220_lcd_resume
,
433 static struct w100_gen_regs w3220_regs
= {
434 .lcd_format
= 0x00000003,
435 .lcdd_cntl1
= 0x00000000,
436 .lcdd_cntl2
= 0x0003ffff,
437 .genlcd_cntl1
= 0x00abf003, /* 0x00fff003 */
438 .genlcd_cntl2
= 0x00000003,
439 .genlcd_cntl3
= 0x000102aa,
442 static struct w100_mode w3220_modes
[] = {
450 .crtc_ss
= 0x00000000,
451 .crtc_ls
= 0xa1ff01f9, /* 0x21ff01f9 */
452 .crtc_gs
= 0xc0000000, /* 0x40000000 */
453 .crtc_vpos_gs
= 0x0000028f,
454 .crtc_ps1_active
= 0x00000000, /* 0x41060010 */
456 .crtc_dclk
= 0x80000000,
457 .crtc_gclk
= 0x040a0104,
461 .pixclk_divider_rotated
= 4,
462 .pixclk_src
= CLK_SRC_PLL
,
464 .sysclk_src
= CLK_SRC_PLL
,
473 .crtc_ss
= 0x80150014,
474 .crtc_ls
= 0xa0fb00f7,
475 .crtc_gs
= 0xc0080007,
476 .crtc_vpos_gs
= 0x00080007,
477 .crtc_rev
= 0x0000000a,
478 .crtc_dclk
= 0x81700030,
479 .crtc_gclk
= 0x8015010f,
480 .crtc_goe
= 0x00000000,
483 .pixclk_divider_rotated
= 4,
484 .pixclk_src
= CLK_SRC_PLL
,
486 .sysclk_src
= CLK_SRC_PLL
,
490 struct w100_mem_info w3220_mem_info
= {
491 .ext_cntl
= 0x09640011,
492 .sdram_mode_reg
= 0x00600021,
493 .ext_timing_cntl
= 0x1a001545, /* 0x15001545 */
494 .io_cntl
= 0x7ddd7333,
498 struct w100_bm_mem_info w3220_bm_mem_info
= {
499 .ext_mem_bw
= 0x50413e01,
501 .ext_timing_ctl
= 0x00043f7f,
502 .ext_cntl
= 0x00000010,
503 .mode_reg
= 0x00250000,
504 .io_cntl
= 0x0fff0000,
505 .config
= 0x08301480,
508 static struct w100_gpio_regs w3220_gpio_info
= {
509 .init_data1
= 0xdfe00100, /* GPIO_DATA */
510 .gpio_dir1
= 0xffff0000, /* GPIO_CNTL1 */
511 .gpio_oe1
= 0x00000000, /* GPIO_CNTL2 */
512 .init_data2
= 0x00000000, /* GPIO_DATA2 */
513 .gpio_dir2
= 0x00000000, /* GPIO_CNTL3 */
514 .gpio_oe2
= 0x00000000, /* GPIO_CNTL4 */
517 static struct w100fb_mach_info w3220_info
= {
518 .tg
= &w3220_tg_info
,
519 .mem
= &w3220_mem_info
,
520 .bm_mem
= &w3220_bm_mem_info
,
521 .gpio
= &w3220_gpio_info
,
523 .modelist
= w3220_modes
,
525 .xtal_freq
= 16000000,
528 static struct resource w3220_resources
[] = {
530 .start
= ATI_W3220_PHYS
,
531 .end
= ATI_W3220_PHYS
+ 0x00ffffff,
532 .flags
= IORESOURCE_MEM
,
536 static struct platform_device w3220
= {
540 .platform_data
= &w3220_info
,
542 .num_resources
= ARRAY_SIZE(w3220_resources
),
543 .resource
= w3220_resources
,
546 static void hx4700_lcd_set_power(struct plat_lcd_data
*pd
, unsigned int power
)
554 static struct plat_lcd_data hx4700_lcd_data
= {
555 .set_power
= hx4700_lcd_set_power
,
558 static struct platform_device hx4700_lcd
= {
559 .name
= "platform-lcd",
562 .platform_data
= &hx4700_lcd_data
,
563 .parent
= &w3220
.dev
,
571 static struct platform_pwm_backlight_data backlight_data
= {
573 .max_brightness
= 200,
574 .dft_brightness
= 100,
575 .pwm_period_ns
= 30923,
578 static struct platform_device backlight
= {
579 .name
= "pwm-backlight",
582 .parent
= &pxa27x_device_pwm1
.dev
,
583 .platform_data
= &backlight_data
,
591 static struct gpio_vbus_mach_info gpio_vbus_info
= {
592 .gpio_pullup
= GPIO76_HX4700_USBC_PUEN
,
593 .gpio_vbus
= GPIOD14_nUSBC_DETECT
,
594 .gpio_vbus_inverted
= 1,
597 static struct platform_device gpio_vbus
= {
601 .platform_data
= &gpio_vbus_info
,
606 * Touchscreen - TSC2046 connected to SSP2
609 static const struct ads7846_platform_data tsc2046_info
= {
611 .vref_delay_usecs
= 100,
616 .gpio_pendown
= GPIO58_HX4700_TSC2046_nPENIRQ
,
619 static struct pxa2xx_spi_chip tsc2046_chip
= {
623 .gpio_cs
= GPIO88_HX4700_TSC2046_CS
,
626 static struct spi_board_info tsc2046_board_info
[] __initdata
= {
628 .modalias
= "ads7846",
630 .max_speed_hz
= 2600000, /* 100 kHz sample rate */
631 .irq
= gpio_to_irq(GPIO58_HX4700_TSC2046_nPENIRQ
),
632 .platform_data
= &tsc2046_info
,
633 .controller_data
= &tsc2046_chip
,
637 static struct pxa2xx_spi_master pxa_ssp2_master_info
= {
639 .clock_enable
= CKEN_SSP2
,
647 static int power_supply_init(struct device
*dev
)
649 return gpio_request(GPIOD9_nAC_IN
, "AC charger detect");
652 static int hx4700_is_ac_online(void)
654 return !gpio_get_value(GPIOD9_nAC_IN
);
657 static void power_supply_exit(struct device
*dev
)
659 gpio_free(GPIOD9_nAC_IN
);
662 static char *hx4700_supplicants
[] = {
663 "ds2760-battery.0", "backup-battery"
666 static struct pda_power_pdata power_supply_info
= {
667 .init
= power_supply_init
,
668 .is_ac_online
= hx4700_is_ac_online
,
669 .exit
= power_supply_exit
,
670 .supplied_to
= hx4700_supplicants
,
671 .num_supplicants
= ARRAY_SIZE(hx4700_supplicants
),
674 static struct resource power_supply_resources
[] = {
677 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
|
678 IORESOURCE_IRQ_LOWEDGE
,
679 .start
= gpio_to_irq(GPIOD9_nAC_IN
),
680 .end
= gpio_to_irq(GPIOD9_nAC_IN
),
684 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
|
685 IORESOURCE_IRQ_LOWEDGE
,
686 .start
= gpio_to_irq(GPIOD14_nUSBC_DETECT
),
687 .end
= gpio_to_irq(GPIOD14_nUSBC_DETECT
),
691 static struct platform_device power_supply
= {
695 .platform_data
= &power_supply_info
,
697 .resource
= power_supply_resources
,
698 .num_resources
= ARRAY_SIZE(power_supply_resources
),
705 static struct regulator_consumer_supply bq24022_consumers
[] = {
707 .dev
= &gpio_vbus
.dev
,
708 .supply
= "vbus_draw",
711 .dev
= &power_supply
.dev
,
716 static struct regulator_init_data bq24022_init_data
= {
719 .valid_ops_mask
= REGULATOR_CHANGE_CURRENT
,
721 .num_consumer_supplies
= ARRAY_SIZE(bq24022_consumers
),
722 .consumer_supplies
= bq24022_consumers
,
725 static struct bq24022_mach_info bq24022_info
= {
726 .gpio_nce
= GPIO72_HX4700_BQ24022_nCHARGE_EN
,
727 .gpio_iset2
= GPIO96_HX4700_BQ24022_ISET2
,
728 .init_data
= &bq24022_init_data
,
731 static struct platform_device bq24022
= {
735 .platform_data
= &bq24022_info
,
743 static void hx4700_set_vpp(struct map_info
*map
, int vpp
)
745 gpio_set_value(GPIO91_HX4700_FLASH_VPEN
, vpp
);
748 static struct resource strataflash_resource
= {
749 .start
= PXA_CS0_PHYS
,
750 .end
= PXA_CS0_PHYS
+ SZ_128M
- 1,
751 .flags
= IORESOURCE_MEM
,
754 static struct physmap_flash_data strataflash_data
= {
756 .set_vpp
= hx4700_set_vpp
,
759 static struct platform_device strataflash
= {
760 .name
= "physmap-flash",
762 .resource
= &strataflash_resource
,
765 .platform_data
= &strataflash_data
,
770 * Maxim MAX1587A on PI2C
773 static struct regulator_consumer_supply max1587a_consumer
= {
774 .supply
= "vcc_core",
777 static struct regulator_init_data max1587a_v3_info
= {
779 .name
= "vcc_core range",
783 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
,
785 .num_consumer_supplies
= 1,
786 .consumer_supplies
= &max1587a_consumer
,
789 static struct max1586_subdev_data max1587a_subdev
= {
792 .platform_data
= &max1587a_v3_info
,
795 static struct max1586_platform_data max1587a_info
= {
797 .subdevs
= &max1587a_subdev
,
798 .v3_gain
= MAX1586_GAIN_R24_3k32
, /* 730..1550 mV */
801 static struct i2c_board_info __initdata pi2c_board_info
[] = {
803 I2C_BOARD_INFO("max1586", 0x14),
804 .platform_data
= &max1587a_info
,
812 static struct platform_device pcmcia
= {
813 .name
= "hx4700-pcmcia",
815 .parent
= &asic3
.dev
,
823 static struct platform_device
*devices
[] __initdata
= {
836 static struct gpio_ress global_gpios
[] = {
837 HX4700_GPIO_IN(GPIO12_HX4700_ASIC3_IRQ
, "ASIC3_IRQ"),
838 HX4700_GPIO_IN(GPIO13_HX4700_W3220_IRQ
, "W3220_IRQ"),
839 HX4700_GPIO_IN(GPIO14_HX4700_nWLAN_IRQ
, "WLAN_IRQ"),
840 HX4700_GPIO_OUT(GPIO59_HX4700_LCD_PC1
, 1, "LCD_PC1"),
841 HX4700_GPIO_OUT(GPIO62_HX4700_LCD_nRESET
, 1, "LCD_RESET"),
842 HX4700_GPIO_OUT(GPIO70_HX4700_LCD_SLIN1
, 1, "LCD_SLIN1"),
843 HX4700_GPIO_OUT(GPIO84_HX4700_LCD_SQN
, 1, "LCD_SQN"),
844 HX4700_GPIO_OUT(GPIO110_HX4700_LCD_LVDD_3V3_ON
, 1, "LCD_LVDD"),
845 HX4700_GPIO_OUT(GPIO111_HX4700_LCD_AVDD_3V3_ON
, 1, "LCD_AVDD"),
846 HX4700_GPIO_OUT(GPIO32_HX4700_RS232_ON
, 1, "RS232_ON"),
847 HX4700_GPIO_OUT(GPIO71_HX4700_ASIC3_nRESET
, 1, "ASIC3_nRESET"),
848 HX4700_GPIO_OUT(GPIO82_HX4700_EUART_RESET
, 1, "EUART_RESET"),
849 HX4700_GPIO_OUT(GPIO105_HX4700_nIR_ON
, 1, "nIR_EN"),
852 static void __init
hx4700_init(void)
854 pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config
));
855 hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios
));
857 platform_add_devices(devices
, ARRAY_SIZE(devices
));
859 pxa_set_ficp_info(&ficp_info
);
860 pxa27x_set_i2c_power_info(NULL
);
861 pxa_set_i2c_info(NULL
);
862 i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info
));
863 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info
);
864 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info
));
866 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET
, 0);
868 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET
, 1);
872 MACHINE_START(H4700
, "HP iPAQ HX4700")
873 .phys_io
= 0x40000000,
874 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
875 .boot_params
= 0xa0000100,
876 .map_io
= pxa_map_io
,
877 .init_irq
= pxa27x_init_irq
,
878 .init_machine
= hx4700_init
,