16 #include <linux/device.h>
18 #include <linux/sched.h>
19 #include <linux/bitops.h>
35 #include <asm/types.h>
36 #include <asm/setup.h>
37 #include <asm/memory.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 = {
149 .platform_data = &platform_data_sht15,
201 .name =
"vcc_pxa_flash",
209 .name =
"vcc_cc2420",
223 .name =
"vcc_sram_ext",
259 .name =
"vcc_sensor_1_8",
266 .name =
"vcc_sensor_3",
270 .num_consumer_supplies =
ARRAY_SIZE(stargate2_sensor_3_con),
271 .consumer_supplies = stargate2_sensor_3_con,
275 .name =
"vcc_pxa_pll",
282 .name =
"vcc_pxa_usim",
289 .name =
"vcc_pxa_mem",
298 .name =
"Bootloader",
305 .offset = 0x00040000,
308 .name =
"Filesystem",
310 .offset = 0x00240000,
315 static struct resource flash_resources = {
322 .map_name =
"cfi_probe",
323 .parts = stargate2flash_partitions,
324 .nr_parts =
ARRAY_SIZE(stargate2flash_partitions),
325 .name =
"PXA27xOnChipROM",
330 .name =
"pxa2xx-flash",
333 .platform_data = &stargate2_flash_data,
335 .resource = &flash_resources,
371 .modalias =
"lis3l02dq",
372 .max_speed_hz = 8000000,
375 .controller_data = &staccel_chip_info,
378 .modalias =
"cc2420",
379 .max_speed_hz = 6500000,
382 .controller_data = &cc2420_info,
386 static void sg2_udc_command(
int cmd)
406 static void __init imote2_stargate2_init(
void)
425 #ifdef CONFIG_MACH_INTELMOTE2
429 static int imote2_mci_get_ro(
struct device *
dev)
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",
461 .leds = imote2_led_pins,
468 .platform_data = &imote2_led_data,
474 .
name =
"da903x-regulator",
476 .platform_data = &stargate2_ldo_init_data[
vcc_bbio],
478 .name =
"da903x-regulator",
480 .platform_data = &stargate2_ldo_init_data[
vcc_bb],
482 .name =
"da903x-regulator",
486 .name =
"da903x-regulator",
488 .platform_data = &stargate2_ldo_init_data[
vcc_cc2420],
490 .name =
"da903x-regulator",
492 .platform_data = &stargate2_ldo_init_data[
vcc_vref],
494 .name =
"da903x-regulator",
496 .platform_data = &stargate2_ldo_init_data[
vcc_sram_ext],
498 .name =
"da903x-regulator",
500 .platform_data = &stargate2_ldo_init_data[
vcc_mica],
502 .name =
"da903x-regulator",
504 .platform_data = &stargate2_ldo_init_data[
vcc_bt],
506 .name =
"da903x-regulator",
510 .name =
"da903x-regulator",
512 .platform_data = &stargate2_ldo_init_data[
vcc_sensor_3],
514 .name =
"da903x-regulator",
516 .platform_data = &stargate2_ldo_init_data[
vcc_lcd],
518 .name =
"da903x-regulator",
520 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_pll],
522 .name =
"da903x-regulator",
524 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_usim],
526 .name =
"da903x-regulator",
528 .platform_data = &stargate2_ldo_init_data[
vcc_io],
530 .name =
"da903x-regulator",
532 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_mem],
538 .subdevs = imote2_da9030_subdevs,
541 static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = {
550 static struct i2c_board_info __initdata imote2_i2c_board_info[] = {
578 static unsigned long imote2_pin_config[] __initdata = {
594 .
name =
"imote2-audio",
599 &stargate2_flash_device,
602 &imote2_audio_device,
605 static void __init imote2_init(
void)
609 imote2_stargate2_init();
623 #ifdef CONFIG_MACH_STARGATE2
625 static unsigned long stargate2_pin_config[] __initdata = {
659 static struct resource smc91x_resources[] = {
661 .
name =
"smc91x-regs",
681 .num_resources =
ARRAY_SIZE(smc91x_resources),
682 .resource = smc91x_resources,
684 .platform_data = &stargate2_smc91x_info,
693 static int stargate2_mci_init(
struct device *
dev,
714 stargate2_detect_int,
720 goto free_nsd_detect;
737 static void stargate2_mci_setpower(
struct device *dev,
unsigned int vdd)
742 static void stargate2_mci_exit(
struct device *dev,
void *data)
752 .init = stargate2_mci_init,
753 .setpower = stargate2_mci_setpower,
754 .exit = stargate2_mci_exit,
765 static struct resource sram_resources = {
779 .resource = &sram_resources,
782 .platform_data = &stargate2_sram_pdata,
802 static int stargate2_reset_bluetooth(
void)
820 static struct led_info stargate2_leds[] = {
835 .
name =
"da903x-led",
837 .platform_data = &stargate2_leds[0],
839 .
name =
"da903x-led",
841 .platform_data = &stargate2_leds[2],
843 .
name =
"da903x-led",
845 .platform_data = &stargate2_leds[1],
847 .
name =
"da903x-regulator",
849 .platform_data = &stargate2_ldo_init_data[
vcc_bbio],
851 .name =
"da903x-regulator",
853 .platform_data = &stargate2_ldo_init_data[
vcc_bb],
855 .name =
"da903x-regulator",
859 .name =
"da903x-regulator",
861 .platform_data = &stargate2_ldo_init_data[
vcc_cc2420],
863 .name =
"da903x-regulator",
865 .platform_data = &stargate2_ldo_init_data[
vcc_vref],
867 .name =
"da903x-regulator",
869 .platform_data = &stargate2_ldo_init_data[
vcc_sram_ext],
871 .name =
"da903x-regulator",
873 .platform_data = &stargate2_ldo_init_data[
vcc_mica],
875 .name =
"da903x-regulator",
877 .platform_data = &stargate2_ldo_init_data[
vcc_bt],
879 .name =
"da903x-regulator",
883 .name =
"da903x-regulator",
885 .platform_data = &stargate2_ldo_init_data[
vcc_sensor_3],
887 .name =
"da903x-regulator",
889 .platform_data = &stargate2_ldo_init_data[
vcc_lcd],
891 .name =
"da903x-regulator",
893 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_pll],
895 .name =
"da903x-regulator",
897 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_usim],
899 .name =
"da903x-regulator",
901 .platform_data = &stargate2_ldo_init_data[
vcc_io],
903 .name =
"da903x-regulator",
905 .platform_data = &stargate2_ldo_init_data[
vcc_pxa_mem],
911 .subdevs = stargate2_da9030_subdevs,
914 static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info[] = {
918 .platform_data = &stargate2_da9030_pdata,
923 static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
930 .platform_data = &platform_data_pcf857x,
934 .platform_data = &pca9500_eeprom_pdata,
962 static int sg2_udc_detect(
void)
969 .udc_command = sg2_udc_command,
973 &stargate2_flash_device,
979 static void __init stargate2_init(
void)
987 imote2_stargate2_init();
999 stargate2_reset_bluetooth();
1003 #ifdef CONFIG_MACH_INTELMOTE2
1010 .init_machine = imote2_init,
1011 .atag_offset = 0x100,
1016 #ifdef CONFIG_MACH_STARGATE2
1023 .init_machine = stargate2_init,
1024 .atag_offset = 0x100,