We are trying to migrate to a new type of display which requires the split-mode functionality in the linux DTS to work. Enabling split mode in the device-tree is working on the kernel side. So the display is functioning as it supposed to after the bootloader starts the OS.
However there is no split mode functionality in u-boot. I tried manually adjusting the clocks in the u-boot source based on this answer (Solved: imx6d LVDS 1920x1080 (split mode on uboot) - NXP Community) but only one of the LVDS clocks work and it runs twice as fast as it should.
In the OS both LVDS clocks run around 35-40Mhz according to Oscilloscope measurements. When only the bootloader runs this speed is doubled and there is no signal on the second LVDS clock.
This leads me to believe that I did not manage to properly configure the clock tree for split-mode operation.
Is there a known patch to add split mode functionality to the bootloader (u-boot), or only single channel displays are supported?
Hi @peter.suti ,
Please take a look at this question at NXP community.
Best regards,
Daniel Morais
Hello @daniel_m.tx,
As I have already said in my question, I tried that method and it did not work for me. Maybe I’m missing something obvious?
I have enabled DM_VIDEO and VIDEO_IPUV3 in the menuconfig.
Here is the patch that I tried based on that answer:
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 40c71adf51..d58db863c6 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -484,7 +484,7 @@ static void enable_lvds(struct display_info_t const *dev)
struct iomuxc *iomux = (struct iomuxc *)
IOMUXC_BASE_ADDR;
u32 reg = readl(&iomux->gpr[2]);
- reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT;
+ reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT | IOMUXC_GPR2_SPLIT_MODE_EN_MASK;
writel(reg, &iomux->gpr[2]);
gpio_direction_output(RGB_BACKLIGHT_GP, 1);
gpio_direction_output(RGB_BACKLIGHTPWM_GP, 0);
@@ -587,6 +587,25 @@ struct display_info_t const displays[] = {{
.vsync_len = 10,
.sync = FB_SYNC_EXT,
.vmode = FB_VMODE_NONINTERLACED
+} }, {
+ .bus = -1,
+ .addr = 0,
+ .pixfmt = IPU_PIX_FMT_RGB24,
+ .enable = enable_lvds,
+ .mode = {
+ .name = "LDB-FULLHD",
+ .refresh = 60,
+ .xres = 1920,
+ .yres = 1080,
+ .pixclock = 16667,
+ .left_margin = 80,
+ .right_margin = 48,
+ .upper_margin = 23,
+ .lower_margin = 3,
+ .hsync_len = 32,
+ .vsync_len = 5,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
} } };
size_t display_count = ARRAY_SIZE(displays);
@@ -612,7 +631,11 @@ static void setup_display(void)
writel(reg, &mxc_ccm->cs2cdr);
reg = readl(&mxc_ccm->cscmr2);
+#ifdef CONFIG_SPLIT_MODE
+ reg &= ~MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
+#else
reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
+#endif
writel(reg, &mxc_ccm->cscmr2);
reg = readl(&mxc_ccm->chsccdr);
@@ -624,10 +647,17 @@ static void setup_display(void)
|IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH
|IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW
|IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG
- |IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT
|IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
+#ifdef CONFIG_SPLIT_MODE
+ |IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT
+ |IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT
+ |IOMUXC_GPR2_SPLIT_MODE_EN_MASK
+ |IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0
+#else
+ |IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT
|IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT
|IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED
+#endif
|IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
writel(reg, &iomux->gpr[2]);
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 1a11231ea2..3d459ec93a 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -67,6 +67,7 @@
#define CONFIG_USBD_HS
/* Framebuffer and LCD */
+#define CONFIG_SPLIT_MODE
#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
#define CONFIG_VIDEO_BMP_RLE8
#define CONFIG_SPLASH_SCREEN
@@ -160,6 +161,7 @@
"setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
"load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
"source ${loadaddr}\0" \
+ "panel=LDB-FULLHD\0" \
"splashpos=m,m\0" \
"splashimage=" __stringify(CONFIG_LOADADDR) "\0" \
"vidargs=mxc_hdmi.only_cea=1 fbmem=32M\0"
@peter.suti,
Apparently there’s no known way to enable split mode LVDS on U-Boot.
Do you necessarily need video output while on U-Boot? A possible workaround would be to disable video in U-Boot entirely, then it’s only enabled when Linux boots.