Example #1
0
static void __init ek_add_device_nand(void)
{
	
	if (ek_nand_data.bus_width_16)
		ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		ek_nand_smc_config.mode |= AT91_SMC_DBW_8;

	
	sam9_smc_configure(3, &ek_nand_smc_config);

	at91_add_device_nand(&ek_nand_data);
}
Example #2
0
static void ek_add_device_nand(void)
{
	/* setup bus-width (8 or 16) */
	if (nand_pdata.bus_width_16)
		ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		ek_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(0, 3, &ek_nand_smc_config);

	at91_add_device_nand(&nand_pdata);
}
Example #3
0
static void __init ek_add_device_nand(void)
{
	ek_nand_data.bus_width_16 = board_have_nand_16bit();
	/* setup bus-width (8 or 16) */
	if (ek_nand_data.bus_width_16)
		ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		ek_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(3, &ek_nand_smc_config);

	at91_add_device_nand(&ek_nand_data);
}
static void __init ek_add_device_nand(void)
{
	ek_nand_data.bus_width_16 = board_have_nand_16bit();
	/*                           */
	if (ek_nand_data.bus_width_16)
		ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		ek_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/*                                */
	sam9_smc_configure(0, 3, &ek_nand_smc_config);

	at91_add_device_nand(&ek_nand_data);
}
Example #5
0
static void __init ek_add_device_nand(void)
{
	if (machine_is_usb_a9260() || machine_is_usb_a9g20()) {
		ek_nand_data.rdy_pin	= AT91_PIN_PC13;
		ek_nand_data.enable_pin	= AT91_PIN_PC14;
	}

	/* configure chip-select 3 (NAND) */
	if (machine_is_usb_a9g20())
		sam9_smc_configure(3, &usb_a9g20_nand_smc_config);
	else
		sam9_smc_configure(3, &usb_a9260_nand_smc_config);

	at91_add_device_nand(&ek_nand_data);
}
Example #6
0
static void tny_a9260_add_device_nand(void)
{
	/* configure chip-select 3 (NAND) */
	if (machine_is_tny_a9g20())
		sam9_smc_configure(0, 3, &tny_a9g20_nand_smc_config);
	else
		sam9_smc_configure(0, 3, &tny_a9260_nand_smc_config);

	if (machine_is_tny_a9263()) {
		nand_pdata.rdy_pin	= AT91_PIN_PA22;
		nand_pdata.enable_pin	= AT91_PIN_PD15;
	}

	at91_add_device_nand(&nand_pdata);
}
Example #7
0
static void __init cam60_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* SPI */
	at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
	/* Ethernet */
	at91_add_device_eth(&cam60_macb_data);
	/* USB Host */
	/* enable USB power supply circuit */
	at91_set_gpio_output(AT91_PIN_PB18, 1);
	at91_add_device_usbh(&cam60_usbh_data);
	/* NAND */
	at91_add_device_nand(&cam60_nand_data);
}
Example #8
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	at91_add_device_nand(&ek_nand_data);
	/* 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);
}
Example #9
0
static void __init yl9200_board_init(void)
{
	/* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
	at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);

	/* 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);

	/* USART0 on ttyS2. (Rx & Tx only to JP3) */
	at91_register_uart(AT91RM9200_ID_US0, 2, 0);

	/* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
	at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
	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();
}
/*this is not called first , yl_9200_map_io is called first*/
static void __init yl_9200_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* Ethernet */
	at91_add_device_eth(&yl_9200_eth_data);
	/* USB Host */
	at91_add_device_usbh(&yl_9200_usbh_data);
	/* USB Device */
	at91_add_device_udc(&yl_9200_udc_data);
	/* pullup_pin it is  actually active low, but this is not needed, driver sets it up */
	/*at91_set_multi_drive(yl_9200_udc_data.pullup_pin, 0);*/

	/* Compact Flash */
	/*at91_add_device_cf(&yl_9200_cf_data);*/

	/* I2C */
	at91_add_device_i2c(yl_9200_i2c_devices, ARRAY_SIZE(yl_9200_i2c_devices));
	/* SPI */
	/*TODO YL9200 we have 2 spi interfaces touch screen & CAN*/
	/* AT91_PIN_PA5, AT91_PIN_PA6 , are used on the  max 485 NOT SPI*/

	/*touch screen and CAN*/
	at91_add_device_spi(yl_9200_spi_devices, ARRAY_SIZE(yl_9200_spi_devices));

	/*Basically the  TS uses  PB11 & PB10 , PB11 is configured by the SPI system BP10 IS NOT USED!!*/
	/* we need this incase the board is running without a touch screen*/
	#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
	at91_init_device_ts(); /*init the touch screen device*/
	#endif
	/* DataFlash card */
	at91_add_device_mmc(0, &yl_9200_mmc_data);
	/* NAND */
	at91_add_device_nand(&yl_9200_nand_data);
	/* NOR Flash */
	platform_device_register(&yl_9200_flash);
	/* LEDs. Note!! this does not include the led's we passed for the processor status */
	at91_gpio_leds(yl_9200_leds, ARRAY_SIZE(yl_9200_leds));
	/* VGA  */
	/*this is self registered by including the s1d13xxx chip in the kernel build*/
	yl_9200_add_device_video();
	/* Push Buttons */
	yl_9200_add_device_buttons();
	/*TODO fixup the Sounder */
//	yl_9200_add_device_sounder(yl_9200_sounder,ARRAY_SIZE(yl_9200_sounder));

}
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 */
	at91_add_device_nand(&ek_nand_data);
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
}
Example #12
0
static void ek_add_device_nand(void)
{
	struct clk *clk = clk_get(NULL, "smc_clk");

	clk_enable(clk);

	/* setup bus-width (8 or 16) */
	if (nand_pdata.bus_width_16)
		sama5d3_xplained_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		sama5d3_xplained_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sama5_smc_configure(0, 3, &sama5d3_xplained_nand_smc_config);

	at91_add_device_nand(&nand_pdata);
}
static void __init cap9adk_add_device_nand(void)
{
	unsigned long csa;

	csa = at91_sys_read(AT91_MATRIX_EBICSA);
	at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V);

	/* setup bus-width (8 or 16) */
	if (cap9adk_nand_data.bus_width_16)
		cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(3, &cap9adk_nand_smc_config);

	at91_add_device_nand(&cap9adk_nand_data);
}
Example #14
0
static void __init dk_board_init(void)
{
	/* Setup the LEDs */
	at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);

	/* 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(&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();
}
Example #15
0
static void __init kb9202_board_init(void)
{
    /* Serial */
    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_mmc(0, &kb9202_mmc_data);
    /* I2C */
    at91_add_device_i2c(NULL, 0);
    /* SPI */
    at91_add_device_spi(NULL, 0);
    /* NAND */
    at91_add_device_nand(&kb9202_nand_data);
}
Example #16
0
static void __init kb9202_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_eth(&kb9202_eth_data);
	
	at91_add_device_usbh(&kb9202_usbh_data);
	
	at91_add_device_udc(&kb9202_udc_data);
	
	at91_add_device_mmc(0, &kb9202_mmc_data);
	
	at91_add_device_i2c(NULL, 0);
	
	at91_add_device_spi(NULL, 0);
	
	at91_add_device_nand(&kb9202_nand_data);
}
Example #17
0
static void __init afeb9260_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);
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&afeb9260_usbh_data);
	/* USB Device */
	at91_add_device_udc(&afeb9260_udc_data);
	/* SPI */
	at91_add_device_spi(afeb9260_spi_devices,
			ARRAY_SIZE(afeb9260_spi_devices));
	/* NAND */
	at91_add_device_nand(&afeb9260_nand_data);
	/* Ethernet */
	at91_add_device_eth(&afeb9260_macb_data);

	/* Standard function's pin assignments are not
	 * appropriate for us and generic code provide
	 * no API to configure these pins any other way */
	at91_set_B_periph(AT91_PIN_PA10, 0);	/* ETX2 */
	at91_set_B_periph(AT91_PIN_PA11, 0);	/* ETX3 */
	/* MMC */
	at91_add_device_mci(0, &afeb9260_mci0_data);
	/* I2C */
	at91_add_device_i2c(afeb9260_i2c_devices,
			ARRAY_SIZE(afeb9260_i2c_devices));
	/* Audio */
	at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
	/* IDE */
	at91_add_device_cf(&afeb9260_cf_data);
}
Example #18
0
static void ek_add_device_nand(void)
{
	struct sam9_smc_config *smc;

	if (machine_is_at91sam9g20ek())
		smc = &ek_9g20_nand_smc_config;
	else
		smc = &ek_9260_nand_smc_config;

	/* setup bus-width (8 or 16) */
	if (nand_pdata.bus_width_16)
		smc->mode |= AT91_SMC_DBW_16;
	else
		smc->mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(0, 3, smc);

	at91_add_device_nand(&nand_pdata);
}
Example #19
0
static void ek_add_device_nand(void)
{
	/* setup bus-width (8 or 16) */
	if (nand_pdata.bus_width_16)
		cm_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		cm_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(0, 3, &cm_nand_smc_config);

	if (at91sam9x5ek_cm_is_vendor(VENDOR_COGENT)) {
		unsigned long csa;

		csa = at91_sys_read(AT91_MATRIX_EBICSA);
		csa |= AT91_MATRIX_EBI_VDDIOMSEL_1_8V;
		at91_sys_write(AT91_MATRIX_EBICSA, csa);
	}

	at91_add_device_nand(&nand_pdata);
}
static void __init cm_add_device_nand(void)
{
	/* setup bus-width (8 or 16) */
	if (cm_nand_data.bus_width_16)
		cm_nand_smc_config.mode |= AT91_SMC_DBW_16;
	else
		cm_nand_smc_config.mode |= AT91_SMC_DBW_8;

	/* revision of board modify NAND wiring */
	if (cm_is_revA()) {
		cm_nand_data.bus_on_d0 = 1;
		cm_nand_data.rdy_pin = AT91_PIN_PD6;
	} else {
		cm_nand_data.bus_on_d0 = 0;
		cm_nand_data.rdy_pin = AT91_PIN_PD5;
	}

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(3, &cm_nand_smc_config);

	at91_add_device_nand(&cm_nand_data);
}
Example #21
0
static void ek_add_device_nand(void)
{
	struct sam9_smc_config *smc;

	if (machine_is_at91sam9g20ek())
		smc = &ek_9g20_nand_smc_config;
	else
		smc = &ek_9260_nand_smc_config;

	/* setup bus-width (8 or 16) */
	if (IS_ENABLED(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)) {
		nand_pdata.bus_width_16 = 1;
		smc->mode |= AT91_SMC_DBW_16;
	} else {
		smc->mode |= AT91_SMC_DBW_8;
	}

	/* configure chip-select 3 (NAND) */
	sam9_smc_configure(0, 3, smc);

	at91_add_device_nand(&nand_pdata);
}
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));
	/* SSC (to LM4549 audio codec) */
	at91_add_device_ssc(AT91RM9200_ID_SSC1, ATMEL_SSC_TD | ATMEL_SSC_RX);
	/* SSC (to SI3021 line interface) */
	at91_add_device_ssc(AT91RM9200_ID_SSC2, ATMEL_SSC_TD | ATMEL_SSC_TK | ATMEL_SSC_RD | ATMEL_SSC_RF);
	/* VGA */
	dk_add_device_video();
}
Example #23
0
static void __init snapper9260_add_device_nand(void)
{
	at91_set_A_periph(AT91_PIN_PC14, 0);
	sam9_smc_configure(0, 3, &snapper9260_nand_smc_config);
	at91_add_device_nand(&snapper9260_nand_data);
}
static void __init cpu9krea_add_device_nand(void)
{
	sam9_smc_configure(3, &cpu9krea_nand_smc_config);
	at91_add_device_nand(&cpu9krea_nand_data);
}