From patchwork Fri Oct 28 20:50:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13024297 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 CB223C38A02 for ; Fri, 28 Oct 2022 20:50:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D818910E8DB; Fri, 28 Oct 2022 20:50:42 +0000 (UTC) Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7113C10E8D3 for ; Fri, 28 Oct 2022 20:50:19 +0000 (UTC) Received: by mail-oi1-x22a.google.com with SMTP id u132so7429188oib.0 for ; Fri, 28 Oct 2022 13:50:19 -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 :message-id:reply-to; bh=SAKWPFpO3BDLUB9/xcvkmx+u4pZn+K38YEespUXVWZ8=; b=i8aiZtUYdidz6fWtX50LJTxT4lS1bC5gtMRB/ilv4Zhn7J7FvaaZdJelfnMu1QuLZM /CVBowyurKP5qmgYViZVKlysJrZbTQ8SjoqYeGL2Cg8wuidodSJ8/ehP3v/5wwD71LUL llunPrGdRKLRe560eyrRnng+JB2gJYriaEcm/kdDFpzG/COrOoSO+u0TRANbMVhfabHf duHNH922VHeSIBhjeFVBtzRqlRaYRDSH4ZBznJiBxcvZeJJe3HEvIeCBD5xJLJcuWhoh NdipWcgX9rCbaJujEU8mdFewPOWV3rChgXb5rJ1O/ep94kbm3zZ0IOKYx+A7PzMiLaTg EPKw== 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:message-id:reply-to; bh=SAKWPFpO3BDLUB9/xcvkmx+u4pZn+K38YEespUXVWZ8=; b=EBgIR7CX2n1uPogu24woh+2wyaNiVyWMU86F19op9ruP42XSSqfKVMo0OAdCJEH566 ZDIeznyDbCVl8C0ezqa4JJ7cq1b/M10iP8qC8Gf3vr98HaFxVgFG/k3m34JteomMSvOu ZsybrdWF2EaEpkLwnyscWO+Xe5rb6Pqt+bmww7UaaaXi05h+sdr2/pn+Sx2NEmJGZc2S IjZDp6ut+VpzCckljFl2Vj/vRHS+xKPxETkMif2jtUtz7e7c4myjyN05H3i001XpYKdE qoxNOhXLGGzKQQwIwr5FPWBbYE7OvmmBSs1QOO/Yrop7iibBvStAwVrwHflAqKwI+Rjs 1vuA== X-Gm-Message-State: ACrzQf2WVdx8jMLDbphpOXForSHHHPmPrUyx809A2weS9ujJ0boxHP5T rsOmgDH2omT5htX4DIYTLfXugOKN9YM= X-Google-Smtp-Source: AMsMyM6Va6F5X+75SML1FxCdXLht5GJauhTZKq6gyEnqeTX2Sm5psZ0KZHg7C+nDy6D6okPbeRhKAw== X-Received: by 2002:a05:6808:f05:b0:354:a393:a9d3 with SMTP id m5-20020a0568080f0500b00354a393a9d3mr8953500oiw.95.1666990217827; Fri, 28 Oct 2022 13:50:17 -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 i2-20020a056830010200b0066756fdd916sm2090778otp.68.2022.10.28.13.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 13:50:17 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V4 3/3] drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel Date: Fri, 28 Oct 2022 15:50:09 -0500 Message-Id: <20221028205009.15105-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028205009.15105-1-macroalpha82@gmail.com> References: <20221028205009.15105-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, sam@ravnborg.org, Chris Morgan , robh+dt@kernel.org, thierry.reding@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan Support NewVision NV3051D panels as found on the Anbernic RG353P and RG353V. The underlying LCD part number for the RG353x devices is unknown, so the device name and a fallback for the driver IC is used instead. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-newvision-nv3051d.c | 523 ++++++++++++++++++ 3 files changed, 533 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-newvision-nv3051d.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index a582ddd583c2..427c22bdbfb3 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -296,6 +296,15 @@ config DRM_PANEL_NEC_NL8048HL11 panel (found on the Zoom2/3/3630 SDP boards). To compile this driver as a module, choose M here. +config DRM_PANEL_NEWVISION_NV3051D + tristate "NewVision NV3051D DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + This driver supports the NV3051D based panel found on the Anbernic + RG353P and RG353V. + config DRM_PANEL_NEWVISION_NV3052C tristate "NewVision NV3052C RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 34e717382dbb..cb03b3a82738 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o +obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) += panel-newvision-nv3052c.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c new file mode 100644 index 000000000000..e7e607f4045d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -0,0 +1,523 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * NV3051D MIPI-DSI panel driver for Anbernic RG353x + * Copyright (C) 2022 Chris Morgan + * + * based on + * + * Elida kd35t133 3.5" MIPI-DSI panel driver + * Copyright (C) Theobroma Systems 2020 + */ + +#include +#include +#include +#include +#include +#include + +#include