From mboxrd@z Thu Jan 1 00:00:00 1970 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 C435DC38145 for ; Tue, 6 Sep 2022 18:37:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3089A10E11A; Tue, 6 Sep 2022 18:36:55 +0000 (UTC) Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 594BF10E0EA for ; Tue, 6 Sep 2022 18:36:49 +0000 (UTC) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1274ec87ad5so15447844fac.0 for ; Tue, 06 Sep 2022 11:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=y9g1AFP23iUxIbJ/LupHZ67b+12wZhLD3PiLPF+2Q5E=; b=ZDlPY9byR8JEcQu/dH3WKXa0aCDcAavSMotIz6syh2sUJv8mzy5U68jLhCCb78j//m aW6AhoCIFr47+jwmEyTMqZ+gTITnNufGsNqXCC/bLB51sa7kaCVz3vEhvL6skbsQ4p/l FWsZIf6yeH1NCP/6hP0CLLR+2TzV/VCyQER/OqJkj/QLopQtnIqSd+fP/PDIgwiPB/tq 1bV57+hcujLuAU4HO/Gkf+fTgBLy3mchyS/NG/DUCj6tyvqco5WJnuEu8YYhoLTKQhXU h21RZJ8VZWLSNOIwwYfE89BBtJ3hAxxuMaQQl6EUD0Jr82fvzoYQqg58ZFsf67wx/2dX T+Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=y9g1AFP23iUxIbJ/LupHZ67b+12wZhLD3PiLPF+2Q5E=; b=FhvLCddPxuouXJcKZC3Z7d+O1+3TIF6wLKRW1A+xXCFM9XPIDiKPmhHpaKAf/Euozq TlFhi4BSTepsLBEvdPyvBfUMHvSES7oddfX0AYjAuY89et2dnAkJts1iu8aa4wdlPY6u Zz/SjLl2sEFlovc/VEdKVwV+2ZYa+kdiU4V4JU1zB/jIl+WxQlZAioV+Ksfd/6+QIGLi dTtj5pLFVGm3sy+QYbKPjY+6Tk3knL+S5NcpnrJkIg6g1DIQlGK8ksmS4k2uQx1fS5ZZ 8FalwAdpDEBLBJtw4Z+LSMFlSzhApp4AJIVbQ875+GSkx3gshbbrRM+CuqV+K8mVLXmD 0Caw== X-Gm-Message-State: ACgBeo3+rLp6ARk1FhHwZv2ul7w0+I+nl4Tjl8DX1vWOMk1Otexcb/uB cGC8PUEUXgU0AlUmCMT7eftL1w/W97I= X-Google-Smtp-Source: AA6agR65tKewA/n8u3zJssvGA00Lj56dHbucb4LIBfb85mT7+/Pp0kVZ2UyelV6wT6DGV/upx/fk3g== X-Received: by 2002:a05:6808:643:b0:343:1207:b0b7 with SMTP id z3-20020a056808064300b003431207b0b7mr10624055oih.97.1662489407838; Tue, 06 Sep 2022 11:36:47 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id j22-20020a9d7f16000000b00638ef9bb847sm6158887otq.79.2022.09.06.11.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 11:36:47 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/panel: Add Samsung AMS495QA01 MIPI-DSI LCD panel Date: Tue, 6 Sep 2022 13:36:42 -0500 Message-Id: <20220906183642.12505-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220906183642.12505-1-macroalpha82@gmail.com> References: <20220906183642.12505-1-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, airlied@linux.ie, Chris Morgan , robh+dt@kernel.org, thierry.reding@gmail.com, sam@ravnborg.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan Support Samsung AMS495QA01 panel as found on the Anbernic RG503. Note This panel receives video signals via DSI, however it receives commands via 3-wire SPI. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-samsung-ams495qa01.c | 468 ++++++++++++++++++ 3 files changed, 479 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-ams495qa01.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index a9043eacce97..954b66a2adee 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -444,6 +444,16 @@ config DRM_PANEL_RONBO_RB070D30 Say Y here if you want to enable support for Ronbo Electronics RB070D30 1024x600 DSI panel. +config DRM_PANEL_SAMSUNG_AMS495QA01 + tristate "Samsung AMS495QA01 DSI panel" + depends on OF && SPI + depends on DRM_MIPI_DSI + select DRM_MIPI_DBI + help + DRM panel driver for the Samsung AMS495QA01 panel. This panel + receives video data via DSI but commands via 3-Wire 9-bit + SPI. + config DRM_PANEL_SAMSUNG_ATNA33XC20 tristate "Samsung ATNA33XC20 eDP panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 34e717382dbb..de0b57baf851 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -42,6 +42,7 @@ obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS495QA01) += panel-samsung-ams495qa01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o diff --git a/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c new file mode 100644 index 000000000000..60afea40a60e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c @@ -0,0 +1,468 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Samsung ams495qa01 MIPI-DSI panel driver + * Copyright (C) 2022 Chris Morgan + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include