ARM: dts: imx7ulp: add focaltech touch panel ft5426 support

Add focaltech new touch panel ft5426 support.
Set the ft5426 as default panel for dts. If want to use the old panel, then
it needs to boot with imx7ulp-evk-ft5416.dtb file.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This commit is contained in:
Haibo Chen 2019-08-15 16:43:10 +08:00 committed by Dong Aisheng
parent d9c5474c4c
commit a596add667
4 changed files with 60 additions and 0 deletions

View File

@ -616,6 +616,7 @@ dtb-$(CONFIG_SOC_IMX7D) += \
imx7s-warp.dtb
dtb-$(CONFIG_SOC_IMX7ULP) += \
imx7ulp-evk.dtb \
imx7ulp-evk-ft5416.dtb \
imx7ulp-evkb.dtb \
imx7ulp-evkb-emmc.dtb \
imx7ulp-evkb-sd1.dtb \

View File

@ -0,0 +1,15 @@
/*
* Copyright 2019 NXP
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "imx7ulp-evk.dts"
&lpi2c7 {
focaltech@38 {
focaltech,panel-type = <FT5416>;
focaltech,swap-xy;
};
};

View File

@ -238,6 +238,33 @@
status = "disabled";
};
&lpi2c7 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_lpi2c7 &pinctrl_touch_io>;
pinctrl-1 = <&pinctrl_lpi2c7 &pinctrl_touch_io>;
status = "okay";
focaltech@38 {
compatible = "focaltech,fts";
reg = <0x38>;
interrupt-parent = <&gpio_ptf>;
interrupts = <0 0x2>;
focaltech,panel-type = <FT5426>;
focaltech,reset-gpio = <&gpio_ptf 1 0x1>;
focaltech,irq-gpio = <&gpio_ptf 0 0x2>;
focaltech,max-touch-number = <5>;
focaltech,display-coords = <0 0 480 854>;
focaltech,have-key;
focaltech,key-number = <3>;
focaltech,keys = <139 102 158>;
focaltech,key-y-coord = <2000>;
focaltech,key-x-coords = <200 600 800>;
};
};
&rpmsg{
/*
* 64K for one rpmsg instance, default using 2 rpmsg instances:
@ -319,6 +346,20 @@
>;
};
pinctrl_lpi2c7: lpi2c7grp {
fsl,pins = <
IMX7ULP_PAD_PTF12__LPI2C7_SCL 0x27
IMX7ULP_PAD_PTF13__LPI2C7_SDA 0x27
>;
};
pinctrl_touch_io: touchiogrp {
fsl,pins = <
IMX7ULP_PAD_PTF0__PTF0 0x10043
IMX7ULP_PAD_PTF1__PTF1 0x20043
>;
};
pinctrl_pwm0: pwm0grp {
fsl,pins = <
IMX7ULP_PAD_PTF2__TPM4_CH1 0x2

View File

@ -15,4 +15,7 @@
#define MATRIX_KEY(row, col, code) \
((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF))
#define FT5416 0x54160002
#define FT5426 0x54260002
#endif /* _DT_BINDINGS_INPUT_INPUT_H */