From patchwork Mon Mar 4 12:50:31 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: 10837781 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 D78731575 for ; Mon, 4 Mar 2019 12:51:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C38CA2A15A for ; Mon, 4 Mar 2019 12:51:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7E032A13C; Mon, 4 Mar 2019 12:51:10 +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 B000F29BB2 for ; Mon, 4 Mar 2019 12:51:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C604E89B78; Mon, 4 Mar 2019 12:51:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE203899B7 for ; Mon, 4 Mar 2019 12:51:04 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id w6so5407029wrs.4 for ; Mon, 04 Mar 2019 04:51:04 -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=S51CZSWURx4sxnX/2hqCBcM8ME8uXacKZHmSIAuzVao=; b=O4/a0CheDp2M542K83YFC+yyZ12PwPlblJAA0fSbXWjUNWWVQDmJQ1IvDuk5cA/y3s oqHzBiJXvQEcYva440eaX/kHyubBh22DLukHgnabSCzpR/L6rnyP/bVT3211jzyqvkcc QicD32YhS+/wHwjadbSwAuREXLlVjPjM4kLoqn61IXREDQKMW/o/Dko+jlFCDCiaAQIZ BOc23PDgabwsZ3bPVF/BohyCo4Jwwm+x/NFYiK4WhIV2PiHpqniPJOIYNat/krXfSscM +kswR8oBCRSqysRKzJ1aZ+wc+PmhEfQ/yXLHuyn3Kl4/1QaEp7+fDqCEPUakpQkJxFTs KeZA== X-Gm-Message-State: APjAAAWbP3V3AIEH5kmwMqQ8HCL0/IzJ0s4n+iklKTv3exmlKepl6335 +zgpGguC8wgkfT6cm/UQwknOug== X-Google-Smtp-Source: APXvYqxRYDyo+LR3i2fYgKf545aujyRMTosHLXp/O6p1i/izPxLZjMH4vkVo/M2S3HTt0uOkh0rN/A== X-Received: by 2002:adf:dd86:: with SMTP id x6mr12239100wrl.250.1551703863181; Mon, 04 Mar 2019 04:51:03 -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 o18sm18377514wrg.40.2019.03.04.04.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 04:51:02 -0800 (PST) From: Josef Lusticky To: thierry.reding@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 0/2] Add DRM panel driver for Ilitek ILI9341 based panels in parallel RGB mode Date: Mon, 4 Mar 2019 13:50:31 +0100 Message-Id: <20190304125033.28841-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=S51CZSWURx4sxnX/2hqCBcM8ME8uXacKZHmSIAuzVao=; b=Zxw1zhWKR6e0D/qMCLmqYKC1YsYWnQW3Y1eSCUDLLUVGcUFTh6MY9vNVk6EZAxq+lQ do67uwVInsE8R2vMLe/lONir00CFV6IZ5TrsdYWmTDiNibBz08c+CXn7vHEg/rGmqM7G R3aRVw4xAqp3dz+dTWgWgft9wjzUv+Xz+4E/yYIFBL/Y4j9Bky2ZFeODpyYACgGVYVjQ JtRBxWCyGtjdMPcgCeSwfi4CdoxeciKj1YzToJ/UAqiSWQI4mljb9C5akN4aF4H3nwQZ 9cGLEr7OZT1mnzNc3dFlUYdgr/AaoTxBvjOiwvm8xEV3kkO/7jheu6NQ/DWqEdYCyJWZ l6rw== 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: maxime.ripard@bootlin.com, airlied@linux.ie, Josef Lusticky , devicetree@vger.kernel.org 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: DisplayTech DT024CTFT panel is configured with the IM[0:3] pins set to "1110" - see page 10 in datasheet [2]. 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 parallel RGB 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