Merge tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux...
[linux/fpc-iii.git] / drivers / staging / board / armadillo800eva.c
blob4de4fd06eebc23d0611d87768e6ee533e00ba498
1 /*
2 * Staging board support for Armadillo 800 eva.
3 * Enable not-yet-DT-capable devices here.
5 * Based on board-armadillo800eva.c
7 * Copyright (C) 2012 Renesas Solutions Corp.
8 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2 of the License.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
20 #include <linux/dma-mapping.h>
21 #include <linux/fb.h>
22 #include <linux/kernel.h>
23 #include <linux/platform_device.h>
24 #include <linux/videodev2.h>
26 #include <video/sh_mobile_lcdc.h>
28 #include "board.h"
30 static struct fb_videomode lcdc0_mode = {
31 .name = "AMPIER/AM-800480",
32 .xres = 800,
33 .yres = 480,
34 .left_margin = 88,
35 .right_margin = 40,
36 .hsync_len = 128,
37 .upper_margin = 20,
38 .lower_margin = 5,
39 .vsync_len = 5,
40 .sync = 0,
43 static struct sh_mobile_lcdc_info lcdc0_info = {
44 .clock_source = LCDC_CLK_BUS,
45 .ch[0] = {
46 .chan = LCDC_CHAN_MAINLCD,
47 .fourcc = V4L2_PIX_FMT_RGB565,
48 .interface_type = RGB24,
49 .clock_divider = 5,
50 .flags = 0,
51 .lcd_modes = &lcdc0_mode,
52 .num_modes = 1,
53 .panel_cfg = {
54 .width = 111,
55 .height = 68,
60 static struct resource lcdc0_resources[] = {
61 [0] = {
62 .name = "LCD0",
63 .start = 0xfe940000,
64 .end = 0xfe943fff,
65 .flags = IORESOURCE_MEM,
67 [1] = {
68 .start = 177 + 32,
69 .flags = IORESOURCE_IRQ,
73 static struct platform_device lcdc0_device = {
74 .name = "sh_mobile_lcdc_fb",
75 .num_resources = ARRAY_SIZE(lcdc0_resources),
76 .resource = lcdc0_resources,
77 .id = 0,
78 .dev = {
79 .platform_data = &lcdc0_info,
80 .coherent_dma_mask = DMA_BIT_MASK(32),
84 static const struct board_staging_clk lcdc0_clocks[] __initconst = {
85 { "lcdc0", NULL, "sh_mobile_lcdc_fb.0" },
88 static const struct board_staging_dev armadillo800eva_devices[] __initconst = {
90 .pdev = &lcdc0_device,
91 .clocks = lcdc0_clocks,
92 .nclocks = ARRAY_SIZE(lcdc0_clocks),
93 .domain = "/system-controller@e6180000/pm-domains/c5/a4lc@1"
97 static void __init armadillo800eva_init(void)
99 board_staging_gic_setup_xlate("arm,pl390", 32);
100 board_staging_register_devices(armadillo800eva_devices,
101 ARRAY_SIZE(armadillo800eva_devices));
104 board_staging("renesas,armadillo800eva", armadillo800eva_init);