blob: bf472902562227cdf32df17eac19071d5f3bb3ab [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Patrick Bruenn98d62e62016-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 Bruenn98d62e62016-11-04 11:57:02 +01008 */
9
10#include <common.h>
Patrick Bruenn98d62e62016-11-04 11:57:02 +010011#include <asm/arch/iomux-mx53.h>
Steffen Dirkwinkel29771c22019-04-17 13:57:17 +020012#include <asm/gpio.h>
13#include <asm/mach-imx/video.h>
Patrick Bruenn98d62e62016-11-04 11:57:02 +010014
15#define CX9020_DVI_PWD IMX_GPIO_NR(6, 1)
16
Steffen Dirkwinkel29771c22019-04-17 13:57:17 +020017struct display_info_t const displays[] = {{
18 .bus = -1,
19 .addr = 0,
20 .pixfmt = IPU_PIX_FMT_RGB24,
21 .detect = NULL,
22 .enable = NULL,
23 .mode = {
24 .name = "DVI",
25 .refresh = 60,
26 .xres = 640,
27 .yres = 480,
28 .pixclock = 39721, /* picosecond (25.175 MHz) */
29 .left_margin = 40,
30 .right_margin = 60,
31 .upper_margin = 10,
32 .lower_margin = 10,
33 .hsync_len = 20,
34 .vsync_len = 10,
35 .sync = 0,
36 .vmode = FB_VMODE_NONINTERLACED
37} } };
38size_t display_count = ARRAY_SIZE(displays);
Patrick Bruenn98d62e62016-11-04 11:57:02 +010039
40void setup_iomux_lcd(void)
41{
42 /* Turn on DVI_PWD */
43 imx_iomux_v3_setup_pad(MX53_PAD_CSI0_DAT15__GPIO6_1);
Steffen Dirkwinkel08cc54f2019-04-17 13:57:14 +020044 gpio_request(CX9020_DVI_PWD, "CX9020_DVI_PWD");
Patrick Bruenn98d62e62016-11-04 11:57:02 +010045 gpio_direction_output(CX9020_DVI_PWD, 1);
46}