From patchwork Wed Apr 17 11:57:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: linux-kernel-dev X-Patchwork-Id: 1086930 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=beckhoff.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44kgp129vjz9s3q for ; Wed, 17 Apr 2019 22:02:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C3914C21E6A; Wed, 17 Apr 2019 12:01:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 84042C21ECF; Wed, 17 Apr 2019 11:57:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B35DBC21EC3; Wed, 17 Apr 2019 11:57:51 +0000 (UTC) Received: from Internet2.beckhoff.com (internet2.beckhoff.com [194.25.186.210]) by lists.denx.de (Postfix) with ESMTPS id EFDA0C21E73 for ; Wed, 17 Apr 2019 11:57:47 +0000 (UTC) Received: from std-laptop.beckhoff.com (172.17.66.103) by NT-Mail06.beckhoff.com (10.1.0.30) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 17 Apr 2019 13:57:46 +0200 From: To: Date: Wed, 17 Apr 2019 13:57:17 +0200 Message-ID: <20190417115719.22407-5-linux-kernel-dev@beckhoff.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190417115719.22407-1-linux-kernel-dev@beckhoff.com> References: <20190417115719.22407-1-linux-kernel-dev@beckhoff.com> MIME-Version: 1.0 X-Originating-IP: [172.17.66.103] X-OLX-Disclaimer: Done Cc: Tom Rini , u-boot@steffen.cc, Patrick Bruenn , s.dirkwinkel@beckhoff.com Subject: [U-Boot] [PATCH v1 4/6] dm: arm: imx: cx9020: migrate to dm_video X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Steffen Dirkwinkel Enable DM_VIDEO in config and don't overwrite console so it can be set from environment Acked-by: Patrick Bruenn Signed-off-by: Steffen Dirkwinkel --- board/beckhoff/mx53cx9020/Makefile | 2 +- board/beckhoff/mx53cx9020/mx53cx9020.c | 11 ----- board/beckhoff/mx53cx9020/mx53cx9020_video.c | 51 +++++++++----------- configs/mx53cx9020_defconfig | 5 +- include/configs/mx53cx9020.h | 6 +-- 5 files changed, 28 insertions(+), 47 deletions(-) diff --git a/board/beckhoff/mx53cx9020/Makefile b/board/beckhoff/mx53cx9020/Makefile index 423a5532ca6..7f15fc5746d 100644 --- a/board/beckhoff/mx53cx9020/Makefile +++ b/board/beckhoff/mx53cx9020/Makefile @@ -4,4 +4,4 @@ # Patrick Bruenn obj-y += mx53cx9020.o -obj-$(CONFIG_VIDEO) += mx53cx9020_video.o +obj-$(CONFIG_DM_VIDEO) += mx53cx9020_video.o diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c index 79ea4560283..fdef4477d9a 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -232,15 +230,6 @@ int board_early_init_f(void) return 0; } -/* - * Do not overwrite the console - * Use always serial for U-Boot console - */ -int overwrite_console(void) -{ - return 1; -} - int board_init(void) { gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; diff --git a/board/beckhoff/mx53cx9020/mx53cx9020_video.c b/board/beckhoff/mx53cx9020/mx53cx9020_video.c index 85f1cdae8af..bf472902562 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020_video.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020_video.c @@ -8,29 +8,34 @@ */ #include -#include -#include #include -#include -#include +#include +#include #define CX9020_DVI_PWD IMX_GPIO_NR(6, 1) -static struct fb_videomode const vga_640x480 = { - .name = "VESA_VGA_640x480", - .refresh = 60, - .xres = 640, - .yres = 480, - .pixclock = 39721, /* picosecond (25.175 MHz) */ - .left_margin = 40, - .right_margin = 60, - .upper_margin = 10, - .lower_margin = 10, - .hsync_len = 20, - .vsync_len = 10, - .sync = 0, - .vmode = FB_VMODE_NONINTERLACED -}; +struct display_info_t const displays[] = {{ + .bus = -1, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = NULL, + .enable = NULL, + .mode = { + .name = "DVI", + .refresh = 60, + .xres = 640, + .yres = 480, + .pixclock = 39721, /* picosecond (25.175 MHz) */ + .left_margin = 40, + .right_margin = 60, + .upper_margin = 10, + .lower_margin = 10, + .hsync_len = 20, + .vsync_len = 10, + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED +} } }; +size_t display_count = ARRAY_SIZE(displays); void setup_iomux_lcd(void) { @@ -39,11 +44,3 @@ void setup_iomux_lcd(void) gpio_request(CX9020_DVI_PWD, "CX9020_DVI_PWD"); gpio_direction_output(CX9020_DVI_PWD, 1); } - -int board_video_skip(void) -{ - const int ret = ipuv3_fb_init(&vga_640x480, 0, IPU_PIX_FMT_RGB24); - if (ret) - printf("VESA VG 640x480 cannot be configured: %d\n", ret); - return ret; -} diff --git a/configs/mx53cx9020_defconfig b/configs/mx53cx9020_defconfig index 93c113aba73..11b414f790e 100644 --- a/configs/mx53cx9020_defconfig +++ b/configs/mx53cx9020_defconfig @@ -33,6 +33,5 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y CONFIG_MXC_UART=y -CONFIG_VIDEO=y -CONFIG_VIDEO_IPUV3=y -# CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_IPUV3=y \ No newline at end of file diff --git a/include/configs/mx53cx9020.h b/include/configs/mx53cx9020.h index 1e3ea88b77a..66a0f319c45 100644 --- a/include/configs/mx53cx9020.h +++ b/include/configs/mx53cx9020.h @@ -160,11 +160,7 @@ #define CONFIG_SYS_MMC_ENV_DEV 0 /* Framebuffer and LCD */ +#define CONFIG_IMX_VIDEO_SKIP #define CONFIG_PREBOOT -#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE -#define CONFIG_VIDEO_BMP_RLE8 -#define CONFIG_SPLASH_SCREEN -#define CONFIG_BMP_16BPP -#define CONFIG_VIDEO_LOGO #endif /* __CONFIG_H */