From patchwork Tue Feb 19 13:20:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Josef_Lu=C5=A1tick=C3=BD?= X-Patchwork-Id: 10819899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51C896CB for ; Tue, 19 Feb 2019 13:21:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 407FF2C17F for ; Tue, 19 Feb 2019 13:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E9712C187; Tue, 19 Feb 2019 13:21:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 798412C1C6 for ; Tue, 19 Feb 2019 13:21:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A5C4892AD; Tue, 19 Feb 2019 13:21:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21B00892AD for ; Tue, 19 Feb 2019 13:21:18 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id v26so2784430wmh.3 for ; Tue, 19 Feb 2019 05:21:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=atacMM8c5eLCPvE/lPmKXvK+XxUYETGC6K5MnxHq6x0=; b=S5dyQfFv0ncx5zUYTv7SLsuPy83zmBycbzNmLUnaeInyNcMWXU3jkHyHn/EmbmlVen qpY0XsTxk2HO+wuCXa+ksfcKrUc8eL/Lx2luHGgm/2ZV7DcfJudZ0+XBKdQlNa3IuKGv i6kV8DKGuZoW2NDJeoAgS7DyragVvt41mOcwdY2KTJiW5pLA+TeB+nKPnVtrZqu13nlH HvuSuiYTneqDaAxcwbdTNIF2IyEquAo2EtcQ9BG3pOrx2ocN6UtRx/YJBx1n1uk7BSTD euN++VCVao/9LjBE74JraUOwd1xlShBnJJBlrFY0XM1DXcvCW3AzHSH9h/cmjROPiBVd EF6Q== X-Gm-Message-State: AHQUAuaycNJqXSgpw8FIsPmkV7triQ8UL2RGfsKJMXyMbRkSSEETOOkI japdqFmakG+/dCwfOno4zi9DQXfS8Ik= X-Google-Smtp-Source: AHgI3IbaXaF4oWY638PgwgmGOkrvHYLYLgGHYIIQcrWnp7FiwFcIX09mOiVGChuxyye6nYuiBQfn8g== X-Received: by 2002:a7b:c450:: with SMTP id l16mr2651802wmi.133.1550582477054; Tue, 19 Feb 2019 05:21:17 -0800 (PST) Received: from e430.riomail.cz (188-175-152-238.client.rionet.cz. [188.175.152.238]) by smtp.gmail.com with ESMTPSA id r15sm19870218wrt.37.2019.02.19.05.21.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 05:21:15 -0800 (PST) From: Josef Lusticky To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/2] Add DRM panel driver for Ilitek ILI9341 based panels in parallel RGB mode Date: Tue, 19 Feb 2019 14:20:59 +0100 Message-Id: <20190219132101.27196-1-josef@lusticky.cz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lusticky.cz; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=atacMM8c5eLCPvE/lPmKXvK+XxUYETGC6K5MnxHq6x0=; b=Pf1yCoEOlg0XKPOS0o/HRscAjwttKWGE2NR9MMSFHCWs1PAmdAw3uV0AA+KoOzgDfe 8x0U2DRiCC68iUO+9+TAu2nDQRLNy03H4dVLW75JzWFWxx+UOrihXjCqRWeclNt4Vzb5 DGpEtWsMls1BMmFQXhGS9baGQ51PEdl0m8FBhK6aqa/wlA04ZMuv7S/3YRsfT3FuxprF AD8OVDxDG6Yxl15E0N0X1lahuQ0xxoMhBrvjlXLo8xni3u0JMLUoxxhkn+qHaTSdVtxP EDnQJ+gO5CLyQj6hyfUed3Y6jHaBnJHYFTES5PuhC2ElUuEP0GNT08UtNkH6SJ//Pnk/ rcBA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Josef Lusticky Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP These patches add panel driver for ili9341-based panels in parallel RGB mode. The driver was developed for DispleyTech DT024CTFT LCD panel [1] which features ILI9341 chip [2]. The driver was tested on the Allwinner A13 (sun5i) platform. The driver supports 240x320 pixel resolution with 18-bit RGB (6 wires per color) and SPI control bus with Data/Command GPIO pin. The Data/Command GPIO is optional, however at the moment the driver requires it: The display itself is capable of 9-bit SPI without the Data/Command GPIO. Support for such configuration can be added later to the driver. Optional HW reset gpio can be specified, otherwise SW reset command is used during the initialization. The ILI9341 displays have two command sets: Level 1 conforms to MIPI specs Level 2 is outside the MIPI specs - custom defines are used in the driver The ILI9341 supports various RGB modes (e.g. NVSYNC, DE_LOW, clock freq, etc.), however values that are presented in the ILI9341 datasheet [2] are used by the driver in struct drm_display_mode. General note on ILI9341-based displays: The ILI9341 chip can be used in parallel RGB with SPI control or in SPI only mode where the image data itself is also transferred via SPI. This driver supports parallel RGB displays - it works with displays wired with 18-bit RGB input, it does not support SPI data mode (i.e. Multi-inno mi0283qt or Adafruit yx240qv29 are not supported by this driver). The SPI data mode is naturally much slower than the parallel RGB mode. General note on DisplayTech DT024CTFT panel: The panel supports different configuation options (18/16/6-bit RGB or 9/8-bit SPI) depending on the IM[0:3] wiring. To keep this patch small for reveiw, at the moment only 18-bit RGB mode and 8-bit SPI with Data/Command GPIO is supported by this driver. I kindly ask you for a patch review. Links to datasheet: [1] https://www.displaytech-us.com/sites/default/files/display-data-sheet/DT024CTFT-v10_0.pdf [2] https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf Best regards, Josef Lusticky Josef Lusticky (2): drm/panel: Add Ilitek ILI9341 panel driver dt-bindings: panel: Add Ilitek ILI9341 panel documentation .../bindings/display/panel/ilitek,ili9341.txt | 33 ++ MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 320 ++++++++++++++++++ 5 files changed, 367 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c