From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB1F9C3279B for ; Tue, 10 Jul 2018 13:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8BB9E20883 for ; Tue, 10 Jul 2018 13:09:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jkl9WzMF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BB9E20883 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933256AbeGJNJA (ORCPT ); Tue, 10 Jul 2018 09:09:00 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34273 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101AbeGJNI6 (ORCPT ); Tue, 10 Jul 2018 09:08:58 -0400 Received: by mail-wr1-f65.google.com with SMTP id c13-v6so14519146wrt.1; Tue, 10 Jul 2018 06:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=YnhuqDmoeHjxgjNu4XDygjxmlwVDz+emJ4HAtoGGqUk=; b=Jkl9WzMFOdixsy/TR6Mz68XvEN96jVJV/pEH9PTsfmR/k62C1lBHOanKm/+L8GWMQN j22dcR18SEgdGXlpjJiuZwp9qdOdiVJEvjZeVrjCNIma3nBgNvdIe9+kQWiwjkh3OVqe C65Ll/1ISFYLE8mx5h/G22DU6ALQzy76PPkY4L9Bso0WwM5HwOKHavvpqaisVoehm+M+ jFfjxR4wgE7wyPbyJDCTjcHSrZTs0V8W1ML+bzxBdqniMeLNC1ZgYPJEMEObinn7AWmZ vfZ6P8gI0ZwD0AtCQFGnEn4yl8C8mF0xMb6sSnjp/vnDfHG+BiKog9X6KcQFBSlMT0VF nSlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YnhuqDmoeHjxgjNu4XDygjxmlwVDz+emJ4HAtoGGqUk=; b=AF8Eo659a36/C/b2CpTrKCLU6NEx3Ns0SJMtqb6INXA9tAUaAUFdCae+UiBDd6sm5R 6eTikE0dDQasdnvuR/bmTCFYfGYaZH2Cu4MkR7F2MJltX1hs/ZhGT3++1LjPX4ZVq84C OoJMvX2cCpFAxQWfgzxJqVaoEYR9wRWaykyzKkbOhc5KNx2TTr+t9QdEF2osnkHBzyA4 R8N60gffRdSMH21DzuJFbM3yswI1ptk/N7RZwtEZt9/9vJHux0dDc6lvbfth+y/oRFQc r5A5UzbncHgic7AGcQRoxrXRtd/wltFItHWQkcF1eaKQx/H7euaZcskpqlZtBrz70oVt /t9g== X-Gm-Message-State: APt69E19nmI1O35R5I6Pws+i2xkXno1Xmz5C+qq2xdYxNTYOqdtyqhwa 2kn4S63ykeL5qH7EKKAm4nMQ6fUa6Pk= X-Google-Smtp-Source: AAOMgpc7K2bGer15MhaW54cZrqStNxUpV6fQoe6+uCHefY+Fol2UkWsY+ebYDtVLeA+KcBEJCq1NqA== X-Received: by 2002:adf:a197:: with SMTP id u23-v6mr19151567wru.50.1531228136673; Tue, 10 Jul 2018 06:08:56 -0700 (PDT) Received: from [192.168.0.59] ([195.238.85.143]) by smtp.gmail.com with ESMTPSA id 6-v6sm2483824wmi.26.2018.07.10.06.08.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 06:08:56 -0700 (PDT) Subject: Re: [PATCH v2 1/1] drm/panel: Add support for Olimex LCD-OLinuXino panel To: Thierry Reding , 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 References: <1529909093-17021-1-git-send-email-stefan@olimex.com> <20180710103250.GG1504@ulmo> From: Stefan Mavrodiev Message-ID: Date: Tue, 10 Jul 2018 16:08:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180710103250.GG1504@ulmo> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2018 01:32 PM, Thierry Reding wrote: > 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. >> >> Signed-off-by: Stefan Mavrodiev >> --- >> Changes for v2: >> - Changed lcd_olinuxino_funcs to static const >> >> .../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..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