|
@@ -867,3 +867,177 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
|
|
|
at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */
|
|
|
at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */
|
|
|
at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */
|
|
|
+ at91_set_B_periph(AT91_PIN_PB9, 0); /* LCDCC */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDD2 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC7, 0); /* LCDD3 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC8, 0); /* LCDD4 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC9, 0); /* LCDD5 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC10, 0); /* LCDD6 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC11, 0); /* LCDD7 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC14, 0); /* LCDD10 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC15, 0); /* LCDD11 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC16, 0); /* LCDD12 */
|
|
|
+ at91_set_B_periph(AT91_PIN_PC12, 0); /* LCDD13 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC18, 0); /* LCDD14 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC19, 0); /* LCDD15 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC22, 0); /* LCDD18 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC23, 0); /* LCDD19 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC24, 0); /* LCDD20 */
|
|
|
+ at91_set_B_periph(AT91_PIN_PC17, 0); /* LCDD21 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC26, 0); /* LCDD22 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PC27, 0); /* LCDD23 */
|
|
|
+
|
|
|
+ lcdc_data = *data;
|
|
|
+ platform_device_register(&at91_lcdc_device);
|
|
|
+}
|
|
|
+#else
|
|
|
+void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/* --------------------------------------------------------------------
|
|
|
+ * Image Sensor Interface
|
|
|
+ * -------------------------------------------------------------------- */
|
|
|
+
|
|
|
+#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
|
|
|
+
|
|
|
+struct resource isi_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .start = AT91SAM9263_BASE_ISI,
|
|
|
+ .end = AT91SAM9263_BASE_ISI + SZ_16K - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
|
|
|
+ .end = NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device at91sam9263_isi_device = {
|
|
|
+ .name = "at91_isi",
|
|
|
+ .id = -1,
|
|
|
+ .resource = isi_resources,
|
|
|
+ .num_resources = ARRAY_SIZE(isi_resources),
|
|
|
+};
|
|
|
+
|
|
|
+void __init at91_add_device_isi(struct isi_platform_data *data,
|
|
|
+ bool use_pck_as_mck)
|
|
|
+{
|
|
|
+ at91_set_A_periph(AT91_PIN_PE0, 0); /* ISI_D0 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE1, 0); /* ISI_D1 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE2, 0); /* ISI_D2 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE3, 0); /* ISI_D3 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE4, 0); /* ISI_D4 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE5, 0); /* ISI_D5 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE6, 0); /* ISI_D6 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE7, 0); /* ISI_D7 */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE8, 0); /* ISI_PCK */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE9, 0); /* ISI_HSYNC */
|
|
|
+ at91_set_A_periph(AT91_PIN_PE10, 0); /* ISI_VSYNC */
|
|
|
+ at91_set_B_periph(AT91_PIN_PE12, 0); /* ISI_PD8 */
|
|
|
+ at91_set_B_periph(AT91_PIN_PE13, 0); /* ISI_PD9 */
|
|
|
+ at91_set_B_periph(AT91_PIN_PE14, 0); /* ISI_PD10 */
|
|
|
+ at91_set_B_periph(AT91_PIN_PE15, 0); /* ISI_PD11 */
|
|
|
+
|
|
|
+ if (use_pck_as_mck) {
|
|
|
+ at91_set_B_periph(AT91_PIN_PE11, 0); /* ISI_MCK (PCK3) */
|
|
|
+
|
|
|
+ /* TODO: register the PCK for ISI_MCK and set its parent */
|
|
|
+ }
|
|
|
+}
|
|
|
+#else
|
|
|
+void __init at91_add_device_isi(struct isi_platform_data *data,
|
|
|
+ bool use_pck_as_mck) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/* --------------------------------------------------------------------
|
|
|
+ * Timer/Counter block
|
|
|
+ * -------------------------------------------------------------------- */
|
|
|
+
|
|
|
+#ifdef CONFIG_ATMEL_TCLIB
|
|
|
+
|
|
|
+static struct resource tcb_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .start = AT91SAM9263_BASE_TCB0,
|
|
|
+ .end = AT91SAM9263_BASE_TCB0 + SZ_16K - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = NR_IRQS_LEGACY + AT91SAM9263_ID_TCB,
|
|
|
+ .end = NR_IRQS_LEGACY + AT91SAM9263_ID_TCB,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device at91sam9263_tcb_device = {
|
|
|
+ .name = "atmel_tcb",
|
|
|
+ .id = 0,
|
|
|
+ .resource = tcb_resources,
|
|
|
+ .num_resources = ARRAY_SIZE(tcb_resources),
|
|
|
+};
|
|
|
+
|
|
|
+#if defined(CONFIG_OF)
|
|
|
+static struct of_device_id tcb_ids[] = {
|
|
|
+ { .compatible = "atmel,at91rm9200-tcb" },
|
|
|
+ { /*sentinel*/ }
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+static void __init at91_add_device_tc(void)
|
|
|
+{
|
|
|
+#if defined(CONFIG_OF)
|
|
|
+ struct device_node *np;
|
|
|
+
|
|
|
+ np = of_find_matching_node(NULL, tcb_ids);
|
|
|
+ if (np) {
|
|
|
+ of_node_put(np);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
+ platform_device_register(&at91sam9263_tcb_device);
|
|
|
+}
|
|
|
+#else
|
|
|
+static void __init at91_add_device_tc(void) { }
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/* --------------------------------------------------------------------
|
|
|
+ * RTT
|
|
|
+ * -------------------------------------------------------------------- */
|
|
|
+
|
|
|
+static struct resource rtt0_resources[] = {
|
|
|
+ {
|
|
|
+ .start = AT91SAM9263_BASE_RTT0,
|
|
|
+ .end = AT91SAM9263_BASE_RTT0 + SZ_16 - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device at91sam9263_rtt0_device = {
|
|
|
+ .name = "at91_rtt",
|
|
|
+ .id = 0,
|
|
|
+ .resource = rtt0_resources,
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource rtt1_resources[] = {
|
|
|
+ {
|
|
|
+ .start = AT91SAM9263_BASE_RTT1,
|
|
|
+ .end = AT91SAM9263_BASE_RTT1 + SZ_16 - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device at91sam9263_rtt1_device = {
|
|
|
+ .name = "at91_rtt",
|
|
|
+ .id = 1,
|