From patchwork Thu Dec 7 14:16:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13483347 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 6A7F9C10DC3 for ; Thu, 7 Dec 2023 14:17:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E716210E8D6; Thu, 7 Dec 2023 14:17:40 +0000 (UTC) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F9B410E8CD for ; Thu, 7 Dec 2023 14:17:37 +0000 (UTC) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54c77e0832cso1273853a12.0 for ; Thu, 07 Dec 2023 06:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958655; x=1702563455; 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=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=TSKbuBgKVwRlkJ9j6H5M1mlqePqKR+8kgWpyKs7kGOD2qJkWM4FNtMCE6BZDCQ42Ae IK6tWoZ6Bsnfax9KMqzR+T+FWdg3bBJWphgSC/x23UirV/fIX2bR5U9EXdbaZHw2Ra2U 3NvQ45f7BiYVnlaWTmGYdBu/6FJ60L8ULprnM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958655; x=1702563455; 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=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=xNjecxPm+adWZ6idlP2L+sMomY4aUFLLATPZCh0AnH9RV91oNVSRCNEmq4fIsfmYVJ L8n7CjQQlZVWEtto8ji2R2QI/YoZ0X0K79W1fFqyH7e4X2C+JNdow1ox97km4pSwy6H4 X65jS8N+eSKWUDKt0/ylq6/gUkcMbs/hx91hWZcySJDy3NIVJXKkAtY0CDQh/gaA9iyk IbqP67VI86EvmgV8KZB5Own66WEWdwSB6ACm2llO+tp2gl+NHa8wEEVmvD13DXcO6DHG IIGPbbRZYNqYhxfMwZozgBQ5yakEr9sjPuZVGP+rvbN8rFPcDCfUDvzo5JEElJ9Y4oHY lPyQ== X-Gm-Message-State: AOJu0Yz2B7pkSRCZuw1hAu8lmrsWM6aRU35UVOuiSadwV6B9bVrNU0Cq ov+i4DSVlnxja1a2PWyT7P3ivA== X-Google-Smtp-Source: AGHT+IGf/RYHqcdtf29q3/P1QxGfbZeZlG37nkLhl6j9vIFOeWkhaVxG+g8PtgwlI6DtRPMM7i7NXg== X-Received: by 2002:a17:907:9705:b0:9e7:d1ab:e90b with SMTP id jg5-20020a170907970500b009e7d1abe90bmr1777303ejc.19.1701958655536; Thu, 07 Dec 2023 06:17:35 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:35 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Subject: [PATCH v5 06/10] drm/panel: Add Synaptics R63353 panel driver Date: Thu, 7 Dec 2023 15:16:35 +0100 Message-ID: <20231207141723.108004-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.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: , Cc: Neil Armstrong , Dario Binacchi , Thomas Zimmermann , Sam Ravnborg , Amarula patchwork , Maxime Ripard , dri-devel@lists.freedesktop.org, Jessica Zhang , michael@amarulasolutions.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Michael Trimarchi The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Neil Armstrong --- Changes in v5: - Replace a 'return ret' with a 'goto fail' in the r63353_panel_activate() Changes in v4: - Set the reset gpio to low in a single operation - Remove duplicated code for prepare/unprepare callbacks Changes in v2: - Adjust the timings of the panel reset MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-synaptics-r63353.c | 363 ++++++++++++++++++ 4 files changed, 379 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-synaptics-r63353.c diff --git a/MAINTAINERS b/MAINTAINERS index 788be9ab5b73..b82dc141d209 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6874,6 +6874,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.yaml F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR SYNAPTICS R63353 PANELS +M: Michael Trimarchi +S: Maintained +F: Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +F: drivers/gpu/drm/panel/panel-synaptics-r63353.c + DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE M: Jagan Teki S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 99e14dc212ec..d018702be3dc 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -735,6 +735,15 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_SYNAPTICS_R63353 + tristate "Synaptics R63353-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Synaptics R63353 controller. + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index d10c3de51c6d..f267d932c2b5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c new file mode 100644 index 000000000000..3f61fcdc550b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Synaptics R63353 Controller driver + * + * Copyright (C) 2020 BSH Hausgerate GmbH + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include