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/platform_data/i2c-pxa.h>
29 #include <linux/platform_data/pcf857x.h>
30 #include <linux/smc91x.h>
31 #include <linux/gpio/machine.h>
32 #include <linux/gpio.h>
33 #include <linux/leds.h>
34 #include <linux/property.h>
36 #include <asm/types.h>
37 #include <asm/setup.h>
38 #include <asm/memory.h>
39 #include <asm/mach-types.h>
42 #include <asm/mach/arch.h>
43 #include <asm/mach/map.h>
44 #include <asm/mach/irq.h>
45 #include <asm/mach/flash.h>
48 #include <linux/platform_data/mmc-pxamci.h>
50 #include "pxa27x-udc.h"
51 #include <mach/smemc.h>
53 #include <linux/spi/spi.h>
54 #include <linux/spi/pxa2xx_spi.h>
55 #include <linux/mfd/da903x.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 gpiod_lookup_table sht15_gpiod_table = {
143 /* FIXME: should this have |GPIO_OPEN_DRAIN set? */
144 GPIO_LOOKUP("gpio-pxa", 100, "data", GPIO_ACTIVE_HIGH),
145 GPIO_LOOKUP("gpio-pxa", 98, "clk", GPIO_ACTIVE_HIGH),
149 static struct platform_device sht15 = {
154 static struct regulator_consumer_supply stargate2_sensor_3_con[] = {
155 REGULATOR_SUPPLY("vcc", "sht15"),
161 /* a mote connector? */
163 /* the CSR bluecore chip */
165 /* The two voltages available to sensor boards */
168 /* directly connected to the pxa27x */
171 vcc_pxa_usim, /* Reference voltage for certain gpios */
174 vcc_pxa_core, /*Dc-Dc buck not yet supported */
177 vcc_bbio, /*not sure!*/
178 vcc_io, /* cc2420 802.15.4 radio and pxa vcc_io ?*/
181 /* The values of the various regulator constraints are obviously dependent
182 * on exactly what is wired to each ldo. Unfortunately this information is
183 * not generally available. More information has been requested from Xbow.
185 static struct regulator_init_data stargate2_ldo_init_data[] = {
187 .constraints = { /* board default 1.8V */
194 .constraints = { /* board default 2.8V */
201 .constraints = {/* default is 1.8V */
202 .name = "vcc_pxa_flash",
207 [vcc_cc2420] = { /* also vcc_io */
209 /* board default is 2.8V */
210 .name = "vcc_cc2420",
215 [vcc_vref] = { /* Reference for what? */
216 .constraints = { /* default 1.8V */
223 .constraints = { /* default 2.8V */
224 .name = "vcc_sram_ext",
230 .constraints = { /* default 2.8V */
237 .constraints = { /* default 2.8V */
244 .constraints = { /* default 2.8V */
250 [vcc_io] = { /* Same or higher than everything
251 * bar vccbat and vccusb */
252 .constraints = { /* default 2.8V */
259 .constraints = { /* default 1.8V */
260 .name = "vcc_sensor_1_8",
265 [vcc_sensor_3] = { /* curiously default 2.8V */
267 .name = "vcc_sensor_3",
271 .num_consumer_supplies = ARRAY_SIZE(stargate2_sensor_3_con),
272 .consumer_supplies = stargate2_sensor_3_con,
274 [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/
276 .name = "vcc_pxa_pll",
282 .constraints = { /* default 1.8V */
283 .name = "vcc_pxa_usim",
289 .constraints = { /* default 1.8V */
290 .name = "vcc_pxa_mem",
297 static struct mtd_partition stargate2flash_partitions[] = {
299 .name = "Bootloader",
306 .offset = 0x00040000,
309 .name = "Filesystem",
311 .offset = 0x00240000,
316 static struct resource flash_resources = {
317 .start = PXA_CS0_PHYS,
318 .end = PXA_CS0_PHYS + SZ_32M - 1,
319 .flags = IORESOURCE_MEM,
322 static struct flash_platform_data stargate2_flash_data = {
323 .map_name = "cfi_probe",
324 .parts = stargate2flash_partitions,
325 .nr_parts = ARRAY_SIZE(stargate2flash_partitions),
326 .name = "PXA27xOnChipROM",
330 static struct platform_device stargate2_flash_device = {
331 .name = "pxa2xx-flash",
334 .platform_data = &stargate2_flash_data,
336 .resource = &flash_resources,
340 static struct pxa2xx_spi_master pxa_ssp_master_0_info = {
344 static struct pxa2xx_spi_master pxa_ssp_master_1_info = {
348 static struct pxa2xx_spi_master pxa_ssp_master_2_info = {
352 /* An upcoming kernel change will scrap SFRM usage so these
353 * drivers have been moved to use gpio's via cs_control */
354 static struct pxa2xx_spi_chip staccel_chip_info = {
362 static struct pxa2xx_spi_chip cc2420_info = {
370 static struct spi_board_info spi_board_info[] __initdata = {
372 .modalias = "lis3l02dq",
373 .max_speed_hz = 8000000,/* 8MHz max spi frequency at 3V */
376 .controller_data = &staccel_chip_info,
377 .irq = PXA_GPIO_TO_IRQ(96),
379 .modalias = "cc2420",
380 .max_speed_hz = 6500000,
383 .controller_data = &cc2420_info,
387 static void sg2_udc_command(int cmd)
390 case PXA2XX_UDC_CMD_CONNECT:
391 UP2OCR |= UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE;
393 case PXA2XX_UDC_CMD_DISCONNECT:
394 UP2OCR &= ~(UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE);
399 static struct i2c_pxa_platform_data i2c_pwr_pdata = {
403 static struct i2c_pxa_platform_data i2c_pdata = {
407 static void __init imote2_stargate2_init(void)
410 pxa2xx_mfp_config(ARRAY_AND_SIZE(sg2_im2_unified_pin_config));
412 pxa_set_ffuart_info(NULL);
413 pxa_set_btuart_info(NULL);
414 pxa_set_stuart_info(NULL);
416 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info);
417 pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info);
418 pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info);
419 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
422 pxa27x_set_i2c_power_info(&i2c_pwr_pdata);
423 pxa_set_i2c_info(&i2c_pdata);
426 #ifdef CONFIG_MACH_INTELMOTE2
427 /* As the the imote2 doesn't currently have a conventional SD slot
428 * there is no option to hotplug cards, making all this rather simple
430 static int imote2_mci_get_ro(struct device *dev)
435 /* Rather simple case as hotplugging not possible */
436 static struct pxamci_platform_data imote2_mci_platform_data = {
437 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */
438 .get_ro = imote2_mci_get_ro,
439 .gpio_card_detect = -1,
444 static struct gpio_led imote2_led_pins[] = {
446 .name = "imote2:red",
450 .name = "imote2:green",
454 .name = "imote2:blue",
460 static struct gpio_led_platform_data imote2_led_data = {
461 .num_leds = ARRAY_SIZE(imote2_led_pins),
462 .leds = imote2_led_pins,
465 static struct platform_device imote2_leds = {
469 .platform_data = &imote2_led_data,
473 static struct da903x_subdev_info imote2_da9030_subdevs[] = {
475 .name = "da903x-regulator",
476 .id = DA9030_ID_LDO2,
477 .platform_data = &stargate2_ldo_init_data[vcc_bbio],
479 .name = "da903x-regulator",
480 .id = DA9030_ID_LDO3,
481 .platform_data = &stargate2_ldo_init_data[vcc_bb],
483 .name = "da903x-regulator",
484 .id = DA9030_ID_LDO4,
485 .platform_data = &stargate2_ldo_init_data[vcc_pxa_flash],
487 .name = "da903x-regulator",
488 .id = DA9030_ID_LDO5,
489 .platform_data = &stargate2_ldo_init_data[vcc_cc2420],
491 .name = "da903x-regulator",
492 .id = DA9030_ID_LDO6,
493 .platform_data = &stargate2_ldo_init_data[vcc_vref],
495 .name = "da903x-regulator",
496 .id = DA9030_ID_LDO7,
497 .platform_data = &stargate2_ldo_init_data[vcc_sram_ext],
499 .name = "da903x-regulator",
500 .id = DA9030_ID_LDO8,
501 .platform_data = &stargate2_ldo_init_data[vcc_mica],
503 .name = "da903x-regulator",
504 .id = DA9030_ID_LDO9,
505 .platform_data = &stargate2_ldo_init_data[vcc_bt],
507 .name = "da903x-regulator",
508 .id = DA9030_ID_LDO10,
509 .platform_data = &stargate2_ldo_init_data[vcc_sensor_1_8],
511 .name = "da903x-regulator",
512 .id = DA9030_ID_LDO11,
513 .platform_data = &stargate2_ldo_init_data[vcc_sensor_3],
515 .name = "da903x-regulator",
516 .id = DA9030_ID_LDO12,
517 .platform_data = &stargate2_ldo_init_data[vcc_lcd],
519 .name = "da903x-regulator",
520 .id = DA9030_ID_LDO15,
521 .platform_data = &stargate2_ldo_init_data[vcc_pxa_pll],
523 .name = "da903x-regulator",
524 .id = DA9030_ID_LDO17,
525 .platform_data = &stargate2_ldo_init_data[vcc_pxa_usim],
527 .name = "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
528 .id = DA9030_ID_LDO18,
529 .platform_data = &stargate2_ldo_init_data[vcc_io],
531 .name = "da903x-regulator",
532 .id = DA9030_ID_LDO19,
533 .platform_data = &stargate2_ldo_init_data[vcc_pxa_mem],
537 static struct da903x_platform_data imote2_da9030_pdata = {
538 .num_subdevs = ARRAY_SIZE(imote2_da9030_subdevs),
539 .subdevs = imote2_da9030_subdevs,
542 static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = {
546 .platform_data = &imote2_da9030_pdata,
547 .irq = PXA_GPIO_TO_IRQ(1),
551 static struct i2c_board_info __initdata imote2_i2c_board_info[] = {
552 { /* UCAM sensor board */
555 }, { /* ITS400 Sensor board only */
558 /* Through a nand gate - Also beware, on V2 sensor board the
559 * pull up resistors are missing.
561 .irq = PXA_GPIO_TO_IRQ(99),
562 }, { /* ITS400 Sensor board only */
565 /* Through a nand gate - Also beware, on V2 sensor board the
566 * pull up resistors are missing.
568 .irq = PXA_GPIO_TO_IRQ(99),
569 }, { /* ITS400 Sensor board only */
572 .irq = PXA_GPIO_TO_IRQ(96),
573 }, { /* IMB400 Multimedia board */
579 static unsigned long imote2_pin_config[] __initdata = {
585 GPIO103_GPIO, /* red led */
586 GPIO104_GPIO, /* green led */
587 GPIO105_GPIO, /* blue led */
590 static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = {
591 .udc_command = sg2_udc_command,
594 static struct platform_device imote2_audio_device = {
595 .name = "imote2-audio",
599 static struct platform_device *imote2_devices[] = {
600 &stargate2_flash_device,
603 &imote2_audio_device,
606 static void __init imote2_init(void)
608 pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config));
610 imote2_stargate2_init();
612 gpiod_add_lookup_table(&sht15_gpiod_table);
613 platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices));
615 i2c_register_board_info(0, imote2_i2c_board_info,
616 ARRAY_SIZE(imote2_i2c_board_info));
617 i2c_register_board_info(1, imote2_pwr_i2c_board_info,
618 ARRAY_SIZE(imote2_pwr_i2c_board_info));
620 pxa_set_mci_info(&imote2_mci_platform_data);
621 pxa_set_udc_info(&imote2_udc_info);
625 #ifdef CONFIG_MACH_STARGATE2
627 static unsigned long stargate2_pin_config[] __initdata = {
629 GPIO15_nCS_1, /* SRAM */
632 GPIO40_GPIO, /*cable detect?*/
635 GPIO91_GPIO | WAKEUP_ON_LEVEL_HIGH,
648 GPIO120_GPIO, /* Buff ctrl */
649 GPIO108_GPIO, /* Power ctrl */
650 GPIO82_GPIO, /* Reset */
651 GPIO53_GPIO, /* SG2_S0_GPIO_DETECT */
653 /* MMC not shared with imote2 */
654 GPIO90_GPIO, /* nSD detect */
655 GPIO89_GPIO, /* SD_POWER_ENABLE */
658 GPIO81_GPIO, /* reset */
661 static struct resource smc91x_resources[] = {
663 .name = "smc91x-regs",
664 .start = (PXA_CS4_PHYS + 0x300),
665 .end = (PXA_CS4_PHYS + 0xfffff),
666 .flags = IORESOURCE_MEM,
669 .start = PXA_GPIO_TO_IRQ(40),
670 .end = PXA_GPIO_TO_IRQ(40),
671 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
675 static struct smc91x_platdata stargate2_smc91x_info = {
676 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT
677 | SMC91X_NOWAIT | SMC91X_USE_DMA,
678 .pxa_u16_align4 = true,
681 static struct platform_device smc91x_device = {
684 .num_resources = ARRAY_SIZE(smc91x_resources),
685 .resource = smc91x_resources,
687 .platform_data = &stargate2_smc91x_info,
693 * The card detect interrupt isn't debounced so we delay it by 250ms
694 * to give the card a chance to fully insert / eject.
696 static int stargate2_mci_init(struct device *dev,
697 irq_handler_t stargate2_detect_int,
702 err = gpio_request(SG2_SD_POWER_ENABLE, "SG2_sd_power_enable");
704 printk(KERN_ERR "Can't get the gpio for SD power control");
707 gpio_direction_output(SG2_SD_POWER_ENABLE, 0);
709 err = gpio_request(SG2_GPIO_nSD_DETECT, "SG2_sd_detect");
711 printk(KERN_ERR "Can't get the sd detect gpio");
714 gpio_direction_input(SG2_GPIO_nSD_DETECT);
716 err = request_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT),
717 stargate2_detect_int,
722 printk(KERN_ERR "can't request MMC card detect IRQ\n");
723 goto free_nsd_detect;
728 gpio_free(SG2_GPIO_nSD_DETECT);
730 gpio_free(SG2_SD_POWER_ENABLE);
736 * stargate2_mci_setpower() - set state of mmc power supply
738 * Very simple control. Either it is on or off and is controlled by
740 static int stargate2_mci_setpower(struct device *dev, unsigned int vdd)
742 gpio_set_value(SG2_SD_POWER_ENABLE, !!vdd);
746 static void stargate2_mci_exit(struct device *dev, void *data)
748 free_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT), data);
749 gpio_free(SG2_SD_POWER_ENABLE);
750 gpio_free(SG2_GPIO_nSD_DETECT);
753 static struct pxamci_platform_data stargate2_mci_platform_data = {
754 .detect_delay_ms = 250,
755 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
756 .init = stargate2_mci_init,
757 .setpower = stargate2_mci_setpower,
758 .exit = stargate2_mci_exit,
763 * SRAM - The Stargate 2 has 32MB of SRAM.
765 * Here it is made available as an MTD. This will then
766 * typically have a cifs filesystem created on it to provide
767 * fast temporary storage.
769 static struct resource sram_resources = {
770 .start = PXA_CS1_PHYS,
771 .end = PXA_CS1_PHYS + SZ_32M-1,
772 .flags = IORESOURCE_MEM,
775 static struct platdata_mtd_ram stargate2_sram_pdata = {
776 .mapname = "Stargate2 SRAM",
780 static struct platform_device stargate2_sram = {
783 .resource = &sram_resources,
786 .platform_data = &stargate2_sram_pdata,
790 static struct pcf857x_platform_data platform_data_pcf857x = {
798 static const struct property_entry pca9500_eeprom_properties[] = {
799 PROPERTY_ENTRY_U32("pagesize", 4),
804 * stargate2_reset_bluetooth() reset the bluecore to ensure consistent state
806 static int stargate2_reset_bluetooth(void)
809 err = gpio_request(SG2_BT_RESET, "SG2_BT_RESET");
811 printk(KERN_ERR "Could not get gpio for bluetooth reset\n");
814 gpio_direction_output(SG2_BT_RESET, 1);
816 /* now reset it - 5 msec minimum */
817 gpio_set_value(SG2_BT_RESET, 0);
819 gpio_set_value(SG2_BT_RESET, 1);
820 gpio_free(SG2_BT_RESET);
824 static struct led_info stargate2_leds[] = {
827 .flags = DA9030_LED_RATE_ON,
830 .flags = DA9030_LED_RATE_ON,
833 .flags = DA9030_LED_RATE_ON,
837 static struct da903x_subdev_info stargate2_da9030_subdevs[] = {
839 .name = "da903x-led",
840 .id = DA9030_ID_LED_2,
841 .platform_data = &stargate2_leds[0],
843 .name = "da903x-led",
844 .id = DA9030_ID_LED_3,
845 .platform_data = &stargate2_leds[2],
847 .name = "da903x-led",
848 .id = DA9030_ID_LED_4,
849 .platform_data = &stargate2_leds[1],
851 .name = "da903x-regulator",
852 .id = DA9030_ID_LDO2,
853 .platform_data = &stargate2_ldo_init_data[vcc_bbio],
855 .name = "da903x-regulator",
856 .id = DA9030_ID_LDO3,
857 .platform_data = &stargate2_ldo_init_data[vcc_bb],
859 .name = "da903x-regulator",
860 .id = DA9030_ID_LDO4,
861 .platform_data = &stargate2_ldo_init_data[vcc_pxa_flash],
863 .name = "da903x-regulator",
864 .id = DA9030_ID_LDO5,
865 .platform_data = &stargate2_ldo_init_data[vcc_cc2420],
867 .name = "da903x-regulator",
868 .id = DA9030_ID_LDO6,
869 .platform_data = &stargate2_ldo_init_data[vcc_vref],
871 .name = "da903x-regulator",
872 .id = DA9030_ID_LDO7,
873 .platform_data = &stargate2_ldo_init_data[vcc_sram_ext],
875 .name = "da903x-regulator",
876 .id = DA9030_ID_LDO8,
877 .platform_data = &stargate2_ldo_init_data[vcc_mica],
879 .name = "da903x-regulator",
880 .id = DA9030_ID_LDO9,
881 .platform_data = &stargate2_ldo_init_data[vcc_bt],
883 .name = "da903x-regulator",
884 .id = DA9030_ID_LDO10,
885 .platform_data = &stargate2_ldo_init_data[vcc_sensor_1_8],
887 .name = "da903x-regulator",
888 .id = DA9030_ID_LDO11,
889 .platform_data = &stargate2_ldo_init_data[vcc_sensor_3],
891 .name = "da903x-regulator",
892 .id = DA9030_ID_LDO12,
893 .platform_data = &stargate2_ldo_init_data[vcc_lcd],
895 .name = "da903x-regulator",
896 .id = DA9030_ID_LDO15,
897 .platform_data = &stargate2_ldo_init_data[vcc_pxa_pll],
899 .name = "da903x-regulator",
900 .id = DA9030_ID_LDO17,
901 .platform_data = &stargate2_ldo_init_data[vcc_pxa_usim],
903 .name = "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
904 .id = DA9030_ID_LDO18,
905 .platform_data = &stargate2_ldo_init_data[vcc_io],
907 .name = "da903x-regulator",
908 .id = DA9030_ID_LDO19,
909 .platform_data = &stargate2_ldo_init_data[vcc_pxa_mem],
913 static struct da903x_platform_data stargate2_da9030_pdata = {
914 .num_subdevs = ARRAY_SIZE(stargate2_da9030_subdevs),
915 .subdevs = stargate2_da9030_subdevs,
918 static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info[] = {
922 .platform_data = &stargate2_da9030_pdata,
923 .irq = PXA_GPIO_TO_IRQ(1),
927 static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
928 /* Techically this a pca9500 - but it's compatible with the 8574
929 * for gpio expansion and the 24c02 for eeprom access.
934 .platform_data = &platform_data_pcf857x,
938 .properties = pca9500_eeprom_properties,
942 }, { /* ITS400 Sensor board only */
945 /* Through a nand gate - Also beware, on V2 sensor board the
946 * pull up resistors are missing.
948 .irq = PXA_GPIO_TO_IRQ(99),
949 }, { /* ITS400 Sensor board only */
952 /* Through a nand gate - Also beware, on V2 sensor board the
953 * pull up resistors are missing.
955 .irq = PXA_GPIO_TO_IRQ(99),
956 }, { /* ITS400 Sensor board only */
959 .irq = PXA_GPIO_TO_IRQ(96),
963 /* Board doesn't support cable detection - so always lie and say
964 * something is there.
966 static int sg2_udc_detect(void)
971 static struct pxa2xx_udc_mach_info stargate2_udc_info __initdata = {
972 .udc_is_connected = sg2_udc_detect,
973 .udc_command = sg2_udc_command,
976 static struct platform_device *stargate2_devices[] = {
977 &stargate2_flash_device,
983 static void __init stargate2_init(void)
985 /* This is probably a board specific hack as this must be set
986 prior to connecting the MFP stuff up. */
987 __raw_writel(__raw_readl(MECR) & ~MECR_NOS, MECR);
989 pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config));
991 imote2_stargate2_init();
993 gpiod_add_lookup_table(&sht15_gpiod_table);
994 platform_add_devices(ARRAY_AND_SIZE(stargate2_devices));
996 i2c_register_board_info(0, ARRAY_AND_SIZE(stargate2_i2c_board_info));
997 i2c_register_board_info(1, stargate2_pwr_i2c_board_info,
998 ARRAY_SIZE(stargate2_pwr_i2c_board_info));
1000 pxa_set_mci_info(&stargate2_mci_platform_data);
1002 pxa_set_udc_info(&stargate2_udc_info);
1004 stargate2_reset_bluetooth();
1008 #ifdef CONFIG_MACH_INTELMOTE2
1009 MACHINE_START(INTELMOTE2, "IMOTE 2")
1010 .map_io = pxa27x_map_io,
1011 .nr_irqs = PXA_NR_IRQS,
1012 .init_irq = pxa27x_init_irq,
1013 .handle_irq = pxa27x_handle_irq,
1014 .init_time = pxa_timer_init,
1015 .init_machine = imote2_init,
1016 .atag_offset = 0x100,
1017 .restart = pxa_restart,
1021 #ifdef CONFIG_MACH_STARGATE2
1022 MACHINE_START(STARGATE2, "Stargate 2")
1023 .map_io = pxa27x_map_io,
1024 .nr_irqs = STARGATE_NR_IRQS,
1025 .init_irq = pxa27x_init_irq,
1026 .handle_irq = pxa27x_handle_irq,
1027 .init_time = pxa_timer_init,
1028 .init_machine = stargate2_init,
1029 .atag_offset = 0x100,
1030 .restart = pxa_restart,