blob: fd28a70f4d72b9e5f8b44775463a735e10c0d1a5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Patrick Bruennba81b042016-11-04 11:57:02 +01002/*
3 * Copyright (C) 2015 Beckhoff Automation GmbH & Co. KG
4 * Patrick Bruenn <p.bruenn@beckhoff.com>
5 *
6 * Based on <u-boot>/board/freescale/mx53loco/mx53loco_video.c
7 * Copyright (C) 2012 Freescale Semiconductor, Inc.
Patrick Bruennba81b042016-11-04 11:57:02 +01008 */
9
Patrick Bruennba81b042016-11-04 11:57:02 +010010#include <asm/arch/iomux-mx53.h>
Steffen Dirkwinkel31736182019-04-17 13:57:17 +020011#include <asm/gpio.h>
12#include <asm/mach-imx/video.h>
Patrick Bruennba81b042016-11-04 11:57:02 +010013
14#define CX9020_DVI_PWD IMX_GPIO_NR(6, 1)
15
Steffen Dirkwinkel31736182019-04-17 13:57:17 +020016struct display_info_t const displays[] = {{
17 .bus = -1,
18 .addr = 0,
19 .pixfmt = IPU_PIX_FMT_RGB24,
20 .detect = NULL,
21 .enable = NULL,
22 .mode = {
23 .name = "DVI",
24 .refresh = 60,
25 .xres = 640,
26 .yres = 480,
27 .pixclock = 39721, /* picosecond (25.175 MHz) */
28 .left_margin = 40,
29 .right_margin = 60,
30 .upper_margin = 10,
31 .lower_margin = 10,
32 .hsync_len = 20,
33 .vsync_len = 10,
34 .sync = 0,
35 .vmode = FB_VMODE_NONINTERLACED
36} } };
37size_t display_count = ARRAY_SIZE(displays);
Patrick Bruennba81b042016-11-04 11:57:02 +010038
39void setup_iomux_lcd(void)
40{
41 /* Turn on DVI_PWD */
42 imx_iomux_v3_setup_pad(MX53_PAD_CSI0_DAT15__GPIO6_1);
Steffen Dirkwinkel098e9ef2019-04-17 13:57:14 +020043 gpio_request(CX9020_DVI_PWD, "CX9020_DVI_PWD");
Patrick Bruennba81b042016-11-04 11:57:02 +010044 gpio_direction_output(CX9020_DVI_PWD, 1);
45}