From patchwork Tue Sep 20 17:09:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 12982413 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 A6FF4C6FA82 for ; Tue, 20 Sep 2022 17:09:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B84A110E728; Tue, 20 Sep 2022 17:09:57 +0000 (UTC) Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by gabe.freedesktop.org (Postfix) with ESMTPS id 965FC10E1FE for ; Tue, 20 Sep 2022 17:09:47 +0000 (UTC) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-127ba06d03fso5192679fac.3 for ; Tue, 20 Sep 2022 10:09:47 -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=qkEkl1T24VS6THCkYE/ePve2BexAGuuTTaNBxBE7vME=; b=GdNwOw3jD/7pINx9z9fWkNhc8elh6hMz5MbddK2cvX4jaFWZjL4tfH596RxYnRKvKa zDgaT6hPaXFw1exakoYc6GW+3FT0rAXvnkBgtrUnLSb+KN4Lm3VxSGsljGtHaB1aieID B96jHMFE6c9kyShOxXkfm5wTZ0VY/rnJeVvKNKWdsz28OTSlnWJdv11+w7ulI366gec1 /z9uH2SGb7znFqZ73PTjq2tuBb24HkaaWt/1CH8RMaiWPbhCE7G0LvYxq2VRgmvtVLm8 3b1b4uPgLwNtVppKj7AfioGpWn/dtb2CgAzSJhP/Vv32/j0INV93x5e2uD/E8m/1tIhp 6X8Q== 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=qkEkl1T24VS6THCkYE/ePve2BexAGuuTTaNBxBE7vME=; b=XjoYreykCS7CDh/gaarqO5ne3KBZht2H++dIvNortQJPQkjvzx4RGwj+FNLtVvuB+Z xZ21IKAWgHl/tFD1i7IuWOOJVB5oHKQ8sNiafKEWzXLQcsI5A9SQiZ4kz/tQCTmN6LWq vezkquAXH73R3858vhnWUWS2pZ+UGO/QjXoBP37zLhu2UuROFeOki8HjSSgjcPHM7erJ FiCG5LpoTku4VxbER9fQuE742zrFSPwMxvU4v551+xOlKhwCBYpNYvSbJDdhs6SYMs9r oHD07kCVwPoXx9dBE4UNeJpP/GDYGXcKzXN+x+VK7tRCDm8uuJLLkG9uR3JYrmIfBWqc YclA== X-Gm-Message-State: ACrzQf2FVrdAJYT4bcjKqKra1A4RCcyVyX/YiyN0LU9bpfBVvtmVwXeT LCh5Q8VsMlFQdrCxeAZPHRNXV/N0db0= X-Google-Smtp-Source: AMsMyM6blCSAhNeOyz5NuIH6XGBmaYwelD4Q1GwgkFAdPygTXc/cOEUo4hbGpX8hR8/HEjVyxNmiPQ== X-Received: by 2002:a05:6870:f10a:b0:127:856b:828c with SMTP id k10-20020a056870f10a00b00127856b828cmr2560103oac.225.1663693786401; Tue, 20 Sep 2022 10:09:46 -0700 (PDT) Received: from wintermute.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id v13-20020a9d69cd000000b00636956b3080sm121468oto.43.2022.09.20.10.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 10:09:45 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 2/2] drm/panel: Add Samsung AMS495QA01 MIPI-DSI LCD panel Date: Tue, 20 Sep 2022 12:09:37 -0500 Message-Id: <20220920170937.14486-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920170937.14486-1-macroalpha82@gmail.com> References: <20220920170937.14486-1-macroalpha82@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: , 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 | 505 ++++++++++++++++++ 3 files changed, 516 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..d693ba5f20c9 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c @@ -0,0 +1,505 @@ +// 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