input: add DFROBOT touchscreen controller
Subsystems (3)
cover input: add DFROBOT touchscreen controller
The DFROBOT DFR0678 [1] and DFR0550 [2] touchscreen displays are meant to be compatible with the official RaspberryPi 7in display. However instead of directly conntecting the FT5x06 touch controller to the I2C bus going to the host processor they route it through an MCU and emulate a virtual FT5x06 controller but don't do a very good job at it. The method the RaspberryPi firmware used to read the touch data is supported (which consists of reading R2 to get the number of touch points, then reading 4 bytes of data for each point in discrete I2C transactions. If you try to use the FT5x06 driver which reads all registers starting at R0 at once you will get invalid point data.
This controller lacks an interrupt and does not send UP events so polling mode is used and event ID tracking is used to emulate UP events.
This series adds dt bindings and a standalone driver for this touch controller as opposed to an RFC series I sent out that attempts to add support to the existing edt-ft5x06 driver.
Tim
[1] - https://www.dfrobot.com/product-2193.html
[2] - https://www.dfrobot.com/product-1784.html
Tim Harvey (3):
dt-bindings: Add vendor prefix for DFRobot
dt-bindings: touchscreen: Add dfr0550 bindings
input: touchscreen: add dfr0550 support
.../bindings/input/touchscreen/dfr0550.yaml | 53 +++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 5 + drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/dfr0550.c | 208 ++++++++++++++++++ 6 files changed, 281 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/dfr0550.yaml create mode 100644 drivers/input/touchscreen/dfr0550.c
Signature · 1 line
2.17.1
RFC PATCH 1/3 dt-bindings: Add vendor prefix for DFRobot
Add vendor prefix for DFRobot (http://dfrobot.com)
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -293,6 +293,8 @@ patternProperties: description: Devantech, Ltd. "^dfi,.*": description: DFI Inc. + "^dfr,.*": + description: DFRobot. "^dh,.*": description: DH electronics GmbH "^difrnce,.*":
Signature · 1 line
2.17.1
RFC PATCH 2/3 dt-bindings: touchscreen: Add dfr0550 bindings
In reply to Tim HarveyThis adds device tree bindings for the touchscreen controller used on the DFRobot DFR0550 touchscreen.
--- .../bindings/input/touchscreen/dfr0550.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/dfr0550.yaml
Documentation/devicetree/bindings/input/touchscreen/dfr0550.yaml new file +53 -0
@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/dfr0550.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DFRobot DFR0550 Touch Controller Bindings + +maintainers: + - Tim Harvey <[email protected]> + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + const: dfr,dfr0550 + + reg: + maxItems: 1 + + poll-interval: + description: Poll interval time in milliseconds. + $ref: /schemas/types.yaml#/definitions/uint32 + + touchscreen-size-x: true + touchscreen-size-y: true + touchscreen-fuzz-x: true + touchscreen-fuzz-y: true + touchscreen-inverted-x: true + touchscreen-inverted-y: true + touchscreen-swapped-x-y: true + +additionalProperties: false + +required: + - compatible + - reg + - poll-interval + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@38 { + compatible = "dfr,dfr0550"; + reg = <0x38>; + }; + }; + +...
Signature · 1 line
2.17.1
RFC PATCH 3/3 input: touchscreen: add dfr0550 support
In reply to Tim HarveyAdd support for the touch controller found on a DFROBOT DFR0550/DFR0776 touchscreen display.
These touchscreen displays are intended to be compatible with the official Raspberry Pi 7in display which has an FTx06 touch controller directly attached to the 15pin connector to the host processor. However these displays have an FTx06 touch controller that connected to an I2C master on a STM32F103 micro controller which polls the FTx06 and emulates a virtual I2C device connected to the 15pin connector to the host processor.
The emulated FTx06 implements a subset of the FTx06 register set but must be read with individual transactions between reading the number of points and the point data itself.
Additionally there is no IRQ made available so this is a polling driver.
--- MAINTAINERS | 5 + drivers/input/touchscreen/Kconfig | 12 ++ drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/dfr0550.c | 208 ++++++++++++++++++++++++++++ 4 files changed, 226 insertions(+) create mode 100644 drivers/input/touchscreen/dfr0550.c
MAINTAINERS +5 -0
@@ -5458,6 +5458,11 @@ F: include/net/devlink.h F: include/uapi/linux/devlink.h F: net/core/devlink.c +DFR0550 TOUCHSCREEN DRIVER +M: Tim Harvey <[email protected]> +S: Supported +F: drivers/input/touchscreen/dfr0550.c + DH ELECTRONICS IMX6 DHCOM BOARD SUPPORT M: Christoph Niedermaier <[email protected]> L: [email protected]
drivers/input/touchscreen/Kconfig +12 -0
@@ -309,6 +309,18 @@ config TOUCHSCREEN_DA9052 To compile this driver as a module, choose M here: the module will be called da9052_tsi. +config TOUCHSCREEN_DFR0550 + tristate "Touchscreen support for DFROBOT DFR0550" + depends on I2C + help + Say Y here to enable the support for the touchscreen found + on DFROBOT DFR0550 and DFR0678 displays. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called dfr0550. + config TOUCHSCREEN_DYNAPRO tristate "Dynapro serial touchscreen" select SERIO
drivers/input/touchscreen/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-$(CONFIG_TOUCHSCREEN_CYTTSP4_I2C) += cyttsp4_i2c.o cyttsp_i2c_common.o obj-$(CONFIG_TOUCHSCREEN_CYTTSP4_SPI) += cyttsp4_spi.o obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o obj-$(CONFIG_TOUCHSCREEN_DA9052) += da9052_tsi.o +obj-$(CONFIG_TOUCHSCREEN_DFR0550) += dfr0550.o obj-$(CONFIG_TOUCHSCREEN_DYNAPRO) += dynapro.o obj-$(CONFIG_TOUCHSCREEN_EDT_FT5X06) += edt-ft5x06.o obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o
drivers/input/touchscreen/dfr0550.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
2.17.1
Quoted 28 lines · Tim Harvey
The DFROBOT DFR0678 [1] and DFR0550 [2] touchscreen displays are meant to be compatible with the official RaspberryPi 7in display. However instead of directly conntecting the FT5x06 touch controller to the I2C bus going to the host processor they route it through an MCU and emulate a virtual FT5x06 controller but don't do a very good job at it. The method the RaspberryPi firmware used to read the touch data is supported (which consists of reading R2 to get the number of touch points, then reading 4 bytes of data for each point in discrete I2C transactions. If you try to use the FT5x06 driver which reads all registers starting at R0 at once you will get invalid point data.
This controller lacks an interrupt and does not send UP events so polling mode is used and event ID tracking is used to emulate UP events.
This series adds dt bindings and a standalone driver for this touch controller as opposed to an RFC series I sent out that attempts to add support to the existing edt-ft5x06 driver.
Tim
[1] - https://www.dfrobot.com/product-2193.html
[2] - https://www.dfrobot.com/product-1784.htmlTim Harvey (3):
dt-bindings: Add vendor prefix for DFRobot
dt-bindings: touchscreen: Add dfr0550 bindings
input: touchscreen: add dfr0550 support
Quoted 10 lines
.../bindings/input/touchscreen/dfr0550.yaml | 53 +++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 5 + drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/dfr0550.c | 208 ++++++++++++++++++ 6 files changed, 281 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/dfr0550.yaml create mode 100644 drivers/input/touchscreen/dfr0550.c
Any feedback on this?
The other approach I posted an RFC series for was to add support to the existing edt-ft5x06 driver [1].
Best regards,
Tim
[1] https://patchwork.kernel.org/project/linux-input/list/?series=596977