public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 14/14] colibri-imx7: fix splash logo drawing
Date: Wed, 15 Jul 2020 13:31:05 +0300	[thread overview]
Message-ID: <20200715103105.8622-15-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20200715103105.8622-1-igor.opaniuk@gmail.com>

From: Igor Opaniuk <igor.opaniuk@toradex.com>

1. Configure white on black for video console.
2. Enable printing bmp logo during late board init stage.
3. Use iomux configuration from device tree.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

(no changes since v1)

 board/toradex/colibri_imx7/colibri_imx7.c | 44 +++++++----------------
 configs/colibri_imx7_defconfig            |  2 ++
 configs/colibri_imx7_emmc_defconfig       |  2 ++
 3 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 8df925dacf..f585260586 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -100,32 +100,7 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
-#ifdef CONFIG_VIDEO_MXS
-static iomux_v3_cfg_t const lcd_pads[] = {
-	MX7D_PAD_LCD_CLK__LCD_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_ENABLE__LCD_ENABLE | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_HSYNC__LCD_HSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_VSYNC__LCD_VSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA00__LCD_DATA0 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA01__LCD_DATA1 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA02__LCD_DATA2 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA03__LCD_DATA3 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA04__LCD_DATA4 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA05__LCD_DATA5 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA06__LCD_DATA6 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA07__LCD_DATA7 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA08__LCD_DATA8 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA09__LCD_DATA9 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA10__LCD_DATA10 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA11__LCD_DATA11 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA12__LCD_DATA12 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA13__LCD_DATA13 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA14__LCD_DATA14 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA15__LCD_DATA15 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA16__LCD_DATA16 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-	MX7D_PAD_LCD_DATA17__LCD_DATA17 | MUX_PAD_CTRL(LCD_PAD_CTRL),
-};
-
+#ifdef CONFIG_DM_VIDEO
 static iomux_v3_cfg_t const backlight_pads[] = {
 	/* Backlight On */
 	MX7D_PAD_SD1_WP__GPIO5_IO1 | MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -139,8 +114,6 @@ static iomux_v3_cfg_t const backlight_pads[] = {
 
 static int setup_lcd(void)
 {
-	imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads));
-
 	imx_iomux_v3_setup_multiple_pads(backlight_pads, ARRAY_SIZE(backlight_pads));
 
 	/* Set BL_ON */
@@ -215,10 +188,6 @@ int board_init(void)
 	setup_gpmi_nand();
 #endif
 
-#ifdef CONFIG_VIDEO_MXS
-	setup_lcd();
-#endif
-
 #ifdef CONFIG_USB_EHCI_MX7
 	imx_iomux_v3_setup_multiple_pads(usb_cdet_pads, ARRAY_SIZE(usb_cdet_pads));
 	gpio_request(USB_CDET_GPIO, "usb-cdet-gpio");
@@ -382,4 +351,15 @@ int board_usb_phy_mode(int port)
 		return USB_INIT_HOST;
 	}
 }
+
+int board_late_init(void)
+{
+#if defined(CONFIG_DM_VIDEO)
+	setup_lcd();
+
+	show_boot_logo();
+#endif
+	return 0;
+}
+
 #endif
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 3c49d70260..73015ed825 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -89,3 +89,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index c7bcb87ddd..8ba03a2b38 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -84,3 +84,5 @@ CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SYS_WHITE_ON_BLACK=y
-- 
2.17.1

  parent reply	other threads:[~2020-07-15 10:31 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 10:30 [PATCH v2 00/14] toradex: imx: fixes and updates for v2020.10 Igor Opaniuk
2020-07-15 10:30 ` [PATCH v2 01/14] imx: mx7: fix DDRC size in A7-M4 mapping table Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 02/14] toradex: tdx-cfg-block: add EEPROM read/store wrappers Igor Opaniuk
2020-07-27 12:49   ` Stefano Babic
2020-07-27 13:35     ` Tom Rini
2020-07-27 14:17       ` Stefano Babic
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 03/14] toradex: tdx-cfg-block: add carrier boards and display adapters Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 04/14] toradex: tdx-cfg-block: add support for EEPROM Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 05/14] toradex: tdx-cfg-clock: add migration routine from PID8 Igor Opaniuk
2020-07-27 19:10   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 06/14] toradex: tdx-cfg-block: add carrier board info printing Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 07/14] ARM: dts: imx8mm-verdin: eeprom nodes adjustments Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:30 ` [PATCH v2 08/14] verdin-imx8mm: add EEPROM support for carrier board Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:31 ` [PATCH v2 09/14] ARM: dts: imx6ull-colibri: move u-boot specific node Igor Opaniuk
2020-07-27 19:10   ` sbabic at denx.de
2020-07-15 10:31 ` [PATCH v2 10/14] toradex: common: show boot logo Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:31 ` [PATCH v2 11/14] ARM: dts: imx7-colibri: multiple node updates Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:31 ` [PATCH v2 12/14] colibri-imx6ull: show boot logo Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:31 ` [PATCH v2 13/14] colibri-imx6ull: fix splash screen logo drawing Igor Opaniuk
2020-07-27 19:09   ` sbabic at denx.de
2020-07-15 10:31 ` Igor Opaniuk [this message]
2020-07-27 19:09   ` [PATCH v2 14/14] colibri-imx7: fix splash " sbabic at denx.de
2020-07-23 15:03 ` [PATCH v2 00/14] toradex: imx: fixes and updates for v2020.10 Igor Opaniuk
2020-07-23 15:16   ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200715103105.8622-15-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox