From patchwork Thu Apr 18 08:15:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13634454 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 F2193C4345F for ; Thu, 18 Apr 2024 10:09:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD5CB10EB6F; Thu, 18 Apr 2024 10:09:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b="ALC8WIWX"; dkim-atps=neutral Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C3D810FB3E for ; Thu, 18 Apr 2024 08:16:15 +0000 (UTC) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6e9e1a52b74so161501a34.0 for ; Thu, 18 Apr 2024 01:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1713428174; x=1714032974; darn=lists.freedesktop.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=YI++royKKBEGzn4ZdNLD2YG0nCfqJuUcPsyVGC3PWBo=; b=ALC8WIWX5FwQWDG+L8ilnVIrbs0MvlV2dFa6U9EDXO1DBb2h5P0Bb9RmAYxiFsN6fR WW6S1yWCck3vGo/BTTBFo/pRPaa8nGq7XZkczIEhBM3uwlEDc/ESAjxTuu83PVxyIsGb 3RqDsJTasnDg/+SmbP2siVDOYyOsALzH/nmxgRGVl+Zt4W8oYtYaW1pujHX5/bmnnmoU y/kIw+H1MUxF/6iAUy2xCoysWqGcjProrvpzJesuq1yXONkE97vIhw7jXbVNDBsLT/RD DbNgegM7/tV+n+p5GS9qsIMbPVIj+AU4rGDdes9LTnYimB+alBC2hFdLYpQFQtjG/eZY UKhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713428174; x=1714032974; h=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=YI++royKKBEGzn4ZdNLD2YG0nCfqJuUcPsyVGC3PWBo=; b=mmdlg9l0JtcyiMrTGJFjnbVOBAyQ4qCB0X1ogpX6Dh902g1ZVdjs3RWJ4FGs3f6lf5 WHSyEm3XJhCu8KujjbJueAE1adVlKaLU34SfmVaCEogJfg/CBQO6s1B5jYGZle7NTzTP VmNGEp+4iQ+h3sA9mwb64oeKzb1l99vjzgSIUupa3ubqZTaA5qiTngVPA+Oy3YyETdAK ZjtvD96MvtdjyIn6SyC8tDGFFR+86vahg5zuUzJlwRQUj6hhVonPksJSvHMeuRU+vSvd BEJPN48TegScB7JQ1dFHmkqp61cpI2glGSiCp6zppb6E6QisScg1J3Oqu6mV2KqeGMBw XjJg== X-Gm-Message-State: AOJu0Yyi69Ab1pAG/p2Iuu2CEFHzshlA6wNZtcxfZxprt5Tr4sajqt8a FOEKyxuzAinlpPF4DzDx7vnAhMOEGDUy0lCgDEmLSrlht6rG8KUAucnvK3Ayvqw= X-Google-Smtp-Source: AGHT+IFaS8d7xX8Vdhv+fWPlod2E0mr7Ym0OVZ1VbnMTF8PCPIzPTDD/RUOjOrZ+R80RweZ9Akv99w== X-Received: by 2002:a05:6870:e98d:b0:235:3d0:2bd4 with SMTP id r13-20020a056870e98d00b0023503d02bd4mr2393991oao.31.1713428174539; Thu, 18 Apr 2024 01:16:14 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id o18-20020a634e52000000b005f3d54c0a57sm881394pgl.49.2024.04.18.01.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:16:14 -0700 (PDT) From: lvzhaoxiong To: mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, dianders@google.com, hsinyi@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lvzhaoxiong Subject: [PATCH v1 2/2] drm/panel: kd101ne3: add new panel driver Date: Thu, 18 Apr 2024 16:15:48 +0800 Message-Id: <20240418081548.12160-3-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> References: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailman-Approved-At: Thu, 18 Apr 2024 10:09:14 +0000 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The kingdisplay panel is based on JD9365DA controller. Add a driver for it. Signed-off-by: lvzhaoxiong --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-kingdisplay-kd101ne3.c | 607 ++++++++++++++++++ 3 files changed, 617 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 154f5bf82980..2c73086cf102 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -297,6 +297,15 @@ config DRM_PANEL_KINGDISPLAY_KD097D04 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. +config DRM_PANEL_KINGDISPLAY_KD101NE3 + tristate "Kingdisplay kd101ne3 panel" + 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 + Kingdisplay kd101ne3 controller. + config DRM_PANEL_LEADTEK_LTK050H3146W tristate "Leadtek LTK050H3146W panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 24a02655d726..cbd414b98bb0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_DRM_PANEL_JDI_LPM102A188A) += panel-jdi-lpm102a188a.o obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.o obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o +obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD101NE3) += panel-kingdisplay-kd101ne3.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c new file mode 100644 index 000000000000..dbf0992f8b81 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c @@ -0,0 +1,607 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Panels based on the JD9365DA display controller. + * Author: Zhaoxiong Lv + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include