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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6F74CCD4F4B for ; Fri, 15 May 2026 22:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1C5kEWYnCqbbm4yYVMU8c5yMz/TDco09ojFSIjdjPg0=; b=iGGPNj+ZimqyYP gIykx5bbgEgZJhWiI4UkfsLlpOQpWtiNxSkNpRCM/iY+yMLtddotdhkppVwVz516JcpYgKleKBnGk uRjXU1B116yiAWJzTMYwDnd6C3GBoL7KmaivtgpepahCOW2Tr2D4HyR0bUZF7n9WxGYK0tumXF9as CF36NBSCl+c0AusnCVIfTy1go6boJFVZOBjo7DqO4xGq9/NMhUWOCHRJpleRlwRDtznKPkK2/fQmd VpXEPQbqmXZHetyVorQkHYYWm7LTg1mhkcssxXpl2hy6xZQACy2aeVPs3CheE8hE2BqnICTw8YYxw YHmbKtQ+yPE991vQneqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wO0vJ-00000009cZF-17Ek; Fri, 15 May 2026 22:22:25 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wO0vD-00000009cTl-1Vpl for linux-rockchip@lists.infradead.org; Fri, 15 May 2026 22:22:20 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-47cba53479aso320000b6e.0 for ; Fri, 15 May 2026 15:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778883738; x=1779488538; darn=lists.infradead.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=0wtvOcai69XcWF/Ct6xFuI8j0ECWde3gbDf9/gqtZgw=; b=fb3fW+7P4Hg/tkRl2OALNmjUFlRlkzpMf/QZmU2IhijxKsUsqk6jgyUGORLrxNXiS7 2woeHmBYRE1eUP8RjdB4c4PYncWAqdMXbmYGjxQcYJPdlY0LUG6Sbb7CKf0Y76KaDEUY DJdRV/coKfEWiewVVNWc609sCrbGA/ob2miOdamViOJ+ueG3TKddjdpCe7W6YRJHaCbX ytn/V2f92ZvAWshtEHImsrMoBdQJd6Ots2ScKif0kNfrG20E7rm8sUi968ku6CDez9wn iPKEBkI9eLUFii6kvubdWijUMgT2BPQ49PxI6SD4sop8fh5xSxJ9kor+8a4TY/zCfGl+ ukIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778883738; x=1779488538; 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=0wtvOcai69XcWF/Ct6xFuI8j0ECWde3gbDf9/gqtZgw=; b=XkPKG/2jiXcEFqv6l7uA9csDPPWmkJw7wen8fWGnM2jRaETrVYePVo7e9bPhwMQVFj FfpI9y3dyZhyI09REcjeBkLElK4/DDyP9KyyclDtVlwjBwyylHz6VVZ4U8gXh2yJUIgd sESYT6fpSj2hHRv8iGx2oLB+5xi5KrUbLhq2x0Kdx+jUbTiCTym+5GHMKwIBwk7QQ0jk pupO0+FjQ7WOmOWtRzSLottq4ql2UMMXIkM9EbK7ZajZhg/9CsFibGNyDT3sMNdwb4lU HxTT3XrDrcJftxaMzXFtAAdaOlJlrE0SPJoYatJabcc+aF65IBywn0njX895Ev9cGxh8 l4MA== X-Gm-Message-State: AOJu0Yx8BiWwihj96cEPmAIpmpWcFgPDYyStWsUl8R15S4njYjecKaT0 prohnRVJn8AnGLySYRC/Za2yFRyPLjY/YqtQrp5JPzHGiGauS8d/ZqY+dVOhfugk X-Gm-Gg: Acq92OGdDa+PpE51cVio+jphGcGTOYQ2cAbQ+dOP2p0PcNaraV6Blv3cviYLJLY5bIR TMEVIBaYfC1itvSYnOg6emgWY7jTcU5lmzB4R7zEwPDjDUkIs6+CeI3+FVR6dGHCbu6owxGO1Js Q2BRpCb2pNMUMe6AB1KIsLRaAudjCURlgM1fHlpQsnp7NIgTwzjGVLrKtARAOW7RC7IBq4mYkgs dfQ4aFQXftRoziLQJ/d7cLTLzHmIVLrqv/l2vjtNTiSY17eejVRfo0QYt2Qo7Uu5zcpzXXbWA+8 m9KcUWzdnhWr79D1jBN33WjN4YMZFWxTPwGRSXrlwVrKvEOaL47DUVQGUf9phIbhoTXxC7emxok Houf5nRW1BX/yckR9s4othXcQG6+mUI6FtdTOeH62qYgQDMgwg7AF5eypoOvshuDrAHSvJ1oyZT l8C46g86pozarcjbg4OLp2AbbmFXPdxCYmZm0nBzENpg== X-Received: by 2002:a05:6808:e3ca:b0:467:27d2:96a7 with SMTP id 5614622812f47-482e5613d70mr3034283b6e.15.1778883737642; Fri, 15 May 2026 15:22:17 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bc0:8c2e:6a8e:445a:9169]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e568c0d889sm980764a34.9.2026.05.15.15.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 15:22:17 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: 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 V2 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel Date: Fri, 15 May 2026 17:19:45 -0500 Message-ID: <20260515221947.299229-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515221947.299229-1-macroalpha82@gmail.com> References: <20260515221947.299229-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260515_152219_435003_446927B3 X-CRM114-Status: GOOD ( 24.46 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 d592f4f4b939..61dd00297ecc 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..733c68ff9771 --- /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