2 * linux/arch/arm/mach-pxa/stargate2.c
5 * Created: Nov 05, 2002
6 * Copyright: Intel Corp.
8 * Modified 2009: Jonathan Cameron <jic23@cam.ac.uk>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #include <linux/init.h>
16 #include <linux/device.h>
17 #include <linux/interrupt.h>
18 #include <linux/sched.h>
19 #include <linux/bitops.h>
21 #include <linux/delay.h>
22 #include <linux/platform_device.h>
23 #include <linux/regulator/machine.h>
24 #include <linux/mtd/mtd.h>
25 #include <linux/mtd/plat-ram.h>
26 #include <linux/mtd/partitions.h>
28 #include <linux/i2c/pxa-i2c.h>
29 #include <linux/i2c/pcf857x.h>
30 #include <linux/i2c/at24.h>
31 #include <linux/smc91x.h>
32 #include <linux/gpio.h>
33 #include <linux/leds.h>
35 #include <asm/types.h>
36 #include <asm/setup.h>
37 #include <asm/memory.h>
38 #include <asm/mach-types.h>
41 #include <asm/mach/arch.h>
42 #include <asm/mach/map.h>
43 #include <asm/mach/irq.h>
44 #include <asm/mach/flash.h>
46 #include <mach/pxa27x.h>
47 #include <linux/platform_data/mmc-pxamci.h>
49 #include <mach/pxa27x-udc.h>
50 #include <mach/smemc.h>
52 #include <linux/spi/spi.h>
53 #include <linux/spi/pxa2xx_spi.h>
54 #include <linux/mfd/da903x.h>
55 #include <linux/platform_data/sht15.h>
60 #define STARGATE_NR_IRQS (IRQ_BOARD_START + 8)
63 #define SG2_BT_RESET 81
66 #define SG2_GPIO_nSD_DETECT 90
67 #define SG2_SD_POWER_ENABLE 89
69 static unsigned long sg2_im2_unified_pin_config
[] __initdata
= {
70 /* Device Identification for wakeup*/
83 /* 802.15.4 radio - driver out of mainline */
84 GPIO22_GPIO
, /* CC_RSTN */
85 GPIO114_GPIO
, /* CC_FIFO */
86 GPIO116_GPIO
, /* CC_CCA */
87 GPIO0_GPIO
, /* CC_FIFOP */
88 GPIO16_GPIO
, /* CCSFD */
89 GPIO115_GPIO
, /* Power enable */
95 /* SSP 3 - 802.15.4 radio */
96 GPIO39_GPIO
, /* Chip Select */
101 /* SSP 2 to daughter boards */
105 GPIO37_GPIO
, /* chip select */
107 /* SSP 1 - to daughter boards */
108 GPIO24_GPIO
, /* Chip Select */
113 /* BTUART Basic Connector*/
119 /* STUART - IM2 via debug board not sure on SG2*/
123 /* Basic sensor board */
124 GPIO96_GPIO
, /* accelerometer interrupt */
125 GPIO99_GPIO
, /* ADC interrupt */
131 /* Basic sensor board */
132 GPIO96_GPIO
, /* accelerometer interrupt */
133 GPIO99_GPIO
, /* ADC interrupt */
135 /* Connector pins specified as gpios */
136 GPIO94_GPIO
, /* large basic connector pin 14 */
137 GPIO10_GPIO
, /* large basic connector pin 23 */
140 static struct sht15_platform_data platform_data_sht15
= {
145 static struct platform_device sht15
= {
149 .platform_data
= &platform_data_sht15
,
153 static struct regulator_consumer_supply stargate2_sensor_3_con
[] = {
154 REGULATOR_SUPPLY("vcc", "sht15"),
160 /* a mote connector? */
162 /* the CSR bluecore chip */
164 /* The two voltages available to sensor boards */
167 /* directly connected to the pxa27x */
170 vcc_pxa_usim
, /* Reference voltage for certain gpios */
173 vcc_pxa_core
, /*Dc-Dc buck not yet supported */
176 vcc_bbio
, /*not sure!*/
177 vcc_io
, /* cc2420 802.15.4 radio and pxa vcc_io ?*/
180 /* The values of the various regulator constraints are obviously dependent
181 * on exactly what is wired to each ldo. Unfortunately this information is
182 * not generally available. More information has been requested from Xbow.
184 static struct regulator_init_data stargate2_ldo_init_data
[] = {
186 .constraints
= { /* board default 1.8V */
193 .constraints
= { /* board default 2.8V */
200 .constraints
= {/* default is 1.8V */
201 .name
= "vcc_pxa_flash",
206 [vcc_cc2420
] = { /* also vcc_io */
208 /* board default is 2.8V */
209 .name
= "vcc_cc2420",
214 [vcc_vref
] = { /* Reference for what? */
215 .constraints
= { /* default 1.8V */
222 .constraints
= { /* default 2.8V */
223 .name
= "vcc_sram_ext",
229 .constraints
= { /* default 2.8V */
236 .constraints
= { /* default 2.8V */
243 .constraints
= { /* default 2.8V */
249 [vcc_io
] = { /* Same or higher than everything
250 * bar vccbat and vccusb */
251 .constraints
= { /* default 2.8V */
258 .constraints
= { /* default 1.8V */
259 .name
= "vcc_sensor_1_8",
264 [vcc_sensor_3
] = { /* curiously default 2.8V */
266 .name
= "vcc_sensor_3",
270 .num_consumer_supplies
= ARRAY_SIZE(stargate2_sensor_3_con
),
271 .consumer_supplies
= stargate2_sensor_3_con
,
273 [vcc_pxa_pll
] = { /* 1.17V - 1.43V, default 1.3V*/
275 .name
= "vcc_pxa_pll",
281 .constraints
= { /* default 1.8V */
282 .name
= "vcc_pxa_usim",
288 .constraints
= { /* default 1.8V */
289 .name
= "vcc_pxa_mem",
296 static struct mtd_partition stargate2flash_partitions
[] = {
298 .name
= "Bootloader",
305 .offset
= 0x00040000,
308 .name
= "Filesystem",
310 .offset
= 0x00240000,
315 static struct resource flash_resources
= {
316 .start
= PXA_CS0_PHYS
,
317 .end
= PXA_CS0_PHYS
+ SZ_32M
- 1,
318 .flags
= IORESOURCE_MEM
,
321 static struct flash_platform_data stargate2_flash_data
= {
322 .map_name
= "cfi_probe",
323 .parts
= stargate2flash_partitions
,
324 .nr_parts
= ARRAY_SIZE(stargate2flash_partitions
),
325 .name
= "PXA27xOnChipROM",
329 static struct platform_device stargate2_flash_device
= {
330 .name
= "pxa2xx-flash",
333 .platform_data
= &stargate2_flash_data
,
335 .resource
= &flash_resources
,
339 static struct pxa2xx_spi_master pxa_ssp_master_0_info
= {
343 static struct pxa2xx_spi_master pxa_ssp_master_1_info
= {
347 static struct pxa2xx_spi_master pxa_ssp_master_2_info
= {
351 /* An upcoming kernel change will scrap SFRM usage so these
352 * drivers have been moved to use gpio's via cs_control */
353 static struct pxa2xx_spi_chip staccel_chip_info
= {
361 static struct pxa2xx_spi_chip cc2420_info
= {
369 static struct spi_board_info spi_board_info
[] __initdata
= {
371 .modalias
= "lis3l02dq",
372 .max_speed_hz
= 8000000,/* 8MHz max spi frequency at 3V */
375 .controller_data
= &staccel_chip_info
,
376 .irq
= PXA_GPIO_TO_IRQ(96),
378 .modalias
= "cc2420",
379 .max_speed_hz
= 6500000,
382 .controller_data
= &cc2420_info
,
386 static void sg2_udc_command(int cmd
)
389 case PXA2XX_UDC_CMD_CONNECT
:
390 UP2OCR
|= UP2OCR_HXOE
| UP2OCR_DPPUE
| UP2OCR_DPPUBE
;
392 case PXA2XX_UDC_CMD_DISCONNECT
:
393 UP2OCR
&= ~(UP2OCR_HXOE
| UP2OCR_DPPUE
| UP2OCR_DPPUBE
);
398 static struct i2c_pxa_platform_data i2c_pwr_pdata
= {
402 static struct i2c_pxa_platform_data i2c_pdata
= {
406 static void __init
imote2_stargate2_init(void)
409 pxa2xx_mfp_config(ARRAY_AND_SIZE(sg2_im2_unified_pin_config
));
411 pxa_set_ffuart_info(NULL
);
412 pxa_set_btuart_info(NULL
);
413 pxa_set_stuart_info(NULL
);
415 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info
);
416 pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info
);
417 pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info
);
418 spi_register_board_info(spi_board_info
, ARRAY_SIZE(spi_board_info
));
421 pxa27x_set_i2c_power_info(&i2c_pwr_pdata
);
422 pxa_set_i2c_info(&i2c_pdata
);
425 #ifdef CONFIG_MACH_INTELMOTE2
426 /* As the the imote2 doesn't currently have a conventional SD slot
427 * there is no option to hotplug cards, making all this rather simple
429 static int imote2_mci_get_ro(struct device
*dev
)
434 /* Rather simple case as hotplugging not possible */
435 static struct pxamci_platform_data imote2_mci_platform_data
= {
436 .ocr_mask
= MMC_VDD_32_33
| MMC_VDD_33_34
, /* default anyway */
437 .get_ro
= imote2_mci_get_ro
,
438 .gpio_card_detect
= -1,
443 static struct gpio_led imote2_led_pins
[] = {
445 .name
= "imote2:red",
449 .name
= "imote2:green",
453 .name
= "imote2:blue",
459 static struct gpio_led_platform_data imote2_led_data
= {
460 .num_leds
= ARRAY_SIZE(imote2_led_pins
),
461 .leds
= imote2_led_pins
,
464 static struct platform_device imote2_leds
= {
468 .platform_data
= &imote2_led_data
,
472 static struct da903x_subdev_info imote2_da9030_subdevs
[] = {
474 .name
= "da903x-regulator",
475 .id
= DA9030_ID_LDO2
,
476 .platform_data
= &stargate2_ldo_init_data
[vcc_bbio
],
478 .name
= "da903x-regulator",
479 .id
= DA9030_ID_LDO3
,
480 .platform_data
= &stargate2_ldo_init_data
[vcc_bb
],
482 .name
= "da903x-regulator",
483 .id
= DA9030_ID_LDO4
,
484 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_flash
],
486 .name
= "da903x-regulator",
487 .id
= DA9030_ID_LDO5
,
488 .platform_data
= &stargate2_ldo_init_data
[vcc_cc2420
],
490 .name
= "da903x-regulator",
491 .id
= DA9030_ID_LDO6
,
492 .platform_data
= &stargate2_ldo_init_data
[vcc_vref
],
494 .name
= "da903x-regulator",
495 .id
= DA9030_ID_LDO7
,
496 .platform_data
= &stargate2_ldo_init_data
[vcc_sram_ext
],
498 .name
= "da903x-regulator",
499 .id
= DA9030_ID_LDO8
,
500 .platform_data
= &stargate2_ldo_init_data
[vcc_mica
],
502 .name
= "da903x-regulator",
503 .id
= DA9030_ID_LDO9
,
504 .platform_data
= &stargate2_ldo_init_data
[vcc_bt
],
506 .name
= "da903x-regulator",
507 .id
= DA9030_ID_LDO10
,
508 .platform_data
= &stargate2_ldo_init_data
[vcc_sensor_1_8
],
510 .name
= "da903x-regulator",
511 .id
= DA9030_ID_LDO11
,
512 .platform_data
= &stargate2_ldo_init_data
[vcc_sensor_3
],
514 .name
= "da903x-regulator",
515 .id
= DA9030_ID_LDO12
,
516 .platform_data
= &stargate2_ldo_init_data
[vcc_lcd
],
518 .name
= "da903x-regulator",
519 .id
= DA9030_ID_LDO15
,
520 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_pll
],
522 .name
= "da903x-regulator",
523 .id
= DA9030_ID_LDO17
,
524 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_usim
],
526 .name
= "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
527 .id
= DA9030_ID_LDO18
,
528 .platform_data
= &stargate2_ldo_init_data
[vcc_io
],
530 .name
= "da903x-regulator",
531 .id
= DA9030_ID_LDO19
,
532 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_mem
],
536 static struct da903x_platform_data imote2_da9030_pdata
= {
537 .num_subdevs
= ARRAY_SIZE(imote2_da9030_subdevs
),
538 .subdevs
= imote2_da9030_subdevs
,
541 static struct i2c_board_info __initdata imote2_pwr_i2c_board_info
[] = {
545 .platform_data
= &imote2_da9030_pdata
,
546 .irq
= PXA_GPIO_TO_IRQ(1),
550 static struct i2c_board_info __initdata imote2_i2c_board_info
[] = {
551 { /* UCAM sensor board */
554 }, { /* ITS400 Sensor board only */
557 /* Through a nand gate - Also beware, on V2 sensor board the
558 * pull up resistors are missing.
560 .irq
= PXA_GPIO_TO_IRQ(99),
561 }, { /* ITS400 Sensor board only */
564 /* Through a nand gate - Also beware, on V2 sensor board the
565 * pull up resistors are missing.
567 .irq
= PXA_GPIO_TO_IRQ(99),
568 }, { /* ITS400 Sensor board only */
571 .irq
= PXA_GPIO_TO_IRQ(96),
572 }, { /* IMB400 Multimedia board */
578 static unsigned long imote2_pin_config
[] __initdata
= {
584 GPIO103_GPIO
, /* red led */
585 GPIO104_GPIO
, /* green led */
586 GPIO105_GPIO
, /* blue led */
589 static struct pxa2xx_udc_mach_info imote2_udc_info __initdata
= {
590 .udc_command
= sg2_udc_command
,
593 static struct platform_device imote2_audio_device
= {
594 .name
= "imote2-audio",
598 static struct platform_device
*imote2_devices
[] = {
599 &stargate2_flash_device
,
602 &imote2_audio_device
,
605 static void __init
imote2_init(void)
607 pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config
));
609 imote2_stargate2_init();
611 platform_add_devices(imote2_devices
, ARRAY_SIZE(imote2_devices
));
613 i2c_register_board_info(0, imote2_i2c_board_info
,
614 ARRAY_SIZE(imote2_i2c_board_info
));
615 i2c_register_board_info(1, imote2_pwr_i2c_board_info
,
616 ARRAY_SIZE(imote2_pwr_i2c_board_info
));
618 pxa_set_mci_info(&imote2_mci_platform_data
);
619 pxa_set_udc_info(&imote2_udc_info
);
623 #ifdef CONFIG_MACH_STARGATE2
625 static unsigned long stargate2_pin_config
[] __initdata
= {
627 GPIO15_nCS_1
, /* SRAM */
630 GPIO40_GPIO
, /*cable detect?*/
633 GPIO91_GPIO
| WAKEUP_ON_LEVEL_HIGH
,
646 GPIO120_GPIO
, /* Buff ctrl */
647 GPIO108_GPIO
, /* Power ctrl */
648 GPIO82_GPIO
, /* Reset */
649 GPIO53_GPIO
, /* SG2_S0_GPIO_DETECT */
651 /* MMC not shared with imote2 */
652 GPIO90_GPIO
, /* nSD detect */
653 GPIO89_GPIO
, /* SD_POWER_ENABLE */
656 GPIO81_GPIO
, /* reset */
659 static struct resource smc91x_resources
[] = {
661 .name
= "smc91x-regs",
662 .start
= (PXA_CS4_PHYS
+ 0x300),
663 .end
= (PXA_CS4_PHYS
+ 0xfffff),
664 .flags
= IORESOURCE_MEM
,
667 .start
= PXA_GPIO_TO_IRQ(40),
668 .end
= PXA_GPIO_TO_IRQ(40),
669 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
,
673 static struct smc91x_platdata stargate2_smc91x_info
= {
674 .flags
= SMC91X_USE_8BIT
| SMC91X_USE_16BIT
| SMC91X_USE_32BIT
675 | SMC91X_NOWAIT
| SMC91X_USE_DMA
,
678 static struct platform_device smc91x_device
= {
681 .num_resources
= ARRAY_SIZE(smc91x_resources
),
682 .resource
= smc91x_resources
,
684 .platform_data
= &stargate2_smc91x_info
,
690 * The card detect interrupt isn't debounced so we delay it by 250ms
691 * to give the card a chance to fully insert / eject.
693 static int stargate2_mci_init(struct device
*dev
,
694 irq_handler_t stargate2_detect_int
,
699 err
= gpio_request(SG2_SD_POWER_ENABLE
, "SG2_sd_power_enable");
701 printk(KERN_ERR
"Can't get the gpio for SD power control");
704 gpio_direction_output(SG2_SD_POWER_ENABLE
, 0);
706 err
= gpio_request(SG2_GPIO_nSD_DETECT
, "SG2_sd_detect");
708 printk(KERN_ERR
"Can't get the sd detect gpio");
711 gpio_direction_input(SG2_GPIO_nSD_DETECT
);
713 err
= request_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT
),
714 stargate2_detect_int
,
719 printk(KERN_ERR
"can't request MMC card detect IRQ\n");
720 goto free_nsd_detect
;
725 gpio_free(SG2_GPIO_nSD_DETECT
);
727 gpio_free(SG2_SD_POWER_ENABLE
);
733 * stargate2_mci_setpower() - set state of mmc power supply
735 * Very simple control. Either it is on or off and is controlled by
737 static void stargate2_mci_setpower(struct device
*dev
, unsigned int vdd
)
739 gpio_set_value(SG2_SD_POWER_ENABLE
, !!vdd
);
742 static void stargate2_mci_exit(struct device
*dev
, void *data
)
744 free_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT
), data
);
745 gpio_free(SG2_SD_POWER_ENABLE
);
746 gpio_free(SG2_GPIO_nSD_DETECT
);
749 static struct pxamci_platform_data stargate2_mci_platform_data
= {
750 .detect_delay_ms
= 250,
751 .ocr_mask
= MMC_VDD_32_33
| MMC_VDD_33_34
,
752 .init
= stargate2_mci_init
,
753 .setpower
= stargate2_mci_setpower
,
754 .exit
= stargate2_mci_exit
,
759 * SRAM - The Stargate 2 has 32MB of SRAM.
761 * Here it is made available as an MTD. This will then
762 * typically have a cifs filesystem created on it to provide
763 * fast temporary storage.
765 static struct resource sram_resources
= {
766 .start
= PXA_CS1_PHYS
,
767 .end
= PXA_CS1_PHYS
+ SZ_32M
-1,
768 .flags
= IORESOURCE_MEM
,
771 static struct platdata_mtd_ram stargate2_sram_pdata
= {
772 .mapname
= "Stargate2 SRAM",
776 static struct platform_device stargate2_sram
= {
779 .resource
= &sram_resources
,
782 .platform_data
= &stargate2_sram_pdata
,
786 static struct pcf857x_platform_data platform_data_pcf857x
= {
794 static struct at24_platform_data pca9500_eeprom_pdata
= {
800 * stargate2_reset_bluetooth() reset the bluecore to ensure consistent state
802 static int stargate2_reset_bluetooth(void)
805 err
= gpio_request(SG2_BT_RESET
, "SG2_BT_RESET");
807 printk(KERN_ERR
"Could not get gpio for bluetooth reset\n");
810 gpio_direction_output(SG2_BT_RESET
, 1);
812 /* now reset it - 5 msec minimum */
813 gpio_set_value(SG2_BT_RESET
, 0);
815 gpio_set_value(SG2_BT_RESET
, 1);
816 gpio_free(SG2_BT_RESET
);
820 static struct led_info stargate2_leds
[] = {
823 .flags
= DA9030_LED_RATE_ON
,
826 .flags
= DA9030_LED_RATE_ON
,
829 .flags
= DA9030_LED_RATE_ON
,
833 static struct da903x_subdev_info stargate2_da9030_subdevs
[] = {
835 .name
= "da903x-led",
836 .id
= DA9030_ID_LED_2
,
837 .platform_data
= &stargate2_leds
[0],
839 .name
= "da903x-led",
840 .id
= DA9030_ID_LED_3
,
841 .platform_data
= &stargate2_leds
[2],
843 .name
= "da903x-led",
844 .id
= DA9030_ID_LED_4
,
845 .platform_data
= &stargate2_leds
[1],
847 .name
= "da903x-regulator",
848 .id
= DA9030_ID_LDO2
,
849 .platform_data
= &stargate2_ldo_init_data
[vcc_bbio
],
851 .name
= "da903x-regulator",
852 .id
= DA9030_ID_LDO3
,
853 .platform_data
= &stargate2_ldo_init_data
[vcc_bb
],
855 .name
= "da903x-regulator",
856 .id
= DA9030_ID_LDO4
,
857 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_flash
],
859 .name
= "da903x-regulator",
860 .id
= DA9030_ID_LDO5
,
861 .platform_data
= &stargate2_ldo_init_data
[vcc_cc2420
],
863 .name
= "da903x-regulator",
864 .id
= DA9030_ID_LDO6
,
865 .platform_data
= &stargate2_ldo_init_data
[vcc_vref
],
867 .name
= "da903x-regulator",
868 .id
= DA9030_ID_LDO7
,
869 .platform_data
= &stargate2_ldo_init_data
[vcc_sram_ext
],
871 .name
= "da903x-regulator",
872 .id
= DA9030_ID_LDO8
,
873 .platform_data
= &stargate2_ldo_init_data
[vcc_mica
],
875 .name
= "da903x-regulator",
876 .id
= DA9030_ID_LDO9
,
877 .platform_data
= &stargate2_ldo_init_data
[vcc_bt
],
879 .name
= "da903x-regulator",
880 .id
= DA9030_ID_LDO10
,
881 .platform_data
= &stargate2_ldo_init_data
[vcc_sensor_1_8
],
883 .name
= "da903x-regulator",
884 .id
= DA9030_ID_LDO11
,
885 .platform_data
= &stargate2_ldo_init_data
[vcc_sensor_3
],
887 .name
= "da903x-regulator",
888 .id
= DA9030_ID_LDO12
,
889 .platform_data
= &stargate2_ldo_init_data
[vcc_lcd
],
891 .name
= "da903x-regulator",
892 .id
= DA9030_ID_LDO15
,
893 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_pll
],
895 .name
= "da903x-regulator",
896 .id
= DA9030_ID_LDO17
,
897 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_usim
],
899 .name
= "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
900 .id
= DA9030_ID_LDO18
,
901 .platform_data
= &stargate2_ldo_init_data
[vcc_io
],
903 .name
= "da903x-regulator",
904 .id
= DA9030_ID_LDO19
,
905 .platform_data
= &stargate2_ldo_init_data
[vcc_pxa_mem
],
909 static struct da903x_platform_data stargate2_da9030_pdata
= {
910 .num_subdevs
= ARRAY_SIZE(stargate2_da9030_subdevs
),
911 .subdevs
= stargate2_da9030_subdevs
,
914 static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info
[] = {
918 .platform_data
= &stargate2_da9030_pdata
,
919 .irq
= PXA_GPIO_TO_IRQ(1),
923 static struct i2c_board_info __initdata stargate2_i2c_board_info
[] = {
924 /* Techically this a pca9500 - but it's compatible with the 8574
925 * for gpio expansion and the 24c02 for eeprom access.
930 .platform_data
= &platform_data_pcf857x
,
934 .platform_data
= &pca9500_eeprom_pdata
,
938 }, { /* ITS400 Sensor board only */
941 /* Through a nand gate - Also beware, on V2 sensor board the
942 * pull up resistors are missing.
944 .irq
= PXA_GPIO_TO_IRQ(99),
945 }, { /* ITS400 Sensor board only */
948 /* Through a nand gate - Also beware, on V2 sensor board the
949 * pull up resistors are missing.
951 .irq
= PXA_GPIO_TO_IRQ(99),
952 }, { /* ITS400 Sensor board only */
955 .irq
= PXA_GPIO_TO_IRQ(96),
959 /* Board doesn't support cable detection - so always lie and say
960 * something is there.
962 static int sg2_udc_detect(void)
967 static struct pxa2xx_udc_mach_info stargate2_udc_info __initdata
= {
968 .udc_is_connected
= sg2_udc_detect
,
969 .udc_command
= sg2_udc_command
,
972 static struct platform_device
*stargate2_devices
[] = {
973 &stargate2_flash_device
,
979 static void __init
stargate2_init(void)
981 /* This is probably a board specific hack as this must be set
982 prior to connecting the MFP stuff up. */
983 __raw_writel(__raw_readl(MECR
) & ~MECR_NOS
, MECR
);
985 pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config
));
987 imote2_stargate2_init();
989 platform_add_devices(ARRAY_AND_SIZE(stargate2_devices
));
991 i2c_register_board_info(0, ARRAY_AND_SIZE(stargate2_i2c_board_info
));
992 i2c_register_board_info(1, stargate2_pwr_i2c_board_info
,
993 ARRAY_SIZE(stargate2_pwr_i2c_board_info
));
995 pxa_set_mci_info(&stargate2_mci_platform_data
);
997 pxa_set_udc_info(&stargate2_udc_info
);
999 stargate2_reset_bluetooth();
1003 #ifdef CONFIG_MACH_INTELMOTE2
1004 MACHINE_START(INTELMOTE2
, "IMOTE 2")
1005 .map_io
= pxa27x_map_io
,
1006 .nr_irqs
= PXA_NR_IRQS
,
1007 .init_irq
= pxa27x_init_irq
,
1008 .handle_irq
= pxa27x_handle_irq
,
1009 .timer
= &pxa_timer
,
1010 .init_machine
= imote2_init
,
1011 .atag_offset
= 0x100,
1012 .restart
= pxa_restart
,
1016 #ifdef CONFIG_MACH_STARGATE2
1017 MACHINE_START(STARGATE2
, "Stargate 2")
1018 .map_io
= pxa27x_map_io
,
1019 .nr_irqs
= STARGATE_NR_IRQS
,
1020 .init_irq
= pxa27x_init_irq
,
1021 .handle_irq
= pxa27x_handle_irq
,
1022 .timer
= &pxa_timer
,
1023 .init_machine
= stargate2_init
,
1024 .atag_offset
= 0x100,
1025 .restart
= pxa_restart
,