Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4903599imm; Tue, 19 Jun 2018 01:37:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJnZav7rOp8HC9roppen33b5pZqgO9aFUmdV4R/5rzfQVB6aDE83RAPLCucjCGdmibvMK8l X-Received: by 2002:a63:9345:: with SMTP id w5-v6mr14315631pgm.212.1529397450800; Tue, 19 Jun 2018 01:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529397450; cv=none; d=google.com; s=arc-20160816; b=SHj8b/z5PE3udbVMGmpbzU9WdaLakhPh53SDUOOMYNH48WEn1r9gX0a+lYm9HIJ8gB sMvdS/DB0Gq+QcEqRK9E9w1BZ+kf1t1jEWQH92tEdICS8g+U5004MJi6oMsMrcwDyR8o +9H5qtOXOuYwJ42/x9AxFsOBCDp/yfp0bw9JNH//Q81bNyW2NPZeWzfAW1QcdGzPzhyI nPqrDlXhrbfeQFJmmEKSECtFYEcSklRiK6krY+Fr98WZGCJRBs+dmAP0/ukPcafv0RmA LsFADeTP6Aw2FLkH8nOks5r/AITW1xPeJ2bgT3mP9v+JyloK2a1lp5oxhH0/mfj8tJ6m QcTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:arc-authentication-results; bh=byz2ivIYE3tUhMfuXglGhDQ5w+IWncj8biwxTLKKj38=; b=janMt75x4JBd11vVMgV5XlDKUIPV4XdC2DkvUbaGIgOHq4cAhJBj/1wYtcK3bMqFBM AeVXwOPr+R73hs2LbJ0WLR5mr6va+of19m/Dxxy/Xc5UMe00YHob5x2ejltUEDoXQmih Ul0oIDe0w6P0qjnZHsM2B3GuCAS7DkUBrZrvGhoPxG1QihHQrFy0s4hJ41M2wNw6HqiT aRLmihlId7GSeKP17LeTZusm85AdYWhhMWNA2rXRQuqrUEuhxGbwRljsFeTw9jy9WDDx Qp32NjXWY5FTTeZgercgVgVaUkR6R+RDOhvXufTHKdVZnOrKC/fUGsR1lbejO6ySbE0x alSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i69-v6si13874713pge.674.2018.06.19.01.37.16; Tue, 19 Jun 2018 01:37:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937477AbeFSIfW (ORCPT + 99 others); Tue, 19 Jun 2018 04:35:22 -0400 Received: from olimex.com ([184.105.72.32]:51147 "EHLO olimex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937314AbeFSIfS (ORCPT ); Tue, 19 Jun 2018 04:35:18 -0400 Received: from localhost.localdomain ([195.238.85.143]) by olimex.com with ESMTPSA (ECDHE-RSA-AES128-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AES(128):Mac=SHA256) (SMTP-AUTH username stefan@olimex.com, mechanism PLAIN) for ; Tue, 19 Jun 2018 01:35:09 -0700 From: Stefan Mavrodiev To: Stefan Mavrodiev , Thierry Reding , David Airlie , Rob Herring , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Andrew Morton , Randy Dunlap , dri-devel@lists.freedesktop.org (open list:DRM PANEL DRIVERS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/1] drm/panel: Add support for Olimex LCD-OLinuXino panel Date: Tue, 19 Jun 2018 11:34:02 +0300 Message-Id: <1529397260-16340-1-git-send-email-stefan@olimex.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds Olimex Ltd. LCD-OLinuXino bridge panel driver. The panel is used with different LCDs (currently from 480x272 to 1280x800). Small EEPROM chip is used for identification, which holds some factory data and timing requirements. Signed-off-by: Stefan Mavrodiev --- .../display/panel/olimex,lcd-olinuxino.txt | 42 +++ MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 360 +++++++++++++++++++++ 5 files changed, 419 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt create mode 100644 drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c diff --git a/Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt b/Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt new file mode 100644 index 0000000..a89f9c8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt @@ -0,0 +1,42 @@ +Binding for Olimex Ltd. LCD-OLinuXino bridge panel. + +This device can be used as bridge between a host controller and LCD panels. +Currently supported LCDs are: + - LCD-OLinuXino-4.3TS + - LCD-OLinuXino-5 + - LCD-OLinuXino-7 + - LCD-OLinuXino-10 + +The panel itself contains: + - AT24C16C EEPROM holding panel identification and timing requirements + - AR1021 resistive touch screen controller (optional) + - FT5x6 capacitive touch screnn controller (optional) + - GT911/GT928 capacitive touch screen controller (optional) + +The above chips share same I2C bus. The EEPROM is factory preprogrammed with +device information (id, serial, etc.) and timing requirements. + +Touchscreen bingings can be found in these files: + - input/touchscreen/goodix.txt + - input/touchscreen/edt-ft5x06.txt + - input/touchscreen/ar1021.txt + +Required properties: + - compatible: should be "olimex,lcd-olinuxino" + - reg: address of the configuration EEPROM, should be <0x50> + - power-supply: phandle of the regulator that provides the supply voltage + +Optional properties: + - enable-gpios: GPIO pin to enable or disable the panel + - backlight: phandle of the backlight device attacked to the panel + +Example: +&i2c2 { + panel@50 { + compatible = "olimex,lcd-olinuxino"; + reg = <0x50>; + power-supply = <®_vcc5v0>; + enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; + backlight = <&backlight>; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 624c3fd..30343f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4557,6 +4557,12 @@ S: Supported F: drivers/gpu/drm/nouveau/ F: include/uapi/drm/nouveau_drm.h +DRM DRIVER FOR OLIMEX LCD-OLINUXINO PANELS +M: Stefan Mavrodiev +S: Maintained +F: drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c +F: Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt + DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS M: Noralf Trønnes S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 25682ff..0292994 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -81,6 +81,16 @@ config DRM_PANEL_LG_LG4573 Say Y here if you want to enable support for LG4573 RGB panel. To compile this driver as a module, choose M here. +config DRM_PANEL_OLIMEX_LCD_OLINUXINO + tristate "Olimex LCD-OLinuXino panel" + depends on OF + depends on I2C + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Olimex Ltd. + LCD-OLinuXino panel. The panel is used with different sizes LCDs, + from 480x272 to 1280x800, and 24 bit per pixel. + config DRM_PANEL_ORISETECH_OTM8009A tristate "Orise Technology otm8009a 480x800 dsi 2dl panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f26efc1..185027f 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o +obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen.o diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c new file mode 100644 index 0000000..0bc04ff --- /dev/null +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c @@ -0,0 +1,360 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * LCD-OLinuXino support for panel driver + * + * Copyright (C) 2018 Olimex Ltd. + * Author: Stefan Mavrodiev + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include