[U-Boot] persistent logo on LCD on imx6ull
Michael Nazzareno Trimarchi
michael at amarulasolutions.com
Mon Jul 2 14:26:56 UTC 2018
Hi Peng
I'm working to make persistent the uboot logo on imx6ull platform but
I have some problem with the framebuffer. Now this is the main idea
I use this to recalculate allocation
ubi part ubiblock; ubi read ${loadaddr} updater; run load_dtb;
fdt addr ${fdt_addr}
fdt set /reserved-memory/framebuffer reg "<0x$video_address
0x$video_memory_size>"
fdt set /chosen/framebuffer reg "<0x$video_address 0x$video_memory_size>"
In linux I have
+ aliases {
+ display0 = &lcdif;
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ display_reserved: framebuffer at 86fa2000 {
+ reg = <0x86fa2000 0x80000>;
+ no-map;
+ };
+
+ };
+
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ stdout-path = "display0";
+ framebuffer0: framebuffer at 86fa2000 {
+ #clock-cells = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcdif>;
+ compatible = "simple-framebuffer";
+ reg = <0x86fa2000 (480 * 272 * 4)>;
+ width = <480>;
+ height = <272>;
+ stride = <(480 * 4)>;
+ format = "a8r8g8b8";
+ clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
+ <&clks IMX6UL_CLK_LCDIF_APB>;
+ nshut-supply = <®_lcd_nshut>;
+ nreset-supply = <®_lcd_nreset>;
+ display = <&lcdif>;
+ };
+ };
and this in uboot
index 4011066..beddd4a 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -69,6 +69,7 @@
#include <version.h>
#include <malloc.h>
#include <video.h>
+#include <lcd.h>
#include <linux/compiler.h>
#if defined(CONFIG_VIDEO_MXS)
@@ -2107,6 +2108,9 @@ static int cfg_video_init(void)
video_console_address = video_fb_address;
#endif
+ env_set_hex("video_address", (unsigned long)VIDEO_FB_ADRS);
+ env_set_hex("video_memory_size", (unsigned long)
roundup(VIDEO_SIZE, PAGE_SIZE));
+
/* Initialize the console */
console_col = 0;
console_row = 0;
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 4e3e3d7..e2a5c05 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <malloc.h>
#include <video_fb.h>
+#include <lcd.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
@@ -214,8 +215,8 @@ void *video_hw_init(void)
panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
/* Allocate framebuffer */
- fb = memalign(ARCH_DMA_MINALIGN,
- roundup(panel.memSize, ARCH_DMA_MINALIGN));
+ fb = memalign(PAGE_SIZE,
+ roundup(panel.memSize, PAGE_SIZE));
if (!fb) {
printf("MXSFB: Error allocating framebuffer!\n");
return NULL;
I have two problems. (Using the latest uboot and linux)
1) I have a 50uS glitch on gpios so they get down and up again (nshut
and nreset) even I don't touch them
2) Even clock tree is ok pixelclock seems that stops to go out
Do you have any suggestion?
Michael
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
More information about the U-Boot
mailing list