From patchwork Sat Jul 6 10:23:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13725814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65C59C2BD09 for ; Sat, 6 Jul 2024 10:24:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CCF9510E154; Sat, 6 Jul 2024 10:24:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Di6ZiVCx"; dkim-atps=neutral Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id E40F010E154 for ; Sat, 6 Jul 2024 10:24:28 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1fb70169c23so739815ad.1 for ; Sat, 06 Jul 2024 03:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720261468; x=1720866268; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/9StNyDVPENkogHm64stpcTfuGvnBMbgIW5F8HqFcpo=; b=Di6ZiVCx7TG/kH9+EQG6CM2iQJEUcrCMmlf5YHENC9RXOc3MohT+JFm+BeSt4cD/Ni xnu4MGJNIpwrVEMQEx7aB3Gpfq9ox6NgrNTf0zFsLGTRbfG7saDOKWUPInqhRWGillT6 hlF7vY8vKKhPLZdwdNxF+Aif1jp4VuhXjuQTUdccrBvGVX0EetqAUYmNIDFCVA/vCYPm JVNO2XMzKqWc5kAFtXbq2mVsh5DMylC5Lj7iRcIsVPMWiEbPTubhe5ztgAOvHg2Y8B/8 haNQaKs6xWvg8DH9U46+ImctoxIfvjAm1jKLbUMjF0QeUkvSUnm8+A56/rEB+O8JGio4 IFew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720261468; x=1720866268; h=content-transfer-encoding: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=/9StNyDVPENkogHm64stpcTfuGvnBMbgIW5F8HqFcpo=; b=V4DYVmjB++FRlpQsnCm2Jqwovvze7SOfuaEg6RX6FxiMBEj9HksIdVtujtIOUvrxpG iAGVSoNS8YFtIpirZMMmJL3E8Y+v2L3iUjK4Z8cSozSKDc2TMKRVk2G6tvsuDqKi8HPm XMNu0piMM0StabBJ6PxENbYJW+2oCVCUzRNBmuIEnXn4x0U3qYh87Tp8bd8zr+5jk+m3 V1FJhVAS8+HUua711x848Ln7Xm0fDHUjGCBERpcHzfJE/oiU/kYGo40I0rF2ZtFCDh8E EKV1LAjsEwqAvKD0ReJkyA/woj1RYz8ZEUItCSkIQl48lMcWdXi9NaisUK8aqSmJOavi vA8Q== X-Forwarded-Encrypted: i=1; AJvYcCUpMTz4pUxTina5i/QMgikHsfX6pT2OcRUV85cLjDvbmEcL6pLui4D5GJZyQHKc2GRu6AE4XuYRMnM3cHhTv4k2q/shAuUghzy2ub1c0k56 X-Gm-Message-State: AOJu0Yzb8taFDyCMvslJmaI61B0toyu+4diGa9tWCjG0+ukTNZSyyHh8 QqV/JSapZc/81LwEr814nvKu/anj3LHrGlXY/HZuUgnIAdXGxIF1 X-Google-Smtp-Source: AGHT+IFhOqQRf+hln7Sdoe6lWRdReT7lTXNhbyEB2QZas/lvUfHDiWJaueAuySapmXzAwwGFb3fBbw== X-Received: by 2002:a17:902:d4d2:b0:1fb:3179:db2d with SMTP id d9443c01a7336-1fb33ee5c13mr52243615ad.46.1720261468289; Sat, 06 Jul 2024 03:24:28 -0700 (PDT) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fb67e04f64sm9126625ad.214.2024.07.06.03.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 03:24:27 -0700 (PDT) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Jagan Teki , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 4/5] drm/panel: st7701: Add support for SPI for configuration Date: Sat, 6 Jul 2024 19:23:35 +0900 Message-ID: <20240706102338.99231-5-kikuchan98@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240706102338.99231-1-kikuchan98@gmail.com> References: <20240706102338.99231-1-kikuchan98@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The ST7701 supports not only MIPI DSI, but also SPI as an interface for configuration. To support a panel connected via SPI with an RGB parallel interface, add support for SPI using MIPI DBI helpers. Signed-off-by: Hironori KIKUCHI Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/Kconfig | 3 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 123 +++++++++++++++--- 2 files changed, 110 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2ae0eb0638f..3dd52869520 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -755,7 +755,8 @@ config DRM_PANEL_SHARP_LS060T1SX01 config DRM_PANEL_SITRONIX_ST7701 tristate "Sitronix ST7701 panel driver" depends on OF - depends on DRM_MIPI_DSI + depends on SPI || DRM_MIPI_DSI + select DRM_MIPI_DBI if SPI depends on BACKLIGHT_CLASS_DEVICE help Say Y here if you want to enable support for the Sitronix diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index a0644f7a4c8..9e83a760a8a 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -4,6 +4,7 @@ * Author: Jagan Teki */ +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include