1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-pxa/stargate2.c
6 * Created: Nov 05, 2002
7 * Copyright: Intel Corp.
9 * Modified 2009: Jonathan Cameron <jic23@cam.ac.uk>
12 #include <linux/init.h>
13 #include <linux/device.h>
14 #include <linux/interrupt.h>
15 #include <linux/sched.h>
16 #include <linux/bitops.h>
18 #include <linux/delay.h>
19 #include <linux/platform_device.h>
20 #include <linux/regulator/machine.h>
21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/plat-ram.h>
23 #include <linux/mtd/partitions.h>
25 #include <linux/platform_data/i2c-pxa.h>
26 #include <linux/platform_data/pcf857x.h>
27 #include <linux/smc91x.h>
28 #include <linux/gpio/machine.h>
29 #include <linux/gpio.h>
30 #include <linux/leds.h>
31 #include <linux/property.h>
33 #include <asm/types.h>
34 #include <asm/setup.h>
35 #include <asm/memory.h>
36 #include <asm/mach-types.h>
39 #include <asm/mach/arch.h>
40 #include <asm/mach/map.h>
41 #include <asm/mach/irq.h>
42 #include <asm/mach/flash.h>
45 #include <linux/platform_data/mmc-pxamci.h>
47 #include "pxa27x-udc.h"
48 #include <mach/smemc.h>
50 #include <linux/spi/spi.h>
51 #include <linux/spi/pxa2xx_spi.h>
52 #include <linux/mfd/da903x.h>
57 #define STARGATE_NR_IRQS (IRQ_BOARD_START + 8)
60 #define SG2_BT_RESET 81
63 #define SG2_GPIO_nSD_DETECT 90
64 #define SG2_SD_POWER_ENABLE 89
66 static unsigned long sg2_im2_unified_pin_config[] __initdata = {
67 /* Device Identification for wakeup*/
80 /* 802.15.4 radio - driver out of mainline */
81 GPIO22_GPIO, /* CC_RSTN */
82 GPIO114_GPIO, /* CC_FIFO */
83 GPIO116_GPIO, /* CC_CCA */
84 GPIO0_GPIO, /* CC_FIFOP */
85 GPIO16_GPIO, /* CCSFD */
86 GPIO115_GPIO, /* Power enable */
92 /* SSP 3 - 802.15.4 radio */
93 GPIO39_GPIO, /* Chip Select */
98 /* SSP 2 to daughter boards */
102 GPIO37_GPIO, /* chip select */
104 /* SSP 1 - to daughter boards */
105 GPIO24_GPIO, /* Chip Select */
110 /* BTUART Basic Connector*/
116 /* STUART - IM2 via debug board not sure on SG2*/
120 /* Basic sensor board */
121 GPIO96_GPIO, /* accelerometer interrupt */
122 GPIO99_GPIO, /* ADC interrupt */
128 /* Basic sensor board */
129 GPIO96_GPIO, /* accelerometer interrupt */
130 GPIO99_GPIO, /* ADC interrupt */
132 /* Connector pins specified as gpios */
133 GPIO94_GPIO, /* large basic connector pin 14 */
134 GPIO10_GPIO, /* large basic connector pin 23 */
137 static struct gpiod_lookup_table sht15_gpiod_table = {
140 /* FIXME: should this have |GPIO_OPEN_DRAIN set? */
141 GPIO_LOOKUP("gpio-pxa", 100, "data", GPIO_ACTIVE_HIGH),
142 GPIO_LOOKUP("gpio-pxa", 98, "clk", GPIO_ACTIVE_HIGH),
146 static struct platform_device sht15 = {
151 static struct regulator_consumer_supply stargate2_sensor_3_con[] = {
152 REGULATOR_SUPPLY("vcc", "sht15"),
158 /* a mote connector? */
160 /* the CSR bluecore chip */
162 /* The two voltages available to sensor boards */
165 /* directly connected to the pxa27x */
168 vcc_pxa_usim, /* Reference voltage for certain gpios */
171 vcc_pxa_core, /*Dc-Dc buck not yet supported */
174 vcc_bbio, /*not sure!*/
175 vcc_io, /* cc2420 802.15.4 radio and pxa vcc_io ?*/
178 /* The values of the various regulator constraints are obviously dependent
179 * on exactly what is wired to each ldo. Unfortunately this information is
180 * not generally available. More information has been requested from Xbow.
182 static struct regulator_init_data stargate2_ldo_init_data[] = {
184 .constraints = { /* board default 1.8V */
191 .constraints = { /* board default 2.8V */
198 .constraints = {/* default is 1.8V */
199 .name = "vcc_pxa_flash",
204 [vcc_cc2420] = { /* also vcc_io */
206 /* board default is 2.8V */
207 .name = "vcc_cc2420",
212 [vcc_vref] = { /* Reference for what? */
213 .constraints = { /* default 1.8V */
220 .constraints = { /* default 2.8V */
221 .name = "vcc_sram_ext",
227 .constraints = { /* default 2.8V */
234 .constraints = { /* default 2.8V */
241 .constraints = { /* default 2.8V */
247 [vcc_io] = { /* Same or higher than everything
248 * bar vccbat and vccusb */
249 .constraints = { /* default 2.8V */
256 .constraints = { /* default 1.8V */
257 .name = "vcc_sensor_1_8",
262 [vcc_sensor_3] = { /* curiously default 2.8V */
264 .name = "vcc_sensor_3",
268 .num_consumer_supplies = ARRAY_SIZE(stargate2_sensor_3_con),
269 .consumer_supplies = stargate2_sensor_3_con,
271 [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/
273 .name = "vcc_pxa_pll",
279 .constraints = { /* default 1.8V */
280 .name = "vcc_pxa_usim",
286 .constraints = { /* default 1.8V */
287 .name = "vcc_pxa_mem",
294 static struct mtd_partition stargate2flash_partitions[] = {
296 .name = "Bootloader",
303 .offset = 0x00040000,
306 .name = "Filesystem",
308 .offset = 0x00240000,
313 static struct resource flash_resources = {
314 .start = PXA_CS0_PHYS,
315 .end = PXA_CS0_PHYS + SZ_32M - 1,
316 .flags = IORESOURCE_MEM,
319 static struct flash_platform_data stargate2_flash_data = {
320 .map_name = "cfi_probe",
321 .parts = stargate2flash_partitions,
322 .nr_parts = ARRAY_SIZE(stargate2flash_partitions),
323 .name = "PXA27xOnChipROM",
327 static struct platform_device stargate2_flash_device = {
328 .name = "pxa2xx-flash",
331 .platform_data = &stargate2_flash_data,
333 .resource = &flash_resources,
337 static struct pxa2xx_spi_controller pxa_ssp_master_0_info = {
341 static struct pxa2xx_spi_controller pxa_ssp_master_1_info = {
345 static struct pxa2xx_spi_controller pxa_ssp_master_2_info = {
349 /* An upcoming kernel change will scrap SFRM usage so these
350 * drivers have been moved to use gpio's via cs_control */
351 static struct pxa2xx_spi_chip staccel_chip_info = {
359 static struct pxa2xx_spi_chip cc2420_info = {
367 static struct spi_board_info spi_board_info[] __initdata = {
369 .modalias = "lis3l02dq",
370 .max_speed_hz = 8000000,/* 8MHz max spi frequency at 3V */
373 .controller_data = &staccel_chip_info,
374 .irq = PXA_GPIO_TO_IRQ(96),
376 .modalias = "cc2420",
377 .max_speed_hz = 6500000,
380 .controller_data = &cc2420_info,
384 static void sg2_udc_command(int cmd)
387 case PXA2XX_UDC_CMD_CONNECT:
388 UP2OCR |= UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE;
390 case PXA2XX_UDC_CMD_DISCONNECT:
391 UP2OCR &= ~(UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE);
396 static struct i2c_pxa_platform_data i2c_pwr_pdata = {
400 static struct i2c_pxa_platform_data i2c_pdata = {
404 static void __init imote2_stargate2_init(void)
407 pxa2xx_mfp_config(ARRAY_AND_SIZE(sg2_im2_unified_pin_config));
409 pxa_set_ffuart_info(NULL);
410 pxa_set_btuart_info(NULL);
411 pxa_set_stuart_info(NULL);
413 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info);
414 pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info);
415 pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info);
416 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
419 pxa27x_set_i2c_power_info(&i2c_pwr_pdata);
420 pxa_set_i2c_info(&i2c_pdata);
423 #ifdef CONFIG_MACH_INTELMOTE2
424 /* As the the imote2 doesn't currently have a conventional SD slot
425 * there is no option to hotplug cards, making all this rather simple
427 static int imote2_mci_get_ro(struct device *dev)
432 /* Rather simple case as hotplugging not possible */
433 static struct pxamci_platform_data imote2_mci_platform_data = {
434 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */
435 .get_ro = imote2_mci_get_ro,
438 static struct gpio_led imote2_led_pins[] = {
440 .name = "imote2:red",
444 .name = "imote2:green",
448 .name = "imote2:blue",
454 static struct gpio_led_platform_data imote2_led_data = {
455 .num_leds = ARRAY_SIZE(imote2_led_pins),
456 .leds = imote2_led_pins,
459 static struct platform_device imote2_leds = {
463 .platform_data = &imote2_led_data,
467 static struct da903x_subdev_info imote2_da9030_subdevs[] = {
469 .name = "da903x-regulator",
470 .id = DA9030_ID_LDO2,
471 .platform_data = &stargate2_ldo_init_data[vcc_bbio],
473 .name = "da903x-regulator",
474 .id = DA9030_ID_LDO3,
475 .platform_data = &stargate2_ldo_init_data[vcc_bb],
477 .name = "da903x-regulator",
478 .id = DA9030_ID_LDO4,
479 .platform_data = &stargate2_ldo_init_data[vcc_pxa_flash],
481 .name = "da903x-regulator",
482 .id = DA9030_ID_LDO5,
483 .platform_data = &stargate2_ldo_init_data[vcc_cc2420],
485 .name = "da903x-regulator",
486 .id = DA9030_ID_LDO6,
487 .platform_data = &stargate2_ldo_init_data[vcc_vref],
489 .name = "da903x-regulator",
490 .id = DA9030_ID_LDO7,
491 .platform_data = &stargate2_ldo_init_data[vcc_sram_ext],
493 .name = "da903x-regulator",
494 .id = DA9030_ID_LDO8,
495 .platform_data = &stargate2_ldo_init_data[vcc_mica],
497 .name = "da903x-regulator",
498 .id = DA9030_ID_LDO9,
499 .platform_data = &stargate2_ldo_init_data[vcc_bt],
501 .name = "da903x-regulator",
502 .id = DA9030_ID_LDO10,
503 .platform_data = &stargate2_ldo_init_data[vcc_sensor_1_8],
505 .name = "da903x-regulator",
506 .id = DA9030_ID_LDO11,
507 .platform_data = &stargate2_ldo_init_data[vcc_sensor_3],
509 .name = "da903x-regulator",
510 .id = DA9030_ID_LDO12,
511 .platform_data = &stargate2_ldo_init_data[vcc_lcd],
513 .name = "da903x-regulator",
514 .id = DA9030_ID_LDO15,
515 .platform_data = &stargate2_ldo_init_data[vcc_pxa_pll],
517 .name = "da903x-regulator",
518 .id = DA9030_ID_LDO17,
519 .platform_data = &stargate2_ldo_init_data[vcc_pxa_usim],
521 .name = "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
522 .id = DA9030_ID_LDO18,
523 .platform_data = &stargate2_ldo_init_data[vcc_io],
525 .name = "da903x-regulator",
526 .id = DA9030_ID_LDO19,
527 .platform_data = &stargate2_ldo_init_data[vcc_pxa_mem],
531 static struct da903x_platform_data imote2_da9030_pdata = {
532 .num_subdevs = ARRAY_SIZE(imote2_da9030_subdevs),
533 .subdevs = imote2_da9030_subdevs,
536 static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = {
540 .platform_data = &imote2_da9030_pdata,
541 .irq = PXA_GPIO_TO_IRQ(1),
545 static struct i2c_board_info __initdata imote2_i2c_board_info[] = {
546 { /* UCAM sensor board */
549 }, { /* ITS400 Sensor board only */
552 /* Through a nand gate - Also beware, on V2 sensor board the
553 * pull up resistors are missing.
555 .irq = PXA_GPIO_TO_IRQ(99),
556 }, { /* ITS400 Sensor board only */
559 /* Through a nand gate - Also beware, on V2 sensor board the
560 * pull up resistors are missing.
562 .irq = PXA_GPIO_TO_IRQ(99),
563 }, { /* ITS400 Sensor board only */
566 .irq = PXA_GPIO_TO_IRQ(96),
567 }, { /* IMB400 Multimedia board */
573 static unsigned long imote2_pin_config[] __initdata = {
579 GPIO103_GPIO, /* red led */
580 GPIO104_GPIO, /* green led */
581 GPIO105_GPIO, /* blue led */
584 static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = {
585 .udc_command = sg2_udc_command,
588 static struct platform_device imote2_audio_device = {
589 .name = "imote2-audio",
593 static struct platform_device *imote2_devices[] = {
594 &stargate2_flash_device,
597 &imote2_audio_device,
600 static void __init imote2_init(void)
602 pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config));
604 imote2_stargate2_init();
606 gpiod_add_lookup_table(&sht15_gpiod_table);
607 platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices));
609 i2c_register_board_info(0, imote2_i2c_board_info,
610 ARRAY_SIZE(imote2_i2c_board_info));
611 i2c_register_board_info(1, imote2_pwr_i2c_board_info,
612 ARRAY_SIZE(imote2_pwr_i2c_board_info));
614 pxa_set_mci_info(&imote2_mci_platform_data);
615 pxa_set_udc_info(&imote2_udc_info);
619 #ifdef CONFIG_MACH_STARGATE2
621 static unsigned long stargate2_pin_config[] __initdata = {
623 GPIO15_nCS_1, /* SRAM */
626 GPIO40_GPIO, /*cable detect?*/
629 GPIO91_GPIO | WAKEUP_ON_LEVEL_HIGH,
642 GPIO120_GPIO, /* Buff ctrl */
643 GPIO108_GPIO, /* Power ctrl */
644 GPIO82_GPIO, /* Reset */
645 GPIO53_GPIO, /* SG2_S0_GPIO_DETECT */
647 /* MMC not shared with imote2 */
648 GPIO90_GPIO, /* nSD detect */
649 GPIO89_GPIO, /* SD_POWER_ENABLE */
652 GPIO81_GPIO, /* reset */
655 static struct resource smc91x_resources[] = {
657 .name = "smc91x-regs",
658 .start = (PXA_CS4_PHYS + 0x300),
659 .end = (PXA_CS4_PHYS + 0xfffff),
660 .flags = IORESOURCE_MEM,
663 .start = PXA_GPIO_TO_IRQ(40),
664 .end = PXA_GPIO_TO_IRQ(40),
665 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
669 static struct smc91x_platdata stargate2_smc91x_info = {
670 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT
671 | SMC91X_NOWAIT | SMC91X_USE_DMA,
672 .pxa_u16_align4 = true,
675 static struct platform_device smc91x_device = {
678 .num_resources = ARRAY_SIZE(smc91x_resources),
679 .resource = smc91x_resources,
681 .platform_data = &stargate2_smc91x_info,
687 * The card detect interrupt isn't debounced so we delay it by 250ms
688 * to give the card a chance to fully insert / eject.
690 static int stargate2_mci_init(struct device *dev,
691 irq_handler_t stargate2_detect_int,
696 err = gpio_request(SG2_SD_POWER_ENABLE, "SG2_sd_power_enable");
698 printk(KERN_ERR "Can't get the gpio for SD power control");
701 gpio_direction_output(SG2_SD_POWER_ENABLE, 0);
703 err = gpio_request(SG2_GPIO_nSD_DETECT, "SG2_sd_detect");
705 printk(KERN_ERR "Can't get the sd detect gpio");
708 gpio_direction_input(SG2_GPIO_nSD_DETECT);
710 err = request_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT),
711 stargate2_detect_int,
716 printk(KERN_ERR "can't request MMC card detect IRQ\n");
717 goto free_nsd_detect;
722 gpio_free(SG2_GPIO_nSD_DETECT);
724 gpio_free(SG2_SD_POWER_ENABLE);
730 * stargate2_mci_setpower() - set state of mmc power supply
732 * Very simple control. Either it is on or off and is controlled by
734 static int stargate2_mci_setpower(struct device *dev, unsigned int vdd)
736 gpio_set_value(SG2_SD_POWER_ENABLE, !!vdd);
740 static void stargate2_mci_exit(struct device *dev, void *data)
742 free_irq(PXA_GPIO_TO_IRQ(SG2_GPIO_nSD_DETECT), data);
743 gpio_free(SG2_SD_POWER_ENABLE);
744 gpio_free(SG2_GPIO_nSD_DETECT);
747 static struct pxamci_platform_data stargate2_mci_platform_data = {
748 .detect_delay_ms = 250,
749 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
750 .init = stargate2_mci_init,
751 .setpower = stargate2_mci_setpower,
752 .exit = stargate2_mci_exit,
757 * SRAM - The Stargate 2 has 32MB of SRAM.
759 * Here it is made available as an MTD. This will then
760 * typically have a cifs filesystem created on it to provide
761 * fast temporary storage.
763 static struct resource sram_resources = {
764 .start = PXA_CS1_PHYS,
765 .end = PXA_CS1_PHYS + SZ_32M-1,
766 .flags = IORESOURCE_MEM,
769 static struct platdata_mtd_ram stargate2_sram_pdata = {
770 .mapname = "Stargate2 SRAM",
774 static struct platform_device stargate2_sram = {
777 .resource = &sram_resources,
780 .platform_data = &stargate2_sram_pdata,
784 static struct pcf857x_platform_data platform_data_pcf857x = {
792 static const struct property_entry pca9500_eeprom_properties[] = {
793 PROPERTY_ENTRY_U32("pagesize", 4),
798 * stargate2_reset_bluetooth() reset the bluecore to ensure consistent state
800 static int stargate2_reset_bluetooth(void)
803 err = gpio_request(SG2_BT_RESET, "SG2_BT_RESET");
805 printk(KERN_ERR "Could not get gpio for bluetooth reset\n");
808 gpio_direction_output(SG2_BT_RESET, 1);
810 /* now reset it - 5 msec minimum */
811 gpio_set_value(SG2_BT_RESET, 0);
813 gpio_set_value(SG2_BT_RESET, 1);
814 gpio_free(SG2_BT_RESET);
818 static struct led_info stargate2_leds[] = {
821 .flags = DA9030_LED_RATE_ON,
824 .flags = DA9030_LED_RATE_ON,
827 .flags = DA9030_LED_RATE_ON,
831 static struct da903x_subdev_info stargate2_da9030_subdevs[] = {
833 .name = "da903x-led",
834 .id = DA9030_ID_LED_2,
835 .platform_data = &stargate2_leds[0],
837 .name = "da903x-led",
838 .id = DA9030_ID_LED_3,
839 .platform_data = &stargate2_leds[2],
841 .name = "da903x-led",
842 .id = DA9030_ID_LED_4,
843 .platform_data = &stargate2_leds[1],
845 .name = "da903x-regulator",
846 .id = DA9030_ID_LDO2,
847 .platform_data = &stargate2_ldo_init_data[vcc_bbio],
849 .name = "da903x-regulator",
850 .id = DA9030_ID_LDO3,
851 .platform_data = &stargate2_ldo_init_data[vcc_bb],
853 .name = "da903x-regulator",
854 .id = DA9030_ID_LDO4,
855 .platform_data = &stargate2_ldo_init_data[vcc_pxa_flash],
857 .name = "da903x-regulator",
858 .id = DA9030_ID_LDO5,
859 .platform_data = &stargate2_ldo_init_data[vcc_cc2420],
861 .name = "da903x-regulator",
862 .id = DA9030_ID_LDO6,
863 .platform_data = &stargate2_ldo_init_data[vcc_vref],
865 .name = "da903x-regulator",
866 .id = DA9030_ID_LDO7,
867 .platform_data = &stargate2_ldo_init_data[vcc_sram_ext],
869 .name = "da903x-regulator",
870 .id = DA9030_ID_LDO8,
871 .platform_data = &stargate2_ldo_init_data[vcc_mica],
873 .name = "da903x-regulator",
874 .id = DA9030_ID_LDO9,
875 .platform_data = &stargate2_ldo_init_data[vcc_bt],
877 .name = "da903x-regulator",
878 .id = DA9030_ID_LDO10,
879 .platform_data = &stargate2_ldo_init_data[vcc_sensor_1_8],
881 .name = "da903x-regulator",
882 .id = DA9030_ID_LDO11,
883 .platform_data = &stargate2_ldo_init_data[vcc_sensor_3],
885 .name = "da903x-regulator",
886 .id = DA9030_ID_LDO12,
887 .platform_data = &stargate2_ldo_init_data[vcc_lcd],
889 .name = "da903x-regulator",
890 .id = DA9030_ID_LDO15,
891 .platform_data = &stargate2_ldo_init_data[vcc_pxa_pll],
893 .name = "da903x-regulator",
894 .id = DA9030_ID_LDO17,
895 .platform_data = &stargate2_ldo_init_data[vcc_pxa_usim],
897 .name = "da903x-regulator", /*pxa vcc i/o and cc2420 vcc i/o */
898 .id = DA9030_ID_LDO18,
899 .platform_data = &stargate2_ldo_init_data[vcc_io],
901 .name = "da903x-regulator",
902 .id = DA9030_ID_LDO19,
903 .platform_data = &stargate2_ldo_init_data[vcc_pxa_mem],
907 static struct da903x_platform_data stargate2_da9030_pdata = {
908 .num_subdevs = ARRAY_SIZE(stargate2_da9030_subdevs),
909 .subdevs = stargate2_da9030_subdevs,
912 static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info[] = {
916 .platform_data = &stargate2_da9030_pdata,
917 .irq = PXA_GPIO_TO_IRQ(1),
921 static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
922 /* Techically this a pca9500 - but it's compatible with the 8574
923 * for gpio expansion and the 24c02 for eeprom access.
928 .platform_data = &platform_data_pcf857x,
932 .properties = pca9500_eeprom_properties,
936 }, { /* ITS400 Sensor board only */
939 /* Through a nand gate - Also beware, on V2 sensor board the
940 * pull up resistors are missing.
942 .irq = PXA_GPIO_TO_IRQ(99),
943 }, { /* ITS400 Sensor board only */
946 /* Through a nand gate - Also beware, on V2 sensor board the
947 * pull up resistors are missing.
949 .irq = PXA_GPIO_TO_IRQ(99),
950 }, { /* ITS400 Sensor board only */
953 .irq = PXA_GPIO_TO_IRQ(96),
957 /* Board doesn't support cable detection - so always lie and say
958 * something is there.
960 static int sg2_udc_detect(void)
965 static struct pxa2xx_udc_mach_info stargate2_udc_info __initdata = {
966 .udc_is_connected = sg2_udc_detect,
967 .udc_command = sg2_udc_command,
970 static struct platform_device *stargate2_devices[] = {
971 &stargate2_flash_device,
977 static void __init stargate2_init(void)
979 /* This is probably a board specific hack as this must be set
980 prior to connecting the MFP stuff up. */
981 __raw_writel(__raw_readl(MECR) & ~MECR_NOS, MECR);
983 pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config));
985 imote2_stargate2_init();
987 gpiod_add_lookup_table(&sht15_gpiod_table);
988 platform_add_devices(ARRAY_AND_SIZE(stargate2_devices));
990 i2c_register_board_info(0, ARRAY_AND_SIZE(stargate2_i2c_board_info));
991 i2c_register_board_info(1, stargate2_pwr_i2c_board_info,
992 ARRAY_SIZE(stargate2_pwr_i2c_board_info));
994 pxa_set_mci_info(&stargate2_mci_platform_data);
996 pxa_set_udc_info(&stargate2_udc_info);
998 stargate2_reset_bluetooth();
1002 #ifdef CONFIG_MACH_INTELMOTE2
1003 MACHINE_START(INTELMOTE2, "IMOTE 2")
1004 .map_io = pxa27x_map_io,
1005 .nr_irqs = PXA_NR_IRQS,
1006 .init_irq = pxa27x_init_irq,
1007 .handle_irq = pxa27x_handle_irq,
1008 .init_time = pxa_timer_init,
1009 .init_machine = imote2_init,
1010 .atag_offset = 0x100,
1011 .restart = pxa_restart,
1015 #ifdef CONFIG_MACH_STARGATE2
1016 MACHINE_START(STARGATE2, "Stargate 2")
1017 .map_io = pxa27x_map_io,
1018 .nr_irqs = STARGATE_NR_IRQS,
1019 .init_irq = pxa27x_init_irq,
1020 .handle_irq = pxa27x_handle_irq,
1021 .init_time = pxa_timer_init,
1022 .init_machine = stargate2_init,
1023 .atag_offset = 0x100,
1024 .restart = pxa_restart,