|
@@ -580,3 +580,96 @@ static struct platform_device *qhd_devices[] __initdata = {
|
|
#endif /* CONFIG_AP4EVB_QHD */
|
|
#endif /* CONFIG_AP4EVB_QHD */
|
|
|
|
|
|
/* LCDC0 */
|
|
/* LCDC0 */
|
|
|
|
+static const struct fb_videomode ap4evb_lcdc_modes[] = {
|
|
|
|
+ {
|
|
|
|
+#ifdef CONFIG_AP4EVB_QHD
|
|
|
|
+ .name = "R63302(QHD)",
|
|
|
|
+ .xres = 544,
|
|
|
|
+ .yres = 961,
|
|
|
|
+ .left_margin = 72,
|
|
|
|
+ .right_margin = 600,
|
|
|
|
+ .hsync_len = 16,
|
|
|
|
+ .upper_margin = 8,
|
|
|
|
+ .lower_margin = 8,
|
|
|
|
+ .vsync_len = 2,
|
|
|
|
+ .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
|
|
|
|
+#else
|
|
|
|
+ .name = "WVGA Panel",
|
|
|
|
+ .xres = 800,
|
|
|
|
+ .yres = 480,
|
|
|
|
+ .left_margin = 220,
|
|
|
|
+ .right_margin = 110,
|
|
|
|
+ .hsync_len = 70,
|
|
|
|
+ .upper_margin = 20,
|
|
|
|
+ .lower_margin = 5,
|
|
|
|
+ .vsync_len = 5,
|
|
|
|
+ .sync = 0,
|
|
|
|
+#endif
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const struct sh_mobile_meram_cfg lcd_meram_cfg = {
|
|
|
|
+ .icb[0] = {
|
|
|
|
+ .meram_size = 0x40,
|
|
|
|
+ },
|
|
|
|
+ .icb[1] = {
|
|
|
|
+ .meram_size = 0x40,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct sh_mobile_lcdc_info lcdc_info = {
|
|
|
|
+ .meram_dev = &meram_info,
|
|
|
|
+ .ch[0] = {
|
|
|
|
+ .chan = LCDC_CHAN_MAINLCD,
|
|
|
|
+ .fourcc = V4L2_PIX_FMT_RGB565,
|
|
|
|
+ .lcd_modes = ap4evb_lcdc_modes,
|
|
|
|
+ .num_modes = ARRAY_SIZE(ap4evb_lcdc_modes),
|
|
|
|
+ .meram_cfg = &lcd_meram_cfg,
|
|
|
|
+#ifdef CONFIG_AP4EVB_QHD
|
|
|
|
+ .tx_dev = &mipidsi0_device,
|
|
|
|
+#endif
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct resource lcdc_resources[] = {
|
|
|
|
+ [0] = {
|
|
|
|
+ .name = "LCDC",
|
|
|
|
+ .start = 0xfe940000, /* P4-only space */
|
|
|
|
+ .end = 0xfe943fff,
|
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
|
+ },
|
|
|
|
+ [1] = {
|
|
|
|
+ .start = intcs_evt2irq(0x580),
|
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device lcdc_device = {
|
|
|
|
+ .name = "sh_mobile_lcdc_fb",
|
|
|
|
+ .num_resources = ARRAY_SIZE(lcdc_resources),
|
|
|
|
+ .resource = lcdc_resources,
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &lcdc_info,
|
|
|
|
+ .coherent_dma_mask = ~0,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/* FSI */
|
|
|
|
+#define IRQ_FSI evt2irq(0x1840)
|
|
|
|
+static struct sh_fsi_platform_info fsi_info = {
|
|
|
|
+ .port_a = {
|
|
|
|
+ .flags = SH_FSI_BRS_INV,
|
|
|
|
+ },
|
|
|
|
+ .port_b = {
|
|
|
|
+ .flags = SH_FSI_BRS_INV |
|
|
|
|
+ SH_FSI_BRM_INV |
|
|
|
|
+ SH_FSI_LRS_INV |
|
|
|
|
+ SH_FSI_CLK_CPG |
|
|
|
|
+ SH_FSI_FMT_SPDIF,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct resource fsi_resources[] = {
|
|
|
|
+ [0] = {
|
|
|
|
+ .name = "FSI",
|
|
|
|
+ .start = 0xFE3C0000,
|