From patchwork Wed Dec 5 22:09:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 1008470 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 439Cd434JJz9s3l for ; Thu, 6 Dec 2018 09:11:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727741AbeLEWLv (ORCPT ); Wed, 5 Dec 2018 17:11:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:41694 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727436AbeLEWLu (ORCPT ); Wed, 5 Dec 2018 17:11:50 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6740FAD05; Wed, 5 Dec 2018 22:11:48 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-input@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org, stefan.wahren@i2se.com, eric@anholt.net, agraf@suse.de, Nicolas Saenz Julienne , Dmitry Torokhov , Rob Herring , Eugen Hristev , Hans de Goede , Jonathan Cameron , Masanari Iida , Zhu Yi , Corentin Labbe , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 0/2] input: driver for RPi's official 7" touchscreen Date: Wed, 5 Dec 2018 23:09:01 +0100 Message-Id: <20181205220902.27682-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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-rc5 and was tested on a RPi 3 B+. [1] https://lists.infradead.org/pipermail/linux-rpi-kernel/2018-December/008444.html === Nicolas Saenz Julienne (2): input: add official Raspberry Pi's 7" touchscreen driver Input: raspberrypi-ts - add devicetree binding documentation .../touchscreen/raspberrypi,firmware-ts.txt | 25 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/raspberrypi-ts.c | 252 ++++++++++++++++++ 4 files changed, 290 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt create mode 100644 drivers/input/touchscreen/raspberrypi-ts.c