This article describes how to add Linux Kernel support for Chiptronic Resistive Touch Diplay 7".
Chiptronic Resistive Touch Diplay 7" uses the Unified Display Interface. Check the article Installing Chiptronic Resistive Touch Display for information on the display connection.
To make the Chiptronic display work on Linux, it will be necessary to add the display struct into the Kernel code or the device-tree.
Make sure you have read the article Kernel Driver Backports Integration. This article will explain exactly how to download and choose the correct branch according to the module and also how to compile the kernel.
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.c
index 0f0981f..c4a45e3 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -662,6 +662,29 @@ static const struct panel_desc edt_etm0700g0dh6 = {
},
};
+static const struct drm_display_mode edt_chiptronic_mode = {
+ .clock = 33300,
+ .hdisplay = 800,
+ .hsync_start = 800 + 40,
+ .hsync_end = 800 + 40 + 170,
+ .htotal = 800 + 40 + 170 + 46,
+ .vdisplay = 480,
+ .vsync_start = 480 + 16,
+ .vsync_end = 480 + 16 + 6,
+ .vtotal = 480 + 16 + 6 + 23,
+ .vrefresh = 60,
+};
+
+static const struct panel_desc edt_chiptronic = {
+ .modes = &edt_chiptronic_mode,
+ .num_modes = 8,
+ .bpc = 1,
+ .size = {
+ .width = 154,
+ .height = 85,
+ },
+ .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
+};
static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
.clock = 32260,
.hdisplay = 800,
@@ -1186,6 +1209,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "edt,etm0700g0dh6",
.data = &edt_etm0700g0dh6,
}, {
+ .compatible = "edt,chiptronic",
+ .data = &edt_chiptronic,
+ }, {
.compatible = "foxlink,fl500wvr00-a0t",
.data = &foxlink_fl500wvr00_a0t,
}, {
--
2.5.5
Re-compile the kernel and device-tree and replace the binary.
After that, set the u-boot environment:
setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /panel compatible "edt,chiptronic"'
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.c
index 1636bae..3edfe02 100644
--- a/drivers/video/fbdev/mxc/mxc_lcdif.c
+++ b/drivers/video/fbdev/mxc/mxc_lcdif.c
@@ -49,6 +49,18 @@ static struct fb_videomode lcdif_modedb[] = {
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,},
{
+ /* 800x480 @ 60 Hz , pixel clk @ 33.26MHz */
+ "Chip", 60, 800, 480, 30030,
+ .left_margin = 47,
+ .right_margin = 11,
+ .hsync_len = 40,
+ .upper_margin = 25,
+ .lower_margin = 45,
+ .vsync_len = 20,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT | 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,
Re-compile the kernel and replace the binary correctly.
After that, change u-boot environment according to the module.
Colibri iMX6:
setenv vidargs 'video=mxcfb0:dev=lcd,Chip,if=RGB666 video=mxcfb1:off fbmem=8'
Apalis iMX6:
setenv vidargs 'video=mxcfb0:dev=lcd,Chip,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'
Apply the changes according to the patch below:
diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
index 8fd1186..69bec1f 100644
--- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
@@ -123,7 +123,7 @@
bus-width = <18>;
display-timings {
- native-mode = <&timing_vga>;
+ native-mode = <&timing_wvga1>;
/* Standard VGA timing */
timing_vga: 640x480 {
@@ -228,6 +228,23 @@
vsync-active = <0>;
pixelclk-active = <0>;
};
+ /* CHIPTRONIC */
+ timing_wvga1: 800x480chip {
+ clock-frequency = <33300000>;
+ hactive = <800>;
+ vactive = <480>;
+ hback-porch = <46>;
+ hfront-porch = <216>;
+ vback-porch = <23>;
+ vfront-porch = <14>;
+ hsync-len = <40>;
+ vsync-len = <20>;
+ de-active = <0>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ pixelclk-active = <1>;
+ };
};
};
};
diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index 6385dfa..6b7ec06 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -15,7 +15,7 @@
compatible = "pwm-backlight";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_bl_on>;
- pwms = <&pwm1 0 5000000 0>;
+ pwms = <&pwm1 0 16000000>;
enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
};
Re-compile the device-tree and replace the binary.
Colibri VF61 (V1.2A)
Colibri VF50 (V1.1A)
Colibri IMX6DL (V1.0A)
Colibri IMX7S (V1.1A)