static void __init tavorevb_init(void)
{

	mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config));

	/* on-chip devices */
	pxa910_add_uart(1);
	pxa168_add_twsi(0, &i2c_info, ARRAY_AND_SIZE(i2c_board_info));
	tavorevb_add_nand();
	tavorevb_add_onenand();
	pxa910_add_ire();
	pxa910_add_acipc();
	if (tavorevb_keypad_type == 1)
		pxa168_add_keypad(&zylonite_keypad_info);
	else
		pxa168_add_keypad(&tavorevb_keypad_info);
#if defined(CONFIG_MMC_PXA_SDH)
	pxa168_add_sdh(0, &tavorevb_sdh_platform_data);
#endif

	if(cpu_is_pxa910_Ax()){
		pxa910_add_fb(&pxa168_tavorevb_lcd_info);
		pxa910_add_fb_ovly(&pxa168_tavorevb_lcd_ovly_info);
	}else{
		pxa168_add_fb(&pxa168_tavorevb_lcd_info);
		pxa168_add_fb_ovly(&pxa168_tavorevb_lcd_ovly_info);
	}
#if defined(CONFIG_PXA168_CAMERA)
        pxa168_add_cam();
#endif
#ifdef CONFIG_USB_GADGET_PXA_U2O
	pxa168_add_u2o(&tavorevb_u2o_info);
#endif
#ifdef CONFIG_USB_OTG
	pxa168_add_u2ootg(&tavorevb_u2o_info);
	pxa168_add_u2oehci(&tavorevb_u2o_info);
#endif
	pxa910_add_ssp(1);
	pxa910_add_imm();
	pxa168_add_freq();

	/* off-chip devices */
	platform_device_register(&smc91x_device);
}
Esempio n. 2
0
static void __init ipcam_init(void)
{
	pxa168_set_vdd_iox(VDD_IO0, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO1, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO2, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO3, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO4, VDD_IO_3P3V);
	pxa168_mfp_set_fastio_drive(MFP_DS02X);

	mfp_config(ARRAY_AND_SIZE(ipcam_pin_config));

	/* on-chip devices */
	pxa168_add_uart(3);
	pxa168_add_ssp(0);
	pxa168_add_twsi(0, &pwri2c_info, ARRAY_AND_SIZE(ipcam_i2c_board_info));
	pxa168_add_twsi(1, &pwri2c_info, ARRAY_AND_SIZE(pwri2c_board_info));
#ifdef CONFIG_USB_GADGET_PXA_U2O
	pxa168_add_u2o(&ipcam_u2o_info);
#endif
#ifdef CONFIG_USB_EHCI_PXA_U2H
	pxa168_add_u2h(&ipcam_u2h_info);
#endif
#if defined(CONFIG_MMC_PXA_SDH)
	ipcam_init_mmc();
#endif
	pxa168_add_mfu(&pxa168_eth_data);

	/* off-chip devices */
#if defined(CONFIG_PXA168_CAMERA) && defined(CONFIG_VIDEO_OV7740)
	pxa168_add_cam();
#endif
#if defined(CONFIG_VIDEO_OV529)
	pxa168_add_ov529(&ov529_encoder_data);
#endif
	ipcam_init_spi();
}
static void __init aspenite_init(void)
{
	mfp_config(ARRAY_AND_SIZE(aspenite_pin_config));
        pxa168_set_vdd_iox(VDD_IO0, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO1, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO2, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO3, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO4, VDD_IO_3P3V);
	pxa168_mfp_set_fastio_drive(MFP_DS02X);

	/* on-chip devices */
	pxa168_add_uart(1);
#if defined(CONFIG_BT_HCIUART) && defined(CONFIG_WLAN_8688_SDIO)
	pxa168_add_uart(3);
#endif
	aspenite_add_nand();
	pxa168_add_ssp(0);
#if defined(CONFIG_MTD_M25P80) && defined(CONFIG_SPI_PXA2XX)
	pxa168_add_ssp(1);
	pxa168_add_spi(2, &pxa_ssp_master_info);
	spi_flashinit();
#endif
	pxa168_add_twsi(0, &pwri2c_info, ARRAY_AND_SIZE(aspenite_i2c_board_info));
	pxa168_add_twsi(1, &pwri2c_info, ARRAY_AND_SIZE(pwri2c_board_info));

	if (is_android())
		pxa168_add_keypad(&aspenite_android_keypad_info);
	else
		pxa168_add_keypad(&aspenite_keypad_info);

#ifdef CONFIG_USB_GADGET_PXA_U2O
 	pxa168_add_u2o(&aspenite_u2o_info);
#endif

#ifdef CONFIG_USB_OTG
	pxa168_add_u2ootg(&aspenite_u2o_info);
	pxa168_add_u2oehci(&aspenite_u2o_info);
#endif

#ifdef CONFIG_USB_EHCI_PXA_U2H
 	pxa168_add_u2h(&aspenite_u2h_info);
#endif
	pxa168_add_mfu(&pxa168_eth_data);
#ifdef CONFIG_PCI
	pxa168_add_pcie(&pxa168_pcie_data);
#endif
#if defined(CONFIG_MMC_PXA_SDH)
	pxa168_add_sdh(0, &aspenite_sdh_platform_data_MMC1);
#if defined(CONFIG_WLAN_8688_SDIO)
	pxa168_add_sdh(1, &aspenite_sdh_platform_data_MMC2);
#if defined(CONFIG_BT_HCIUART)
	aspenite_bt_init();
#endif
#endif
#if defined(CONFIG_MMC3)
	pxa168_add_sdh(2, &aspenite_sdh_platform_data_MMC3);
#endif
#endif
#if defined(CONFIG_CIR)
	pxa168_cir_init(); /*init the gpio */
#endif
#if defined(CONFIG_PXA168_CF)
#if defined(CONFIG_PXA168_CF_USE_GPIO_CARDDETECT)
	pxa168_cf_init();
#else
	pxa168_add_cf();	
#endif
#endif
	pxa168_add_freq();
	if (machine_is_aspenite()) {
		pxa168_add_fb(&aspenite_lcd_info);
		pxa168_add_fb_ovly(&aspenite_lcd_ovly_info);
	}
	/* off-chip devices */
	if (machine_is_zylonite2()) {
		pxa168_add_fb(&zylonite2_lcd_info);
		platform_device_register(&smc91x_device);
	}
#if defined(CONFIG_PXA168_CAMERA)
	pxa168_add_cam();
#endif
#if defined(CONFIG_PXA_ICR)
	pxa168_add_icr();
#endif
#if defined(CONFIG_BATTERY_PXA168)
	pxa168_add_battery();
#endif
}
static void __init silvermoon_init(void)
{
	int gpio_109 = 109;
    CHLOG("Just so you know, the CPU type is 0x%08x\n", read_cpuid_id());

	mfp_config(ARRAY_AND_SIZE(silvermoon_pin_config));

	pxa168_set_vdd_iox(VDD_IO0, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO1, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO2, VDD_IO_3P3V);
	pxa168_set_vdd_iox(VDD_IO3, VDD_IO_1P8V);
	pxa168_set_vdd_iox(VDD_IO4, VDD_IO_3P3V);
	pxa168_mfp_set_fastio_drive(MFP_DS02X);


	//Make sure the GPIO 109 is set as output, level low


	if(gpio_request(gpio_109, "GPIO109")) 
	{
		printk(KERN_ERR "GPIO109 Request Failed\n");
	}
	else
	{
		gpio_direction_output(gpio_109, 1);
		gpio_set_value(gpio_109, 0);
		gpio_free(gpio_109);
	}


	/* on-chip devices */
	pxa168_add_uart(1);
	// Used for cryptoprocessor
	pxa168_add_uart(3);

	//turn on the I2C bus for the audio codec (and others)
	pxa168_add_twsi(0, &xi2c_info, ARRAY_AND_SIZE(xi2c_board_info));
	pxa168_add_twsi(1, &pwri2c_info, ARRAY_AND_SIZE(pwri2c_board_info));
	pxa168_add_ssp(0);
#if defined(CONFIG_TOUCHSCREEN_ASPEN) || defined(CONFIG_TOUCHSCREEN_ASPEN_MODULE)
	// SSP2 used for CP-based touchscreen
	printk( "%s() - attempting to add SSP2 for touchscreen\n", __FUNCTION__ );
	silvermoon_ssp_init();
#if defined(CONFIG_TOUCHSCREEN_ASPEN)
       // Register platform device now iff not loading as module
        silvermoon_touchscreen_init();
#endif
#else
	printk( "%s() - CONFIG_TOUCHSCREEN_ASPEN not set??\n", __FUNCTION__ );
#endif

#ifdef CONFIG_USB_GADGET_PXA_U2O
 	pxa168_add_u2o(&aspenite_u2o_info);
#endif

#ifdef CONFIG_USB_OTG
	pxa168_add_u2ootg(&aspenite_u2o_info);
	pxa168_add_u2oehci(&aspenite_u2o_info);
#endif

#ifdef CONFIG_USB_EHCI_PXA_U2H
	printk( "%s() - adding u2h ehci usb hub\n", __FUNCTION__ );
 	pxa168_add_u2h(&aspenite_u2h_info);
#endif
//	pxa168_add_mfu(&pxa168_eth_data);
#if defined(CONFIG_MMC_PXA_SDH) || defined(CONFIG_MMC_PXA_SDH_MODULE)
#if defined(CONFIG_CHUMBY_SILVERMOON_SDBOOT)
#define WIFI_SDIO_ADDR	1 // MMC2
#else
#define WIFI_SDIO_ADDR	2 // MMC3
#endif
#if defined(CONFIG_WLAN_8688_SDIO) || defined(CONFIG_WLAN_8688_SDIO_MODULE)
#define ESD_SDIO_ADDR	2
#else
#define ESD_SDIO_ADDR	1
#endif
	// This is not present but may be needed for the driver to work properly with MMC2/MMC3
	pxa168_add_sdh(0, &aspenite_sdh_platform_data_MMC1);
#if defined(CONFIG_WLAN_8688_SDIO) || defined(CONFIG_WLAN_8688_SDIO_MODULE)
	pxa168_add_sdh(WIFI_SDIO_ADDR, &aspenite_sdh_platform_data_MMC2);
#endif
#if defined(CONFIG_CHUMBY_SILVERMOON_SDBOOT)
	// Addr=2 for MMC3
	pxa168_add_sdh(ESD_SDIO_ADDR, &aspenite_sdh_platform_data_MMC3);
	printk( "%s() - adding MMC3 init[%d], wifi MMC%d\n", __FUNCTION__, ESD_SDIO_ADDR, WIFI_SDIO_ADDR );
#endif
#endif
#if defined(CONFIG_PXA168_CF)
	/* pxa168_add_cf(); */
	pxa168_cf_init();
#endif

	pxa168_add_freq();

	pxa168_add_fb_ovly(&silvermoon_lcd_ovly_info);
	pxa168_add_fb(&silvermoon_lcd_info);

#if defined(CONFIG_PXA168_CAMERA) || defined(CONFIG_PXA168_CAMERA_MODULE)
	pxa168_add_cam();
#endif

	platform_device_register(&silvermoon_bl_device);

	platform_device_register(&pxa910_device_rtc);
}