From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23A5B2FF172 for ; Mon, 10 Nov 2025 09:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762766130; cv=none; b=VX9oK5E0sjgawZ9ddzSEas2/TsMdJu9Gtb6sAaUcZ0TXTnZ8LxrIoMPznbHe9RsvN8LN4sMPCrqyDTRpdi54H8cMQmfipS92Js0j71NraZmOywoBP5j0LZYnhgIqQUccM1Kp4zEMqfPNB0UXf8lT797ufCo+BTLKzr31NUkW1Ms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762766130; c=relaxed/simple; bh=/CXzj5jTIsG6xjXWB8a3Ddy3m9DDciOJ66r1kBk8d4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zwo1l931IS2SBOwTKplWV+/OcopBlHsBF4k8J325NeDn36sbLZLKfxdo+kPoLKBAYQCBW1vFq8F0eHaYiZofGxz4KhsUQpbzFO28nrKSEslOWOqfNGoRXkRV4kwJPPd7iEXtPjuToEMRIixBuKTm4PL59K48h79yIrs1HszHdWg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jlACDDgO; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jlACDDgO" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-378ccb8f84aso26184951fa.3 for ; Mon, 10 Nov 2025 01:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762766126; x=1763370926; darn=vger.kernel.org; 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=veHv/uRfxtfoSVQhbpvYC1/mXF+mOr0qW/T/KMequQ0=; b=jlACDDgO/Jko1OYxe3joBkbnlS8cjWjuLBITuikjzfm+6EEJyj3CB/oJPU/dXF6rF/ yUEJ6j+PTOF02j9lwCDf7ZUJu6tWh9mS25j7roA2CziVPbGKeM9xZQSL+mevMaLG1myG cS+5DwR+Sw+JRGiT22DJvtanXLwRbBbAiXF70k8nkjIA5tM0puWc+yZMbyCzCLxVH69j TM7/MzqtqMgMTJPrDrzq01vyrlngabruhCLT8739DajvSsvpqQ0bZ/njUQDE1vdjTn1n xYkAq4NRBi06kY1cCPqUYnctzjYHHSRQZadFrKKyBdQA3F+AOoLUTaSeeUjZjHjyKqSN /umQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762766126; x=1763370926; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=veHv/uRfxtfoSVQhbpvYC1/mXF+mOr0qW/T/KMequQ0=; b=aJAftVrr0t6TxgkwFChkUYLZb74Af57e6iabjNJUsijK9eGcewgdHKJW2kUzr2XlFx z6QdH3NS/otOuPgCzCWO2kGROloVEBW2jMXWxqQsnr+SDdBDeYMxuWOsibXohqoYAyvA 2I5Ug2pSIQ5yKyWD9ANypyVsw9nQi8tq314nG78F3lrRkzD8kD7ylp9/cXhl5U6TuAly BeC7kkotLP/z7pxHx6LmuiNDcHJfCq/c1yTz/j0ucd/ChjkV3JfaSg1xbgpFCmpfFkDM 7BieJoiZ/Rz4SEQS2wJ8sjDdwEx5ptEWlK7FnHdgUn1emLRziJKwK+VkT/9BCm4bSzbE Dc5Q== X-Forwarded-Encrypted: i=1; AJvYcCXc4+hJQn+XbNZZZXNzo9RlL6/Psq3bQ8stVgnXWd5YtdY0G1smLSmjAq7kbhj5w/wia3zIea54L4igYQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxmHCe9k+juZQsxJCiGkIFX9ipOGGDMIj1uWkL6pN5bTPxmdc7w 9dDEDE0le4qlaQSzI91aMU/j1REom1xbHwsHDjKHdPL4cUoaEqboHjp0 X-Gm-Gg: ASbGncsUP0UMXdFGktRHHDXbFbKiI+It+b31/x9Epl0ZJUAbO8uHJIIDfE6boFGNgCT 82zanQxGbsjgcsWnn4KQtmTiENrHWnPfpo3FS/S8jKxNXlFFPnhgnyGKs2W8KZyNCOZbjxcAqXI g7fSdh2atD9pTy+HNY/FzDw3ST108XvFxfzTLHMqLYIWFkTsbnVtLTOXWu67tOncqz9F+7e8DQu T2fNsueDXdb3upL0AynH7z8EQLJheHVhR4zKwmp70xiBwg1G3cTGvIENM7tabMuEpf5VgoRSq8p Kx+9wrEDVDSZTt4+LHAQxtz3H9Y3L6LZxpCz1RXZyU5AA5KkTuJ5WjjzCgj37dzvLMzm7jzw5NG 5efVau9DukDG50YjtZYtA+KgMbHrWJKftU/7ZSZsjUxs8nHjSgRuZc8eZXB++4rZA X-Google-Smtp-Source: AGHT+IEYKC+UVtlSAdBpY8qGaxywx7G3p1nhsry/fr15fjGb+9mY1iP3g5oIkKF/qfU4YqicbtZh9Q== X-Received: by 2002:a05:6512:a96:b0:592:f44e:a28b with SMTP id 2adb3069b0e04-5945f1dfb7bmr2195041e87.57.1762766125833; Mon, 10 Nov 2025 01:15:25 -0800 (PST) Received: from xeon ([188.163.112.74]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5944a0b76f4sm3852006e87.73.2025.11.10.01.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Nov 2025 01:15:25 -0800 (PST) From: Svyatoslav Ryhel To: Neil Armstrong , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Douglas Anderson , Svyatoslav Ryhel , Sam Ravnborg Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 2/7 RESEND] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel Date: Mon, 10 Nov 2025 11:14:32 +0200 Message-ID: <20251110091440.5251-3-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251110091440.5251-1-clamor95@gmail.com> References: <20251110091440.5251-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The LD070WX3 is a Color Active Matrix Liquid Crystal Display with an integral Light Emitting Diode (LED) backlight system. The matrix employs a-Si Thin Film Transistor as the active element. It is a transmissive type display operating in the normally Black mode. This TFT-LCD has 7.0 inches diagonally measured active display area with WXGA resolution (800 by 1280 pixel array). LG LD070WX3-SL01 MIPI DSI panel was treated as simple DSI panel when it is actually not and requires proper setup for correct work. Simple panel work relied on preliminary configuration done by bootloader. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/Kconfig | 13 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lg-ld070wx3.c | 184 ++++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 31 ---- 4 files changed, 198 insertions(+), 31 deletions(-) create mode 100644 drivers/gpu/drm/panel/panel-lg-ld070wx3.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 045ffb2ccd0f..1f660ba065a1 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -408,6 +408,19 @@ config DRM_PANEL_LG_LB035Q02 (found on the Gumstix Overo Palo35 board). To compile this driver as a module, choose M here. +config DRM_PANEL_LG_LD070WX3 + tristate "LG LD070WX3 MIPI DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y here if you want to enable support for the LD070WX3 MIPI DSI + panel found in the NVIDIA Tegra Note 7 tablet. + + To compile this driver as a module, choose M here: the module will + be called panel-lg-ld070wx3. + config DRM_PANEL_LG_LG4573 tristate "LG4573 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 0356775a443a..9281221183ac 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -41,6 +41,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o obj-$(CONFIG_DRM_PANEL_LINCOLNTECH_LCD197) += panel-lincolntech-lcd197.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o +obj-$(CONFIG_DRM_PANEL_LG_LD070WX3) += panel-lg-ld070wx3.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o diff --git a/drivers/gpu/drm/panel/panel-lg-ld070wx3.c b/drivers/gpu/drm/panel/panel-lg-ld070wx3.c new file mode 100644 index 000000000000..00cbfc5518a5 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-ld070wx3.c @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include +#include +#include +#include +#include +#include +#include +#include + +#include