From c23e67cc73e4fe0d7c07dd79bd2380367d2047d6 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 6 Oct 2017 16:32:46 +0300 Subject: apalis-imx6: add support for the new capasitive touch display The atmel_mxt_ts controller needs to be enabled in the dtb, done here for the ixora v1.1 dtb. Said dtb is also changed to be the default dtb in the u-boot config. Existing u-boot patch is updated to include console=tty1 removal for all toradex boards. Task-number: QTBUG-63344 Change-Id: Idaba988c2a0a5916c8fe6b6f11cc75981a9a28e2 Reviewed-by: Sami Nurmenniemi --- conf/bblayers.conf.toradex.sample | 1 + conf/distro/include/apalis-imx6.conf | 2 +- .../0001-Make-sdboot-default-on-all-boards.patch | 63 +++++++++++++++++----- ...-enable-Fusion10-display-if-found-during-.patch | 34 ------------ ...-test-for-Capacitive-Touch-Display-7-Para.patch | 44 +++++++++++++++ .../recipes/u-boot/u-boot-toradex_%.bbappend | 2 +- meta-toradex-extras/conf/layer.conf | 40 ++++++++++++++ ...01-Enable-atmel-mxt-multitouch-controller.patch | 31 +++++++++++ .../recipes/linux/linux-toradex_4.1-2.0.x.bbappend | 32 +++++++++++ 9 files changed, 200 insertions(+), 49 deletions(-) delete mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-apalis-imx6-enable-Fusion10-display-if-found-during-.patch create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-apalis-imx6-test-for-Capacitive-Touch-Display-7-Para.patch create mode 100644 meta-toradex-extras/conf/layer.conf create mode 100644 meta-toradex-extras/recipes/linux/linux-toradex/0001-Enable-atmel-mxt-multitouch-controller.patch create mode 100644 meta-toradex-extras/recipes/linux/linux-toradex_4.1-2.0.x.bbappend diff --git a/conf/bblayers.conf.toradex.sample b/conf/bblayers.conf.toradex.sample index e7cedd7..a8f4f43 100644 --- a/conf/bblayers.conf.toradex.sample +++ b/conf/bblayers.conf.toradex.sample @@ -49,6 +49,7 @@ BBLAYERS ?= " \ ${BSPDIR}/sources/meta-openembedded/meta-multimedia \ ${BSPDIR}/sources/meta-boot2qt \ ${BSPDIR}/sources/meta-boot2qt/meta-fsl-extras \ + ${BSPDIR}/sources/meta-boot2qt/meta-toradex-extras \ ${BSPDIR}/sources/meta-mingw \ ${BSPDIR}/sources/meta-qt5 \ " diff --git a/conf/distro/include/apalis-imx6.conf b/conf/distro/include/apalis-imx6.conf index 4819a74..bdb57d8 100644 --- a/conf/distro/include/apalis-imx6.conf +++ b/conf/distro/include/apalis-imx6.conf @@ -41,4 +41,4 @@ BOOT_SCRIPTS += " \ SERIAL_CONSOLES = "115200;ttymxc0 \ 115200;ttymxc1" -KERNEL_MODULE_AUTOLOAD += "fusion_F0710A" +KERNEL_MODULE_AUTOLOAD += "atmel_mxt_ts" diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch index bf7861e..f6dc0cc 100644 --- a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch @@ -1,20 +1,21 @@ -From 003b18993fe1c5b1e64a44a3b831c63afb0e9a94 Mon Sep 17 00:00:00 2001 +From f86bb70bd270967082cb8132eb68c3c3dea4a7a7 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 15 May 2017 15:31:36 +0300 -Subject: [PATCH] Make sdboot default on all boards +Subject: [PATCH 1/2] Make sdboot default on all boards +... and remove console=tty1 from kernel args --- - include/configs/apalis_imx6.h | 3 ++- - include/configs/colibri_imx6.h | 3 ++- - include/configs/colibri_imx7.h | 2 +- - include/configs/colibri_vf.h | 2 +- - 4 files changed, 6 insertions(+), 4 deletions(-) + include/configs/apalis_imx6.h | 5 +++-- + include/configs/colibri_imx6.h | 5 +++-- + include/configs/colibri_imx7.h | 4 ++-- + include/configs/colibri_vf.h | 4 ++-- + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h -index 8dce5af..4f2f689 100644 +index 76cbdf2..9b42af9 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h -@@ -256,7 +256,8 @@ +@@ -257,7 +257,8 @@ #endif #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ @@ -24,11 +25,20 @@ index 8dce5af..4f2f689 100644 "run distro_bootcmd ; " \ "usb start ;" \ "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \ +@@ -280,7 +281,7 @@ + " ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ + "setup=setenv setupargs fec_mac=${ethaddr} " \ +- "consoleblank=0 no_console_suspend=1 console=tty1 " \ ++ "consoleblank=0 no_console_suspend=1 " \ + "console=${console},${baudrate}n8\0 " \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h -index af49bcc..f6c6e9a 100644 +index ab561f3..cbaeece 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h -@@ -231,7 +231,8 @@ +@@ -232,7 +232,8 @@ #define FDT_FILE "imx6dl-colibri-eval-v3.dtb" #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ @@ -38,8 +48,17 @@ index af49bcc..f6c6e9a 100644 "run distro_bootcmd ; " \ "usb start ;" \ "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \ +@@ -253,7 +254,7 @@ + "${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ + "setup=setenv setupargs fec_mac=${ethaddr} " \ +- "consoleblank=0 no_console_suspend=1 console=tty1 " \ ++ "consoleblank=0 no_console_suspend=1 " \ + "console=${console},${baudrate}n8\0 " \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h -index 1709032..01a8f43 100644 +index 2d6cee3..6773296 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -104,7 +104,7 @@ @@ -51,8 +70,17 @@ index 1709032..01a8f43 100644 "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" #define BOOTENV_RUN_NET_USB_START "" +@@ -138,7 +138,7 @@ + "fatload ${interface} 0:1 ${loadaddr} " \ + "${board}/flash_blk.img && source ${loadaddr}\0" \ + "setup=setenv setupargs " \ +- "console=tty1 console=${console}" \ ++ "console=${console}" \ + ",${baudrate}n8 ${memargs} consoleblank=0\0" \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb && " \ diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h -index 6770f62..73a316a 100644 +index 7fea78b..5bc3e3d 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -155,7 +155,7 @@ @@ -64,3 +92,12 @@ index 6770f62..73a316a 100644 "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" #define BOOTENV_RUN_NET_USB_START "" +@@ -190,7 +190,7 @@ + "fatload ${interface} 0:1 ${loadaddr} " \ + "${board}/flash_blk.img && source ${loadaddr}\0" \ + "setup=setenv setupargs " \ +- "console=tty1 console=${console}" \ ++ "console=${console}" \ + ",${baudrate}n8 ${memargs} consoleblank=0 ${mtdparts}\0" \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb && " \ diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-apalis-imx6-enable-Fusion10-display-if-found-during-.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-apalis-imx6-enable-Fusion10-display-if-found-during-.patch deleted file mode 100644 index 2fcadc0..0000000 --- a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-apalis-imx6-enable-Fusion10-display-if-found-during-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5dc634b67f3b1890c5f166694ba9b81dd0a5a871 Mon Sep 17 00:00:00 2001 -From: Samuli Piippo -Date: Fri, 19 May 2017 12:41:38 +0300 -Subject: [PATCH] apalis-imx6: enable Fusion10 display if found during boot - -Test i2c bus if Fusion10 display is present during boot. -If found, enable it as the primary display in kernel args. - -Also remove console from tty1, as it overlays with Qt. ---- - include/configs/apalis_imx6.h | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h -index 4f2f689..de18b43 100644 ---- a/include/configs/apalis_imx6.h -+++ b/include/configs/apalis_imx6.h -@@ -279,9 +279,14 @@ - "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1" \ - " ${loadaddr} flash_blk.img && " \ - "source ${loadaddr}\0" \ -- "setup=setenv setupargs fec_mac=${ethaddr} " \ -- "consoleblank=0 no_console_suspend=1 console=tty1 " \ -+ "setup=run setupvideo; setenv setupargs fec_mac=${ethaddr} " \ -+ "consoleblank=0 no_console_suspend=1 " \ - "console=${console},${baudrate}n8\0 " \ -+ "setupvideo=i2c dev 0; if i2c probe 50; " \ -+ "then setenv vidargs mxc_hdmi.only_cea=1 " \ -+ "video=mxcfb0:dev=lcd,FusionF10A,if=RGB24 " \ -+ "video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \ -+ "fbmem=32M; fi\0" \ - "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ - "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ - "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-apalis-imx6-test-for-Capacitive-Touch-Display-7-Para.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-apalis-imx6-test-for-Capacitive-Touch-Display-7-Para.patch new file mode 100644 index 0000000..469009b --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-apalis-imx6-test-for-Capacitive-Touch-Display-7-Para.patch @@ -0,0 +1,44 @@ +From 138f477c5a1990429d35ffadc8f5cea5b1e9f945 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Fri, 19 May 2017 12:41:38 +0300 +Subject: [PATCH 2/2] apalis-imx6: test for Capacitive Touch Display 7" + Parallel + +Test i2c bus if Capacitive Touch Display 7" Parallel display is present +during boot. If found, enable it as the primary display in kernel args. + +Set imx6q-apalis-ixora-v1.1.dtb as the default dtb, as it provides +support for the atmel_mxt_ts touch controller. +--- + include/configs/apalis_imx6.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h +index 9b42af9..121eaa7 100644 +--- a/include/configs/apalis_imx6.h ++++ b/include/configs/apalis_imx6.h +@@ -250,7 +250,7 @@ + "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0" + + #ifndef CONFIG_TDX_APALIS_IMX6_V1_0 +-#define FDT_FILE "imx6q-apalis-eval.dtb" ++#define FDT_FILE "imx6q-apalis-ixora-v1.1.dtb" + #define FDT_FILE_V1_0 "imx6q-apalis_v1_0-eval.dtb" + #else + #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb" +@@ -280,9 +280,14 @@ + "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1" \ + " ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ +- "setup=setenv setupargs fec_mac=${ethaddr} " \ ++ "setup=run setupvideo; setenv setupargs fec_mac=${ethaddr} " \ + "consoleblank=0 no_console_suspend=1 " \ + "console=${console},${baudrate}n8\0 " \ ++ "setupvideo=i2c dev 0; if i2c probe 4A; " \ ++ "then setenv vidargs mxc_hdmi.only_cea=1 " \ ++ "video=mxcfb0:dev=lcd,FusionF07A,if=RGB24 " \ ++ "video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \ ++ "fbmem=32M; fi\0" \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ + "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex_%.bbappend b/meta-fsl-extras/recipes/u-boot/u-boot-toradex_%.bbappend index 7d7f373..e501f5e 100644 --- a/meta-fsl-extras/recipes/u-boot/u-boot-toradex_%.bbappend +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex_%.bbappend @@ -30,5 +30,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-Make-sdboot-default-on-all-boards.patch \ - file://0001-apalis-imx6-enable-Fusion10-display-if-found-during-.patch \ + file://0002-apalis-imx6-test-for-Capacitive-Touch-Display-7-Para.patch \ " diff --git a/meta-toradex-extras/conf/layer.conf b/meta-toradex-extras/conf/layer.conf new file mode 100644 index 0000000..e39649f --- /dev/null +++ b/meta-toradex-extras/conf/layer.conf @@ -0,0 +1,40 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ + ${LAYERDIR}/recipes*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "b2qt_toradex" +BBFILE_PATTERN_b2qt_toradex := "^${LAYERDIR}/" +BBFILE_PRIORITY_b2qt_toradex = "20" diff --git a/meta-toradex-extras/recipes/linux/linux-toradex/0001-Enable-atmel-mxt-multitouch-controller.patch b/meta-toradex-extras/recipes/linux/linux-toradex/0001-Enable-atmel-mxt-multitouch-controller.patch new file mode 100644 index 0000000..1535234 --- /dev/null +++ b/meta-toradex-extras/recipes/linux/linux-toradex/0001-Enable-atmel-mxt-multitouch-controller.patch @@ -0,0 +1,31 @@ +From 37a2e407172b37a880d04c5a7721aeff498854ad Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Fri, 6 Oct 2017 15:54:35 +0300 +Subject: [PATCH] Enable atmel mxt multitouch controller for ixora v1.1 dtb + +Need to disable fusion touch to get the new atmel mxt multitouch +controller to work. +--- + arch/arm/boot/dts/imx6qdl-apalis-ixora-v1.1.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/imx6qdl-apalis-ixora-v1.1.dtsi b/arch/arm/boot/dts/imx6qdl-apalis-ixora-v1.1.dtsi +index 354bf80d..1181502 100644 +--- a/arch/arm/boot/dts/imx6qdl-apalis-ixora-v1.1.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-apalis-ixora-v1.1.dtsi +@@ -166,7 +166,6 @@ + reg = <0x4a>; + interrupt-parent = <&gpio6>; + interrupts = <10 IRQ_TYPE_EDGE_FALLING>; +- status = "disabled"; + }; + + pcap@10 { +@@ -176,6 +175,7 @@ + gpios = <&gpio6 10 0 /* MXM3 11, Pen down interrupt */ + &gpio6 9 0 /* MXM3 13, Reset */ + >; ++ status = "disabled"; + }; + + /* M41T0M6 real time clock on carrier board */ diff --git a/meta-toradex-extras/recipes/linux/linux-toradex_4.1-2.0.x.bbappend b/meta-toradex-extras/recipes/linux/linux-toradex_4.1-2.0.x.bbappend new file mode 100644 index 0000000..eadfa15 --- /dev/null +++ b/meta-toradex-extras/recipes/linux/linux-toradex_4.1-2.0.x.bbappend @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-Enable-atmel-mxt-multitouch-controller.patch" -- cgit v1.2.3-54-g00ecf