From 778a02466db200a8a3f2875ff64f991b70440107 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Thu, 28 Mar 2013 15:57:56 +0000 Subject: amba-clcd: Add Device Tree support to amba-clcd driver Add support to parse the display configuration from device tree. If the board does not provide platform specific functions in the struct clcd_board contained with the amba device info, then defaults are provided by the driver. The device tree configuration can either ask for a DMA setup or provide a framebuffer address to be remapped into the driver. Signed-off-by: Ryan Harkin --- drivers/video/amba-clcd.c | 250 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 0a2cce7285b..3cacf26f3e5 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -16,7 +16,10 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -391,6 +394,19 @@ static int clcdfb_blank(int blank_mode, struct fb_info *info) } return 0; } +int clcdfb_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma) +{ + return dma_mmap_writecombine(&fb->dev->dev, vma, + fb->fb.screen_base, + fb->fb.fix.smem_start, + fb->fb.fix.smem_len); +} + +void clcdfb_remove_dma(struct clcd_fb *fb) +{ + dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, + fb->fb.screen_base, fb->fb.fix.smem_start); +} static int clcdfb_mmap(struct fb_info *info, struct vm_area_struct *vma) @@ -542,12 +558,246 @@ static int clcdfb_register(struct clcd_fb *fb) return ret; } +struct string_lookup { + const char *string; + const u32 val; +}; + +static struct string_lookup vmode_lookups[] = { + { "FB_VMODE_NONINTERLACED", FB_VMODE_NONINTERLACED}, + { "FB_VMODE_INTERLACED", FB_VMODE_INTERLACED}, + { "FB_VMODE_DOUBLE", FB_VMODE_DOUBLE}, + { "FB_VMODE_ODD_FLD_FIRST", FB_VMODE_ODD_FLD_FIRST}, + { NULL, 0 }, +}; + +static struct string_lookup tim2_lookups[] = { + { "TIM2_CLKSEL", TIM2_CLKSEL}, + { "TIM2_IVS", TIM2_IVS}, + { "TIM2_IHS", TIM2_IHS}, + { "TIM2_IPC", TIM2_IPC}, + { "TIM2_IOE", TIM2_IOE}, + { "TIM2_BCD", TIM2_BCD}, + { NULL, 0}, +}; +static struct string_lookup cntl_lookups[] = { + {"CNTL_LCDEN", CNTL_LCDEN}, + {"CNTL_LCDBPP1", CNTL_LCDBPP1}, + {"CNTL_LCDBPP2", CNTL_LCDBPP2}, + {"CNTL_LCDBPP4", CNTL_LCDBPP4}, + {"CNTL_LCDBPP8", CNTL_LCDBPP8}, + {"CNTL_LCDBPP16", CNTL_LCDBPP16}, + {"CNTL_LCDBPP16_565", CNTL_LCDBPP16_565}, + {"CNTL_LCDBPP16_444", CNTL_LCDBPP16_444}, + {"CNTL_LCDBPP24", CNTL_LCDBPP24}, + {"CNTL_LCDBW", CNTL_LCDBW}, + {"CNTL_LCDTFT", CNTL_LCDTFT}, + {"CNTL_LCDMONO8", CNTL_LCDMONO8}, + {"CNTL_LCDDUAL", CNTL_LCDDUAL}, + {"CNTL_BGR", CNTL_BGR}, + {"CNTL_BEBO", CNTL_BEBO}, + {"CNTL_BEPO", CNTL_BEPO}, + {"CNTL_LCDPWR", CNTL_LCDPWR}, + {"CNTL_LCDVCOMP(1)", CNTL_LCDVCOMP(1)}, + {"CNTL_LCDVCOMP(2)", CNTL_LCDVCOMP(2)}, + {"CNTL_LCDVCOMP(3)", CNTL_LCDVCOMP(3)}, + {"CNTL_LCDVCOMP(4)", CNTL_LCDVCOMP(4)}, + {"CNTL_LCDVCOMP(5)", CNTL_LCDVCOMP(5)}, + {"CNTL_LCDVCOMP(6)", CNTL_LCDVCOMP(6)}, + {"CNTL_LCDVCOMP(7)", CNTL_LCDVCOMP(7)}, + {"CNTL_LDMAFIFOTIME", CNTL_LDMAFIFOTIME}, + {"CNTL_WATERMARK", CNTL_WATERMARK}, + { NULL, 0}, +}; +static struct string_lookup caps_lookups[] = { + {"CLCD_CAP_RGB444", CLCD_CAP_RGB444}, + {"CLCD_CAP_RGB5551", CLCD_CAP_RGB5551}, + {"CLCD_CAP_RGB565", CLCD_CAP_RGB565}, + {"CLCD_CAP_RGB888", CLCD_CAP_RGB888}, + {"CLCD_CAP_BGR444", CLCD_CAP_BGR444}, + {"CLCD_CAP_BGR5551", CLCD_CAP_BGR5551}, + {"CLCD_CAP_BGR565", CLCD_CAP_BGR565}, + {"CLCD_CAP_BGR888", CLCD_CAP_BGR888}, + {"CLCD_CAP_444", CLCD_CAP_444}, + {"CLCD_CAP_5551", CLCD_CAP_5551}, + {"CLCD_CAP_565", CLCD_CAP_565}, + {"CLCD_CAP_888", CLCD_CAP_888}, + {"CLCD_CAP_RGB", CLCD_CAP_RGB}, + {"CLCD_CAP_BGR", CLCD_CAP_BGR}, + {"CLCD_CAP_ALL", CLCD_CAP_ALL}, + { NULL, 0}, +}; + +u32 parse_setting(struct string_lookup *lookup, const char *name) +{ + int i = 0; + while (lookup[i].string != NULL) { + if (strcmp(lookup[i].string, name) == 0) + return lookup[i].val; + ++i; + } + return -EINVAL; +} + +u32 get_string_lookup(struct device_node *node, const char *name, + struct string_lookup *lookup) +{ + const char *string; + int count, i, ret = 0; + + count = of_property_count_strings(node, name); + if (count >= 0) + for (i = 0; i < count; i++) + if (of_property_read_string_index(node, name, i, + &string) == 0) + ret |= parse_setting(lookup, string); + return ret; +} + +int get_val(struct device_node *node, const char *string) +{ + u32 ret = 0; + + if (of_property_read_u32(node, string, &ret)) + ret = -1; + return ret; +} + +struct clcd_panel *getPanel(struct device_node *node) +{ + static struct clcd_panel panel; + + panel.mode.refresh = get_val(node, "refresh"); + panel.mode.xres = get_val(node, "xres"); + panel.mode.yres = get_val(node, "yres"); + panel.mode.pixclock = get_val(node, "pixclock"); + panel.mode.left_margin = get_val(node, "left_margin"); + panel.mode.right_margin = get_val(node, "right_margin"); + panel.mode.upper_margin = get_val(node, "upper_margin"); + panel.mode.lower_margin = get_val(node, "lower_margin"); + panel.mode.hsync_len = get_val(node, "hsync_len"); + panel.mode.vsync_len = get_val(node, "vsync_len"); + panel.mode.sync = get_val(node, "sync"); + panel.bpp = get_val(node, "bpp"); + panel.width = (signed short) get_val(node, "width"); + panel.height = (signed short) get_val(node, "height"); + + panel.mode.vmode = get_string_lookup(node, "vmode", vmode_lookups); + panel.tim2 = get_string_lookup(node, "tim2", tim2_lookups); + panel.cntl = get_string_lookup(node, "cntl", cntl_lookups); + panel.caps = get_string_lookup(node, "caps", caps_lookups); + + return &panel; +} + +struct clcd_panel *clcdfb_get_panel(const char *name) +{ + struct device_node *node = NULL; + const char *mode; + struct clcd_panel *panel = NULL; + + do { + node = of_find_compatible_node(node, NULL, "panel"); + if (node) + if (of_property_read_string(node, "mode", &mode) == 0) + if (strcmp(mode, name) == 0) { + panel = getPanel(node); + panel->mode.name = name; + } + } while (node != NULL); + + return panel; +} + +#ifdef CONFIG_OF +static int clcdfb_dt_init(struct clcd_fb *fb) +{ + int err = 0; + struct device_node *node; + const char *mode; + dma_addr_t dma; + u32 use_dma; + const __be32 *prop; + int len, na, ns; + phys_addr_t fb_base, fb_size; + + node = fb->dev->dev.of_node; + if (!node) + return -ENODEV; + + na = of_n_addr_cells(node); + ns = of_n_size_cells(node); + + if (WARN_ON(of_property_read_string(node, "mode", &mode))) + return -ENODEV; + + fb->panel = clcdfb_get_panel(mode); + if (!fb->panel) + return -EINVAL; + fb->fb.fix.smem_len = fb->panel->mode.xres * fb->panel->mode.yres * 2; + + if (of_property_read_u32(node, "use_dma", &use_dma)) + use_dma = 0; + if (use_dma) { + fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, + fb->fb.fix.smem_len, &dma, GFP_KERNEL); + if (!fb->fb.screen_base) { + pr_err("CLCD: unable to map framebuffer\n"); + err = -ENOMEM; + } else + fb->fb.fix.smem_start = dma; + } else { + prop = of_get_property(node, "framebuffer", &len); + if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop))) + return -EINVAL; + fb_base = of_read_number(prop, na); + fb_size = of_read_number(prop + na, ns); + + fb->fb.fix.smem_start = fb_base; + fb->fb.screen_base = ioremap_wc(fb->fb.fix.smem_start, fb_size); + } + return err; +} +#endif /* CONFIG_OF */ + static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) { struct clcd_board *board = dev->dev.platform_data; struct clcd_fb *fb; int ret; +#ifdef CONFIG_OF + if (dev->dev.of_node) { + const __be32 *prop; + int len, na, ns; + phys_addr_t reg_base; + + na = of_n_addr_cells(dev->dev.of_node); + ns = of_n_size_cells(dev->dev.of_node); + + prop = of_get_property(dev->dev.of_node, "reg", &len); + if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop))) + return -EINVAL; + reg_base = of_read_number(prop, na); + + if (dev->res.start != reg_base) + return -EINVAL; + + if (!board) { + board = kzalloc(sizeof(struct clcd_board), GFP_KERNEL); + if (!board) + return -EINVAL; + board->name = "Device Tree CLCD PL111"; + board->caps = CLCD_CAP_5551 | CLCD_CAP_565; + board->check = clcdfb_check; + board->decode = clcdfb_decode; + board->setup = clcdfb_dt_init; + board->mmap = clcdfb_mmap_dma; + board->remove = clcdfb_remove_dma; + } + } +#endif /* CONFIG_OF */ + if (!board) return -EINVAL; -- cgit v1.2.3 From 95c8041c5018e75c58968f0ca2251482fe6b22d6 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Wed, 10 Oct 2012 13:27:25 +0100 Subject: amba-clcd: Remove check for 'reg' value in clcdfb_probe This check was attempting to ensure only one clcd device in the device-tree was probed, however the check fails in the valid case where the device is a child of another device and the 'reg' value is a offset from the start of that other device, not an absolute address. This occurs on vexpress with the motherboard clcd being a child of iofga. For now, we will just have to rely on there only being one display device specified in device-tree. Signed-off-by: Jon Medhurst --- drivers/video/amba-clcd.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 3cacf26f3e5..53af3d18a0c 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -768,21 +768,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) #ifdef CONFIG_OF if (dev->dev.of_node) { - const __be32 *prop; - int len, na, ns; - phys_addr_t reg_base; - - na = of_n_addr_cells(dev->dev.of_node); - ns = of_n_size_cells(dev->dev.of_node); - - prop = of_get_property(dev->dev.of_node, "reg", &len); - if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop))) - return -EINVAL; - reg_base = of_read_number(prop, na); - - if (dev->res.start != reg_base) - return -EINVAL; - if (!board) { board = kzalloc(sizeof(struct clcd_board), GFP_KERNEL); if (!board) -- cgit v1.2.3 From 8df3102afa56f6e0b8fdc6df4af0ac4d8436f9a6 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 4 Jan 2013 12:56:49 +0000 Subject: amba-clcd: Only use dma_alloc_writecombine() if the arch supports it This patch hides the dma_(alloc|free)_writecombine() calls behind macros to allow the amba-clcd.c to be used on architectures that do not provide this DMA API. With this patch, the *_writecombine() API is only used on ARM (AArch32). Signed-off-by: Catalin Marinas --- drivers/video/amba-clcd.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 53af3d18a0c..76b1e6bc5ee 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -33,6 +33,16 @@ #define to_clcd(info) container_of(info, struct clcd_fb, fb) +#ifdef CONFIG_ARM +#define clcdfb_dma_alloc dma_alloc_writecombine +#define clcdfb_dma_free dma_free_writecombine +#define clcdfb_dma_mmap dma_mmap_writecombine +#else +#define clcdfb_dma_alloc dma_alloc_coherent +#define clcdfb_dma_free dma_free_coherent +#define clcdfb_dma_mmap dma_mmap_coherent +#endif + /* This is limited to 16 characters when displayed by X startup */ static const char *clcd_name = "CLCD FB"; @@ -396,16 +406,19 @@ static int clcdfb_blank(int blank_mode, struct fb_info *info) } int clcdfb_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma) { - return dma_mmap_writecombine(&fb->dev->dev, vma, - fb->fb.screen_base, - fb->fb.fix.smem_start, - fb->fb.fix.smem_len); + return clcdfb_dma_mmap(&fb->dev->dev, vma, fb->fb.screen_base, + fb->fb.fix.smem_start, fb->fb.fix.smem_len); } void clcdfb_remove_dma(struct clcd_fb *fb) { - dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, - fb->fb.screen_base, fb->fb.fix.smem_start); + struct device_node *node = fb->dev->dev.of_node; + u32 use_dma = 0; + + of_property_read_u32(node, "use_dma", &use_dma); + if (use_dma) + clcdfb_dma_free(&fb->dev->dev, fb->fb.fix.smem_len, + fb->fb.screen_base, fb->fb.fix.smem_start); } static int clcdfb_mmap(struct fb_info *info, @@ -739,7 +752,7 @@ static int clcdfb_dt_init(struct clcd_fb *fb) if (of_property_read_u32(node, "use_dma", &use_dma)) use_dma = 0; if (use_dma) { - fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, + fb->fb.screen_base = clcdfb_dma_alloc(&fb->dev->dev, fb->fb.fix.smem_len, &dma, GFP_KERNEL); if (!fb->fb.screen_base) { pr_err("CLCD: unable to map framebuffer\n"); -- cgit v1.2.3 From 50ad0eb192d28ffaaac1a8c0ec97aa07bf9be645 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Mon, 28 Jan 2013 12:06:58 +0000 Subject: amba-clcd: separate ioremap framebuffer from DMA implementation The amba-clcd device can be configured to use either DMA or, when this feature is not available, an ioremapped frambuffer in static ram. In the case of the latter, we must take care not to pass ioremapped addresses to dma_common_mmap, since this expects only addresses from dma_mmap_coherent, which reside in the kernel linear mapping. This patch reworks the fb initialisation code so that either DMA or IO implementations of the mmap/remove functions are chosen as appropriate. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas --- drivers/video/amba-clcd.c | 84 +++++++++++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 76b1e6bc5ee..94a1998338d 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -404,21 +404,43 @@ static int clcdfb_blank(int blank_mode, struct fb_info *info) } return 0; } + int clcdfb_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma) { - return clcdfb_dma_mmap(&fb->dev->dev, vma, fb->fb.screen_base, - fb->fb.fix.smem_start, fb->fb.fix.smem_len); + return clcdfb_dma_mmap(&fb->dev->dev, vma, + fb->fb.screen_base, + fb->fb.fix.smem_start, + fb->fb.fix.smem_len); +} + +int clcdfb_mmap_io(struct clcd_fb *fb, struct vm_area_struct *vma) +{ + unsigned long user_count, count, pfn, off; + + user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; + count = PAGE_ALIGN(fb->fb.fix.smem_len) >> PAGE_SHIFT; + pfn = fb->fb.fix.smem_start >> PAGE_SHIFT; + off = vma->vm_pgoff; + + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + + if (off < count && user_count <= (count - off)) + return remap_pfn_range(vma, vma->vm_start, pfn + off, + user_count << PAGE_SHIFT, + vma->vm_page_prot); + + return -ENXIO; } void clcdfb_remove_dma(struct clcd_fb *fb) { - struct device_node *node = fb->dev->dev.of_node; - u32 use_dma = 0; + clcdfb_dma_free(&fb->dev->dev, fb->fb.fix.smem_len, + fb->fb.screen_base, fb->fb.fix.smem_start); +} - of_property_read_u32(node, "use_dma", &use_dma); - if (use_dma) - clcdfb_dma_free(&fb->dev->dev, fb->fb.fix.smem_len, - fb->fb.screen_base, fb->fb.fix.smem_start); +void clcdfb_remove_io(struct clcd_fb *fb) +{ + iounmap(fb->fb.screen_base); } static int clcdfb_mmap(struct fb_info *info, @@ -749,26 +771,40 @@ static int clcdfb_dt_init(struct clcd_fb *fb) return -EINVAL; fb->fb.fix.smem_len = fb->panel->mode.xres * fb->panel->mode.yres * 2; + fb->board->name = "Device Tree CLCD PL111"; + fb->board->caps = CLCD_CAP_5551 | CLCD_CAP_565; + fb->board->check = clcdfb_check; + fb->board->decode = clcdfb_decode; + if (of_property_read_u32(node, "use_dma", &use_dma)) use_dma = 0; + if (use_dma) { fb->fb.screen_base = clcdfb_dma_alloc(&fb->dev->dev, - fb->fb.fix.smem_len, &dma, GFP_KERNEL); + fb->fb.fix.smem_len, + &dma, GFP_KERNEL); if (!fb->fb.screen_base) { pr_err("CLCD: unable to map framebuffer\n"); - err = -ENOMEM; - } else - fb->fb.fix.smem_start = dma; + return -ENOMEM; + } + + fb->fb.fix.smem_start = dma; + fb->board->mmap = clcdfb_mmap_dma; + fb->board->remove = clcdfb_remove_dma; } else { prop = of_get_property(node, "framebuffer", &len); if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop))) return -EINVAL; + fb_base = of_read_number(prop, na); fb_size = of_read_number(prop + na, ns); - fb->fb.fix.smem_start = fb_base; - fb->fb.screen_base = ioremap_wc(fb->fb.fix.smem_start, fb_size); + fb->fb.fix.smem_start = fb_base; + fb->fb.screen_base = ioremap_wc(fb_base, fb_size); + fb->board->mmap = clcdfb_mmap_io; + fb->board->remove = clcdfb_remove_io; } + return err; } #endif /* CONFIG_OF */ @@ -779,25 +815,17 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) struct clcd_fb *fb; int ret; + if (!board) { #ifdef CONFIG_OF - if (dev->dev.of_node) { - if (!board) { + if (dev->dev.of_node) { board = kzalloc(sizeof(struct clcd_board), GFP_KERNEL); if (!board) - return -EINVAL; - board->name = "Device Tree CLCD PL111"; - board->caps = CLCD_CAP_5551 | CLCD_CAP_565; - board->check = clcdfb_check; - board->decode = clcdfb_decode; + return -ENOMEM; board->setup = clcdfb_dt_init; - board->mmap = clcdfb_mmap_dma; - board->remove = clcdfb_remove_dma; - } + } else +#endif + return -EINVAL; } -#endif /* CONFIG_OF */ - - if (!board) - return -EINVAL; ret = amba_request_regions(dev, NULL); if (ret) { -- cgit v1.2.3 From c0ac923b5e9addc55f56fc777e1137c6d0a59c3c Mon Sep 17 00:00:00 2001 From: Ryan Harkin Date: Thu, 26 Jul 2012 19:05:10 +0100 Subject: ARM: vexpress: configure CLCD driver device tree support for A9 CoreTile Configuration for the amba-clcd PL111 driver is added to the A9 CoreTile's DTS file. Configuration of the motherboard CLCD driver is disabled in the DTSI files to prevent duplicate CLCD drivers being registered. A generic set of CLCD panel descriptions has been split into its own DTSI file. Currently, only XVGA and VGA monitors are described. Signed-off-by: Ryan Harkin Signed-off-by: Jon Medhurst --- arch/arm/boot/dts/clcd-panels.dtsi | 52 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 1 + arch/arm/boot/dts/vexpress-v2m.dtsi | 1 + arch/arm/boot/dts/vexpress-v2p-ca9.dts | 4 +++ 4 files changed, 58 insertions(+) create mode 100644 arch/arm/boot/dts/clcd-panels.dtsi diff --git a/arch/arm/boot/dts/clcd-panels.dtsi b/arch/arm/boot/dts/clcd-panels.dtsi new file mode 100644 index 00000000000..0b0ff6ead4b --- /dev/null +++ b/arch/arm/boot/dts/clcd-panels.dtsi @@ -0,0 +1,52 @@ +/* + * ARM Ltd. Versatile Express + * + */ + +/ { + panels { + panel@0 { + compatible = "panel"; + mode = "VGA"; + refresh = <60>; + xres = <640>; + yres = <480>; + pixclock = <39721>; + left_margin = <40>; + right_margin = <24>; + upper_margin = <32>; + lower_margin = <11>; + hsync_len = <96>; + vsync_len = <2>; + sync = <0>; + vmode = "FB_VMODE_NONINTERLACED"; + + tim2 = "TIM2_BCD", "TIM2_IPC"; + cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)"; + caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888"; + bpp = <16>; + }; + + panel@1 { + compatible = "panel"; + mode = "XVGA"; + refresh = <60>; + xres = <1024>; + yres = <768>; + pixclock = <15748>; + left_margin = <152>; + right_margin = <48>; + upper_margin = <23>; + lower_margin = <3>; + hsync_len = <104>; + vsync_len = <4>; + sync = <0>; + vmode = "FB_VMODE_NONINTERLACED"; + + tim2 = "TIM2_BCD", "TIM2_IPC"; + cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)"; + caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888"; + bpp = <16>; + }; + }; +}; diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi index ac870fb3fa0..9584232ee6b 100644 --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi @@ -228,6 +228,7 @@ }; clcd@1f0000 { + status = "disabled"; compatible = "arm,pl111", "arm,primecell"; reg = <0x1f0000 0x1000>; interrupts = <14>; diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi index f1420368355..6593398c11a 100644 --- a/arch/arm/boot/dts/vexpress-v2m.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi @@ -227,6 +227,7 @@ }; clcd@1f000 { + status = "disabled"; compatible = "arm,pl111", "arm,primecell"; reg = <0x1f000 0x1000>; interrupts = <14>; diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts index 62d9b225dcc..f83706bd3f9 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts @@ -9,6 +9,8 @@ /dts-v1/; +/include/ "clcd-panels.dtsi" + / { model = "V2P-CA9"; arm,hbi = <0x191>; @@ -73,6 +75,8 @@ interrupts = <0 44 4>; clocks = <&oscclk1>, <&oscclk2>; clock-names = "clcdclk", "apb_pclk"; + mode = "XVGA"; + use_dma = <1>; }; memory-controller@100e0000 { -- cgit v1.2.3