This article describes how to add Linux Kernel support for AGT Touch Diplays 4", 7" and 10" .
AGT Diplays use the Unified Display Interface. Check the Installing AGT Touch Display article for information on the display connection.
To make AGT display 7" and 10" work on linux, it is just necessary change U-Boot environments. Other than that, on AGT display 4" is necessary add the display struct into the Kernel code or the device-tree.
Apply the changes according to the patch below:
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.cindex 0f0981f..b2a9a8b 100644--- a/drivers/gpu/drm/panel/panel-simple.c+++ b/drivers/gpu/drm/panel/panel-simple.c@@ -662,6 +662,79 @@ static const struct panel_desc edt_etm0700g0dh6 = {},};+static const struct drm_display_mode edt_agt0470_mode = {+ .clock = 9000,+ .hdisplay = 480,+ .hsync_start = 480 + 30,+ .hsync_end = 480 + 30 + 1,+ .htotal = 480 + 30 + 1 + 5,+ .vdisplay = 272,+ .vsync_start = 272 + 8,+ .vsync_end = 272 + 8 + 1,+ .vtotal = 272 + 8 + 1 + 7,+ .vrefresh = 60,+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,+};++static const struct panel_desc edt_agt0470 = {+ .modes = &edt_agt0470_mode,+ .num_modes = 1,+ .bpc = 6,+ .size = {+ .width = 152,+ .height = 91,+ },+ .bus_format = MEDIA_BUS_FMT_RGB666_1X18,+ .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,+};+static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {.clock = 32260,.hdisplay = 800,@@ -1186,6 +1259,15 @@ static const struct of_device_id platform_of_match[] = {.compatible = "edt,etm0700g0dh6",.data = &edt_etm0700g0dh6,}, {+ .compatible = "edt,agt0470",+ .data = &edt_agt0470,+ }, {.compatible = "foxlink,fl500wvr00-a0t",.data = &foxlink_fl500wvr00_a0t,}, {--2.7.4
Re-compile the kernel according to the Build U-Boot and Linux Kernel from Source Code
The image will be deployed in *arch/arm/boot/zImage after compiled.
Prepare an SD Card or USB flash drive with a Toradex image using update.sh, and overwrite the kernel zImage deployed by the script into the prepared media.
sudo cp arch/arm/boot/zImage /media/<user>/DATA/<module_directory>/zImage
Insert the prepared media into the carrier board, power on the board and press any key to stop the autoboot and update the module as following:
run setupdaterun update_kernel
Power cycle the module and press any key to stop the autoboot again to set U-Boot environment.
Set the u-boot environment for your display, see below the possibilities:
For the 4" display:
setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /panel compatible "edt,agt0470"'
For the 7" display:
setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /panel compatible "logic,lt161010-2nhc"'
For the 10" display:
setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /panel compatible "tpk,f10a-0102"'
Save the environment:
saveenv
Boot your module:
boot
Apply the changes according to the patch below:
diff --git a/drivers/video/fbdev/mxc/mxc_lcdif.c b/drivers/video/fbdev/mxc/mxc_lcdif.cindex 1636bae..6ba86f0 100644--- a/drivers/video/fbdev/mxc/mxc_lcdif.c+++ b/drivers/video/fbdev/mxc/mxc_lcdif.c@@ -49,6 +49,30 @@ static struct fb_videomode lcdif_modedb[] = {.vmode = FB_VMODE_NONINTERLACED,.flag = 0,},{+ /* 320x240 @ 60 Hz , pixel clk @ 9 MHz */ /* 111000 ps*/+ "AGT04", 60, 480, 272, 111000,+ .left_margin = 5,+ .right_margin = 39,+ .hsync_len = 1,+ .upper_margin = 8,+ .lower_margin = 7,+ .vsync_len = 1,+ .sync = FB_SYNC_CLK_LAT_FALL,+ .vmode = FB_VMODE_NONINTERLACED,+ .flag = 0,},+ {/* 800x480 @ 60 Hz , pixel clk @ 33.26MHz */"FusionF07A", 60, 800, 480, 30066,.left_margin = 88,--2.9.3
Re-compile the kernel according to the Build U-Boot and Linux Kernel from Source Code article.
The image will be deployed in *arch/arm/boot/uImage after compiled.
Prepare an SD Card or USB flash drive with a Toradex image using update.sh, and overwrite the kernel zImage deployed by the script into the prepared media.
sudo cp arch/arm/boot/zImage /media/<user>/DATA/<module_directory>/uImage
Insert the prepared media into the carrier board, power on the board and press any key to stop the autoboot and update the module as following:
run setupdaterun update_kernel
Power cycle the module and stop press any key to stop the autoboot again to set U-Boot environments:
Set the u-boot environment for your display, see below the possibilities:
For the 4" display:
setenv vidargs 'video=mxcfb0:dev=lcd,AGT04,if=RGB666, video=mxcfb1:off fbmem=8M'
For the 7" display:
setenv vidargs 'video=mxcfb0:dev=lcd,FusionF07A,if=RGB666 video=mxcfb1:off fbmem=8'
For the 10" display:
setenv vidargs 'video=mxcfb0:dev=lcd,FusionF10A,if=RGB666 video=mxcfb1:off fbmem=8'
Save the environment:
saveenv
Boot your module:
boot
Apply the changes according to the patch below:
diff --git a/drivers/video/fbdev/mxc/mxc_lcdif.c b/drivers/video/fbdev/mxc/mxc_lcdif.cindex 1636bae..6ba86f0 100644--- a/drivers/video/fbdev/mxc/mxc_lcdif.c+++ b/drivers/video/fbdev/mxc/mxc_lcdif.c@@ -49,6 +49,30 @@ static struct fb_videomode lcdif_modedb[] = {.vmode = FB_VMODE_NONINTERLACED,.flag = 0,},{+ /* 320x240 @ 60 Hz , pixel clk @ 9 MHz */ /* 111000 ps*/+ "AGT04", 60, 480, 272, 111000,+ .left_margin = 5,+ .right_margin = 39,+ .hsync_len = 1,+ .upper_margin = 8,+ .lower_margin = 7,+ .vsync_len = 1,+ .sync = FB_SYNC_CLK_LAT_FALL,+ .vmode = FB_VMODE_NONINTERLACED,+ .flag = 0,},+ {/* 800x480 @ 60 Hz , pixel clk @ 33.26MHz */"FusionF07A", 60, 800, 480, 30066,.left_margin = 88,--2.9.3
Re-compile the kernel according to the Build U-Boot and Linux Kernel from Source Code article.
The image will be deployed in *arch/arm/boot/uImage after compiled.
Prepare an SD Card or USB flash drive with a Toradex image using update.sh, and overwrite the kernel zImage deployed by the script into the prepared media.
sudo cp arch/arm/boot/zImage /media/<user>/DATA/<module_directory>/uImage
Insert the prepared media into the carrier board, power on the board and press any key to stop the autoboot and update the module as following:
run setupdaterun update_kernel
Power cycle the module and stop press any key to stop the autoboot again to set U-Boot environments:
Set the u-boot environment for your display, see below the possibilities:
For the 4" display:
setenv vidargs 'video=mxcfb0:dev=lcd,AGT04,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'
For the 7" display:
setenv vidargs 'video=mxcfb0:dev=lcd,FusionF07A,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'
For the 10" display:
setenv vidargs 'video=mxcfb0:dev=lcd,FusionF10A,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'
Save the environment:
saveenv
Boot your module:
boot
Power on the board and press any key to stop the autoboot and set the u-boot environment vidargs, see below the possibilities:
For the 4" display:
setenv vidargs 'video=mxsfb:480x272M-16@60,pixclockpol=1'
For the 7" display:
setenv vidargs 'video=mxsfb:800x480M-16@60,pixclockpol=1'
For the 10" display:
setenv vidargs 'video=mxsfb:1024x600M-16@60,pixclockpol=1'
Save the environment:
saveenv
Boot your module:
boot
Note: This only works on Toradex image version 2.7.3 & newer, if you need update your image version refer to the Flashing Embedded Linux to iMX7 Modules article.
Colibri VF61 (V1.2A)
Colibri VF50 (V1.2A)
Colibri IMX6DL (V1.0A)
Colibri IMX7S (V1.1B)
Colibri iMX6ULL 256MB (V1.0A)
Colibri iMX6ULL 512MB IT (V1.0A)