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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B379ECAAD8 for ; Tue, 20 Sep 2022 14:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbiITO7O (ORCPT ); Tue, 20 Sep 2022 10:59:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231258AbiITO7N (ORCPT ); Tue, 20 Sep 2022 10:59:13 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B229E52FE3 for ; Tue, 20 Sep 2022 07:59:11 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id n83so3990834oif.11 for ; Tue, 20 Sep 2022 07:59:11 -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=FfB6jorhKu8ZA0PpT9dEi6/rHDfl3OPKXxepeeFIOJk=; b=cWXtGM34hFNYEsVVdJwIobB0yK/By7zW238wEZrxnj8CJHsabL40gzYpK6xtTC23XJ cUNrgXoCLZqqSeKj7ByqLyfjmK4gFZN2kXp9hjPULWceMjfAp6Bj2kykJFYtJnR2P/vX gv/oqSHNy/PUBQNkyVC/2MyUV3qmAd3wSoP0kn6ZJZtD777ADgrBTomvnrVUuuf/cZ0V HdAGIQMo11n2qDO+4tGt+37YqDIKbbG4vKpMiZBrkrQdAKKG703plcbDp2+ziHHrl8x9 kgrwekktMp+pdSkI1Hp2WZdxH3fk4BxzBiSRmKU4STxETshp77wYd0cLGxyy/kR1t3uq mp4g== 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=FfB6jorhKu8ZA0PpT9dEi6/rHDfl3OPKXxepeeFIOJk=; b=74srxFzUIuwbzH1BACWqQxNRWjNQhVEaxMZUGtQtLdBMW+mdRaXzkoEIa7uyiJJwkK luf8HzBbyvrWjGt/A7kSsHgbILWwOx1olyF/FrOmGmVnJ9BLfATRG9bHaEJzUeeVrjKU lycKBFaUXO8DOZYtFJmm5hRpPdjFtc+iFeStUCh/xki6R/FMk/kIaiPHQBaVDFZyeZHL blTUdbZh6VI1BIfsWrNOIRfcRqMfEuCIMlKcTFeunH9C3vohIyvVvdHKk+kMG17HbhF9 sPAFbA+5NiWC6KAq5pzBDMvxmSsrdMXailNFuthi/yJfIr/1KdVRcdQCMo31G65iuXUe zHzQ== X-Gm-Message-State: ACrzQf1ZQhkIvigNRxkqU2aoglXd0MhG0ViUsNGSloIQjl9HUt1EcChb sg4nx/KF0fyI5rKYeBwsQRs= X-Google-Smtp-Source: AMsMyM7J/NBqoeiFcGFqkPDZL0UnSrVOYnxBTMIp9uDkcZ/LF6fzlkZjjNViDqsCMt3uWgb7wmtKAg== X-Received: by 2002:a05:6808:2029:b0:34f:f1c3:9493 with SMTP id q41-20020a056808202900b0034ff1c39493mr1753685oiw.215.1663685950953; Tue, 20 Sep 2022 07:59:10 -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 o4-20020a05680803c400b0033e8629b323sm203156oie.35.2022.09.20.07.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:59:10 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie, sam@ravnborg.org, thierry.reding@gmail.com, Chris Morgan Subject: [PATCH V2 3/3] drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel Date: Tue, 20 Sep 2022 09:59:05 -0500 Message-Id: <20220920145905.20595-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920145905.20595-1-macroalpha82@gmail.com> References: <20220920145905.20595-1-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Chris Morgan Add NewVision NV3051D MIPI-DSI LCD panel 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 | 513 ++++++++++++++++++ 3 files changed, 523 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 a9043eacce97..7258d28dda2f 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..be57b3579bd5 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -0,0 +1,513 @@ +// 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