From patchwork Thu Sep 9 04:40:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 508480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BE50C433EF for ; Thu, 9 Sep 2021 04:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CB8861131 for ; Thu, 9 Sep 2021 04:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350309AbhIIElX (ORCPT ); Thu, 9 Sep 2021 00:41:23 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:34996 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234691AbhIIElX (ORCPT ); Thu, 9 Sep 2021 00:41:23 -0400 Date: Thu, 09 Sep 2021 04:40:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1631162410; bh=PZ6HBgkuXibr0gRzhr0DQAD1QhPhDCggyHpEpVtWVyw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=oHS0srMrivQME6VWgmFuKvFB3f5wEOzYe55+b5jwHK2thu3fEberN0KhgB+OMmUTV KPDSjTFurtQyM+zdyhNi4Wj32AIrRSqdAzvZ+5YPJu+QcT6bmKFPHKa2k1UNyKIAIw nBCBsr08Ut5qzoFlF2XFaSCm/PLnREkm+bw2GOK4= To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring From: Yassine Oudjana Cc: Yassine Oudjana , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-kernel@vger.kernel.org Reply-To: Yassine Oudjana Subject: [PATCH v2 1/2] drm/panel: Add driver for LG.Philips SW43101 DSI video mode panel Message-ID: <20210909043904.12982-2-y.oudjana@protonmail.com> In-Reply-To: <20210909043904.12982-1-y.oudjana@protonmail.com> References: <20210909043904.12982-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a driver for the LG.Philips SW43101 FHD (1080x1920) OLED DSI video mode panel. This driver has been generated using linux-mdss-dsi-panel-driver-generator. Signed-off-by: Yassine Oudjana --- Changes since v1: - Add regulator support. - Add MAINTAINERS entry. MAINTAINERS | 5 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-lgphilips-sw43101.c | 363 ++++++++++++++++++ 4 files changed, 379 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-lgphilips-sw43101.c diff --git a/MAINTAINERS b/MAINTAINERS index f58dad1a1922..46431e8ad373 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5899,6 +5899,11 @@ S: Orphan / Obsolete F: drivers/gpu/drm/i810/ F: include/uapi/drm/i810_drm.h +DRM DRIVER FOR LG.PHILIPS SW43101 PANEL +M: Yassine Oudjana +S: Maintained +F: drivers/gpu/drm/panel/panel-lgphilips-sw43101.c + DRM DRIVER FOR LVDS PANELS M: Laurent Pinchart L: dri-devel@lists.freedesktop.org diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index beb581b96ecd..d8741c35bbfc 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -226,6 +226,16 @@ config DRM_PANEL_SAMSUNG_LD9040 depends on OF && SPI select VIDEOMODE_HELPERS +config DRM_PANEL_LGPHILIPS_SW43101 + tristate "LG.Philips SW43101 DSI video mode panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the LG.Philips SW43101 FHD + (1080x1920) OLED DSI video mode panel found on the Xiaomi Mi Note 2. + To compile this driver as a module, choose M here. + config DRM_PANEL_LG_LB035Q02 tristate "LG LB035Q024573 RGB panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index c8132050bcec..e79143ad14dd 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -20,6 +20,7 @@ obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.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_LGPHILIPS_SW43101) += panel-lgphilips-sw43101.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 diff --git a/drivers/gpu/drm/panel/panel-lgphilips-sw43101.c b/drivers/gpu/drm/panel/panel-lgphilips-sw43101.c new file mode 100644 index 000000000000..b7adf1d4a8ab --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lgphilips-sw43101.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * LG.Philips SW43101 OLED Panel driver + * Generated with linux-mdss-dsi-panel-driver-generator + * + * Copyright (c) 2020 Yassine Oudjana + */ + +#include +#include +#include +#include +#include +#include + +#include