Merge pull request #22 from brain-hackers/x1lcd

x1: enable LCD
This commit is contained in:
Takumi Sueda 2022-02-20 23:24:34 +09:00 committed by GitHub
commit 2696eb4b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 5 deletions

View File

@ -40,6 +40,16 @@
status = "okay";
};
simplefb: simplefb {
status = "okay";
reg = <0x62000000 0xc6c00>;
compatible = "simple-framebuffer";
width = <480>;
height = <854>;
format = "r5g6b5";
rot = <90>;
};
mipi_dsi_reset: mipi-dsi-reset {
compatible = "gpio-reset";
reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;

View File

@ -2,8 +2,6 @@ CONFIG_ARM=y
CONFIG_ARCH_MX7ULP=y
CONFIG_SYS_TEXT_BASE=0x60000000
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_MEMTEST_START=0x60000000
CONFIG_SYS_MEMTEST_END=0x66000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xC0000
CONFIG_DM_GPIO=y
@ -13,8 +11,10 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/sharp/pwh1/imximage.cfg"
CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_BMP=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
@ -36,3 +36,12 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
CONFIG_DM_VIDEO=y
CONFIG_CONSOLE_ROTATION=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_SIMPLE=y
CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASHIMAGE_GUARD=y
CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_SPLASH_SOURCE=y
CONFIG_BMP_16BPP=y

View File

@ -28,7 +28,7 @@ static int simple_video_probe(struct udevice *dev)
return -EINVAL;
}
debug("%s: base=%llx, size=%llu\n", __func__, base, size);
debug("%s: base=%lx, size=%lu\n", __func__, base, size);
/*
* TODO is there some way to reserve the framebuffer
@ -43,7 +43,11 @@ static int simple_video_probe(struct udevice *dev)
uc_priv->xsize = fdtdec_get_uint(blob, node, "width", 0);
uc_priv->ysize = fdtdec_get_uint(blob, node, "height", 0);
uc_priv->rot = 0;
uc_priv->rot = fdtdec_get_uint(blob, node, "rot", 0) / 90;
if (uc_priv->rot < 0 || uc_priv->rot > 3) {
printf("%s: invalid rot\n", __func__);
return -EINVAL;
}
format = fdt_getprop(blob, node, "format", NULL);
debug("%s: %dx%d@%s\n", __func__, uc_priv->xsize, uc_priv->ysize, format);

View File

@ -41,6 +41,8 @@
#define CONFIG_SYS_MAXARGS 256
#define CONFIG_VIDEO_FONT_6X11
/* Physical Memory Map */
#define PHYS_SDRAM 0x60000000
@ -52,11 +54,18 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
"splashsource=mmc_fs\0" \
"splashfile=splash.bmp\0" \
"splashimage=0x64000000\0" \
"splashpos=192,m\0" \
"console=ttyLP0\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
"fdt_file=imx7ulp-pwh1.dtb\0" \
"fdt_addr=0x63000000\0" \
"stdin=serial\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0" \
"boot_fdt=try\0" \
"earlycon=lpuart32,0x402D0010\0" \
"ip_dyn=yes\0" \

View File

@ -16,7 +16,7 @@
#define VIDEO_FONT_HEIGHT 11
#define VIDEO_FONT_SIZE (VIDEO_FONT_CHARS * VIDEO_FONT_HEIGHT)
static unsigned char video_fontdata[VIDEO_FONT_SIZE] = {
static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = {
/* 0 0x00 '^@' */
0x00, /* 00000000 */

BIN
tools/logos/pwh1.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB