From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 265783E0C45 for ; Mon, 27 Apr 2026 17:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777309911; cv=none; b=riI2PXT9m6eD3A+u4FYW/1lbQamAen+6wqwGmcPdipez+fS+xEL2tmJ8Z3ainZFwRBn0e2BIaBPdIw2hxXEae4KXvBwrYVj5fb3A15xDwP7+bKLEfViQLfFqFX//vLKlU8l+vS8J+pHfAEbHDDvyV5EyhN3uYut1cjpuJncpewA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777309911; c=relaxed/simple; bh=xwXm9V844KYxg2tj+g0n4GiZBBcrGSHhGpsFN4Swn6g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LcEGGyQqySWGRtvLCZltJptBC9Aqk930Z9X7q5gyyN9pKQDB7nQdH1qR9P5E2/MZl0ijm5BXYoOTvxWEi0ydYk5QBsC+TamwvpLhpVjxvX0BvdqMhX2SxVlYiv2WgslMOuDGk5civA0XeJU9F99ncZFf78vRLTbzQPxu8AURyF0= 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=HEejMlb0; arc=none smtp.client-ip=209.85.210.41 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="HEejMlb0" Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-7dccb8644c4so3770618a34.0 for ; Mon, 27 Apr 2026 10:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777309907; x=1777914707; 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=30EaWge1vr69+mBJGQmrqCxUtg6xcGISL+y5QQ8wI0E=; b=HEejMlb01rZK+NNOJhhe1n0m9y3h8bVITXBfWCLvI7q0SGK7oRYUewze0euqU3tysj vAQp5ZFjWNuAEVzSSiYPzZq7OW5MRhPy1Jm31vH044nUu8Du9vocgtlwCF6WpOb1qta6 PrGLN4duABvt9kR331E34m96/XWmkbVWgq2LXru63wDkNCZHVQjAqSeE9AlaXMvAHKur Nku9u39v1q3altHdm8a1n2ezX6B0kauAXoPCUtcvwzIRjKNZWzGnvN/+vY8M4UQ7faOB vCmbiy1AaFP4oXpHjj738sXzxKUEnEyFhXHk1UnxBhZ60p+3G4aTIdGqLSMdnK7IaZK6 yWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777309907; x=1777914707; 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=30EaWge1vr69+mBJGQmrqCxUtg6xcGISL+y5QQ8wI0E=; b=Klso4oVU16q2zFzzf2w700N7hzKtRqUJa9oI9xVD9j+ho6t93cNLUBUjZIpNajRIBr tLqkve6jtxDdm6NeDdjs/Hw3OnTzifx+Qzdr3Wq54IkmJ54i0d45d3e9YT9yqykFU9rN GkgG85Tt9j59mdELeyCfVsujH78IBOCQpqPXxxuJp4FFo9GUj8JATuisBcFwivPkqTwD vWnqoTrokISQUU9J79GJdMsy8sPoUdphbMg8P/6CYZ+o2LUsaGxWueHwIGyKAJyCjEcT H8NmBr4uStNUE7mlMOPEMeXxIV/uYQ8iKnON7uBACfPEvVq5r0PnP6xTN1IKdsaBVtju zZJw== X-Gm-Message-State: AOJu0YwzXdrz/oS445OIcf+lP/Om+r2OlJloMzfUaWYobqAhHQTfL7Ty 0AX3YPmsNeSf0KjRUfY09h6ARvk6nV4Pi0bm0xntxspH1Y+PFz7mlelH X-Gm-Gg: AeBDiesoTZO50wt7I6MvQ3iWbU6gVpYY2J+j0d9SyCfRpdP3RYI12ezuN8Emmlro8RI NGrGWzWqyiqvm9DW3kXSS6tmznMKs/1QmYEOG2gOMEPykqRoqXCoXrn0AMxqq+P1a5ZiVOsrhen 9QRDOq2UEZpJcO27n48GYlC8iLwUxULRm9MthKmUq/ssnfwag6FjOa7I6DUx4mI1TjAajdDubBB 9oRtQ4rC6FzYw1vy5N0Q4/Eb6wPRfd8ifxezPZUaZy1zn304SZy5dqZjgyNNMX/u+MpgArrzt24 dM4jUixNxywsU7hO6BPXKsqXkUJf4Hq1w5Ugj2/buuRC4LRrfNFVEIH2NBrzKlkLzEApYnr8LJk NVEt45Verbg6IoisiPw0irt470lZ/BsWlxyEuY2s/mVYKqnM6cTa8OTC6plhOxiFK5Lef61sfrz f1AFPMyxoWdayBi0vhZi3uaVfKy5DjDcCJENeygfP0wg== X-Received: by 2002:a4a:e903:0:b0:696:175d:6016 with SMTP id 006d021491bc7-696175d6293mr10102934eaf.37.1777309906851; Mon, 27 Apr 2026 10:11:46 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bc0::54]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6955036558esm10261236eaf.14.2026.04.27.10.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 10:11:46 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, xsf@rock-chips.com, sre@kernel.org, simona@ffwll.ch, airlied@gmail.com, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, jesszhan0024@gmail.com, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, Chris Morgan Subject: [PATCH 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel Date: Mon, 27 Apr 2026 12:09:12 -0500 Message-ID: <20260427170914.5062-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260427170914.5062-1-macroalpha82@gmail.com> References: <20260427170914.5062-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chris Morgan The panel used by Anbernic in the RG Vita-Pro is a DSI panel based on the TD4310 controller IC. It measures approximately 5.5 inches diagonally and is 1080x1920 in resolution. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-anbernic-td4310.c | 291 ++++++++++++++++++ 3 files changed, 302 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-anbernic-td4310.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d6863b28ddc5..5229361349d4 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,16 @@ config DRM_PANEL_ABT_Y030XX067A Y030XX067A 320x480 3.0" panel as found in the YLM RG-280M, RG-300 and RG-99 handheld gaming consoles. +config DRM_PANEL_ANBERNIC_TD4310 + tristate "Anbernic TD4310 LCD panel" + depends on GPIOLIB && OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here to enable support for Anbernic designed panels with the + TD4310 panel controller such as the ones used on the Anbernic RG + Vita Pro. + config DRM_PANEL_ARM_VERSATILE tristate "ARM Versatile panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index a4291dc3905b..9d8f70c9de3e 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_ABT_Y030XX067A) += panel-abt-y030xx067a.o +obj-$(CONFIG_DRM_PANEL_ANBERNIC_TD4310) += panel-anbernic-td4310.o obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.o obj-$(CONFIG_DRM_PANEL_AUO_A030JTN01) += panel-auo-a030jtn01.o diff --git a/drivers/gpu/drm/panel/panel-anbernic-td4310.c b/drivers/gpu/drm/panel/panel-anbernic-td4310.c new file mode 100644 index 000000000000..9dd1db822989 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-anbernic-td4310.c @@ -0,0 +1,291 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for Anbernic panels with TD4310 panel controller. + * + * Copyright (C) 2026 Chris Morgan + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include