From patchwork Tue Jun 18 08:15:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13701947 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 A60C7C2BA15 for ; Tue, 18 Jun 2024 08:15:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDCF610E5CD; Tue, 18 Jun 2024 08:15:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YprzLNYD"; dkim-atps=neutral Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id C71FA10E5CA for ; Tue, 18 Jun 2024 08:15:53 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1f44b45d6abso39048015ad.0 for ; Tue, 18 Jun 2024 01:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718698553; x=1719303353; 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=QD1GfKw9SNR3aCxw2m1Eb7xqb4LCyjQ9URCxOhH2S+4=; b=YprzLNYDYExJxnOIAbl74YUxqkBQQVNdXZCSiKUn/KSR9fQ5W6DvtP7iOZvnA4WIyg maNfvw9NTgPL0sHevEYBWpo622fzRKEgDCq5W2gP3dR7mGXIByS+MjXpYbSRIdwguYF2 kYSjFFBoWo+5r2tCRGLFSVVo7eBPmFhUFR0L8BIfpWpZ/YPnA6IzWz4Wp84hulOinWaV VNeSLcCjpya3XCxKeAqwliqoaWXlmKVIf9KPdeYZx4ntxqbhlr6/n12D8vBKV+qcZV+I J4C3lLusk4RwOmek9zpTFL4hhF6IK+Dwvvg7Xn8bVEvYLOSMVH+iE6NoCHigmupyj/Zs ERkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718698553; x=1719303353; 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=QD1GfKw9SNR3aCxw2m1Eb7xqb4LCyjQ9URCxOhH2S+4=; b=MozACK34AE/J/DIV0E52z3i/lmZT66xWEaHVbMgMGJyqV9jMZcW7pFzEgjjbGYufJr ZHGho3RhWUVb2m8UJVtVG2I1p87vdYqJkKBXt7OGH+jVyg+QZWGAQ+fibALP8gZxIM02 NnrXTotYDaiu1VFY4HQ6/r2V2t3t1SayG+VDAlXOsyBOT/0Bc7gU0UkfJv0TTYmkx/80 ww/uUhBQFNL3xRDWFibk42Xb+zz+Bv9ocEZpj3QrLWcJUjegBYE31+t8O3uNeIrlRK8l APuM7XytmoM5tPm3lbrrciBoOzUg/jErSaaBRAEiUKdgk8wS9CP2wYWjZQkVkI3sPWUf nvfQ== X-Forwarded-Encrypted: i=1; AJvYcCXYJpO4ITNDFqG8Ps5DjIaublQOpRjSyE3jFHZCqg+3fPxrm2ykjuFWIVOSNQeoQmiEoCqvHYOwZqXBoGoOgVH8ydVLw1mHIkR2ZMchLsrM X-Gm-Message-State: AOJu0Yx0o3gEkoM55ATy7a02wLsW4+c3QbkB+4C2ZQirmNhTv1j8H2sn xufjI2qwO2ghlU5sJ4Suh3H7KbT11hutBlRWx8d4sGiYEi53sTJm X-Google-Smtp-Source: AGHT+IG9TC/KD0e6xD+FYGIcjwjENiHg6TgflND45V342WU/3qkJFD75wF7dTxbpmYomMIt7s9egqA== X-Received: by 2002:a17:902:ce87:b0:1f7:3d0d:4cd with SMTP id d9443c01a7336-1f8625cf213mr128231965ad.24.1718698553108; Tue, 18 Jun 2024 01:15:53 -0700 (PDT) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855f1a1ebsm91883575ad.238.2024.06.18.01.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 01:15:52 -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 v1 2/3] drm/panel: st7701: Add support for SPI for configuration Date: Tue, 18 Jun 2024 17:15:13 +0900 Message-ID: <20240618081515.1215552-3-kikuchan98@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618081515.1215552-1-kikuchan98@gmail.com> References: <20240618081515.1215552-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 RGB parallel interface, add support for SPI using MIPI DBI helpers. Signed-off-by: Hironori KIKUCHI --- drivers/gpu/drm/panel/Kconfig | 2 + drivers/gpu/drm/panel/panel-sitronix-st7701.c | 211 ++++++++++++++---- 2 files changed, 172 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2ae0eb0638f..1831544400d 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -755,7 +755,9 @@ config DRM_PANEL_SHARP_LS060T1SX01 config DRM_PANEL_SITRONIX_ST7701 tristate "Sitronix ST7701 panel driver" depends on OF + depends on SPI depends on DRM_MIPI_DSI + select DRM_MIPI_DBI 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 421eb4592b6..3c4a66f2fc7 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