From patchwork Tue Oct 18 16:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2445 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C4B1540F4D for ; Tue, 18 Oct 2022 18:46:05 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id f26-20020a7bcc1a000000b003c03db14864sf7056297wmh.6 for ; Tue, 18 Oct 2022 09:46:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666111565; cv=pass; d=google.com; s=arc-20160816; b=yHZbsMMiI4PrUT5RO+7PAQsezYL3XtJB7IhGjahh1Ej3Li4em1QZupRI9EB4qrd7SM B38DitUc4JRorV+NhTper4R/ARblRifbkbDPPVtQ3GTK6Ye9dyANIQnQOj0vY3rqfNsJ ZcsVXjGoGIwlqWaysr47LZ5hukZr4QJXdAgdeMs101CJYLbjqviqpuAy7PuMKQhg7mRP ejUJhwRzgoxDTXzBitpTQlXCP+AfErTCXuduRYzFZ4SP+wgLh15znm9YvYLbwhdAmKfx 5TUeIIzmOSbKPi9Uu6GMIIUVnSVCrEpFKYGWvPafRohlVhBvR1I/xFCP16DmEXh5wCjW kBUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7JzopchC1XxcnzOk4qCPNzgrIUltcIDJcTgS33XVin0=; b=LuvMFNM8Ht9kWEzrnkrelbWDQwvBiJIHqIcj9GNOthHF31rec7OCHr1InvqEL4HSrQ QBdfNI3Jm/zIIloM9v21ZH4UwdhEl3+c4YAxyS3jbaZoXEKSMt0eTgWChrQbAcgmFrwr oBrC3+JQmInQ3k1X7elBpVvSBhMebZO+3e9Gg+to3Eylk7GtczMGlOWrvsp4vdsHLXVW SSj2PEf+HypM/miVBezUWvlzV1H9wJDtx8Dav0Zjx7U9EVPeKIQZIZU5U7UlCmWct1sR SzuBsz8IAy7uS9xN5VrbqPxDfRodb8/gxaIcBhfW+0JN4P4V9VG64OkhA6t3Ecj9bwmG PssQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=REoGGe4Z; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=7JzopchC1XxcnzOk4qCPNzgrIUltcIDJcTgS33XVin0=; b=pOti3dJdwKosp6o3zfPKxulvtseqecTSGpUAX7olQqWz01D3jMPf+AUKoPlcMX2gt4 tUSeigNLbLQCbJ7aGMu1KR8NRpbvsGkTZKvAlLGBLc2egnF3F+SyceXFHuVScnoUMN2a 8Utby3DQVG/5oAFiY4GyYwsqK81qlZYZ/2hhw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7JzopchC1XxcnzOk4qCPNzgrIUltcIDJcTgS33XVin0=; b=i9fNZzB36pIufQXMeJX1A3pSswneb/JRHoMV64qg9UWn5zVxzyj8WONxmlZ09xpgGA GdI+9eO1+m0Fa7i9R/3tvIkqBk9N3xxmNsya8uT6wkYXfE/i56M6++Xn82r3lEuLyOX9 GgKauK5bMh3Lpnlq/2VqzpROy9pGxou3ydG3iwNcWSIIzyUAod1IH2eQBhdc02yDHijH Tzppbbbl0muOhLHWhFnxs6WA2bkVSRvJbx1juKzlhCJlogetOZ4GeRrXWUEMowX40Bq8 xoSIgHhwR25ZPsicJXx8SEPZYVbjpwoyggGO58b2aCibC8zguZb5+OUOZoZgPi4LcgSG Rkgw== X-Gm-Message-State: ACrzQf2mKloKwv4Pt2JEGFdMAHdJLuTpD6hTxshxGuCzr7vRdIkqvwI5 A5rXua7XasNJwroneb8YPnrSqiJx X-Google-Smtp-Source: AMsMyM4Bs9FCESbj259SDn3o6IazsUI9nK6RAZkzwfKKk7cAeq4koq5t/7rPlq3hCpHwc40ldOUxtw== X-Received: by 2002:a1c:e90b:0:b0:3b4:fb6c:7654 with SMTP id q11-20020a1ce90b000000b003b4fb6c7654mr2679066wmc.98.1666111565556; Tue, 18 Oct 2022 09:46:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:d20e:0:b0:228:ddd7:f40e with SMTP id j14-20020adfd20e000000b00228ddd7f40els5539801wrh.3.-pod-prod-gmail; Tue, 18 Oct 2022 09:46:04 -0700 (PDT) X-Received: by 2002:a5d:58d6:0:b0:22e:7318:4e8f with SMTP id o22-20020a5d58d6000000b0022e73184e8fmr2580698wrf.578.1666111564375; Tue, 18 Oct 2022 09:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666111564; cv=none; d=google.com; s=arc-20160816; b=z2XRI7VSseCTQWLqIwZghEUXC7CAhKyHfzsRuVjG94Nd3FRSaW3tHoFpnMwLFVYalE usKP2FosJURr/48voCSNNFWYF+4eZxp0O/9c6wrRFnObSxjRoCYHtAsYqE+7VGTUkHdP neXoG+7yp1VvwjJ2PEHUjIbuBtSeQQod4HGEPy955tu3B6zEjb/umgFAMTkrK20D2GNR EkhZb9oBCePuN3o9TyMY99+cSxpnSdbgaaC95W6UeN+5wbcv40/EGq8+09MCstaYgZP2 cZQxAuLw9xSebqBv8deGHbWyglB3ox1APEma3JcL1Cp7j/xsmFKpjmq1q5+LrlLs3OKO 3yIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gKjYCg4q49kkphz9i6T9qW9XIPEe2OGxCyqrNNxW728=; b=EzsJ9CB1Quf1iFsZnQ+ieSeaNpMqWv/+ELdNcnf+JNfpYRCQBNnRfpkrkyHbM+VS3K 0OiY3YbyD8rJc64U8e5V3v1ATi/n3tQ6X+mQ836kNdbkAyNCRoHUSMPq7laXFZoc7rDa 1Tf+gCEUtedYHx1FvH9RVGZCZUq7izwYBy5WzWGsvwfVqps4Eg2n7f5KjmIgmiUHknoE hEat6/fptToJy9nC44J54tsY6Y08+IdBqN+hUu1UVrLy+e12PtChQec8v0HHFBf5UTho DJUZTTyS0pfWN2dskEfXSAeDpmXfaUPr+UTzsksgYihU1StdYxB2KYVI1f0KKr6GUDjg kj2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=REoGGe4Z; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id t27-20020adfa2db000000b002305cfb999csor7532184wra.23.2022.10.18.09.46.04 for (Google Transport Security); Tue, 18 Oct 2022 09:46:04 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6000:1561:b0:22f:7201:74ad with SMTP id 1-20020a056000156100b0022f720174admr2494172wrz.340.1666111564006; Tue, 18 Oct 2022 09:46:04 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-54-207.cust.vodafonedsl.it. [188.217.54.207]) by smtp.gmail.com with ESMTPSA id e26-20020a05600c4b9a00b003a5537bb2besm13545592wmp.25.2022.10.18.09.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 09:46:02 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: michael@amarulasolutions.com, linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, kamlesh.gurudasani@gmail.com, David Airlie , Daniel Vetter , Maxime Ripard , Thomas Zimmermann , Javier Martinez Canillas , Sam Ravnborg , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/tiny: add support for tft displays based on ilitek, ili9488 Date: Tue, 18 Oct 2022 18:45:26 +0200 Message-Id: <20221018164532.1705215-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221018164532.1705215-1-tommaso.merciai@amarulasolutions.com> References: <20221018164532.1705215-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=REoGGe4Z; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This adds support for ilitek,ili9488 based displays with shift register in front of controller. Waveshare,pico-restouch-lcd-3.5 are such displays Signed-off-by: Tommaso Merciai --- drivers/gpu/drm/tiny/Kconfig | 13 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/ili9488.c | 440 +++++++++++++++++++++++++++++++++ 3 files changed, 454 insertions(+) create mode 100644 drivers/gpu/drm/tiny/ili9488.c diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index 027cd87c3d0d7..6e708e8414806 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -148,6 +148,19 @@ config TINYDRM_ILI9486 If M is selected the module will be called ili9486. +config TINYDRM_ILI9488 + tristate "DRM support for ILI9488 display panels" + depends on DRM && SPI + select DRM_KMS_HELPER + select DRM_GEM_CMA_HELPER + select DRM_MIPI_DBI + select BACKLIGHT_CLASS_DEVICE + help + DRM driver for the following Ilitek ILI9488 panels: + * LCD 3.5" 320x480 TFT (Waveshare Pico-ResTouch-LCD-3.5") + + If M is selected the module will be called ili9486. + config TINYDRM_MI0283QT tristate "DRM support for MI0283QT" depends on DRM && SPI diff --git a/drivers/gpu/drm/tiny/Makefile b/drivers/gpu/drm/tiny/Makefile index 1d9d6227e7ab7..aad6683b2ac40 100644 --- a/drivers/gpu/drm/tiny/Makefile +++ b/drivers/gpu/drm/tiny/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_TINYDRM_ILI9163) += ili9163.o obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o obj-$(CONFIG_TINYDRM_ILI9486) += ili9486.o +obj-$(CONFIG_TINYDRM_ILI9488) += ili9488.o obj-$(CONFIG_TINYDRM_MI0283QT) += mi0283qt.o obj-$(CONFIG_TINYDRM_REPAPER) += repaper.o obj-$(CONFIG_TINYDRM_ST7586) += st7586.o diff --git a/drivers/gpu/drm/tiny/ili9488.c b/drivers/gpu/drm/tiny/ili9488.c new file mode 100644 index 0000000000000..b94d9d4ff4544 --- /dev/null +++ b/drivers/gpu/drm/tiny/ili9488.c @@ -0,0 +1,440 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * DRM driver for Ilitek ILI9488 panels + * + * Copyright 2020 Kamlesh Gurudasani + */ + +#include +#include +#include +#include +#include +#include +#include