From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (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 35EA444A3F7 for ; Wed, 30 Sep 2026 07:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790751975; cv=none; b=IlFz2PskH9om29+naRBOtem3C3Q/nXHIhfdMSwQloYwIDo3v/qmh1ZT5LTpULAeFcbiWD67iJtb3IA7jYgb2wntduiBT2c+CExsgujZXxk5Td29tr0QBPSJLryKxn7mPz4lSFTTJRo+ikOYCftMm06+7jZ4AQyWKsTPTrrYYyPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790751975; c=relaxed/simple; bh=4JFdheQkSmIoRSHb8d5YjU7V1fbRbwiYYakNSYg75JI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nLJ2cK7tsp85Z6aHk23eyuL+az9wDJaSeiyJMfvd4JeaBEBjlgaAXtHsYNcKwRsCVOhFAOnhIYDQsCWIT8Fmn6IJV32EdWkA5bjN6z+lIdGmBwrbGEgXExjEzKTDnFYtExMmStc+04tDjxeyUEoYbUB7qvKGuXV1/gtnLiRcQEU= 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=npUh3sZc; arc=none smtp.client-ip=74.125.225.140 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="npUh3sZc" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49fff72474fso20420845e9.3 for ; Wed, 30 Sep 2026 00:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790751962; x=1791356762; 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=l3z8vG5srk/ZUNTpJ2oGCNWAQjS+iPZwU1XzeVv3hmU=; b=npUh3sZcCnhghXAlKBTQk360jP/pR2W/mBNxWRsQxN4kEtVhBVKmgC4r6roN7nrHz/ mjmek3GWRY35BhGxHZnZrUdEHImnlUdA8vRSd3XLP0/udE6KEXHnY0oatR6zUZga/IUi Y9Q2C6Z4z0drWSPvEsGBEYZBLvmTneDeu983n8rcdA86r2DUgVLJqZE+nbneG7EaD5ZW V+9DJ4HDbJBOsyJ9EX6B88v8YoaUh4PIsl2tNG7j3gAujjZG1OnRqu82zxSJZId0Q7Dp T5U+eBpZJmo0Sh8/IiiKnrCxtjQJyIqHwy4o39V6VQc3/CvraUHC5pi6YIP02zf4wx+y m16g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790751962; x=1791356762; 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=l3z8vG5srk/ZUNTpJ2oGCNWAQjS+iPZwU1XzeVv3hmU=; b=jTT6nifNBTj07i5XYk03gkgnxXELu1KIuR92uWmvlmcGjERML5CS8q/MMx/a1D1N7F bvwSxIVAmfcWNQxU5mGJ9prRy4kB2k1sTZL5URy6I5FZ78eal6gF6tv6bGX5k0puyp0f o8ZY+MaELbI50RFh1yiooS5J5ufTUvjkQIqTrBhtmdEjB66AlxgPtL5dgpdTwoApolLR pKmssgpXCOUz+8CYfCdXrVlTGZfFKai3m2BuYU1/XwHifHMLNUXLXAGYo/VjvuDRMRbs k+uApLiEW2yN0Gsit2zmZCljIrwQUIQ/MZCHOeLWgmawJMGiODRBH3TNGI6rS0+leQ7Q XEnw== X-Forwarded-Encrypted: i=1; AKwUvBx28zBw1PaPMCH3Uan3qi1+4CxvpYJRhm1hyNvFfw8Qj9P8kNBgilbGH4C3qxo4vjD1AN2qka4MAEfLtg==@vger.kernel.org X-Gm-Message-State: AFuF++lW3lhYNsJNbfiuA+1TpOS4qQVwtdc2dEMss/6aQRp7cgnPPYe7 05j+aaL71nwlG08RZMPPJkOS3zOltIlRpm65EQ0KXEI/bTuyJTPF6+GD X-Gm-Gg: AYBFou0jllOtz0jlTiko08ERmGkVB7CqsiRieVeEshpNcueRDS9T/ksGDrR8fjTsqHq sRV2MjCsY9ap1QmT2HUIgK+CA1yEn1TZTiBG3ZMSQ4OACVW9Lvz4Xd/7sDNuzt5P6U6aiwNDpak HQ/AyfQzw2c12bjp6Vp50kAcURHx701v9Avn35HU2V+04ohkLNgSjh5eSyBUGA9BOupSyp+CF06 iftxlmdH6HM44Vl9FxYxrxm05QA35nvKoT4ZszzrTKGV9z70WfOOFHIPO+fHJdJU8Dhtquy2QrY ShodiBqoDECQ/7UzD0QnJMQymyauv+0PHpHxfr+5FtFT9107zy5xNQHh5ZuGg4NqZ4cpfQ8/KVl dnaE14W2OPhiCHqkMR9vuNgpfRDox7QpmrTToX7cIOTOxZxnDB61C5JB5pWWd2Bvvu0CYyGyHuk 0b4FvcUcz5hvwaa40PRCD73OEGeA7BhdDhEkbd6oVIFdJPOySMUymmF7TgdTFw2DF91rZxE1Iz6 C6xke2d4J7aGYiXojg= X-Received: by 2002:a05:600c:4512:b0:4a0:136d:f721 with SMTP id 5b1f17b1804b1-4a01b00c143mr5662565e9.17.1790751962183; Wed, 30 Sep 2026 00:06:02 -0700 (PDT) Received: from xeon ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48b029f5bcdsm1145150f8f.27.2026.09.30.00.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 00:06:01 -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 v1 4/6] drm/tegra: Add support for 8-bit CPU interface Date: Wed, 30 Sep 2026 10:05:33 +0300 Message-ID: <20260930070535.47130-5-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260930070535.47130-1-clamor95@gmail.com> References: <20260930070535.47130-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 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. Signed-off-by: Svyatoslav Ryhel --- drivers/gpu/drm/tegra/Kconfig | 7 + drivers/gpu/drm/tegra/Makefile | 1 + drivers/gpu/drm/tegra/cpu-bridge.c | 427 +++++++++++++++++++++++++++++ 3 files changed, 435 insertions(+) create mode 100644 drivers/gpu/drm/tegra/cpu-bridge.c diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 8a3b16aac5d68..db9839280b8aa 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_CPU_BRIDGE + bool "Enable 8 bit panel 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 as a MIPI DBI bridge 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..88d5ed2f9ded0 100644 --- a/drivers/gpu/drm/tegra/Makefile +++ b/drivers/gpu/drm/tegra/Makefile @@ -31,5 +31,6 @@ tegra-drm-y := \ tegra-drm-y += trace.o tegra-drm-$(CONFIG_DRM_FBDEV_EMULATION) += fbdev.o +tegra-drm-$(CONFIG_DRM_TEGRA_CPU_BRIDGE) += cpu-bridge.o obj-$(CONFIG_DRM_TEGRA) += tegra-drm.o diff --git a/drivers/gpu/drm/tegra/cpu-bridge.c b/drivers/gpu/drm/tegra/cpu-bridge.c new file mode 100644 index 0000000000000..63ca87a0be909 --- /dev/null +++ b/drivers/gpu/drm/tegra/cpu-bridge.c @@ -0,0 +1,427 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include