Hi All,
We have a 5" LCD display [ Winstar WF50DSYA3MNN0#, datasheet: https://www.winstar.com.tw/uploads/files/5f2c8bb6f970f8b469ca866f21523592.pdf ]
We are trying to integrate it into our custom IMX8MM board, the LCP display is using the MIPI interface and as specified in the datasheet it uses the ILI9881C driver.
This is our Kernel device tree configuration (following https://github.com/TechNexion-customization/linux-imx-tn/blob/tn-imx_4.14.98_2.0.0_ga-wip-mipi2lvds/... )
&mipi_dsi {
status = "okay";
panel@0 {
compatible = "bananapi,lhr050h41";
reg = <0>;
pinctrl-0 = <&pinctrl_lcd_rst>;
reset-gpio = <&gpio3 25 GPIO_ACTIVE_HIGH>;
dsi-lanes = <4>;
video-mode = <0>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <720>;
panel-height-mm = <1280>;
status = "okay";
};
};
&lcdif {
status = "okay";
};
&vpu_g1 {
status = "okay";
};
&vpu_g2 {
status = "okay";
};
&vpu_h1 {
status = "okay";
};
&gpu {
status = "okay";
};
The "bananapi,lhr050h41" compatible value is taken from the official ILI9881C kernel MIPI DSI driver,
As far as I understand and following the EVK implementation of the rm67191 driver I do not need to add something to uboot bootargs like "video=mxcfb0...", and nothing to be added to Uboot device tree also, the only configuration should be only in the Kernel device tree file.
When booting the Kernel errors occur related to the IMX display-subsystem:
[ 4.660791] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 4.667467] [drm] No driver support for vblank timestamp query.
[ 4.673536] imx-drm soc@0:bus@32c00000:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 4.691442] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 4.698594] ina2xx 2-0041: power monitor ina219 (Rshunt = 20000 uOhm)
[ 4.698686] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 4.713441] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 4.719314] ina2xx 2-0042: power monitor ina219 (Rshunt = 20000 uOhm)
[ 4.727269] imx-drm soc@0:bus@32c00000:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -517
[ 4.738615] imx-drm soc@0:bus@32c00000:display-subsystem: master bind failed: -517
- What is the problem with drm kernel errors?
I checked the EVK uboot header file and defconfig and they contain VIDEO configuration:
imx8mm_evk_defconfig | imx8mm_evk.h |
CONFIG_VIDEO=y CONFIG_IMX_SEC_MIPI_DSI=y | #ifdef CONFIG_VIDEO #define CONFIG_VIDEO_MXS #define CONFIG_VIDEO_LOGO #define CONFIG_SPLASH_SCREEN #define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_CMD_BMP #define CONFIG_BMP_16BPP #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_VIDEO_SKIP #define CONFIG_RM67191 #endif |
I'm using imx8mmddr3lval yocto MACHINE and working with L5.4.24 release but it does not contain those VIDEO configurations, is that the missing part? If yes, I tried to add it and compilation errors occurred:
| u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13: undefined reference to `displays'
| aarch64-poky-linux-ld.bfd: arch/arm/mach-imx/built-in.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `displays' which may bind externally can not be used when making a shared object; recompile with -fPIC
| u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13:(.text.board_video_skip+0x14): dangerous relocation: unsupported relocation
| u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13: undefined reference to `displays'
| u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13: undefined reference to `display_count'
| aarch64-poky-linux-ld.bfd: arch/arm/mach-imx/built-in.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `display_count' which may bind externally can not be used when making a shared object; recompile with -fPIC
| u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13:(.text.board_video_skip+0x24): dangerous relocation: unsupported relocation
|u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:13: undefined reference to `display_count'
|u-boot-imx/2018.03-r0/git/arch/arm/mach-imx/video.c:39: undefined reference to `display_count'
| u-boot-imx/2018.03-r0/git/Makefile:1304: recipe for target 'u-boot' failed
What I'm missing?
Help me, please.
Thanks,
Talel
Solved! Go to Solution.
Hi Talel
may be recommended to try more new uboot/kernels, like L5.4.47_2.2.0
add custom Winstar initialization (from its datasheet) in "cmd_set_table manufacturer_cmd_set[]"
and "struct display_timing default_timing" in
Best regards
igor
Hi Talel
may be recommended to try more new uboot/kernels, like L5.4.47_2.2.0
add custom Winstar initialization (from its datasheet) in "cmd_set_table manufacturer_cmd_set[]"
and "struct display_timing default_timing" in
Best regards
igor
Hi,
Thanks for the reply,
Can you confirm these steps?:
Nothing should be added in uboot configuration
No video parameters should be added in kernel boot parameters
I attached the datasheet of the LCD display. Because I don't understand what to read exactly or where to find the registers configuration in the datasheet.
In the ili9881c driver there is an init instruction struct that switch pages and configure registers like this:
struct ili9881c_instr {
enum ili9881c_op op;
union arg {
struct cmd {
u8 cmd;
u8 data;
} cmd;
u8 page;
} arg;
};
#define ILI9881C_SWITCH_PAGE_INSTR(_page) \
{ \
.op = ILI9881C_SWITCH_PAGE, \
.arg = { \
.page = (_page), \
}, \
}
#define ILI9881C_COMMAND_INSTR(_cmd, _data) \
{ \
.op = ILI9881C_COMMAND, \
.arg = { \
.cmd = { \
.cmd = (_cmd), \
.data = (_data), \
}, \
}, \
}
static const struct ili9881c_instr ili9881c_init[] = {
ILI9881C_SWITCH_PAGE_INSTR(3),
ILI9881C_COMMAND_INSTR(0x01, 0x00),
ILI9881C_COMMAND_INSTR(0x02, 0x00),
ILI9881C_COMMAND_INSTR(0x03, 0x73),
ILI9881C_COMMAND_INSTR(0x04, 0x03),
ILI9881C_COMMAND_INSTR(0x05, 0x00),
ILI9881C_COMMAND_INSTR(0x06, 0x06),
ILI9881C_COMMAND_INSTR(0x07, 0x06),
ILI9881C_COMMAND_INSTR(0x08, 0x00),
ILI9881C_COMMAND_INSTR(0x09, 0x18),
ILI9881C_COMMAND_INSTR(0x0a, 0x04),
ILI9881C_COMMAND_INSTR(0x0b, 0x00),
ILI9881C_COMMAND_INSTR(0x0c, 0x02),
ILI9881C_COMMAND_INSTR(0x0d, 0x03),
ILI9881C_COMMAND_INSTR(0x0e, 0x00),
ILI9881C_COMMAND_INSTR(0x0f, 0x25),
ILI9881C_COMMAND_INSTR(0x10, 0x25),
ILI9881C_COMMAND_INSTR(0x11, 0x00),
ILI9881C_COMMAND_INSTR(0x12, 0x00),
ILI9881C_COMMAND_INSTR(0x13, 0x00),
ILI9881C_COMMAND_INSTR(0x14, 0x00),
ILI9881C_COMMAND_INSTR(0x15, 0x00),
ILI9881C_COMMAND_INSTR(0x16, 0x0C),
ILI9881C_COMMAND_INSTR(0x17, 0x00),
ILI9881C_COMMAND_INSTR(0x18, 0x00),
ILI9881C_COMMAND_INSTR(0x19, 0x00),
ILI9881C_COMMAND_INSTR(0x1a, 0x00),
ILI9881C_COMMAND_INSTR(0x1b, 0x00),
ILI9881C_COMMAND_INSTR(0x1c, 0x00),
ILI9881C_COMMAND_INSTR(0x1d, 0x00),
ILI9881C_COMMAND_INSTR(0x1e, 0xC0),
ILI9881C_COMMAND_INSTR(0x1f, 0x80),
ILI9881C_COMMAND_INSTR(0x20, 0x04),
ILI9881C_COMMAND_INSTR(0x21, 0x01),
ILI9881C_COMMAND_INSTR(0x22, 0x00),
ILI9881C_COMMAND_INSTR(0x23, 0x00),
ILI9881C_COMMAND_INSTR(0x24, 0x00),
ILI9881C_COMMAND_INSTR(0x25, 0x00),
ILI9881C_COMMAND_INSTR(0x26, 0x00),
ILI9881C_COMMAND_INSTR(0x27, 0x00),
ILI9881C_COMMAND_INSTR(0x28, 0x33),
ILI9881C_COMMAND_INSTR(0x29, 0x03),
ILI9881C_COMMAND_INSTR(0x2a, 0x00),
ILI9881C_COMMAND_INSTR(0x2b, 0x00),
ILI9881C_COMMAND_INSTR(0x2c, 0x00),
ILI9881C_COMMAND_INSTR(0x2d, 0x00),
ILI9881C_COMMAND_INSTR(0x2e, 0x00),
ILI9881C_COMMAND_INSTR(0x2f, 0x00),
ILI9881C_COMMAND_INSTR(0x30, 0x00),
ILI9881C_COMMAND_INSTR(0x31, 0x00),
ILI9881C_COMMAND_INSTR(0x32, 0x00),
ILI9881C_COMMAND_INSTR(0x33, 0x00),
ILI9881C_COMMAND_INSTR(0x34, 0x04),
ILI9881C_COMMAND_INSTR(0x35, 0x00),
ILI9881C_COMMAND_INSTR(0x36, 0x00),
ILI9881C_COMMAND_INSTR(0x37, 0x00),
ILI9881C_COMMAND_INSTR(0x38, 0x3C),
ILI9881C_COMMAND_INSTR(0x39, 0x00),
ILI9881C_COMMAND_INSTR(0x3a, 0x00),
ILI9881C_COMMAND_INSTR(0x3b, 0x00),
ILI9881C_COMMAND_INSTR(0x3c, 0x00),
ILI9881C_COMMAND_INSTR(0x3d, 0x00),
ILI9881C_COMMAND_INSTR(0x3e, 0x00),
ILI9881C_COMMAND_INSTR(0x3f, 0x00),
ILI9881C_COMMAND_INSTR(0x40, 0x00),
ILI9881C_COMMAND_INSTR(0x41, 0x00),
ILI9881C_COMMAND_INSTR(0x42, 0x00),
ILI9881C_COMMAND_INSTR(0x43, 0x00),
ILI9881C_COMMAND_INSTR(0x44, 0x00),
ILI9881C_COMMAND_INSTR(0x50, 0x01),
ILI9881C_COMMAND_INSTR(0x51, 0x23),
ILI9881C_COMMAND_INSTR(0x52, 0x45),
ILI9881C_COMMAND_INSTR(0x53, 0x67),
ILI9881C_COMMAND_INSTR(0x54, 0x89),
ILI9881C_COMMAND_INSTR(0x55, 0xab),
ILI9881C_COMMAND_INSTR(0x56, 0x01),
ILI9881C_COMMAND_INSTR(0x57, 0x23),
ILI9881C_COMMAND_INSTR(0x58, 0x45),
ILI9881C_COMMAND_INSTR(0x59, 0x67),
ILI9881C_COMMAND_INSTR(0x5a, 0x89),
ILI9881C_COMMAND_INSTR(0x5b, 0xab),
ILI9881C_COMMAND_INSTR(0x5c, 0xcd),
ILI9881C_COMMAND_INSTR(0x5d, 0xef),
ILI9881C_COMMAND_INSTR(0x5e, 0x11),
ILI9881C_COMMAND_INSTR(0x5f, 0x02),
ILI9881C_COMMAND_INSTR(0x60, 0x02),
ILI9881C_COMMAND_INSTR(0x61, 0x02),
ILI9881C_COMMAND_INSTR(0x62, 0x02),
ILI9881C_COMMAND_INSTR(0x63, 0x02),
ILI9881C_COMMAND_INSTR(0x64, 0x02),
ILI9881C_COMMAND_INSTR(0x65, 0x02),
ILI9881C_COMMAND_INSTR(0x66, 0x02),
ILI9881C_COMMAND_INSTR(0x67, 0x02),
ILI9881C_COMMAND_INSTR(0x68, 0x02),
ILI9881C_COMMAND_INSTR(0x69, 0x02),
ILI9881C_COMMAND_INSTR(0x6a, 0x0C),
ILI9881C_COMMAND_INSTR(0x6b, 0x02),
ILI9881C_COMMAND_INSTR(0x6c, 0x0F),
ILI9881C_COMMAND_INSTR(0x6d, 0x0E),
ILI9881C_COMMAND_INSTR(0x6e, 0x0D),
ILI9881C_COMMAND_INSTR(0x6f, 0x06),
ILI9881C_COMMAND_INSTR(0x70, 0x07),
ILI9881C_COMMAND_INSTR(0x71, 0x02),
ILI9881C_COMMAND_INSTR(0x72, 0x02),
ILI9881C_COMMAND_INSTR(0x73, 0x02),
ILI9881C_COMMAND_INSTR(0x74, 0x02),
ILI9881C_COMMAND_INSTR(0x75, 0x02),
ILI9881C_COMMAND_INSTR(0x76, 0x02),
ILI9881C_COMMAND_INSTR(0x77, 0x02),
ILI9881C_COMMAND_INSTR(0x78, 0x02),
ILI9881C_COMMAND_INSTR(0x79, 0x02),
ILI9881C_COMMAND_INSTR(0x7a, 0x02),
ILI9881C_COMMAND_INSTR(0x7b, 0x02),
ILI9881C_COMMAND_INSTR(0x7c, 0x02),
ILI9881C_COMMAND_INSTR(0x7d, 0x02),
ILI9881C_COMMAND_INSTR(0x7e, 0x02),
ILI9881C_COMMAND_INSTR(0x7f, 0x02),
ILI9881C_COMMAND_INSTR(0x80, 0x0C),
ILI9881C_COMMAND_INSTR(0x81, 0x02),
ILI9881C_COMMAND_INSTR(0x82, 0x0F),
ILI9881C_COMMAND_INSTR(0x83, 0x0E),
ILI9881C_COMMAND_INSTR(0x84, 0x0D),
ILI9881C_COMMAND_INSTR(0x85, 0x06),
ILI9881C_COMMAND_INSTR(0x86, 0x07),
ILI9881C_COMMAND_INSTR(0x87, 0x02),
ILI9881C_COMMAND_INSTR(0x88, 0x02),
ILI9881C_COMMAND_INSTR(0x89, 0x02),
ILI9881C_COMMAND_INSTR(0x8A, 0x02),
ILI9881C_SWITCH_PAGE_INSTR(4),
ILI9881C_COMMAND_INSTR(0x6C, 0x15),
ILI9881C_COMMAND_INSTR(0x6E, 0x22),
ILI9881C_COMMAND_INSTR(0x6F, 0x33),
ILI9881C_COMMAND_INSTR(0x3A, 0xA4),
ILI9881C_COMMAND_INSTR(0x8D, 0x0D),
ILI9881C_COMMAND_INSTR(0x87, 0xBA),
ILI9881C_COMMAND_INSTR(0x26, 0x76),
ILI9881C_COMMAND_INSTR(0xB2, 0xD1),
ILI9881C_SWITCH_PAGE_INSTR(1),
ILI9881C_COMMAND_INSTR(0x22, 0x0A),
ILI9881C_COMMAND_INSTR(0x53, 0xDC),
ILI9881C_COMMAND_INSTR(0x55, 0xA7),
ILI9881C_COMMAND_INSTR(0x50, 0x78),
ILI9881C_COMMAND_INSTR(0x51, 0x78),
ILI9881C_COMMAND_INSTR(0x31, 0x02),
ILI9881C_COMMAND_INSTR(0x60, 0x14),
ILI9881C_COMMAND_INSTR(0xA0, 0x2A),
ILI9881C_COMMAND_INSTR(0xA1, 0x39),
ILI9881C_COMMAND_INSTR(0xA2, 0x46),
ILI9881C_COMMAND_INSTR(0xA3, 0x0e),
ILI9881C_COMMAND_INSTR(0xA4, 0x12),
ILI9881C_COMMAND_INSTR(0xA5, 0x25),
ILI9881C_COMMAND_INSTR(0xA6, 0x19),
ILI9881C_COMMAND_INSTR(0xA7, 0x1d),
ILI9881C_COMMAND_INSTR(0xA8, 0xa6),
ILI9881C_COMMAND_INSTR(0xA9, 0x1C),
ILI9881C_COMMAND_INSTR(0xAA, 0x29),
ILI9881C_COMMAND_INSTR(0xAB, 0x85),
ILI9881C_COMMAND_INSTR(0xAC, 0x1C),
ILI9881C_COMMAND_INSTR(0xAD, 0x1B),
ILI9881C_COMMAND_INSTR(0xAE, 0x51),
ILI9881C_COMMAND_INSTR(0xAF, 0x22),
ILI9881C_COMMAND_INSTR(0xB0, 0x2d),
ILI9881C_COMMAND_INSTR(0xB1, 0x4f),
ILI9881C_COMMAND_INSTR(0xB2, 0x59),
ILI9881C_COMMAND_INSTR(0xB3, 0x3F),
ILI9881C_COMMAND_INSTR(0xC0, 0x2A),
ILI9881C_COMMAND_INSTR(0xC1, 0x3a),
ILI9881C_COMMAND_INSTR(0xC2, 0x45),
ILI9881C_COMMAND_INSTR(0xC3, 0x0e),
ILI9881C_COMMAND_INSTR(0xC4, 0x11),
ILI9881C_COMMAND_INSTR(0xC5, 0x24),
ILI9881C_COMMAND_INSTR(0xC6, 0x1a),
ILI9881C_COMMAND_INSTR(0xC7, 0x1c),
ILI9881C_COMMAND_INSTR(0xC8, 0xaa),
ILI9881C_COMMAND_INSTR(0xC9, 0x1C),
ILI9881C_COMMAND_INSTR(0xCA, 0x29),
ILI9881C_COMMAND_INSTR(0xCB, 0x96),
ILI9881C_COMMAND_INSTR(0xCC, 0x1C),
ILI9881C_COMMAND_INSTR(0xCD, 0x1B),
ILI9881C_COMMAND_INSTR(0xCE, 0x51),
ILI9881C_COMMAND_INSTR(0xCF, 0x22),
ILI9881C_COMMAND_INSTR(0xD0, 0x2b),
ILI9881C_COMMAND_INSTR(0xD1, 0x4b),
ILI9881C_COMMAND_INSTR(0xD2, 0x59),
ILI9881C_COMMAND_INSTR(0xD3, 0x3F),
};
Can I set those same configurations in the rm67191 cmd_set_table manufacturer_cmd_set[] and use the rm67191 driver?
And, I will upgrade to the 5.4.47 release and try again.
Thanks,
Talel