|
@@ -296,3 +296,101 @@ static struct resource smc911x_resources[] = {
|
|
.end = 0x16000000 - 1,
|
|
.end = 0x16000000 - 1,
|
|
.flags = IORESOURCE_MEM,
|
|
.flags = IORESOURCE_MEM,
|
|
}, {
|
|
}, {
|
|
|
|
+ .start = evt2irq(0x02c0) /* IRQ6A */,
|
|
|
|
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct smsc911x_platform_config smsc911x_info = {
|
|
|
|
+ .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
|
|
|
|
+ .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
|
|
|
+ .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device smc911x_device = {
|
|
|
|
+ .name = "smsc911x",
|
|
|
|
+ .id = -1,
|
|
|
|
+ .num_resources = ARRAY_SIZE(smc911x_resources),
|
|
|
|
+ .resource = smc911x_resources,
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &smsc911x_info,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/* MERAM */
|
|
|
|
+static struct sh_mobile_meram_info mackerel_meram_info = {
|
|
|
|
+ .addr_mode = SH_MOBILE_MERAM_MODE1,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct resource meram_resources[] = {
|
|
|
|
+ [0] = {
|
|
|
|
+ .name = "regs",
|
|
|
|
+ .start = 0xe8000000,
|
|
|
|
+ .end = 0xe807ffff,
|
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
|
+ },
|
|
|
|
+ [1] = {
|
|
|
|
+ .name = "meram",
|
|
|
|
+ .start = 0xe8080000,
|
|
|
|
+ .end = 0xe81fffff,
|
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device meram_device = {
|
|
|
|
+ .name = "sh_mobile_meram",
|
|
|
|
+ .id = 0,
|
|
|
|
+ .num_resources = ARRAY_SIZE(meram_resources),
|
|
|
|
+ .resource = meram_resources,
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &mackerel_meram_info,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/* LCDC */
|
|
|
|
+static struct fb_videomode mackerel_lcdc_modes[] = {
|
|
|
|
+ {
|
|
|
|
+ .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,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static int mackerel_set_brightness(int brightness)
|
|
|
|
+{
|
|
|
|
+ gpio_set_value(GPIO_PORT31, brightness);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+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 = &mackerel_meram_info,
|
|
|
|
+ .clock_source = LCDC_CLK_BUS,
|
|
|
|
+ .ch[0] = {
|
|
|
|
+ .chan = LCDC_CHAN_MAINLCD,
|
|
|
|
+ .fourcc = V4L2_PIX_FMT_RGB565,
|
|
|
|
+ .lcd_modes = mackerel_lcdc_modes,
|
|
|
|
+ .num_modes = ARRAY_SIZE(mackerel_lcdc_modes),
|
|
|
|
+ .interface_type = RGB24,
|
|
|
|
+ .clock_divider = 3,
|
|
|
|
+ .flags = 0,
|
|
|
|
+ .panel_cfg = {
|
|
|
|
+ .width = 152,
|
|
|
|
+ .height = 91,
|
|
|
|
+ },
|