From patchwork Sun Aug 4 06:14:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13752486 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 305D1C3DA7F for ; Sun, 4 Aug 2024 06:16:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADCF710E071; Sun, 4 Aug 2024 06:16:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cMCvlCuB"; dkim-atps=neutral Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id 320BA10E071 for ; Sun, 4 Aug 2024 06:16:16 +0000 (UTC) Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3db14339fb0so6527526b6e.2 for ; Sat, 03 Aug 2024 23:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722752175; x=1723356975; 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=Fnql3FbykIepF8kn8jYdsbjwm/J1dth3YluSeiLe3RM=; b=cMCvlCuBV7HILmcTxb3i+o8Cl+y8wdqVwBeNIirPzDP1yvCO/DSoaLj6uKNcrMssfH 35+vaHaCMdoSsa3wCM7QiVG96hzPWbF4tVv0nGN3Y9z7vwFj+BnfbxDT5X/9uojt9Jt1 3/rL9YDCO/EV5/rJYsUkr6G2eg1PEtBp86NltrfbtlV+V1nuPjb+1tLxm/QtfvSGiWmZ hi6uZqP/JyqWMUDgRg7/gl9X2atM1BtjmbxPOt1FN5EwZ3h9o/JUAK+b5fDRJz7s2fuY CuwlD/chBDweuzCRrEYO+FtPpcryl3266b/5Ofwl7FYms+k8NrBb1Tsrac04/K76Qory YYfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722752175; x=1723356975; 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=Fnql3FbykIepF8kn8jYdsbjwm/J1dth3YluSeiLe3RM=; b=a4WPXwzVoFi2Xx7ibfHdFQwILys+2abBiQK93MGF3Rl5+FXNfBYQ6g1JhEvaBubAfm RB67nTwot87C7oCIEi93h12KYh7ncy2LDB83v6K4yK607Z3zGwZx2pnzM2NyxE6DdgXp +uN96yztgc2hn/G6p5eMgIZVem6L3K5RQg7cscrlRl+rcsYq0CVaBF7hwVnCoyAs1xbs Rs1E6Xc6Y/N5FKW/Inel5MOHGiF01+9Lp6i+oRoX4taelgflcpKVZP+mrBV/kxCiK2SA 0XbXgRkmR7DEd/T72D1xpLGm1znlpsdBPUfZDwr3xKPV15VZ+gl2B5e6zHLdqslkF5N4 31pA== X-Forwarded-Encrypted: i=1; AJvYcCWY2WaXWHP1xPPZjEJLVpY7G61zwhuwDSZes9FNZu3tS0EhFwycpRDRVHs+d+KMe6ZgGJz2h6U/e4s81keuJcX+OIvR1Yquan80Xwmcghym X-Gm-Message-State: AOJu0YwLQ679cQG/j5zepLMyDesdeeUAQZ2OvjWqHbS1gxPGE0wg4UCG SD8VnALKXxPg4cLRfCqmfiPOQSmJbPPT76AFgv2NJtL47Z7+fu8Y X-Google-Smtp-Source: AGHT+IEJzz1gHaqM2q/OdiVr5f66AvMuo9n4CECuHPcEhxtVPnmU2yXtswZqOsJRNmBEGBzil0HePw== X-Received: by 2002:a05:6808:1a01:b0:3da:c428:1c51 with SMTP id 5614622812f47-3db557fc32dmr12228412b6e.8.1722752175351; Sat, 03 Aug 2024 23:16:15 -0700 (PDT) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff58f29ef4sm44194195ad.14.2024.08.03.23.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Aug 2024 23:16:15 -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 v4 4/5] drm/panel: st7701: Add support for SPI for configuration Date: Sun, 4 Aug 2024 15:14:48 +0900 Message-ID: <20240804061503.881283-5-kikuchan98@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240804061503.881283-1-kikuchan98@gmail.com> References: <20240804061503.881283-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 9f49b0189d3..5d83ddc06ec 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -784,7 +784,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