summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-31 00:16:35 +0300
committerTom Rini <trini@konsulko.com>2022-10-31 00:16:35 +0300
commit218e2c45af83f2cb7b1374b9023b4ced6eb0bb77 (patch)
treee78dcbb902ebca32f6048b74e67414419dc4edab /include
parent6f02819cceb19c334f1dbd6eccefb4ccfae319f9 (diff)
parentb86986c7b314f1378ca5be8df49310a6ce7302f8 (diff)
downloadu-boot-218e2c45af83f2cb7b1374b9023b4ced6eb0bb77.tar.xz
Merge tag 'video-20221030' of https://source.denx.de/u-boot/custodians/u-boot-video
- fix [hv]sync active vs back porch in dw_mipi_dsi - simplefb rotation support - support splash as raw image from MMC - enhancements to Truetype console (multiple fonts and sizes) - drop old LCD support
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/global_data.h4
-rw-r--r--include/configs/at91sam9261ek.h7
-rw-r--r--include/configs/at91sam9263ek.h7
-rw-r--r--include/configs/at91sam9m10g45ek.h5
-rw-r--r--include/configs/at91sam9n12ek.h5
-rw-r--r--include/configs/at91sam9rlek.h7
-rw-r--r--include/configs/brxre1.h4
-rw-r--r--include/configs/colibri-imx6ull.h2
-rw-r--r--include/configs/ge_b1x5v2.h1
-rw-r--r--include/configs/ge_bx50v3.h1
-rw-r--r--include/configs/gw_ventana.h1
-rw-r--r--include/configs/imxrt1050-evk.h2
-rw-r--r--include/configs/m53menlo.h5
-rw-r--r--include/configs/meson64.h2
-rw-r--r--include/configs/mx23evk.h11
-rw-r--r--include/configs/mx28evk.h7
-rw-r--r--include/configs/nitrogen6x.h1
-rw-r--r--include/configs/nyan-big.h5
-rw-r--r--include/configs/pico-imx6ul.h4
-rw-r--r--include/configs/pm9261.h7
-rw-r--r--include/configs/pm9263.h6
-rw-r--r--include/configs/pxm2.h5
-rw-r--r--include/configs/s5pc210_universal.h12
-rw-r--r--include/configs/sama5d3xek.h3
-rw-r--r--include/configs/sunxi-common.h2
-rw-r--r--include/configs/tegra-common-post.h12
-rw-r--r--include/configs/tegra20-common.h5
-rw-r--r--include/configs/trats.h9
-rw-r--r--include/configs/trats2.h9
-rw-r--r--include/env_callback.h7
-rw-r--r--include/lcd.h218
-rw-r--r--include/ld9040.h15
-rw-r--r--include/libtizen.h4
-rw-r--r--include/samsung/misc.h15
-rw-r--r--include/test/suites.h1
-rw-r--r--include/video.h84
-rw-r--r--include/video_console.h64
37 files changed, 125 insertions, 434 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 2d55fe2ac0..c4b2bb4497 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -68,7 +68,7 @@ struct global_data {
* @mem_clk: memory clock rate in Hz
*/
unsigned long mem_clk;
-#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
+#if defined(CONFIG_VIDEO)
/**
* @fb_base: base address of frame buffer memory
*/
@@ -359,7 +359,7 @@ struct global_data {
*/
struct membuff console_in;
#endif
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
/**
* @video_top: top of video frame buffer area
*/
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 12726c10bd..5576a5ffbe 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -16,13 +16,6 @@
#include <asm/hardware.h>
-/*
- * Hardware drivers
- */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define CONFIG_SYS_SDRAM_BASE 0x20000000
#define CONFIG_SYS_SDRAM_SIZE 0x04000000
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 8c6d1cd1d9..02d04d0776 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -22,13 +22,6 @@
#define CONFIG_SYS_AT91_MAIN_CLOCK 16367660 /* 16.367 MHz crystal */
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
-/*
- * Hardware drivers
- */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
#define CONFIG_SYS_SDRAM_SIZE 0x04000000
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index b55d2e3925..2d257c4983 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -14,11 +14,6 @@
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
#define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
-/* general purpose I/O */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define CONFIG_SYS_SDRAM_BASE 0x70000000
#define CONFIG_SYS_SDRAM_SIZE 0x08000000
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 4d492988eb..f2ca4f3d0b 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -14,11 +14,6 @@
#define CONFIG_SYS_AT91_MAIN_CLOCK 16000000 /* main clock xtal */
/* Misc CPU related */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR16
-#define LCD_OUTPUT_BPP 24
-
#define CONFIG_SYS_SDRAM_BASE 0x20000000
#define CONFIG_SYS_SDRAM_SIZE 0x08000000
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index e418edddfb..bc687fc44d 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -16,13 +16,6 @@
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
#define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* main clock xtal */
-/*
- * Hardware drivers
- */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
#define CONFIG_SYS_SDRAM_SIZE 0x04000000
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 4d91a776ba..410b3e641c 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -14,10 +14,6 @@
#include <configs/bur_cfg_common.h>
#include <configs/bur_am335x_common.h>
#include <linux/stringify.h>
-/* ------------------------------------------------------------------------- */
-#define LCD_BPP LCD_COLOR32
-
-/* memory */
/* Clock Defines */
#define V_OSCK 26000000 /* Clock output from T2 */
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index 79b1284cc7..321edabe98 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -137,7 +137,7 @@
/* USB Device Firmware Update support */
#define DFU_DEFAULT_POLL_TIMEOUT 300
-#if defined(CONFIG_DM_VIDEO)
+#if defined(CONFIG_VIDEO)
#define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
#endif
diff --git a/include/configs/ge_b1x5v2.h b/include/configs/ge_b1x5v2.h
index 95ba20c686..176f80bb09 100644
--- a/include/configs/ge_b1x5v2.h
+++ b/include/configs/ge_b1x5v2.h
@@ -34,7 +34,6 @@
#define CONFIG_USBD_HS
/* Video */
-#define CONFIG_HIDE_LOGO_VERSION
#define CONFIG_IMX_VIDEO_SKIP
/* Memory */
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index ad00769bde..ab8c66f263 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -103,7 +103,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 3
/* Framebuffer */
-#define CONFIG_HIDE_LOGO_VERSION
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 82076ff74f..bba64af2c9 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -47,7 +47,6 @@
/* Framebuffer and LCD */
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
-#define CONFIG_HIDE_LOGO_VERSION /* Custom config to hide U-boot version */
/* Miscellaneous configurable options */
#define CONFIG_HWCONFIG
diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h
index e36718dc82..d1a7dab37c 100644
--- a/include/configs/imxrt1050-evk.h
+++ b/include/configs/imxrt1050-evk.h
@@ -18,7 +18,7 @@
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
DMAMEM_SZ_ALL)
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
#define CONFIG_EXTRA_ENV_SETTINGS \
"stdin=serial\0" \
"stdout=serial,vidconsole\0" \
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 0499e63351..03e1619c86 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -78,11 +78,6 @@
#define CONFIG_MXC_USB_FLAGS 0
#endif
-/*
- * LCD
- */
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)
-
/* LVDS display */
#define CONFIG_SYS_LDB_CLOCK 33260000
#define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/meson64.h b/include/configs/meson64.h
index 40803ee9da..0c41df2a95 100644
--- a/include/configs/meson64.h
+++ b/include/configs/meson64.h
@@ -17,7 +17,7 @@
#endif
/* For splashscreen */
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
#define STDOUT_CFG "vidconsole,serial"
#else
#define STDOUT_CFG "serial"
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index 3507e83fb3..4c0531212e 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -15,17 +15,6 @@
#define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
-/* Environment */
-
-/* Environment is in MMC */
-
-/* USB */
-
-/* Framebuffer support */
-#ifdef CONFIG_DM_VIDEO
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10)
-#endif
-
/* Extra Environments */
#define CONFIG_EXTRA_ENV_SETTINGS \
"update_sd_firmware_filename=u-boot.sd\0" \
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 9f3ac48b70..140f5e98c5 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -22,13 +22,6 @@
#define CONFIG_RTC_MXS
#endif
-/* USB */
-
-/* Framebuffer support */
-#ifdef CONFIG_DM_VIDEO
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10)
-#endif
-
/* Extra Environment */
#define CONFIG_EXTRA_ENV_SETTINGS \
"ubifs_file=filesystem.ubifs\0" \
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 26e6de2d2c..d507f8f11c 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -27,7 +27,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* Framebuffer and LCD */
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h
index bc5754566b..c59e103243 100644
--- a/include/configs/nyan-big.h
+++ b/include/configs/nyan-big.h
@@ -18,11 +18,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-/* Environment in eMMC, at the end of 2nd "boot sector" */
-
-/* Align LCD to 1MB boundary */
-#define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE
-
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 2ac48c40c9..c0d837d7c5 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -102,9 +102,7 @@
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
-/* environment organization */
-
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
#define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
#endif
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 797e44f844..7f9442acbb 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -124,13 +124,6 @@
AT91_WDT_MR_WDDIS | \
AT91_WDT_MR_WDD(0xfff))
-/*
- * Hardware drivers
- */
-
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define PHYS_SDRAM 0x20000000
#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index bb5bd8b606..00d159f03c 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -136,12 +136,6 @@
AT91_WDT_MR_WDDIS | \
AT91_WDT_MR_WDD(0xfff))
-/*
- * Hardware drivers
- */
-/* LCD */
-#define LCD_BPP LCD_COLOR8
-
/* SDRAM */
#define PHYS_SDRAM 0x20000000
#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h
index 4f24b13f50..586a7edcbb 100644
--- a/include/configs/pxm2.h
+++ b/include/configs/pxm2.h
@@ -18,11 +18,6 @@
#define DDR_IOCTRL_VAL 0x18b
#define DDR_PLL_FREQ 266
-#define BOARD_DFU_BUTTON_GPIO 59
-#define BOARD_LCD_POWER 111
-#define BOARD_BACK_LIGHT 112
-#define BOARD_TOUCH_POWER 57
-
#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
"button_dfu0=59\0" \
"led0=117,0,1\0" \
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 137537d65f..668b52600e 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -98,9 +98,6 @@ int universal_spi_read(void);
/* Common misc for Samsung */
#define CONFIG_MISC_COMMON
-/* Download menu - Samsung common */
-#define CONFIG_LCD_MENU
-
/* Download menu - definitions for check keys */
#ifndef __ASSEMBLY__
@@ -114,13 +111,4 @@ int universal_spi_read(void);
#define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21
#endif /* __ASSEMBLY__ */
-/* LCD console */
-#define LCD_BPP LCD_COLOR16
-
-/*
- * LCD Settings
- */
-#define CONFIG_LD9040
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
-
#endif /* __CONFIG_H */
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index b48e40bee4..ccb3842c1c 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -25,9 +25,6 @@
*/
#define ATMEL_PMC_UHP (1 << 6)
-/* board specific (not enough SRAM) */
-#define CONFIG_SAMA5D3_LCD_BASE 0x23E00000
-
/* NOR flash */
#ifdef CONFIG_MTD_NOR_FLASH
#define CONFIG_SYS_FLASH_BASE 0x10000000
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index fe90d55bd4..12666b7818 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -301,7 +301,7 @@
"stdin=serial\0"
#endif
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
#define CONSOLE_STDOUT_SETTINGS \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index c8f9d7cb17..4e20e1d198 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -37,13 +37,7 @@
#define STDIN_KBD_USB ""
#endif
-#ifdef CONFIG_LCD
-#define STDOUT_LCD ",lcd"
-#else
-#define STDOUT_LCD ""
-#endif
-
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
#define STDOUT_VIDEO ",vidconsole"
#else
#define STDOUT_VIDEO ""
@@ -57,8 +51,8 @@
#define TEGRA_DEVICE_SETTINGS \
"stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
- "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
- "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
+ "stdout=serial" STDOUT_VIDEO "\0" \
+ "stderr=serial" STDOUT_VIDEO "\0" \
""
#ifndef BOARD_EXTRA_ENV_SETTINGS
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h
index 71867bb6ba..617bfb2197 100644
--- a/include/configs/tegra20-common.h
+++ b/include/configs/tegra20-common.h
@@ -54,11 +54,6 @@
"fdt_addr_r=0x03000000\0" \
"ramdisk_addr_r=0x03100000\0"
-/* Defines for SPL */
-
-/* Align LCD to 1MB boundary */
-#define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE
-
#ifdef CONFIG_TEGRA_LP0
#define TEGRA_LP0_ADDR 0x1C406000
#define TEGRA_LP0_SIZE 0x2000
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 530b413d5b..ca31868778 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -128,9 +128,6 @@
/* Common misc for Samsung */
#define CONFIG_MISC_COMMON
-/* Download menu - Samsung common */
-#define CONFIG_LCD_MENU
-
/* Download menu - definitions for check keys */
#ifndef __ASSEMBLY__
@@ -144,10 +141,4 @@
#define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21
#endif /* __ASSEMBLY__ */
-/* LCD console */
-#define LCD_BPP LCD_COLOR16
-
-/* LCD */
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
-
#endif /* __CONFIG_H */
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 06c1fcd23e..f324ea7ebe 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -118,9 +118,6 @@
/* Common misc for Samsung */
#define CONFIG_MISC_COMMON
-/* Download menu - Samsung common */
-#define CONFIG_LCD_MENU
-
/* Download menu - definitions for check keys */
#ifndef __ASSEMBLY__
@@ -134,10 +131,4 @@
#define KEY_VOL_DOWN_GPIO EXYNOS4X12_GPIO_X33
#endif /* __ASSEMBLY__ */
-/* LCD console */
-#define LCD_BPP LCD_COLOR16
-
-/* LCD */
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
-
#endif /* __CONFIG_H */
diff --git a/include/env_callback.h b/include/env_callback.h
index d5d2b2fcad..1eae0efca2 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -24,12 +24,6 @@
#define SILENT_CALLBACK
#endif
-#ifdef CONFIG_SPLASHIMAGE_GUARD
-#define SPLASHIMAGE_CALLBACK "splashimage:splashimage,"
-#else
-#define SPLASHIMAGE_CALLBACK
-#endif
-
#ifdef CONFIG_REGEX
#define ENV_DOT_ESCAPE "\\"
#else
@@ -74,7 +68,6 @@
BOOTSTD_CALLBACK \
"loadaddr:loadaddr," \
SILENT_CALLBACK \
- SPLASHIMAGE_CALLBACK \
"stdin:console,stdout:console,stderr:console," \
"serial#:serialno," \
CONFIG_ENV_CALLBACK_LIST_STATIC
diff --git a/include/lcd.h b/include/lcd.h
deleted file mode 100644
index 4f18069278..0000000000
--- a/include/lcd.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * MPC823 and PXA LCD Controller
- *
- * Modeled after video interface by Paolo Scaffardi
- *
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- */
-
-#ifndef _LCD_H_
-#define _LCD_H_
-#include <lcd_console.h>
-#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
-#include <bmp_layout.h>
-#include <asm/byteorder.h>
-#endif
-
-int bmp_display(ulong addr, int x, int y);
-struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
- void **alloc_addr);
-
-#ifndef CONFIG_DM_VIDEO
-
-extern char lcd_is_enabled;
-extern int lcd_line_length;
-extern struct vidinfo panel_info;
-
-void lcd_ctrl_init(void *lcdbase);
-void lcd_enable(void);
-void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue);
-ulong lcd_setmem(ulong addr);
-
-/**
- * Set whether we need to flush the dcache when changing the LCD image. This
- * defaults to off.
- *
- * @param flush non-zero to flush cache after update, 0 to skip
- */
-void lcd_set_flush_dcache(int flush);
-
-#if defined(CONFIG_ATMEL_LCD) || defined(CONFIG_ATMEL_HLCD)
-#include <atmel_lcd.h>
-#elif defined(CONFIG_EXYNOS_FB)
-#include <exynos_lcd.h>
-#else
-typedef struct vidinfo {
- ushort vl_col; /* Number of columns (i.e. 160) */
- ushort vl_row; /* Number of rows (i.e. 100) */
- ushort vl_rot; /* Rotation of Display (0, 1, 2, 3) */
- u_char vl_bpix; /* Bits per pixel, 0 = 1 */
- ushort *cmap; /* Pointer to the colormap */
- void *priv; /* Pointer to driver-specific data */
-} vidinfo_t;
-
-static __maybe_unused ushort *configuration_get_cmap(void)
-{
- return panel_info.cmap;
-}
-#endif
-
-ushort *configuration_get_cmap(void);
-
-extern vidinfo_t panel_info;
-
-void lcd_putc(const char c);
-void lcd_puts(const char *s);
-void lcd_printf(const char *fmt, ...);
-void lcd_clear(void);
-int lcd_display_bitmap(ulong bmp_image, int x, int y);
-
-/**
- * Get the width of the LCD in pixels
- *
- * Return: width of LCD in pixels
- */
-int lcd_get_pixel_width(void);
-
-/**
- * Get the height of the LCD in pixels
- *
- * Return: height of LCD in pixels
- */
-int lcd_get_pixel_height(void);
-
-/**
- * Get the number of text lines/rows on the LCD
- *
- * Return: number of rows
- */
-int lcd_get_screen_rows(void);
-
-/**
- * Get the number of text columns on the LCD
- *
- * Return: number of columns
- */
-int lcd_get_screen_columns(void);
-
-/**
- * Get the background color of the LCD
- *
- * Return: background color value
- */
-int lcd_getbgcolor(void);
-
-/**
- * Get the foreground color of the LCD
- *
- * Return: foreground color value
- */
-int lcd_getfgcolor(void);
-
-/**
- * Set the position of the text cursor
- *
- * @param col Column to place cursor (0 = left side)
- * @param row Row to place cursor (0 = top line)
- */
-void lcd_position_cursor(unsigned col, unsigned row);
-
-/* Allow boards to customize the information displayed */
-void lcd_show_board_info(void);
-
-/* Return the size of the LCD frame buffer, and the line length */
-int lcd_get_size(int *line_length);
-
-/* Update the LCD / flush the cache */
-void lcd_sync(void);
-
-/*
- * Information about displays we are using. This is for configuring
- * the LCD controller and memory allocation. Someone has to know what
- * is connected, as we can't autodetect anything.
- */
-#define CONFIG_SYS_HIGH 0 /* Pins are active high */
-#define CONFIG_SYS_LOW 1 /* Pins are active low */
-
-#define LCD_MONOCHROME 0
-#define LCD_COLOR2 1
-#define LCD_COLOR4 2
-#define LCD_COLOR8 3
-#define LCD_COLOR16 4
-#define LCD_COLOR32 5
-
-#if defined(CONFIG_LCD_INFO_BELOW_LOGO)
-#define LCD_INFO_X 0
-#define LCD_INFO_Y (BMP_LOGO_HEIGHT + VIDEO_FONT_HEIGHT)
-#elif defined(CONFIG_LCD_LOGO)
-#define LCD_INFO_X (BMP_LOGO_WIDTH + 4 * VIDEO_FONT_WIDTH)
-#define LCD_INFO_Y VIDEO_FONT_HEIGHT
-#else
-#define LCD_INFO_X VIDEO_FONT_WIDTH
-#define LCD_INFO_Y VIDEO_FONT_HEIGHT
-#endif
-
-/* Default to 8bpp if bit depth not specified */
-#ifndef LCD_BPP
-#define LCD_BPP LCD_COLOR8
-#endif
-
-#ifndef LCD_DF
-#define LCD_DF 1
-#endif
-
-/* Calculate nr. of bits per pixel and nr. of colors */
-#define NBITS(bit_code) (1 << (bit_code))
-#define NCOLORS(bit_code) (1 << NBITS(bit_code))
-
-#if LCD_BPP == LCD_COLOR8
-# define CONSOLE_COLOR_BLACK 0
-# define CONSOLE_COLOR_RED 1
-# define CONSOLE_COLOR_GREEN 2
-# define CONSOLE_COLOR_YELLOW 3
-# define CONSOLE_COLOR_BLUE 4
-# define CONSOLE_COLOR_MAGENTA 5
-# define CONSOLE_COLOR_CYAN 6
-# define CONSOLE_COLOR_GREY 14
-# define CONSOLE_COLOR_WHITE 15 /* Must remain last / highest */
-#elif LCD_BPP == LCD_COLOR32
-#define CONSOLE_COLOR_RED 0x00ff0000
-#define CONSOLE_COLOR_GREEN 0x0000ff00
-#define CONSOLE_COLOR_YELLOW 0x00ffff00
-#define CONSOLE_COLOR_BLUE 0x000000ff
-#define CONSOLE_COLOR_MAGENTA 0x00ff00ff
-#define CONSOLE_COLOR_CYAN 0x0000ffff
-#define CONSOLE_COLOR_GREY 0x00aaaaaa
-#define CONSOLE_COLOR_BLACK 0x00000000
-#define CONSOLE_COLOR_WHITE 0x00ffffff /* Must remain last / highest */
-#define NBYTES(bit_code) (NBITS(bit_code) >> 3)
-#else /* 16bpp color definitions */
-# define CONSOLE_COLOR_BLACK 0x0000
-# define CONSOLE_COLOR_RED 0xF800
-# define CONSOLE_COLOR_GREEN 0x07E0
-# define CONSOLE_COLOR_YELLOW 0xFFE0
-# define CONSOLE_COLOR_BLUE 0x001F
-# define CONSOLE_COLOR_MAGENTA 0xF81F
-# define CONSOLE_COLOR_CYAN 0x07FF
-# define CONSOLE_COLOR_GREY 0xC618
-# define CONSOLE_COLOR_WHITE 0xffff /* Must remain last / highest */
-#endif /* color definitions */
-
-#if LCD_BPP == LCD_COLOR16
-#define fbptr_t ushort
-#elif LCD_BPP == LCD_COLOR32
-#define fbptr_t u32
-#else
-#define fbptr_t uchar
-#endif
-
-#ifndef PAGE_SIZE
-#define PAGE_SIZE 4096
-#endif
-
-#endif /* !CONFIG_DM_VIDEO */
-
-#endif /* _LCD_H_ */
diff --git a/include/ld9040.h b/include/ld9040.h
deleted file mode 100644
index 58413d0a3d..0000000000
--- a/include/ld9040.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * ld9040 AMOLED LCD panel driver.
- *
- * Copyright (C) 2012 Samsung Electronics
- * Donghwa Lee <dh09.lee@samsung.com>
- */
-
-#ifndef __LD9040_H_
-#define __LD9040_H_
-
-void ld9040_cfg_ldo(void);
-void ld9040_enable_ldo(unsigned int onoff);
-
-#endif /* __LD9040_H_ */
diff --git a/include/libtizen.h b/include/libtizen.h
index 655d4cb28c..15e01454b9 100644
--- a/include/libtizen.h
+++ b/include/libtizen.h
@@ -9,8 +9,4 @@
#define HD_RESOLUTION 0
-#ifdef CONFIG_LCD
-void get_tizen_logo_info(vidinfo_t *vid);
-#endif
-
#endif /* _LIBTIZEN_H_ */
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index 4ff28a1df0..89546a1cbc 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -9,21 +9,6 @@ u32 get_board_rev(void);
void set_board_info(void);
#endif
-#ifdef CONFIG_LCD_MENU
-enum {
- BOOT_MODE_INFO,
- BOOT_MODE_THOR,
- BOOT_MODE_UMS,
- BOOT_MODE_DFU,
- BOOT_MODE_GPT,
- BOOT_MODE_ENV,
- BOOT_MODE_EXIT,
-};
-
-void keys_init(void);
-void check_boot_mode(void);
-#endif /* CONFIG_LCD_MENU */
-
#ifdef CONFIG_CMD_BMP
void draw_logo(void);
#endif
diff --git a/include/test/suites.h b/include/test/suites.h
index 44025ccecd..a01000e127 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -39,6 +39,7 @@ int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc,
int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_font(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
diff --git a/include/video.h b/include/video.h
index 43e2c89977..43f2e2c02f 100644
--- a/include/video.h
+++ b/include/video.h
@@ -131,6 +131,41 @@ struct video_ops {
#define video_get_ops(dev) ((struct video_ops *)(dev)->driver->ops)
+/** enum colour_idx - the 16 colors supported by consoles */
+enum colour_idx {
+ VID_BLACK = 0,
+ VID_RED,
+ VID_GREEN,
+ VID_BROWN,
+ VID_BLUE,
+ VID_MAGENTA,
+ VID_CYAN,
+ VID_LIGHT_GRAY,
+ VID_GRAY,
+ VID_LIGHT_RED,
+ VID_LIGHT_GREEN,
+ VID_YELLOW,
+ VID_LIGHT_BLUE,
+ VID_LIGHT_MAGENTA,
+ VID_LIGHT_CYAN,
+ VID_WHITE,
+
+ VID_COLOUR_COUNT
+};
+
+/**
+ * video_index_to_colour() - convert a color code to a pixel's internal
+ * representation
+ *
+ * The caller has to guarantee that the color index is less than
+ * VID_COLOR_COUNT.
+ *
+ * @priv private data of the console device
+ * @idx color index
+ * Return: color value
+ */
+u32 video_index_to_colour(struct video_priv *priv, unsigned int idx);
+
/**
* video_reserve() - Reserve frame-buffer memory for video devices
*
@@ -150,14 +185,23 @@ struct video_ops {
int video_reserve(ulong *addrp);
/**
- * video_clear() - Clear a device's frame buffer to background color.
+ * video_clear() - Clear a device's frame buffer to background colour.
*
* @dev: Device to clear
- * Return: 0
+ * Return: 0 on success
*/
int video_clear(struct udevice *dev);
/**
+ * video_fill() - Fill a device's frame buffer to a colour.
+ *
+ * @dev: Device to fill
+ * @colour: Colour to use, in the frame buffer's format
+ * Return: 0 on success
+ */
+int video_fill(struct udevice *dev, u32 colour);
+
+/**
* video_sync() - Sync a device's frame buffer with its hardware
*
* @vid: Device to sync
@@ -180,6 +224,17 @@ int video_sync(struct udevice *vid, bool force);
void video_sync_all(void);
/**
+ * video_bmp_get_info() - Get information about a bitmap image
+ *
+ * @bmp_image: Pointer to BMP image to check
+ * @widthp: Returns width in pixels
+ * @heightp: Returns height in pixels
+ * @bpixp: Returns log2 of bits per pixel
+ */
+void video_bmp_get_info(void *bmp_image, ulong *widthp, ulong *heightp,
+ uint *bpixp);
+
+/**
* video_bmp_display() - Display a BMP file
*
* @dev: Device to display the bitmap on
@@ -231,6 +286,15 @@ void video_set_flush_dcache(struct udevice *dev, bool flush);
*/
void video_set_default_colors(struct udevice *dev, bool invert);
+/**
+ * video_default_font_height() - Get the default font height
+ *
+ * @dev: video device
+ * Returns: Default font height in pixels, which depends on which console driver
+ * is in use
+ */
+int video_default_font_height(struct udevice *dev);
+
#ifdef CONFIG_VIDEO_COPY
/**
* vidconsole_sync_copy() - Sync back to the copy framebuffer
@@ -275,4 +339,20 @@ static inline int video_sync_copy_all(struct udevice *dev)
*/
bool video_is_active(void);
+/**
+ * video_get_u_boot_logo() - Get a pointer to the U-Boot logo
+ *
+ * Returns: Pointer to logo
+ */
+void *video_get_u_boot_logo(void);
+
+/*
+ * bmp_display() - Display BMP (bitmap) data located in memory
+ *
+ * @addr: address of the bmp data
+ * @x: Position of bitmap from the left side, in pixels
+ * @y: Position of bitmap from the top, in pixels
+ */
+int bmp_display(ulong addr, int x, int y);
+
#endif
diff --git a/include/video_console.h b/include/video_console.h
index 5921767fbf..d755eb73cf 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -15,30 +15,6 @@ struct video_priv;
#define VID_TO_PIXEL(x) ((x) / VID_FRAC_DIV)
#define VID_TO_POS(x) ((x) * VID_FRAC_DIV)
-/*
- * The 16 colors supported by the console
- */
-enum color_idx {
- VID_BLACK = 0,
- VID_RED,
- VID_GREEN,
- VID_BROWN,
- VID_BLUE,
- VID_MAGENTA,
- VID_CYAN,
- VID_LIGHT_GRAY,
- VID_GRAY,
- VID_LIGHT_RED,
- VID_LIGTH_GREEN,
- VID_YELLOW,
- VID_LIGHT_BLUE,
- VID_LIGHT_MAGENTA,
- VID_LIGHT_CYAN,
- VID_WHITE,
-
- VID_COLOR_COUNT
-};
-
/**
* struct vidconsole_priv - uclass-private data about a console device
*
@@ -244,17 +220,41 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col,
unsigned row);
/**
- * vid_console_color() - convert a color code to a pixel's internal
- * representation
+ * vidconsole_set_cursor_pos() - set cursor position
*
- * The caller has to guarantee that the color index is less than
- * VID_COLOR_COUNT.
+ * The cursor is set to the new position and the start-of-line information is
+ * updated to the same position, so that a newline will return to @x
+ *
+ * @dev: video console device to update
+ * @x: x position from left in pixels
+ * @y: y position from top in pixels
+ */
+void vidconsole_set_cursor_pos(struct udevice *dev, int x, int y);
+
+/**
+ * vidconsole_list_fonts() - List the available fonts
+ *
+ * This shows a list on the console
+ */
+void vidconsole_list_fonts(void);
+
+/**
+ * vidconsole_select_font() - Select a font to use
+ *
+ * @dev: vidconsole device
+ * @name: Font name
+ * @size: Size of the font (norminal pixel height) or 0 for default
+ */
+int vidconsole_select_font(struct udevice *dev, const char *name, uint size);
+
+/**
+ * vidconsole_get_font() - get the current font name and size
*
- * @priv private data of the console device
- * @idx color index
- * Return: color value
+ * @dev: vidconsole device
+ * @sizep: Place to put the font size (nominal height in pixels)
+ * Returns: Current font name
*/
-u32 vid_console_color(struct video_priv *priv, unsigned int idx);
+const char *vidconsole_get_font(struct udevice *dev, uint *sizep);
#ifdef CONFIG_VIDEO_COPY
/**