Ejemplo n.º 1
0
static void __init ek_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
	at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
			   | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
			   | ATMEL_UART_RI);

	/* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
	at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* NAND */
	ek_add_device_nand();
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mci(0, &ek_mci0_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Ejemplo n.º 2
0
static void __init pcontrol_g20_board_init(void)
{
	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback  A2 */
	at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
						| ATMEL_UART_RTS);

	/* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485  X5 */
	at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
						| ATMEL_UART_RTS);

	/* USART2 on ttyS3. (Rx, Tx)  9bit-Bus  Multidrop-mode  X4 */
	at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
	stamp9g20_board_init();
	at91_add_device_usbh(&usbh_data);
	at91_add_device_eth(&macb_data);
	at91_add_device_i2c(pcontrol_g20_i2c_devices,
		ARRAY_SIZE(pcontrol_g20_i2c_devices));
	add_device_pcontrol();
	at91_add_device_spi(pcontrol_g20_spi_devices,
		ARRAY_SIZE(pcontrol_g20_spi_devices));
	at91_add_device_udc(&pcontrol_g20_udc_data);
	at91_gpio_leds(pcontrol_g20_leds,
		ARRAY_SIZE(pcontrol_g20_leds));
	/* piggyback  A2 */
	at91_set_gpio_output(AT91_PIN_PB31, 1);
}
Ejemplo n.º 3
0
static void __init eco920_board_init(void)
{
	/* DBGU on ttyS0. (Rx & Tx only */
	at91_register_uart(0, 0, 0);
	at91_add_device_serial();
	at91_add_device_eth(&eco920_eth_data);
	at91_add_device_usbh(&eco920_usbh_data);
	at91_add_device_udc(&eco920_udc_data);

	at91_add_device_mci(0, &eco920_mci0_data);
	platform_device_register(&eco920_flash);

	at91_ramc_write(0, AT91_SMC_CSR(7),	AT91_SMC_RWHOLD_(1)
				| AT91_SMC_RWSETUP_(1)
				| AT91_SMC_DBW_8
				| AT91_SMC_WSEN
				| AT91_SMC_NWS_(15));

	at91_set_A_periph(AT91_PIN_PC6, 1);

	at91_set_gpio_input(AT91_PIN_PA23, 0);
	at91_set_deglitch(AT91_PIN_PA23, 1);

/* Initialization of the Static Memory Controller for Chip Select 3 */
	at91_ramc_write(0, AT91_SMC_CSR(3),
		AT91_SMC_DBW_16  |	/* 16 bit */
		AT91_SMC_WSEN    |
		AT91_SMC_NWS_(5) |	/* wait states */
		AT91_SMC_TDF_(1)	/* float time */
	);

	at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
	/* LEDs */
	at91_gpio_leds(eco920_leds, ARRAY_SIZE(eco920_leds));
}
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB HS */
	at91_add_device_usba(&ek_usba_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	ek_add_device_nand();
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* AC97 */
	at91_add_device_ac97(&ek_ac97_data);
	/* Touch Screen Controller */
	at91_add_device_tsadcc(&ek_tsadcc_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* Push Buttons */
	ek_add_device_buttons();
}
Ejemplo n.º 5
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_set_gpio_output(AT91_PIN_PE20, 1);		/* select spi0 clock */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
	/* MMC */
	at91_add_device_mmc(1, &ek_mmc_data);
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* NAND */
	at91_add_device_nand(&ek_nand_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* AC97 */
	at91_add_device_ac97(&ek_ac97_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* shutdown controller, wakeup button (5 msec low) */
	at91_sys_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10) | AT91_SHDW_WKMODE0_LOW
				| AT91_SHDW_RTTWKEN);
}
Ejemplo n.º 6
0
static void __init ecb_at91board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx & Tx only) */
	at91_register_uart(AT91RM9200_ID_US0, 1, 0);
	at91_add_device_serial();

	/* Ethernet */
	at91_add_device_eth(&ecb_at91eth_data);

	/* USB Host */
	at91_add_device_usbh(&ecb_at91usbh_data);

	/* I2C */
	at91_add_device_i2c(NULL, 0);

	/* MMC */
	at91_add_device_mci(0, &ecbat91_mci0_data);

	/* SPI */
	at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));

	/* LEDs */
	at91_gpio_leds(ecb_leds, ARRAY_SIZE(ecb_leds));
}
Ejemplo n.º 7
0
static void __init kb9202_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1 (Rx & Tx only) */
	at91_register_uart(AT91RM9200_ID_US0, 1, 0);

	/* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
	at91_register_uart(AT91RM9200_ID_US1, 2, 0);

	/* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
	at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&kb9202_eth_data);
	/* USB Host */
	at91_add_device_usbh(&kb9202_usbh_data);
	/* USB Device */
	at91_add_device_udc(&kb9202_udc_data);
	/* MMC */
	at91_add_device_mci(0, &kb9202_mci0_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* SPI */
	at91_add_device_spi(NULL, 0);
	/* NAND */
	at91_add_device_nand(&kb9202_nand_data);
	/* LEDs */
	at91_gpio_leds(kb9202_leds, ARRAY_SIZE(kb9202_leds));
}
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB HS Host */
	at91_add_device_usbh_ohci(&ek_usbh_hs_data);
	at91_add_device_usbh_ehci(&ek_usbh_hs_data);
	/* USB HS Device */
	at91_add_device_usba(&ek_usba_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* NAND */
	ek_add_device_nand();
	/* I2C */
	at91_add_device_i2c(0, NULL, 0);
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Touch Screen */
	at91_add_device_tsadcc(&ek_tsadcc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* AC97 */
	at91_add_device_ac97(&ek_ac97_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
}
Ejemplo n.º 9
0
static void __init ek_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_usba(&ek_usba_udc_data);
	
	at91_add_device_i2c(NULL, 0);
	
	ek_add_device_nand();
	
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	
	at91_add_device_mmc(0, &ek_mmc_data);
	
	at91_add_device_lcdc(&ek_lcdc_data);
	
	at91_add_device_ac97(&ek_ac97_data);
	
	at91_add_device_tsadcc(&ek_tsadcc_data);
	
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	
	ek_add_device_buttons();
}
Ejemplo n.º 10
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_set_gpio_output(AT91_PIN_PE20, 1);		/* select spi0 clock */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
	/* MMC */
	at91_add_device_mmc(1, &ek_mmc_data);
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* NAND */
	ek_add_device_nand();
	/* I2C */
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* AC97 */
	at91_add_device_ac97(&ek_ac97_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
	/* CAN */
	at91_add_device_can(&ek_can_data);
}
Ejemplo n.º 11
0
static void __init ek_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_usbh(&ek_usbh_data);
	
	at91_add_device_udc(&ek_udc_data);
	
	at91_add_device_i2c(NULL, 0);
	
	ek_add_device_nand();
	
	ek_add_device_dm9000();

	
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	
	ek_add_device_ts();
	
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
#else
	
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	
	at91_add_device_lcdc(&ek_lcdc_data);
	
	ek_add_device_buttons();
	
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	ek_add_device_nand();
	/* DM9000 ethernet */
	ek_add_device_dm9000();

	/* spi0 and mmc/sd share the same PIO pins */
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
	/* SSC (to AT73C213) */
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
#else
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Ejemplo n.º 13
0
static void __init ek_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
	at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
	at91_add_device_serial();
	/* USB HS */
	at91_add_device_usba(&ek_usba_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	ek_add_device_nand();
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* MMC (AT91_MCI Legacy Driver */
	at91_add_device_mmc(0, &at91_mci0_data);
	/* MMC */
	at91_add_device_mci(0, &mci0_data);
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* AC97 */
	at91_add_device_ac97(&ek_ac97_data);
	/* Touch Screen Controller */
	at91_add_device_tsadcc(&ek_tsadcc_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* Push Buttons */
	ek_add_device_buttons();
}
Ejemplo n.º 14
0
static void __init ek_add_device_leds(void)
{
	if (machine_is_usb_a9260() || machine_is_usb_a9g20())
		ek_leds[0].active_low = 0;

	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Ejemplo n.º 15
0
static void __init csb337_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&csb337_eth_data);
	/* USB Host */
	at91_add_device_usbh(&csb337_usbh_data);
	/* USB Device */
	at91_add_device_udc(&csb337_udc_data);
	/* I2C */
	at91_add_device_i2c(csb337_i2c_devices, ARRAY_SIZE(csb337_i2c_devices));
	/* Compact Flash */
	at91_set_gpio_input(AT91_PIN_PB22, 1);		/* IOIS16 */
	at91_add_device_cf(&csb337_cf_data);
	/* SPI */
	at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
	/* MMC */
	at91_add_device_mmc(0, &csb337_mmc_data);
	/* NOR flash */
	platform_device_register(&csb_flash);
	/* LEDs */
	at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
	/* Switches on CSB300 */
	csb300_add_device_buttons();
}
Ejemplo n.º 16
0
static void __init ek_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_usbh(&ek_usbh_data);
	
	at91_add_device_udc(&ek_udc_data);
	
	at91_set_gpio_output(AT91_PIN_PE20, 1);		
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	
	ek_add_device_ts();
	
	at91_add_device_mmc(1, &ek_mmc_data);
	
	at91_add_device_eth(&ek_macb_data);
	
	ek_add_device_nand();
	
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	
	at91_add_device_lcdc(&ek_lcdc_data);
	
	ek_add_device_buttons();
	
	at91_add_device_ac97(&ek_ac97_data);
	
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
	
	at91_add_device_can(&ek_can_data);
}
Ejemplo n.º 17
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* NAND */
	ek_add_device_nand();
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
	/* I2C */
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* SSC (to AT73C213) */
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* Push Buttons */
	ek_add_device_buttons();
}
Ejemplo n.º 18
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* NAND */
	ek_add_device_nand();
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* shutdown controller, wakeup button (5 msec low) */
	at91_sys_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10) | AT91_SHDW_WKMODE0_LOW
				| AT91_SHDW_RTTWKEN);
}
Ejemplo n.º 19
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* NAND */
	ek_add_device_nand();
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
	/* I2C */
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* Push Buttons */
	ek_add_device_buttons();
	/* PCK0 provides MCLK to the WM8731 */
	at91_set_B_periph(AT91_PIN_PC1, 0);
	/* SSC (for WM8731) */
	at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
}
Ejemplo n.º 20
0
static void __init yl9200_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&yl9200_eth_data);
	/* USB Host */
	at91_add_device_usbh(&yl9200_usbh_data);
	/* USB Device */
	at91_add_device_udc(&yl9200_udc_data);
	/* I2C */
	at91_add_device_i2c(yl9200_i2c_devices, ARRAY_SIZE(yl9200_i2c_devices));
	/* MMC */
	at91_add_device_mmc(0, &yl9200_mmc_data);
	/* NAND */
	at91_add_device_nand(&yl9200_nand_data);
	/* NOR Flash */
	platform_device_register(&yl9200_flash);
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	/* SPI */
	at91_add_device_spi(yl9200_spi_devices, ARRAY_SIZE(yl9200_spi_devices));
	/* Touchscreen */
	yl9200_add_device_ts();
#endif
	/* LEDs. */
	at91_gpio_leds(yl9200_leds, ARRAY_SIZE(yl9200_leds));
	/* Push Buttons */
	yl9200_add_device_buttons();
	/* VGA */
	yl9200_add_device_video();
}
Ejemplo n.º 21
0
static void __init dk_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&dk_eth_data);
	/* USB Host */
	at91_add_device_usbh(&dk_usbh_data);
	/* USB Device */
	at91_add_device_udc(&dk_udc_data);
	at91_set_multi_drive(dk_udc_data.pullup_pin, 1);	/* pullup_pin is connected to reset */
	/* Compact Flash */
	at91_add_device_cf(&dk_cf_data);
	/* I2C */
	at91_add_device_i2c(dk_i2c_devices, ARRAY_SIZE(dk_i2c_devices));
	/* SPI */
	at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices));
#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
	/* DataFlash card */
	at91_set_gpio_output(AT91_PIN_PB7, 0);
#else
	/* MMC */
	at91_set_gpio_output(AT91_PIN_PB7, 1);	/* this MMC card slot can optionally use SPI signaling (CS3). */
	at91_add_device_mmc(0, &dk_mmc_data);
#endif
	/* NAND */
	at91_add_device_nand(&dk_nand_data);
	/* NOR Flash */
	platform_device_register(&dk_flash);
	/* LEDs */
	at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
	/* VGA */
//	dk_add_device_video();
}
Ejemplo n.º 22
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* NAND */
	ek_add_device_nand();
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
	/* I2C */
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* Compact Flash */
	at91_add_device_cf(&ek_cf_data);
	/* SSC (to AT73C213) */
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	/* Push Buttons */
	ek_add_device_buttons();
	/* shutdown controller, wakeup button (5 msec low) */
	at91_sys_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10) | AT91_SHDW_WKMODE0_LOW
				| AT91_SHDW_RTTWKEN);
}
Ejemplo n.º 23
0
static void __init carmeva_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
	at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
			   | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
			   | ATMEL_UART_RI);
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&carmeva_eth_data);
	/* USB Host */
	at91_add_device_usbh(&carmeva_usbh_data);
	/* USB Device */
	at91_add_device_udc(&carmeva_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* SPI */
	at91_add_device_spi(carmeva_spi_devices, ARRAY_SIZE(carmeva_spi_devices));
	/* Compact Flash */
//	at91_add_device_cf(&carmeva_cf_data);
	/* MMC */
	at91_add_device_mmc(0, &carmeva_mmc_data);
	/* LEDs */
	at91_gpio_leds(carmeva_leds, ARRAY_SIZE(carmeva_leds));
}
static void __init csb337_board_init(void)
{
	/*        */
	at91_add_device_serial();
	/*          */
	at91_add_device_eth(&csb337_eth_data);
	/*          */
	at91_add_device_usbh(&csb337_usbh_data);
	/*            */
	at91_add_device_udc(&csb337_udc_data);
	/*     */
	at91_add_device_i2c(csb337_i2c_devices, ARRAY_SIZE(csb337_i2c_devices));
	/*               */
	at91_set_gpio_input(AT91_PIN_PB22, 1);		/*        */
	at91_add_device_cf(&csb337_cf_data);
	/*     */
	at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
	/*     */
	at91_add_device_mmc(0, &csb337_mmc_data);
	/*           */
	platform_device_register(&csb_flash);
	/*      */
	at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
	/*                    */
	csb300_add_device_buttons();
}
Ejemplo n.º 25
0
static void __init ek_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_usbh(&ek_usbh_data);
	
	at91_add_device_udc(&ek_udc_data);
	
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	
	ek_add_device_nand();
	
	at91_add_device_eth(&ek_macb_data);
	
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
	at91_add_device_mci(0, &ek_mmc_data);
#else
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	
	at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	
	at91_set_B_periph(AT91_PIN_PC1, 0);
	
	at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
}
void __init cm_board_init(u32 *cm_config)
{
	int i;

	*cm_config = 0;

	/* SPI */
	at91_add_device_spi(cm_spi_devices, ARRAY_SIZE(cm_spi_devices));
	/* Check SPI0 usage to take decision in mother board */
	for (i = 0; i < ARRAY_SIZE(cm_spi_devices); i++) {
		if (cm_spi_devices[i].bus_num == 0) {
			*cm_config |= CM_CONFIG_SPI0_ENABLE;
			break;
		}
	}
	/* NAND */
	cm_add_device_nand();
	/* I2C */
	at91_add_device_i2c(0, cm_i2c_devices, ARRAY_SIZE(cm_i2c_devices));
	*cm_config |= CM_CONFIG_I2C0_ENABLE;
	/* LEDs */
	at91_gpio_leds(cm_leds, ARRAY_SIZE(cm_leds));

	if (cm_is_revA())
		printk(KERN_CRIT "AT91: CM rev A\n");
	else
		printk(KERN_CRIT "AT91: CM rev B and higher\n");
}
Ejemplo n.º 27
0
static void __init ek_add_device_gpio_leds(void)
{
	if (ek_have_2mmc()) {
		ek_leds[0].gpio = AT91_PIN_PB8;
		ek_leds[1].gpio = AT91_PIN_PB9;
	}

	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Ejemplo n.º 28
0
static void __init foxg20_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
	at91_register_uart(AT91SAM9260_ID_US0, 1,
				ATMEL_UART_CTS
				| ATMEL_UART_RTS
				| ATMEL_UART_DTR
				| ATMEL_UART_DSR
				| ATMEL_UART_DCD
				| ATMEL_UART_RI);

	/* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
	at91_register_uart(AT91SAM9260_ID_US1, 2,
		ATMEL_UART_CTS
		| ATMEL_UART_RTS);

	/* USART2 on ttyS3. (Rx & Tx only) */
	at91_register_uart(AT91SAM9260_ID_US2, 3, 0);

	/* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
	at91_register_uart(AT91SAM9260_ID_US3, 4,
		ATMEL_UART_CTS
		| ATMEL_UART_RTS);

	/* USART4 on ttyS5. (Rx & Tx only) */
	at91_register_uart(AT91SAM9260_ID_US4, 5, 0);

	/* USART5 on ttyS6. (Rx & Tx only) */
	at91_register_uart(AT91SAM9260_ID_US5, 6, 0);

	/* Set the internal pull-up resistor on DRXD */
	at91_set_A_periph(AT91_PIN_PB14, 1);
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&foxg20_usbh_data);
	/* USB Device */
	at91_add_device_udc(&foxg20_udc_data);
	/* SPI */
	at91_add_device_spi(foxg20_spi_devices, ARRAY_SIZE(foxg20_spi_devices));
	/* Ethernet */
	at91_add_device_eth(&foxg20_macb_data);
	/* MMC */
	at91_add_device_mci(0, &foxg20_mci0_data);
	/* I2C */
	at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
	/* LEDs */
	at91_gpio_leds(foxg20_leds, ARRAY_SIZE(foxg20_leds));
	/* Push Buttons */
	foxg20_add_device_buttons();
#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
	at91_add_device_w1();
#endif
}
Ejemplo n.º 29
0
/*
static char tft_type = 's';

static int __init ek_tft_setup(char *str)
{
    tft_type = str[0];
    return 1;
}

__setup("tft=", ek_tft_setup);
*/
static void __init ek_board_init(void)
{/*
	int default_display = 0;
	switch (tft_type) {
    case 's': // small or production 
        default_display = 0;
        break;
    case 'm': // middle 
        default_display = 1;
        break;
    case 'b': // big 
    default:
        default_display = 2;
        break;
    }
    ek_fb_set_platdata(default_display);*/
	/* Serial */
	at91_add_device_serial();
	/* USB HS Host */
	at91_add_device_usbh_ohci(&ek_usbh_hs_data);
	at91_add_device_usbh_ehci(&ek_usbh_hs_data);
	/* USB HS Device */
	at91_add_device_usba(&ek_usba_udc_data);	
	/* MMC */
	#if 0
	at91_add_device_mci(0, &mci0_data);
	at91_add_device_mci(1, &mci1_data);
	#endif
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	#if 1
	/* DM9000 ethernet */
	ek_add_device_dm9000();
	#endif
	/* NAND */
	ek_add_device_nand();
	/* SPI */
	at91_add_device_spi(ek_spi0_devices, ARRAY_SIZE(ek_spi0_devices));
	/* I2C */
	at91_add_device_i2c(0, ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* LCD Controller */
	//at91_add_device_lcdc(&ek_lcdc_data);
	/* Touch Screen */
	//at91_add_device_tsadcc(&ek_tsadcc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* AC97 */
	//at91_add_device_ac97(&ek_ac97_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
	#if 0
	/* CF */
	at91_add_device_cf(&at91sam9g45ek_cf_data);
	#endif
}
static void __init stamp9g20evb_board_init(void)
{
	stamp9g20_board_init();
	/*          */
	at91_add_device_usbh(&usbh_data);
	/*            */
	at91_add_device_udc(&stamp9g20evb_udc_data);
	/*          */
	at91_add_device_eth(&macb_data);
	/*     */
	at91_add_device_i2c(NULL, 0);
	/*      */
	at91_gpio_leds(stamp9g20evb_leds, ARRAY_SIZE(stamp9g20evb_leds));
}