From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796038939; b=sN9U5tDFCCR+mGF8VIb6xAVaIc/f/BWH8DMrajDvqs7Xz6+HM3HwgnEv789hAdyMUg1F 1u6/SukBvIrTBZH10YL0zE5qDWCyH34PssQikWafj7Y6KB7YbkGVkRJWavWfIdCrs0MXg QZBWPQ4u2+BIFXL0Mw8lUSFaMExPuhrSNgj5B0bwOV6IK6dEsa9nkrrP/5m3sYqhXnwhx 6oFViKApFdu1pXkjoZG/RbMlaI+z/UHzTljMn/QAtG1qgR+SzGhJsgbwsotwy2vdJ2yza lV/HUCQ5AYOMgyM2sr4bWPvDjdTslKKnVwEiF3NYH41+blfmo4SX83XBHRwnVn2w6hQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796038939; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=hs4JbBakgyYDlq4CXvnrleLTPCKiDcmj9n945qMJG/E=; b=hUZ0glpqtbPJXy3UBBln50SkQjWOHLz2l/sEEULrXSuU3ktl7AcdN+MP5KLEWeIuSELB n5JqfpfoDkWg0KGL9eZ1QiIBirbjtsshRy5XXKdqoA8dwQg2c/JbMC0rNlby+tA/e24ki WDuqpPsUubk9PbmaOl7IlhSQo5WSHEojL6uNvfFPnPI/fFMbJt08UscSLMxj8scOHc6uP uqn4aqzY7OaNhyOYpLfQPj7R/1UGJAvXqLTc20SmjL7vZryakxvGoDsbxPEopmscBGllZ BVpFbrxMnwUaMojdnoL6YnTLIYecrIU+yZW3pBjG/nLGgdtPCbgx4g7MW7XYDRG7ZJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="E87lmd/l"; arc=none smtp.remote-ip=209.85.218.47 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C583606A320 for ; Mon, 30 Nov 2026 11:42:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7C583606A320 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.a=rsa-sha256 header.s=20260707 header.b=E87lmd/l Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-c5198302d38so956144766b.0 for ; Mon, 30 Nov 2026 03:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796038937; x=1796643737; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hs4JbBakgyYDlq4CXvnrleLTPCKiDcmj9n945qMJG/E=; b=E87lmd/lhuOVuioc08ojpj0kiZrzEX18ARphKUmBKy6W6kCTJ6OHMikms4uz9SxQiq sAZCSVps95MMKXYrF770a48qaMQB574qCNXLW5NTdJKxehUmIqHSGvO0NWmPNWdlQLP/ YZr+GP+1da2S9VkYDSlGrN0oLuBMKo/ExcssJlvs85PSTtIRRY23ZuJ+YVwbDIozuoHa s+s3g6VoN+aLYwx6VR22F7qq4nO1OK5nB7GlMTtjPdChu62a0lal2mMklrNjE4z+w7/z xKq0gAkTq9qx0D/MTrKDb2S0sA2Pyg/Y4XcoMvTllj6jiMZbZ4xnlXLMON+hqST+7g+I 8EuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796038937; x=1796643737; h=content-transfer-encoding:mime-version: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=hs4JbBakgyYDlq4CXvnrleLTPCKiDcmj9n945qMJG/E=; b=ANBsJauVOqASOshndPG/2CfdZH3IBfRkbUb1cmpOtHyGCvPQo5I1acdf0PK38dS5OK GH1cydy/Ui1BPo0yXWiO/LhfblcdMSDtB4SyPIv/+ZCwlnH2FpHEB7sdxBbCEusua7dX Cou7QmQDBWLe9Iy6tIM/X0kDMh5329DoeJCUl6BeLyqPly31R89rnuQNILKB1eq6p+zI EUpQdPiCWVVF1ct7azvPQvstJrgaJHZXUxTo/VAkALQoscspqrJenVp/1yLyROKhMnie BCGzcDxP8d4Ra2wfhGv4J9taQKqYQmWOZSrp2yHspg4Y7sunoRbl617a+9CXzWFrB5yu dsDg== X-Forwarded-Encrypted: i=1; AL+hErEdUGQqtjELui6MoLR0mijlEyTqCXyadpMvwelFY7UOTppLdf69a3X0QIladZ40qsl29GlO+yOooSGZ6b4=@vger.kernel.org X-Gm-Message-State: APuU4Z8fE+xoDIYz5AAtsk7FtHwGtv6vyUPO5hRGSHiyARf4rZIQeZqH zTF/lbpf0VkRV2yrKEsnYxDdM2SUnkQH0p79sDp2NRsLOTpH+BOSItU2 X-Gm-Gg: AZFdTZfqObumBvz8huXDRYC5YNUyaJo74TABu11f8jo5BVF1Wz0p6sMdPHePHjWSEHi GNfKF8ls8N5RNKTm4pc+3iE7KxOglUQMMXOcTCRjSmwEVwwTntHe1xhN+9LiiELup1OmuE7r0Fg 7r6fdDnbuYyXovfEvzKmDTCGsJakqB6wY9Li5xKi1/utV/tTyl13tZqhjczT15y+uuV3wLELZO9 vxRVB8qKIF/A36j/tmB+xLNnPbUvhVYnDWQ6PFX57tO8rYGsn8EppZrazULECQV9C+yQTPC1K++ u+H3yp+UC1RbtEVRVmsXpETPgDrPPaSeBjeESTtV1EEY+VA9KJ1v94lc8vB7CnchD1uMvEfKs+X PhntRzkHcZuWBj4gfvtgW4wd3xjY2vyWifXE/XKai8taqg22IvV9aBKjheNjMQRz5YcXgFd+WF0 l/ZGLPGp/SyI0PU52sJLL+/MH8ofEe3SAbVMkut1y5TTv2JdTOR8s9sMEChU7hZuPrCKd6EQQkZ RDh/PKEOwzNE157l4vFxpXhN7R/ILKPWvSpjkYHA11NtM5+NAJQVADX4LkntEM/4T0GOGv0jZ2b 2bX8KTOe6a0spjJOtChvJYRMlW0Fxm6xsk4hNv7US6pNpPNZy/S6karKt34BN8aSXz91qXZCZej pSKf4OvNRgA== X-Received: by 2002:a17:907:a890:b0:c50:9432:b7e3 with SMTP id a640c23a62f3a-c513aace654mr2938695366b.42.1796038936825; Mon, 30 Nov 2026 03:42:16 -0800 (PST) Received: from xeon ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513afc73d3sm1139733466b.64.2026.11.30.03.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 03:42:16 -0800 (PST) From: Svyatoslav Ryhel To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Neil Armstrong , Jessica Zhang , Mikko Perttunen , Svyatoslav Ryhel Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v9 00/13] drm/tegra: Add support for Tegra20/Tegra30 8-bit CPU interface Date: Mon, 30 Nov 2026 13:41:41 +0200 Message-ID: <20261130114155.72920-1-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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'. Add MIPI DBI bus support along with 2 DBI Type B panels used in LG Optimus 2X which work with the 8-bit CPU interface. Convert rgb, dsi, hdmi and sor to use atomic versions of drm_encoder_helper_funcs needed for bridge state requesting. Refactor and expand DC header. Add DC parametrization options needed for fine tuning by bridges. Make panel parsing by tegra_output_probe() optional and document optional DSI port. Add 8-bit CPU interface in form of a bridge linking to RGB port. --- Changes in v2: - convert enums in the dc header into definitions list - add check in RGB if bridge_state is not NULL, if yes, use default flags - inverted FLAG_PIXDATA_SAMPLE flag setup logic since default value is set to be on NEGEDGE while v1 set default to be on POSEDGE - 8bit-cpu schema renamed to dbi, removed compaible and set as DC child - expanded list of required properties - 8bit-cpu bridge remodelled into dbi interface as DC child - improve gpio handling - rework attach to get drvdata from parent - add panel supplies description - split panel driver into per-panel drivers - get DBI interface from the patent directly I have deliberately left GPIO parsing from device tree since it seems to be the most convenient and mainstream method of working with GPIOs. Changes in v3: - rgb: fix default bus_flags to match original behavior - dbi-schema: remove compatible from required props remove dc@54200000 wrapper from example restrict dbi nodes for tegra20/tegra30 only - dbi: remove unused idx from tegra_dbi_priv wrap dbi registration in dc with devm_add_action_or_reset() separate dbi into separate object export tegra_dc_commit() and trace_dc_readl()/dc_readl() Changes in v4: - reorder patches to avoid errors on checking dbi schema - dbi schema renamed to nvidia,tegra20-dbi for consistency - fix DC_DISP_V_PULSE0_POSITION_* > DC_DISP_V_PULSE1_POSITION_* - add MODULE_ALIAS - swap width and height in panels - dropped use of init-sequence and gpios - dbi driver reworked to use only DC to operate pins Changes in v5: - added commit modelling DBI bus (suggested by Mikko Perttunen) - hitachi and lg panels converted to mipi_dbi_driver - dc header refactored and completed - added commit documenting DSI controller port - added commit which converts drm_encoder_helper_funcs to use atomic enable/disable - added commit which makes panel parsing in tegra_output_probe() optional - dbi command/data converted to enum - dc com pins are now backed up into drivers private structure - magic numbers replaced with pin defines - dropped tegra_dc_readl() from tegra_dbi_pin_set - tegra_dbi_pin_set() accepts boolean third argument - tegra_dbi_write() second argument converted to use tegra_dbi_dc_signal enum - used field_get() to extract pin value - extended comment regarding init sequence - nvidia,index > generic reg property - adjusted tegra_dbi_atomic_enable() to properly handle shadowed registers - switched to use of_drm_get_bridge_by_endpoint() since panels are auto-wrapped into bridge now - added support for mipi_dbi_host_ops - added resource managed helper to register DBI device and provided to DC via header - dbi.o built with all other tegra drm files Changes in v6: - improved descriptions of new framework - mipi dbi bus commit authorship was changed with Mikko's permission - panel commits swapped with mipi dbi panel conversion commits - fixed tegra_output_probe() for hdmi - added CONFIG_DRM_MIPI_DBI select into CONFIG_DRM_TEGRA - devm_drm_bridge_add() moved into bridge probe to avoid possible issues with deferred panel probing - setting LDC pin to V Pulse 1 moved before GPIO pin reconfiguration - DC_CMD_STATE_ACCESS is set to read and write in tegra_dbi_atomic_disable() - platform_driver_register() does not error out if driver is registered Changes in v7: - reduce changes in the panels when converting to mipi dbi - dropped of_node_get() in devm_mipi_dbi_device_register - remove enable()/disable() operations and add prep prev bridge flag - drop add DC header changes, add only strictly needed by the dbi - dropped tegra_dbi_iface and reg_entry enums - dropped reg from struct tegra_dbi_priv, com_pin_backup converted to u32 - interface dropped from struct tegra_dbi_interface and init call added - BIT macro converted to PIN_UNMASK in the tegra_dbi_pin_set() - init functions and tegra_dbi_interface structure moved before probe - tegra_dbi_atomic_enable() split into pre_enable() and enable() phases to squeeze interface into existing framework - DC_CMD_STATE_ACCESS and setting active true moved into init functions - reg reading moved before bridge allocation - reg renamed to nvidia,interface Changes in v8: - return of_node_get() in devm_mipi_dbi_device_register - add mipi_dbi_write_buffer_multi() and mipi_dbi_write_seq_multi() - remove return doc from void function - replace disable() removal in panel with mipi_dbi_write_seq_multi() conversion - removed of_node_get() in tegra_dc_dbi_probe() for dbi node - switch to drm_bridge_clear_and_put() in tegra_dbi_host_detach() - add check if DC is idle before reconfiguring pins - restored original tegra_dbi_atomic_disable() operation from v5 Changes in v9: - store dbi node pointed in the driver's private structure - add tegra_dbi_stop_dc() helper - clarify "Set LDC pin to V Pulse 1" comment - add check for next_bridge != NULL in enable and disable - add probe, remove and shutdown directly into mipi_dbi_device_pm_ops - removed match and uevent wrappers - fixed function documentation - switched to imroved PIN macros (suggested by Mikko Perttunen) - switched encoder->crtc into conn_state->crtc - switched struct tegra_dbi_pin to plain u32 - added unified tegra_dbi_init_interface() - added and documented nvidia,contiguous-rgb-pins property --- Svyatoslav Ryhel (13): drm: Add MIPI DBI bus support for MIPI DBI Type A and B drm/panel: panel-hitachi-tx10d07vm0baa: Convert to use MIPI DBI bus drm/panel: panel-hitachi-tx10d07vm0baa: Convert to mipi_dbi_write_seq_multi() drm/panel: panel-lg-lh400wv3: Convert to use MIPI DBI bus drm/panel: panel-lg-lh400wv3: Convert to mipi_dbi_write_seq_multi() drm/tegra: dc: Add elements required by Tegra MIPI DBI dt-bindings: display: tegra: Document Tegra20 DSI port drm/tegra: output: Make panel parsing configurable drm/tegra: Convert to use atomic versions of drm_encoder_helper_funcs dt-bindings: display: tegra: Document nvidia,contiguous-rgb-pins property drm/tegra: rgb: Parameterize configuration based on bus flags and DT property dt-bindings: display: tegra: Document 8-bit CPU parallel interface drm/tegra: Add support for 8-bit CPU interface .../display/tegra/nvidia,tegra20-dbi.yaml | 108 ++++ .../display/tegra/nvidia,tegra20-dc.yaml | 27 + .../display/tegra/nvidia,tegra20-dsi.yaml | 6 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_mipi_dbi_bus.c | 265 +++++++++ .../drm/panel/panel-hitachi-tx10d07vm0baa.c | 241 ++++---- drivers/gpu/drm/panel/panel-lg-lh400wv3.c | 121 ++-- drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/Makefile | 1 + drivers/gpu/drm/tegra/dbi.c | 561 ++++++++++++++++++ drivers/gpu/drm/tegra/dc.c | 4 + drivers/gpu/drm/tegra/dc.h | 129 +++- drivers/gpu/drm/tegra/drm.h | 2 +- drivers/gpu/drm/tegra/dsi.c | 57 +- drivers/gpu/drm/tegra/hdmi.c | 33 +- drivers/gpu/drm/tegra/output.c | 52 +- drivers/gpu/drm/tegra/rgb.c | 68 ++- drivers/gpu/drm/tegra/sor.c | 64 +- include/drm/drm_mipi_dbi_bus.h | 148 +++++ 19 files changed, 1604 insertions(+), 286 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dbi.yaml create mode 100644 drivers/gpu/drm/drm_mipi_dbi_bus.c create mode 100644 drivers/gpu/drm/tegra/dbi.c create mode 100644 include/drm/drm_mipi_dbi_bus.h -- 2.53.0