From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 8F3314BEE2E for ; Mon, 19 Oct 2026 09:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792403857; cv=none; b=LPAcz1AbNA7BwfBfR6u49Jp0Smylxda9t6OqMQrFM0J4X5nqMrScLkt/L0zQOQN64smqHIi8EicBiFTlThVtiSPOL5mZdh58nyZitoMauEH/ksLI/dweh0O6R24KIgl0A8cnp5VkoPBuyecbPkaWpwGtCb4lwbysqTYTPhHezTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792403857; c=relaxed/simple; bh=2h7ePiOQxejNRl8e1ndTlpV4W+pfg9dWRBWZ+NSV16U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mvPu5XsI5grDp+U2voSNA3l2yDRCBTGFpHcvUsVr+ymFVJTNN27wzS+xf+KvdTlmsAOvkboXH1SXv0ZzvZ4jNLswWsCU5tVD8hDX/f3e4z5vbexGQZtKJnEK5+yv9678MzUsBkSF8fKGSX4a+ojnLFnh9QpJzmXwZXY751JCk18= 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=bRyILqfb; arc=none smtp.client-ip=209.85.128.46 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="bRyILqfb" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4a1df4c0966so7708585e9.1 for ; Mon, 19 Oct 2026 02:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792403853; x=1793008653; 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:content-type; bh=6FSYoheTDmA4DpRaSb6YIPC1UctKcu1GqLxb7xH0SzE=; b=bRyILqfbyWG1QolQ34HMxziHIxHz+OiKpt4FiPSJzvOxGtr271qpzJEzMusPmqFY9u LawxN3DoGc7ZpfzbLu6kN+mWTQEU8LpcWQQDeqYL994OxBh27tZ1VNcmb99Fbv1UvU7s zSJcnpldyUBMaSTLxpILte4P1pMbrHoFZv558gD34wHSqH6iL3MKIpBimUi9HAZeUNRq S7xJg9CFUXgRhWQ215AEJ+ppjv0Syau5IiC7KZ359VantUykJsF5P3ir0Yrt+XF+D15F LVCVjVcp34eD1i3UBnueTPqfXb+Z6PdXk4g6PqdNUtEoFC0E1oDBmC5mJSUOST8SOuO9 TxDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792403853; x=1793008653; 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:content-type; bh=6FSYoheTDmA4DpRaSb6YIPC1UctKcu1GqLxb7xH0SzE=; b=UX9/mOmBzz4gTHMdISyYIVO5nsF+zo2IOkoWlYnylpYlNAPgCIzyXkSXOo50BQcrzc F7KJ1jeF5SVpX6dj1/1ubHLXwQ4xclnIY9g3jtOR2fvi/v6yrJXQAsXecJEk4wzGIoXJ YHoqtAyV3jjzM2VTViZRamrRtxol70BUw5bL0oiL4u6bwJcwDwf82SHmUfDKN+OsVQN9 V7a6QA5afzJmXMqUDElcNrW9juG6iPJPtCrF6To9kSVQdcp7/1/cuJT2DkZd/XQsAnP1 1IgmBxQYyglrmScVX+ex4YmOI6JPYXRqXPkpreQF7lwm+CO0Vl2sHBKBlv3zdEvtUpRu 2nUw== X-Forwarded-Encrypted: i=1; AKwUvBzDZWootYtag6W5wqnlT6ABp3+tH584qMFBbvvepUgp4IcJOyYetzy9cuQllgHMwEEIdgzaO1vjfkHu@vger.kernel.org X-Gm-Message-State: AFq9FYLjappdVXK4X1DQ9MbeW2MX0VlV4JePvYUsWEgJRHm3xWN0oTZt LXt1CT4rksJGFpSLamJYps8OcYZqg7ZLURjcNVNEbXugC0XF+se9kcXd X-Gm-Gg: AYBFou0nVR69w1s+WExCKVV0jl1tLGl8HtO4Q/34sAD9wHBQYMjR21ziEwiDSq8e58W i4hzxoXrIDmJdcjStTMr7A9ts4ohNOGc9k2CK2XuGuflhF+olVbrzgVOBH84ndcN7CoCUiXGvGZ icMqRgnC4WGN8sDPnYUsaGzl186fnq6LAC9fYLLRu19ZGA/S9xVmngaWuKZ1eeHeIl9hG1tsLUO iDVphckLpqT2iA4GSYF1jSfQFoRhZyqfAfqJE3FseJ+NVZFyYMzGFLoliG3dKMcXlHE8a9jR7bI pFrc1MzMYe2GC/usynhysy/usDUmnRg9ht3rOVLjbyIMTu5P7XCuok8AEdv5utOQUyoMB0fi+4n euWSgIj75QrGcOkbsdHKkX+YfCe5dZMrlpaeeg1deqiz0VRc2mpQ2bweLnokh27MpUaBO36YN2F ZF7gqp5eBl/Es/Y6Vnl3kT0e3rGVeJ5V9sb/xv11TT4eJlAYvqtS73jiYCwpXDNzBHFuORZti+N zbccylFB7DhP5xkUkM= X-Received: by 2002:a05:600c:4f88:b0:4a1:9c71:9f17 with SMTP id 5b1f17b1804b1-4a1d75fe190mr145198735e9.9.1792403852594; Mon, 19 Oct 2026 02:57:32 -0700 (PDT) Received: from xeon ([188.163.112.62]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48dfd500e75sm21740089f8f.42.2026.10.19.02.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 02:57:31 -0700 (PDT) From: Svyatoslav Ryhel To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Svyatoslav Ryhel Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 4/7] drm/tegra: Add support for 8-bit CPU interface Date: Mon, 19 Oct 2026 12:57:02 +0300 Message-ID: <20261019095705.91062-5-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261019095705.91062-1-clamor95@gmail.com> References: <20261019095705.91062-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The display controller in Tegra20/30 SoCs features an 8-bit SPI interface that closely resembles the MIPI DBI Type B protocol and is referred to as '8-bit CPU'. Each display controller provides two such interfaces, which can be used to send MIPI DCS commands to initialize and control the panel while image data is transmitted via 16/18/24-line RGB. The '8-bit CPU', although being the DC interface, is modeled using a bridge framework for flexibility and convenience. This implementation does not change the existing codebase besides registering a fragment and can be enabled/disabled without losing other Tegra DRM functionality. Signed-off-by: Svyatoslav Ryhel --- drivers/gpu/drm/tegra/Kconfig | 7 + drivers/gpu/drm/tegra/Makefile | 3 + drivers/gpu/drm/tegra/dbi.c | 415 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/dc.c | 29 +++ drivers/gpu/drm/tegra/dc.h | 1 + drivers/gpu/drm/tegra/trace.c | 3 + 6 files changed, 458 insertions(+) create mode 100644 drivers/gpu/drm/tegra/dbi.c diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 8a3b16aac5d68..ce3a424398713 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -30,6 +30,13 @@ config DRM_TEGRA if DRM_TEGRA +config DRM_TEGRA_DBI + tristate "Enable MIPI DBI type B communication protocol for Tegra 20/30" + help + Tegra20 and Tegra30 feature 8 bit CPU driver panel control + protocol (similar to MIPI DBI Type B). This option allows use + it to set up and control compatible panel. + config DRM_TEGRA_DEBUG bool "NVIDIA Tegra DRM debug support" help diff --git a/drivers/gpu/drm/tegra/Makefile b/drivers/gpu/drm/tegra/Makefile index e399b40d64a1d..d67e53248a082 100644 --- a/drivers/gpu/drm/tegra/Makefile +++ b/drivers/gpu/drm/tegra/Makefile @@ -33,3 +33,6 @@ tegra-drm-y += trace.o tegra-drm-$(CONFIG_DRM_FBDEV_EMULATION) += fbdev.o obj-$(CONFIG_DRM_TEGRA) += tegra-drm.o + +obj-$(CONFIG_DRM_TEGRA_DBI) += tegra-dbi.o +tegra-dbi-y := dbi.o diff --git a/drivers/gpu/drm/tegra/dbi.c b/drivers/gpu/drm/tegra/dbi.c new file mode 100644 index 0000000000000..4b3966dea0438 --- /dev/null +++ b/drivers/gpu/drm/tegra/dbi.c @@ -0,0 +1,415 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include