From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f13.google.com (mail-wm2-f13.google.com [74.125.225.141]) (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 E18CD3BED69 for ; Wed, 30 Sep 2026 07:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790751970; cv=none; b=nKKQG53dry8IltxEAnrKCPP4Iy3/pWYJWXqoW/sBuNHeLiF8TFHSZhcw1kR1u/LbXDRPPmN3zdjskEvFiuXu5xiZOi7s0AHZpX7rJcPzi1hYfZQHj+MWGyEXJp3XKQ+fFRVa1uOit5z8ClNGKb43slLuAA/2Yxy3crgBi5B1MvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790751970; c=relaxed/simple; bh=4JFdheQkSmIoRSHb8d5YjU7V1fbRbwiYYakNSYg75JI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=btlejDqSRZLoPcbAqtn9uSnFwmfobxd1kUQ+ckYSURRAVTPbHxNit5rJLEa/7mSimtxE9Az14bLucpl4HuVJOLDegUXc7mvPNJZoUpbNle+l6ejOYqQ4QDUDBBcJzbZKrX5UzFDkSORCldLt4I0bOQSANDfR9Meu3CxEsEepeJE= 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.141 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-f13.google.com with SMTP id 5b1f17b1804b1-49cd5462b69so27819055e9.1 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=rMhW+NLrypYgVDkBMg/nKHzinhZxArXJ5jbdxcTG3uEPyhkJUqbmKmGfOVYXCI8Foe tcKF0xyc65iuaR2mFVifK8jWO8Mb3lEuRJs7QJJK574+NC0pv3KIqg3s+EUI8wsaldIp mcEJ3RbzMmmsGk8nxduIciMVxypK1DSbpGQOaEh9oDuW8m5JV4/gEd7psvdKYB6XE2V8 GbSg6D5kokUKNzVyIyZydnxqljQVFv0D8iACovruJ6hmuZfIYu+PjIUzB8sAnivvWsX2 bIuFWsEre3kPflwiaUzTOJUT/gocv3i4zUBqjeuhvdaGhBxeNaQ83DRLeuQiw8iRQ+om s6/Q== X-Forwarded-Encrypted: i=1; AKwUvBy6PzC7e9P8Z8kCBPFP4wyjQDMVzZuh0XsAQHvI8TIUu+qGKMUY9LSWV7qruvyAfdIYZlmHUN1pNwzRJxg=@vger.kernel.org X-Gm-Message-State: AFuF++l7dmcIIqt7DG3YdM9m9LeDZI/Sxa20JLwyGkx+owNuaVhYJhTo lowtId3peKZ7zsobinZZ1DJsFcr5VGFDy81Ou32EMhvUnP/VWUSOPJAP X-Gm-Gg: AYBFou0Iek5cLwvxhHpDRfUQBm3D0e03RUAr03ezJayesvvdCjj/eemf4lB+xRqBjh1 STePuOUGxGhKGJ5YNrEP6aR7N1/3UMbqeZC9dTCkOa/VMhv/J0OxfHTrIOpun8+oJJXJ34XUK6C zewx57ChP/jH9sTH9nSN5dkN6wiCSDdW7nzRmYdzwBKC2s+xLcv1Zx/5ufDETaZzylg/0KX9NJk ePF5dPVZrGVC6tW8MUSAwmC29cupzFF709BlM8PASZyM7p/XatbS75p0gWBQ1S92yeP+AbcjFVq idnZQ8LbV4UUUu7g+2cCEDtaoLT9UCUiD3Kx/Hw7/9KwAQIfWcrInYOIy9KQFOmRWXpR0l1AnI4 kNhOafL6DvuHC9lSr8bj/dhSRoS7ZwQxLz7dGFhj3HENmx7q6mHzF/6L4dIiPNgpLUtO60dqPs9 mfNh4xo+vE25+PAop4EKrgWYaq03MtHZF+uDrmvxMVmHm7vpKC4Qz9dKfxhJpeGKDaNo6K1sM/9 KYg32/PSaCqh/WtvIY= 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-kernel@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