Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1530373imm; Tue, 10 Jul 2018 03:33:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeN20SAvVo4iFG7EU9Jqq5elsQzuwMpasU/BTIsxRQgzFuQ9IFOV9Napcc6/ci73jNmeKGu X-Received: by 2002:a17:902:d716:: with SMTP id w22-v6mr24016543ply.98.1531218837856; Tue, 10 Jul 2018 03:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531218837; cv=none; d=google.com; s=arc-20160816; b=QNsXlZNEYmui4q89xjm6Xc4Ue2fhPJpX+OHZs6ybGjl9qI0tYAUxRpiU443vNb3SJn zARRh1HWblnXbJ14J85OlacoZPaOS/fLXAjivIu8AZ2HWbQbUMny3pqhCYwHF99W+2l+ WRfOqOm6wKDO2d9o2cFGU+gDGS4E3e0aEG4NT+3n/61TDz7POzIKFXLBbQd74tCfKmPx kDJa9ytqHYQfYZDEFPXz/UuBTjTQfrGZIk4inzmo+0/ZziF5sWegp5nmdYnCjrNVatLx qRi5rMV0Zv3LA79swue2gqDxlIvHxPe5ISTTWILksGJf1eS00VN7zZIP7Z1J/bMR+itL 5FeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=hZFU7p0bL2nvxw3B1g9tFwcct93fN6ZMn/m0cz7Mvm8=; b=fFDI0D1uWTc9Wsb+tzBb4u4QrfBeT4tb5A5DMZGbeP6MSguBlhgNlj+GWPyCYVH36w iofJYhon4J+wrnJEhgIXdtEvgq6kJwWl20rCyavZegiXhfgjvlsXS9FTBJylu6hLVxnL o+k1ALSBFvXnaMamZYmI4uCAi42HlJpS3qTIeK4nFL2awrsPju0+DKRQwFWvuFnY9XcW JN4eHwi6aMGOk7FKpxbKMEv3oUbZ8RFcp1aveAzKZMsgktJ1WEumeNljv3tCfLEd2gjA o4vcaEs/l5HnrTMOs1dMrKbVv+9URwyF2uIRG8LyWqlIwKh5ctFLdLu6G6FDNSZgXALy T7ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mkU+Z34S; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u188-v6si2373635pgu.256.2018.07.10.03.33.42; Tue, 10 Jul 2018 03:33:57 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mkU+Z34S; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933279AbeGJKc4 (ORCPT + 99 others); Tue, 10 Jul 2018 06:32:56 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50922 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932172AbeGJKcy (ORCPT ); Tue, 10 Jul 2018 06:32:54 -0400 Received: by mail-wm0-f65.google.com with SMTP id v25-v6so24148354wmc.0; Tue, 10 Jul 2018 03:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hZFU7p0bL2nvxw3B1g9tFwcct93fN6ZMn/m0cz7Mvm8=; b=mkU+Z34SQsaRx1UoorcPJvx/If6mhy2HMcvFqPlmPZZiYxUeUtG3dVo+fr4Esistp1 nBIx0RGPRSMQW7vZ4w9phEoPPlwboymQASg0bWixg6f3aX19PoxN3hTuXVpQTHxXhE/M niuDJLIf1O4VtoJwOWEV1xRdImmaf4UMMcIOYweK+uAPJGPQWCykRUISkRXJ/Zq5UxrL b3SfObGfqL84oZUc6HiXIn6xHR/IbrAsj1eSmz2aVAE1etMhPtV4LWnnqljUcDNlVz01 7qTvmPWLh/+GbhDQ8JI3h4yF2OC9/0pCDsGSIcPY5UpuSGQuJfphX896WQGE4FpdGkQC 7kJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hZFU7p0bL2nvxw3B1g9tFwcct93fN6ZMn/m0cz7Mvm8=; b=lrNsNa8+NQHrDQxZ0kio9KyfqunBLlbQsXslpy3znwIy0usA7jE+9y1j0D2PbNnDfF eRpJQfH74swx10om5kE5fzh5mgnnxi6DQl7AQIxMcyNIlsXmWLyiyaURi3K810x+i2le hv+l8t4onY43msRu3xw3R+XinqogXKhi+JOwSkxpaA8GZMkP5Ha+TKcYh6Mb5b2LJ/FX o+/Sk2Uftx+wJGBNXQs6RPYWzUhSzavCyU1xw+EN9joTK3abKkPdB0KZ3GN2EFg66tMY I2wheyNK4Ne+ChLtWcFMuF/cRUqFjU4DWjYkmg09vr0zna/LSBhGx7a9YHAOgwRiyxAt vnww== X-Gm-Message-State: AOUpUlEqsm33GQ+KbgJc33OEFzHRTpfm0C+EVNSYSIqCx7B8XopkMwYO MjfBuXTPzBL40TU3Zurvzfw= X-Received: by 2002:a1c:1d4d:: with SMTP id d74-v6mr4407808wmd.85.1531218772618; Tue, 10 Jul 2018 03:32:52 -0700 (PDT) Received: from localhost (pD9E51B8F.dip0.t-ipconnect.de. [217.229.27.143]) by smtp.gmail.com with ESMTPSA id h5-v6sm4841144wrr.19.2018.07.10.03.32.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 03:32:51 -0700 (PDT) Date: Tue, 10 Jul 2018 12:32:50 +0200 From: Thierry Reding To: Stefan Mavrodiev Cc: David Airlie , Rob Herring , Mark Rutland , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Randy Dunlap , "open list:DRM PANEL DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH v2 1/1] drm/panel: Add support for Olimex LCD-OLinuXino panel Message-ID: <20180710103250.GG1504@ulmo> References: <1529909093-17021-1-git-send-email-stefan@olimex.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gvF4niNJ+uBMJnEh" Content-Disposition: inline In-Reply-To: <1529909093-17021-1-git-send-email-stefan@olimex.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gvF4niNJ+uBMJnEh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 25, 2018 at 09:44:35AM +0300, Stefan Mavrodiev wrote: > 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. >=20 > Signed-off-by: Stefan Mavrodiev > --- > Changes for v2: > - Changed lcd_olinuxino_funcs to static const >=20 > .../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/olime= x,lcd-olinuxino.txt > create mode 100644 drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c >=20 > diff --git a/Documentation/devicetree/bindings/display/panel/olimex,lcd-o= linuxino.txt b/Documentation/devicetree/bindings/display/panel/olimex,lcd-o= linuxino.txt > new file mode 100644 > index 0000000..a89f9c8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxin= o.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 pane= ls. > +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 volt= age > + > +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 =3D "olimex,lcd-olinuxino"; > + reg =3D <0x50>; > + power-supply =3D <®_vcc5v0>; > + enable-gpios =3D <&pio 7 8 GPIO_ACTIVE_HIGH>; > + backlight =3D <&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 > =20 > +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=C3=B8nnes > 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. > =20 > +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/Makef= ile > 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) +=3D panel-ilitek-i= li9322.o > obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) +=3D panel-innolux-p079zca.o > obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) +=3D panel-jdi-lt070me05000.o > obj-$(CONFIG_DRM_PANEL_LG_LG4573) +=3D panel-lg-lg4573.o > +obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) +=3D panel-olimex-lcd-olinu= xino.o > obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) +=3D panel-orisetech-otm8009a= =2Eo > obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) +=3D panel-panasonic-vvx1= 0f034n00.o > obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) +=3D panel-raspberrypi-t= ouchscreen.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..89d7816 > --- /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