* [PATCH v2 0/2] input: driver for RPi's official 7" touchscreen
@ 2018-12-11 11:23 Nicolas Saenz Julienne
2018-12-11 11:23 ` [PATCH v2 1/2] dt-bindings: input: Add Raspberry Pi Touchscreen Nicolas Saenz Julienne
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Saenz Julienne @ 2018-12-11 11:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-rpi-kernel, stefan.wahren, eric, agraf, afaerber,
Nicolas Saenz Julienne, Dmitry Torokhov, Masanari Iida,
Rob Herring, Hans de Goede, Zhu Yi, Eugen Hristev, Corentin Labbe,
Hans-Christian Noren Egtvedt, Mark Jonas, Heiko Schocher,
linux-input, devicetree
This small series adds support for Raspberry pi's 7" touchscreen. Which
alongside with the backlight driver are the last devices needed to have
a functional touchscreen upstream.
With this setup the board's VC4 firmware takes care of communicating
with the touch chip and provides data though a shared memory area
provided by the driver. The driver takes care of polling the firmware
whenever at around 60Hz since there is no interrupt line available.
The 1.0 revision of the touchscreen is based on the ft5426 chip.
Technically, with some changes in edt-ft54x4.c we should be able to
access the data directly through I2C. Yet this bus is meant to be owned
by RPi's firmware and might access it anytime. For example, to
configure RPi's camera device. As sharing the bus master interface is
not possible a series of alternatives have been tested unsuccessfully
[1]. It seems that we'll be unable to access the chip directly in a
"clean" way which leaves us with this firmware based solution.
The driver was rewritten based on the one available on the downstream
Raspberry Pi kernel tree: https://github.com/raspberrypi/linux/.
This series is based on v4.20-rc6 and was tested on a RPi 3 B+.
Changelog
v1 -> v2:
- Remove all references to RPi3
- Spelling errors
- Rename config string
- Reorder devm_add_action_or_reset()
- Remove __set_bit(EV* functions
- Remove INPUT_MT_POINTER flag
- Add missing header files
- Create define to invalidate npointers
- Fix commit ordering and titles
RFC -> PATCH:
- Better dependencies check in Kconfig
- Add SPDX tag
- Use polled input device API
- Use input_mt_sync_frame()
- Drop reference from dt node in probe
- Use devm where possible
- Small cosmetic changes
[1] https://lists.infradead.org/pipermail/linux-rpi-kernel/2018-December/008444.html
===
Nicolas Saenz Julienne (2):
dt-bindings: input: Add Raspberry Pi Touchscreen
input: add official Raspberry Pi's touchscreen driver
.../touchscreen/raspberrypi,firmware-ts.txt | 26 ++
drivers/input/touchscreen/Kconfig | 12 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/raspberrypi-ts.c | 227 ++++++++++++++++++
4 files changed, 266 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt
create mode 100644 drivers/input/touchscreen/raspberrypi-ts.c
--
2.19.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] dt-bindings: input: Add Raspberry Pi Touchscreen
2018-12-11 11:23 [PATCH v2 0/2] input: driver for RPi's official 7" touchscreen Nicolas Saenz Julienne
@ 2018-12-11 11:23 ` Nicolas Saenz Julienne
2018-12-18 16:52 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Saenz Julienne @ 2018-12-11 11:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-rpi-kernel, stefan.wahren, eric, agraf, afaerber,
Nicolas Saenz Julienne, Dmitry Torokhov, Rob Herring,
Mark Rutland, linux-input, devicetree
Adds device tree documentation for Raspberry Pi's official 7"
touchscreen.
This binding is meant to be used as an overlay.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
.../touchscreen/raspberrypi,firmware-ts.txt | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt
diff --git a/Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt b/Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt
new file mode 100644
index 000000000000..2a1af240ccc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt
@@ -0,0 +1,26 @@
+Raspberry Pi firmware based 7" touchscreen
+=====================================
+
+Required properties:
+ - compatible: "raspberrypi,firmware-ts"
+
+Optional properties:
+ - firmware: Reference to RPi's firmware device node
+ - touchscreen-size-x: See touchscreen.txt
+ - touchscreen-size-y: See touchscreen.txt
+ - touchscreen-inverted-x: See touchscreen.txt
+ - touchscreen-inverted-y: See touchscreen.txt
+ - touchscreen-swapped-x-y: See touchscreen.txt
+
+Example:
+
+firmware: firmware-rpi {
+ compatible = "raspberrypi,bcm2835-firmware";
+ mboxes = <&mailbox>;
+
+ ts: touchscreen {
+ compatible = "raspberrypi,firmware-ts";
+ touchscreen-size-x = <800>;
+ touchscreen-size-y = <480>;
+ };
+};
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: Add Raspberry Pi Touchscreen
2018-12-11 11:23 ` [PATCH v2 1/2] dt-bindings: input: Add Raspberry Pi Touchscreen Nicolas Saenz Julienne
@ 2018-12-18 16:52 ` Rob Herring
0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-12-18 16:52 UTC (permalink / raw)
Cc: linux-kernel, linux-rpi-kernel, stefan.wahren, eric, agraf,
afaerber, Nicolas Saenz Julienne, Dmitry Torokhov, Mark Rutland,
linux-input, devicetree
On Tue, 11 Dec 2018 12:23:53 +0100, Nicolas Saenz Julienne wrote:
> Adds device tree documentation for Raspberry Pi's official 7"
> touchscreen.
>
> This binding is meant to be used as an overlay.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
> .../touchscreen/raspberrypi,firmware-ts.txt | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-18 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-11 11:23 [PATCH v2 0/2] input: driver for RPi's official 7" touchscreen Nicolas Saenz Julienne
2018-12-11 11:23 ` [PATCH v2 1/2] dt-bindings: input: Add Raspberry Pi Touchscreen Nicolas Saenz Julienne
2018-12-18 16:52 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).