|
@@ -308,3 +308,153 @@ static struct spi_board_info ek_spi_devices[] = {
|
|
.chip_select = 2,
|
|
.chip_select = 2,
|
|
.max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */
|
|
.max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */
|
|
.bus_num = 0,
|
|
.bus_num = 0,
|
|
|
|
+ .platform_data = &ads_info,
|
|
|
|
+ .irq = NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0,
|
|
|
|
+ .controller_data = (void *) AT91_PIN_PA28, /* CS pin */
|
|
|
|
+ },
|
|
|
|
+#endif
|
|
|
|
+#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
|
|
|
|
+ { /* DataFlash card - jumper (J12) configurable to CS3 or CS0 */
|
|
|
|
+ .modalias = "mtd_dataflash",
|
|
|
|
+ .chip_select = 3,
|
|
|
|
+ .max_speed_hz = 15 * 1000 * 1000,
|
|
|
|
+ .bus_num = 0,
|
|
|
|
+ },
|
|
|
|
+#elif defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
|
|
|
|
+ { /* AT73C213 DAC */
|
|
|
|
+ .modalias = "at73c213",
|
|
|
|
+ .chip_select = 3,
|
|
|
|
+ .max_speed_hz = 10 * 1000 * 1000,
|
|
|
|
+ .bus_num = 0,
|
|
|
|
+ .mode = SPI_MODE_1,
|
|
|
|
+ .platform_data = &at73c213_data,
|
|
|
|
+ .controller_data = (void*) AT91_PIN_PA29, /* default for CS3 is PA6, but it must be PA29 */
|
|
|
|
+ },
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#else /* CONFIG_SPI_ATMEL_* */
|
|
|
|
+/* spi0 and mmc/sd share the same PIO pins: cannot be used at the same time */
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * MCI (SD/MMC)
|
|
|
|
+ * det_pin, wp_pin and vcc_pin are not connected
|
|
|
|
+ */
|
|
|
|
+static struct mci_platform_data __initdata mci0_data = {
|
|
|
|
+ .slot[0] = {
|
|
|
|
+ .bus_width = 4,
|
|
|
|
+ .detect_pin = -EINVAL,
|
|
|
|
+ .wp_pin = -EINVAL,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#endif /* CONFIG_SPI_ATMEL_* */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * LCD Controller
|
|
|
|
+ */
|
|
|
|
+#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_FB_ATMEL_STN)
|
|
|
|
+
|
|
|
|
+/* STN */
|
|
|
|
+static struct fb_videomode at91_stn_modes[] = {
|
|
|
|
+ {
|
|
|
|
+ .name = "SP06Q002 @ 75",
|
|
|
|
+ .refresh = 75,
|
|
|
|
+ .xres = 320, .yres = 240,
|
|
|
|
+ .pixclock = KHZ2PICOS(1440),
|
|
|
|
+
|
|
|
|
+ .left_margin = 1, .right_margin = 1,
|
|
|
|
+ .upper_margin = 0, .lower_margin = 0,
|
|
|
|
+ .hsync_len = 1, .vsync_len = 1,
|
|
|
|
+
|
|
|
|
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
|
|
|
+ .vmode = FB_VMODE_NONINTERLACED,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct fb_monspecs at91fb_default_stn_monspecs = {
|
|
|
|
+ .manufacturer = "HIT",
|
|
|
|
+ .monitor = "SP06Q002",
|
|
|
|
+
|
|
|
|
+ .modedb = at91_stn_modes,
|
|
|
|
+ .modedb_len = ARRAY_SIZE(at91_stn_modes),
|
|
|
|
+ .hfmin = 15000,
|
|
|
|
+ .hfmax = 64000,
|
|
|
|
+ .vfmin = 50,
|
|
|
|
+ .vfmax = 150,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#define AT91SAM9261_DEFAULT_STN_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
|
|
|
|
+ | ATMEL_LCDC_DISTYPE_STNMONO \
|
|
|
|
+ | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE \
|
|
|
|
+ | ATMEL_LCDC_IFWIDTH_4 \
|
|
|
|
+ | ATMEL_LCDC_SCANMOD_SINGLE)
|
|
|
|
+
|
|
|
|
+static void at91_lcdc_stn_power_control(int on)
|
|
|
|
+{
|
|
|
|
+ /* backlight */
|
|
|
|
+ if (on) { /* power up */
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PC14, 0);
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PC15, 0);
|
|
|
|
+ } else { /* power down */
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PC14, 1);
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PC15, 1);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
|
|
|
|
+ .default_bpp = 1,
|
|
|
|
+ .default_dmacon = ATMEL_LCDC_DMAEN,
|
|
|
|
+ .default_lcdcon2 = AT91SAM9261_DEFAULT_STN_LCDCON2,
|
|
|
|
+ .default_monspecs = &at91fb_default_stn_monspecs,
|
|
|
|
+ .atmel_lcdfb_power_control = at91_lcdc_stn_power_control,
|
|
|
|
+ .guard_time = 1,
|
|
|
|
+#if defined(CONFIG_MACH_AT91SAM9G10EK)
|
|
|
|
+ .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#else
|
|
|
|
+
|
|
|
|
+/* TFT */
|
|
|
|
+static struct fb_videomode at91_tft_vga_modes[] = {
|
|
|
|
+ {
|
|
|
|
+ .name = "TX09D50VM1CCA @ 60",
|
|
|
|
+ .refresh = 60,
|
|
|
|
+ .xres = 240, .yres = 320,
|
|
|
|
+ .pixclock = KHZ2PICOS(4965),
|
|
|
|
+
|
|
|
|
+ .left_margin = 1, .right_margin = 33,
|
|
|
|
+ .upper_margin = 1, .lower_margin = 0,
|
|
|
|
+ .hsync_len = 5, .vsync_len = 1,
|
|
|
|
+
|
|
|
|
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
|
|
|
+ .vmode = FB_VMODE_NONINTERLACED,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct fb_monspecs at91fb_default_tft_monspecs = {
|
|
|
|
+ .manufacturer = "HIT",
|
|
|
|
+ .monitor = "TX09D50VM1CCA",
|
|
|
|
+
|
|
|
|
+ .modedb = at91_tft_vga_modes,
|
|
|
|
+ .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
|
|
|
|
+ .hfmin = 15000,
|
|
|
|
+ .hfmax = 64000,
|
|
|
|
+ .vfmin = 50,
|
|
|
|
+ .vfmax = 150,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#define AT91SAM9261_DEFAULT_TFT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
|
|
|
|
+ | ATMEL_LCDC_DISTYPE_TFT \
|
|
|
|
+ | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
|
|
|
|
+
|
|
|
|
+static void at91_lcdc_tft_power_control(int on)
|
|
|
|
+{
|
|
|
|
+ if (on)
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
|
|
|
|
+ else
|
|
|
|
+ at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
|