IMX8M series technology stickers

Okmx8mm-c development board is designed based on NXP’s i.mx8mmini quad core 64 bit processor, adopts core board + backplane structure, with a maximum dominant frequency of 1.8GHz and cortex-a53 architecture; 2GB DDR4 ram, supporting a universal cortex ?- The m4400mhz core processor provides a variety of peripheral interfaces, such as mipi-csi, mipi-dsi, USB, PCIe, UART, ecspi, IIC and Gigabit Ethernet. This article mainly explains how to add new display support to okmx8mm-c development board platform uboot < H2 > I. the display device that Mipi interface can connect < / H2 > < p > okmx8mm-c development board has only one Mipi DSI display interface. This interface can not only connect Mipi display screen, but also connect LVDS display screen or HDMI display screen through Mipi to LVDS module < p > among them, Mipi display screen is also divided into those that need to be configured and those that do not need to be configured < H3 > 1. Mipi screen without configuration < / H3 > < p > the display screen of Mipi interface is divided into Mipi screen that can be displayed only after DSI enters command mode configuration and Mipi screen that does not need configuration. The Mipi screen that does not need to be configured is relatively simple. As long as the Mipi DSI interface is normal, the output signal can be displayed normally. The 7-inch Mipi screen with 1024×600 resolution provided by Feiling embedded okmx8mm-c development board is a Mipi screen that does not need to be configured. It works in 4lanes high-speed mode by default. It only needs to configure the display related modules in the CPU and let it start working, Mipi screen can display normally < H3 > 2. Mipi screen to be configured < / H3 > < p > Mipi screen to be configured. The DSI interface needs to enter the command mode to configure the display screen before outputting the display signal. The configuration parameters are generally provided by the screen manufacturer. NXPi. The OLED screen rm67191 used in the mx8mm Evaluation Kit is a Mipi display that needs to be configured The display screen module can convert the HDMI signal to the LVMI signal through the hdpi module or the LVMI module. Mipi to LVDS & amp; The HDMI module needs to configure the transfer through I2C, configure the information including the display parameters of the corresponding display screen into the chip, and then the Mipi interface outputs the corresponding display signal < H2 > II. The logo display in uboot stage < / H2 > < p > okmx8mm-c development board adds a 7-inch screen (mipi7) of < / P > 1024×600 by default; Custom 7mipi display (mipicustom); 1920×1080 of Mipi to HDMI (mipi2hdmi1920x1080); 1280×720 (MIPI2HDMI1280x720£©£» 640×480 (MIPI2HDMI640x480£©£» 10.1-inch 1280x800lvds display (mipi2hdmi1280x800); Customize Mipi to LVDS (mipi2hdmicustom)< p> Xiaobian intercepted mipi7 and mipi2hdmi_ The complete display parameters of 1280×720 correspond to the direct connection to Mipi screen and the conversion to LVDS & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; The HDMI module is connected to the LVDS or HDMI display

structdisplay_ info_ tconstdisplays[]={{.bus=LCDIF_BASE_ADDR,.addr=0,.pixfmt=24,.detect=NULL,.enable=do_enable_mipi_led,.mode={.name=”MIPI7″,.refresh=60,.xres=1024,.yres=600,.pixclock=22733,/*43987200*/.left_margin=48,.right_margin=40,.upper_margin=16,.lower_margin=13,.hsync_len=48,.vsync_len=3,.sync=FB_SYNC_EXT,.vmode=FB_VMODE_NONINTERLACED}},… {.bus=LCDIF_BASE_ADDR,.addr=0,.pixfmt=24,.detect=NULL,.enable=do_enable_mipi2hdmi,.mode={.name=”MIPI2HDMI_1280x720″,.refresh=60,.xres=1280,.yres=720,.pixclock=13468,//74250000.left_margin=220,.right_margin=110,.upper_margin=20,.lower_margin=5,.hsync_len=40,.vsync_len=5,.sync=FB_SYNC_EXT,.vmode=FB_VMODE_NONINTERLACED}},…} < H3 > 1. How to select the display parameter < / H3 > < p > uboot stage? Determine which group of display parameters to use by reading the value of uboot environment variable panel. You can set the value of panel through uboot command line or uboot menu. For the method, please refer to the user manual provided by Feiling embedded. Uboot code selects which group of parameters by judging which group of parameters has the same name value in the mode field as the value of panel. For example, if the value of panel is equal to mipi7, the group of display parameters corresponding to mipi7 will be selected, that is, the 7-inch Mipi screen with 1024×600 resolution provided by Feiling embedded system < H3 > 2. What is the meaning of user-defined parameters < / H3 > < p > when debugging the display, we need to modify the parameters in the display parameter structure corresponding to the panel. User defined parameters refer to the parameters in the display parameter structure that can be modified by setting environment variables on the uboot command line. The usage of custom parameters is to set the value of panel to mipi2hdmi_ Custom or Mipi_ Custom, the code reads the environment variable customvideomode, and then parses the values of Xres, yres and other parameters to display Xres, yres and other parameters in the parameter structure. The code is implemented as follows

intboard_ video_ skip(void){inti;intret=0;charconst*panel=env_get(“panel”); if(!panel){…} else{for(i=0;i

staticvoidget_ mode_ frome_ env(structdisplay_info_t*dev,char*options){char*opt;while((opt=strsep(&options,”,”))!= NULL){if(!*opt)continue;if(!strncmp(opt,”xres=”,5)){dev->mode.xres=simple_strtoul(opt+5,NULL,0);} elseif(!strncmp(opt,”yres=”,5)){dev->mode.yres=simple_strtoul(opt+5,NULL,0);} elseif(!strncmp(opt,”pixclock=”,9)){dev->mode.pixclock=simple_strtoul(opt+9,NULL,0);} elseif(!strncmp(opt,”left_margin=”,12)){dev->mode.left_margin=simple_strtoul(opt+12,NULL,0);} elseif(!strncmp(opt,”right_margin=”,13)){dev->mode.right_margin=simple_strtoul(opt+13,NULL,0);} elseif(!strncmp(opt,”upper_margin=”,13)){dev->mode.upper_margin=simple_strtoul(opt+13,NULL,0);} elseif(!strncmp(opt,”lower_margin=”,13)){dev->mode.lower_margin=simple_strtoul(opt+13,NULL,0);} elseif(!strncmp(opt,”hsync_len=”,10)){dev->mode.hsync_len=simple_strtoul(opt+10,NULL,0);} elseif(!strncmp(opt,”vsync_len=”,10)){dev->mode.vsync_len=simple_strtoul(opt+10,NULL,0);} elseif(!strncmp(opt,”sync=”,5)){dev->mode.sync=simple_strtoul(opt+5,NULL,0);} elseif(!strncmp(opt,”vmode=”,6)){dev->mode.vmode=simple_strtoul(opt+6,NULL,0);} elseif(!strncmp(opt,”refresh=”,8)){dev->mode.refresh=simple_strtoul(opt+8,NULL,0);}} printf (“usecustommode%s:%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%08X,%08Xn”,dev->mode.name,dev->mode.refresh,dev->mode.xres,dev->mode.yres,dev->mode.pixclock,dev->mode.left_margin,dev->mode.right_margin,dev->mode.upper_margin,dev->mode.lower_margin,dev->mode.hsync_len,dev->mode.vsync_len,dev->mode.sync,dev->mod e.vmode);} < H2 > III. uboot new display debugging < / H2 > < p > when uboot new display screen, first confirm which type of display screen is added, and then follow the small series to debug different display screens < H3 > 1. Mipi to LVDS and HDMI module < / H3 > < p > Mipi to LVDS and HDMI module. The conditions for normal display are as follows: < / P > the display parameters of the current display screen are configured in the display structure; I2C sends the correct configuration parameters to the transfer module< p> The configuration parameters to be issued by I2C are calculated through the display parameters, so when connecting LVDS or HDMI display, uboot can display the logo normally only by correctly configuring the display parameters. The code provided by Feiling embedded supports four resolutions by default: 640×480, 1280×720, 1920×1080 and 1280×800. If the display screen with these resolutions is selected, it can be displayed directly through the menu (the maximum resolution of LVDS interface is 1280×800). If you want to add a display screen with other resolutions, Feiling embedded provides a set of parameters that can customize the display. You only need to set the value of panel to “mipi2hdcustom”, and then set the environment variable customvideo__ Mode, modify the Xres and yres equivalents you need, save the environment variables, and restart to detect whether the logo can be displayed. You can see the newly set display parameters during the startup process, which is convenient to verify whether the modification is successful

… u-boot=> setenvpanelMIPI2HDMI_ CUSTOMu-boot=> setenvcustom_ video_ modexres=1024,yres=768u-boot=> saSavingEnvironmenttoMMC… WritingtoMMC(1)… OKu-boot=> resetresetting…… LoadingEnvironmentfromMMC… OKusecustommodeMIPI2HDMI_ CUSTOM:60,1024,768,12048,200,64,24,1,136,3,00000004,00000000… < H3 > 2. Mipi screen without configuration < / H3 > < p > Mipi screen without configuration. Just modify the display parameters to display the logo normally. By default, Feiling embedded development board supports a display screen with a resolution of 1024×600. If you need to add a new display screen of this type, Feiling embedded provides a set of parameters that can customize the display, Just set the value of panel to “mipicustom” “, then set the environment variable customvideo_mode, modify the Xres and yres equivalence you need, save the environment variable, and restart to detect whether the logo can be displayed. You can see the newly set display parameters during startup to verify whether the modification is successful. < / P > < div >… U-boot = & gt; setenvpanelmipi_custom boot = & gt; setenvcustom_video_modexres = 800, yres = 600, pixclock = 20000, reference sh=55u-boot=> saSavingEnvironmenttoMMC… WritingtoMMC(1)… OKu-boot=> resetresetting…… LoadingEnvironmentfromMMC… OKusecustommodeMIPI_ CUSTOM:55,800,600,20000,48,40,16,13,48,3,00000004,00000000Display:MIPI_ CUSTOM(800×600)Video:800x600x24… < H3 > 3. Mipi display screen to be configured < / H3 > < p > this display screen has one more step configuration than the Mipi display screen that does not need to be configured, which can be modified with reference to rm67191 provided by the original factory < p > first, add a group of display parameters. The display parameters are modified according to the display screen. Modify the file board / Freescale / imx8mmevk / imx8mmevk c¡£

{.bus=LCDIF_BASE_ADDR,.addr=0,.pixfmt=24,.detect=NULL,.enable=do_enable_mipi_led,.mode={.name=”RM67191_OLED”,.refresh=60,.xres=1080,.yres=1920,.pixclock=7575,/*132000000*/.left_margin=34,.right_margin=20,.upper_margin=4,.lower_margin=10,.hsync_len=2,.vsync_len=2,.sync=FB_SYNC_EXT,.vmode=FB_VMODE_NONINTERLACED} }< / div > < p > then modify the enabling function < / P > < div > void do of this group of parameters_ enable_ mipi_ led(structdisplay_info_tconst*dev){imx_iomux_v3_setup_multiple_pads(backlight_pads,ARRAY_SIZE(backlight_pads));gpio_request(IMX_GPIO_NR(1,1),”backlight”);gpio_direction_output(IMX_GPIO_NR(1,1),0);gpio_request(IMX_GPIO_NR(1,8),”DSIEN”);gpio_direction_output(IMX_GPIO_NR(1,8),0);mdelay(10);gpio_direction_output(IMX_GPIO_NR(1,8) ,1);/* enablethedispmix& mipiphypowerdomain*/call_ imx_ sip(FSL_SIP_GPC,FSL_SIP_CONFIG_GPC_PM_DOMAIN,DISPMIX,true,0); call_ imx_ sip(FSL_SIP_GPC,FSL_SIP_CONFIG_GPC_PM_DOMAIN,MIPI,true,0);/* Putlcdifoutofreset*/disp_ mix_ bus_ rstn_ reset(imx8mm_mipi_dsim_plat_data.gpr_base,false); disp_ mix_ lcdif_ clks_ enable(imx8mm_mipi_dsim_plat_data.gpr_base,true);/* Setupmipidsim*/sec_ mipi_ dsim_ setup(&imx8mm_mipi_dsim_plat_data); rm67191_ init(); rm67191_ dev.name=dev-> mode. name; imx_ mipi_ dsi_ bridge_ attach(&rm67191_dev);/* attachrm67191device*/}structmipi_ dsi_ client_ devrm67191_ dev={.channel=0,.lanes=4,.format=MIPI_DSI_FMT_RGB888,.mode_flags=MIPI_DSI_MODE_VIDEO|MIPI_DSI_MODE_VIDEO_SYNC_PULSE|MIPI_DSI_MODE_EOT_PACKET|MIPI_DSI_MODE_VIDEO_HSE,}; < p > Modify display driver / video / rm67191 c. Add the initialization sequence of your own screen in the function int rm67191lcdsetup (struct mipidsiclientdev * paneldev) < p > compile test after modification < p > note: the uboot code is not open source. To modify the code, you need to contact the salesperson < / P > < p > < / P > < / div >