From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796177936; b=B3/tUTWK0DBKT4S7wdIc3kiDbMDVc6CehgQvKpk7GTzEZDIy+0rtsWBJTPHEzMSu34m3 GgmjxZkN5WLRPxbxQDmvv2n/+SZAK9UNSO0pBqAeFbDOoMaFaYCXJUhgljb8wlzM7EHpG 3iyRpvrWMVPA3QFNVHGUclknwa3ZIm8gDtFttx1nBJwY9Tf+RdLCKC2E147weCkYnscwy HdMl9TEFXgil1/T70D8rmfq37ugY6N/JFwfWha7TOJFX2kXywL3/MCMCercFlW5AlaQYs CM90MziHkEJHVHyYNLmvVe3gXSv41noxgo3x7yBjoHTp3P4W9Ik/z5zTpkkb34andHw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796177936; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=xIGmlPRd1w3mhNK7GcZyzI+7Q/A2Ma1csGpUBv4dYgc=; b=RBlX7vNVevzBnFHO+PM7dXSeaemMfteP4C1m6GdmOgeVCqijBmKX19n0PRKPMED/MuQW 6L2R5VIQrwgB8Wu3xbanGxsUxxmxY4oKUT3zdifbwSRYRJEbvc4mEh33mG+AbIotc/m55 D81ghrXySu6M01LemJJJwn9Sd+BPNozcJFrZZHAexa+eBvDzwlRvLocvWJX2l5SA77I2j /2elFrIJvgotNhAC8xjpIMXjc955U6iA9Ym7HAA9XkVG+/SQ/zyjZLpWR9NWrCN0vyLP1 XFdklwbY4P0FnjrN4M1m9Y0AnVZbKC3s4nQeQfNWElDoXyppcBgQV2IwbgjgWCuil9Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AUawJGS2; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43E67606A325; Wed, 2 Dec 2026 02:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AUawJGS2 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796177935; b=B54A/4uf/LbqrQPwizvtSkp1cIim4o0lvLm/Z5WwUbA0izRm5+fFeSolSaxBTCdMxtDb 54f7zz/u7aFRCI4JkPx8TM7D/yc3bu7JPAxGEhJH2oNKcP83PCsFytsMbiAWvjOg6pFNT NPgYTNVJ31t09Bn4cFggHt19/VGYC1phCCEn3qGsApSqSVJCKep7PMIM/fFq8vpzeXRwF VJBZ/5D4anGp4wjw2OZ0odPjJ0O4E4PhU/CSPqyuMv1EHfXhJJrz3NcVxtbJSBJ2zH7bQ HIcg1ClFNOoSvYMeI41r2VCBcsdLBKiFM5CITI5JbRzpkXEaXXsMeVT25XKhJtzIBJA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796177935; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=xIGmlPRd1w3mhNK7GcZyzI+7Q/A2Ma1csGpUBv4dYgc=; b=HLOEJw5Rw2bZ5eQ3Y8ZGnCjGb9jMXF8b88ksC9Yg34tZzib4eepU2F2R5odaA8tZH9S1 EV0XTVf0JdTJIkjeiEEH9gRnqPPCvdrO09hZCe4ymSqH55REyvjN7ID4WsYuyhZOh5zKY VIL0PO7tFs058QaarJo2cOuY1bRrs4wRzPowjzuRTsR1ykn66wBlOANo+gv15Lz04gXMu w0RIudFD3ctsGHzsW7RWedaw/iGq839jp1R4NtB9r0g6xOxGjU9I2vdy0ZumtK+72/pK/ ONn1mQIycbol0TbrLCobXap/xxeyKqtaQ5sGeln/AAbU+dGzr0LbWNOmER8RJFn/aOw== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id DB97E1F00896; Wed, 2 Dec 2026 02:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796177935; bh=xIGmlPRd1w3mhNK7GcZyzI+7Q/A2Ma1csGpUBv4dYgc=; h=From:Subject:Date:To:Cc:Reply-To; b=AUawJGS2arTUts+/eC13JQT/cjLPy0CKoqt4BBYfw5q64R+o4v9bu+G4fVbChSZtQ nIIYOhYgycxJxW3YCxbalvTZmctFUnyyj0qHaj2m1Eom38aO9/zM8YFst4OXb+E/FO 9eNt/wMRlfURqa6K4GCyoobS4hZJfkBThlFhgMoUSIZ+dZLPr2+xVBpcD25B2rkp4Q 8ImdWHLsFhNoR3x6i0u7DgTSObrxls5LRjeK0loCS2atYD+9FWmayvQoqKtUyCTnpU +de4TIfZqnx4Es/b1s6ClxB8pwYYqhtXHN374EuZ553VEloOaPwc7+/3PjQcTWzCOz wkU9Oqbk3KFhg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 38B3B4F1CF; Wed, 2 Dec 2026 02:18:54 +0000 (UTC) From: Hermes Wu via B4 Relay Subject: [PATCH v6 0/2] Add ITE IT6162 MIPI DSI to HDMI bridge driver Date: Wed, 02 Dec 2026 10:18:34 +0800 Message-Id: <20261202-upstream-6162-v6-0-508a142766a2@ite.com.tw> 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPp/D2sC/3XNy27DIBAF0F+JWJeIlwfcVf+j6sIMQ8MicQSuk yryvwdnkUdRl3c0594LK5QTFfa+ubBMcyppPNQAbxuGu+HwTTyFmpkSCoRSmv8cy5Rp2HOQoLi 2nSTrQsQhsGqOmWI63/o+v2repTKN+fdWP8v1+l/TLLng5BEBEL2M9JEm2uK4304ntlbN6sG16 P9yVXkgHzygc/Wh4fqJy2ZdV+5Mb6O3aIyAhptn3qybyq0CZ5ymKHRoeHfnUqiGd+u6hj721A2 RXteXZbkCQt0JyqcBAAA= X-Change-ID: 20260223-upstream-6162-3751e78dfcad To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Luca Ceresoli Cc: Pet.Weng@ite.com.tw, Kenneth.Hung@ite.com.tw, Hermes Wu , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Hermes Wu , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796177933; l=11317; i=Hermes.wu@ite.com.tw; s=20241230; h=from:subject:message-id; bh=ZvqoYcGLJsZKoTRQFuoyjcBnX1ujf/Yp2Gt/ifMJ3e8=; b=6glETJYjDYhpe+fEaPF3yn1HWJHSGF5NDNJm73csCudUhwtiatcnDfUVd83oykMd0rLWiCxWy prSOmpFbcI7C1bsBbDNmtMJKB2yz39QF8Y2vZfzea0m9h2KzvpZFZND X-Developer-Key: i=Hermes.wu@ite.com.tw; a=ed25519; pk=qho5Dawp2WWj9CGyjtJ6/Y10xH8odjRdS6SXDaDAerU= X-Endpoint-Received: by B4 Relay for Hermes.wu@ite.com.tw/20241230 with auth_id=310 X-Original-From: Hermes Wu Reply-To: Hermes.wu@ite.com.tw This patch series adds support for the ITE IT6162 MIPI DSI to HDMI bridge chip. The IT6162 is an I2C-controlled bridge that receives MIPI DSI input and outputs HDMI signals. The device supports the following configurations: - Single MIPI DSI input: up to 4K @ 30Hz - Dual MIPI DSI input (combined): up to 4K @ 60Hz This series introduces: - dt-bindings: Add YAML binding document for ITE IT6162 - drm/bridge: Add ITE IT6162 MIPI DSI to HDMI bridge driver Signed-off-by: Hermes Wu --- Changes in v6: - Rebase on drm-misc-next - Drop the Assisted-by trailer from both patches - Documentation/devicetree/bindings/display/bridge/ite,it6162.yaml: * Add Reviewed-by tag * Keep the MAINTAINERS entry for this file in the driver patch, which adds the entry for both files - drivers/gpu/drm/bridge/ite-it6162.c: * Kconfig: select DRM_DISPLAY_HDMI_STATE_HELPER instead of the undefined DRM_HDMI_HELPER * Fix the loop bound when reading the HDCP KSV/RxID list, which read one block too many for a multiple of 6 devices * Don't pass the bridge OF node to the DSI devices: the DSI core drops a node reference on release that the driver never took * Reject attach without DRM_BRIDGE_ATTACH_NO_CONNECTOR * Drop DRM_BRIDGE_OP_MODES, as the driver has no .get_modes and the modes come from the EDID * Advertise SPD InfoFrame support * Set DRM_BRIDGE_OP_HPD and report hotplug from a work item, since the EDID read on hotplug waits for the interrupt thread; report the initial HPD state once the chip is ready * Declare HDMI 2.0 support; the firmware handles SCDC scrambling * Reject modes above the DSI input bandwidth, 3 Gbps per lane per enabled port * Use named initializers for the I2C device ID table * Expose HDCP through the Content Protection property. HDCP stays off until userspace requests it, and the property goes back to DESIRED when the output is disabled * Reset the chip and wait for the firmware once at probe, not again after the DSI attach; drop the unused pm_runtime.h include * Accept 32-bit I2S samples; the chip sends the top 24 bits over HDMI * Use system_percpu_wq instead of the deprecated system_wq * Support the HDCP Content Type property: Type 1 uses HDCP 2.3 with stream type 1 and no HDCP 1.4 fallback; a content type change sets Content Protection back to DESIRED, and the new type is used from the next modeset * Keep port@3 without a next bridge: the IT6162 is the last bridge and handles HPD and EDID itself * Keep drm_bridge_add() before the DSI attach, the order required for a bridge driving a DSI device - Link to v5: https://lore.kernel.org/r/20261029-upstream-6162-v5-0-8369f9e5afe6@ite.com.tw Changes in v5: - Move per-patch changelogs into the cover letter - Documentation/devicetree/bindings/display/bridge/ite,it6162.yaml: * Use 1-based data-lanes numbering as lane 0 is the D-PHY clock lane, revert example to <1 2 3 4> * Constrain data-lanes to in-order lanes or full reversal <4 3 2 1> * Document port@1 as the preferred port for a single MIPI DSI input * Keep port@0 and port@3 optional: a single MIPI DSI input uses port@1, and the HDMI connector is created for the bridge without a port@3 link * Keep a single endpoint node per MIPI DSI port, as other bridge bindings based on port-base do * Drop Reviewed-by tag due to above changes - drivers/gpu/drm/bridge/ite-it6162.c: * Detect lane reversal from 1-based data-lanes (data_lanes[0] == 4) * Rebase on drm-misc-next: use struct drm_atomic_commit in atomic_enable/atomic_disable, replace .atomic_reset with .atomic_create_state, pass DRM_OUTPUT_COLOR_FORMAT_RGB444 to drm_hdmi_compute_mode_clock() * Take the colorspace sent to firmware from the AVI infoframe instead of conn_state->hdmi.output_format, which is no longer enum hdmi_colorspace * Enable the supplies once, while detecting the chip, and disable them through devres on removal and on every probe failure; unwind a partially failed enable in the power-down order; propagate it6162_poweron() errors and drop the unused it6162_poweroff() * Power up ivdd, wait at least 1 ms, then ovdd1833 and ovdd, and power down in the reverse order with the same wait before ivdd * Rename it6162_poweron() to it6162_hw_start() and the power_on flag to hw_ready, as the function no longer enables the supplies: it resets and configures the chip, then enables the interrupt and connector status reporting * Order teardown with devres: initialise the (devm managed) mutex, wait queue and HDCP work first, and register the bridge before the HDCP work cancel action and the IRQ, so the IRQ is freed and the work cancelled before the bridge is removed; drop .remove() * Hold it6162->lock while writing or clearing an infoframe through the data buffer * Update the HDCP content protection property from a dedicated work holding connection_mutex, and drop updates for an HDCP session that has already ended * Zero-initialise the video settings and set the HSync/VSync polarity and scan mode bits as the programming guide defines them, which also fixes the inverted VSync polarity * Check regmap read results before using the data read * Name the chip ID and version register offsets as in the programming guide (register 0x00 is the most significant ID byte); the ID check is unchanged * Document that the firmware is given the HDMI output timing from the requested mode, not the MIPI input timing in adjusted_mode * Drop the endpoint node reference on the data-lanes error path * Get the chip info with i2c_get_match_data(), add it to the I2C ID table and fail probe if it is missing * Honour the requested length when reading an EDID block * Leave the cached HPD state to the IRQ thread instead of updating it from detect * Drop Reviewed-by tag due to above changes - Link to v4: https://lore.kernel.org/r/20260319-upstream-6162-v4-0-7268483ef03d@ite.com.tw Changes in v4: - Documentation/devicetree/bindings/display/bridge/ite,it6162.yaml: * Drop ite,support-hdcp * Drop endpoint properties already in video-interfaces.yaml * Fix data-lanes in example with <0 1 2 3> * Add blanking line in example before endpoint subnode starts * Add reset-gpio and power controls to required - drivers/gpu/drm/bridge/ite-it6162.c: * Drop struc it6162_audio * Add HDCP_AUTO in enum hdcp_ver{}, FW enable HDCP by sink capability. * Call drm_atomic_helper_connector_hdmi_clear_audio_infoframe() in it6162_bridge_hdmi_audio_shutdown() * Drop it6162_bridge_hdmi_audio_startup() * Add hdmi_clear_hdmi_infoframe and hdmi_write_hdmi_infoframe * Drop it6162_parse_dt() due to "ite,support-hdcp" is removed from DT. * add DRM_BRIDGE_OP_HDMI to it6162->bridge.ops - Link to v3: https://lore.kernel.org/r/20260313-upstream-6162-v3-0-8497fb7c4406@ite.com.tw Changes in v3: - Documentation/devicetree/bindings/display/bridge/ite,it6162.yaml: * Fix lane-polarities: remove $ref redefinition, allow via video-interfaces.yaml * Improve ite,support-hdcp description to clarify FW-based HDCP behavior * Remove descriptions repeating schema constraints * Remove stray comment in ports required section * Fix data-lanes spacing in example: <1 2 3 4> * Add missing newline at end of file * Add missing change log that Reviewed-by tag was removed when V1->V2 - drivers/gpu/drm/bridge/ite-it6162.c: * Fix OFFSET_VERSION_H register offset from 0x03 to 0x05 * Add MIPI_PORT_EN_MASK macro combining MIPI_PORT1_EN_MASK and MIPI_PORT0_EN_MASK * Rename HDCP enums: NO_HDCP -> HDCP_DISABLE, NO_HDCP_STATE -> HDCP_STATE_IDLE, AUTH_DONE -> HDCP_STATE_AUTH_DONE, AUTH_FAIL -> HDCP_STATE_AUTH_FAIL * Rename it6162_infoblock_complete() to it6162_wait_command_complete() * Rename it6162_infoblock_host_set() to it6162_infoblock_trigger() * Remove it6162_infoblock_mipi_config() and it6162_infoblock_write_msg() wrappers, inline into it6162_reset_init() and it6162_mipi_set_video_timing() respectively * Remove it6162_set_default_config() wrapper, inline into it6162_reset_init() * Fix typo: hdcp_encyption -> hdcp_encryption * Fix typo: it6162_hdcp_read_infomation -> it6162_hdcp_read_information * Remove dev_err_probe() usage outside of probe path * Remove verbose success-path dev_info/dev_dbg logging throughout * Replace __func__ usage in error messages with descriptive strings * Fix double error printing in probe for it6162_init_pdata failure path * Fix uninitialized variable warning: initialize cp_status to DRM_MODE_CONTENT_PROTECTION_DESIRED at declaration; move drm_hdcp_update_content_protection() inside the state-change block * Fix audio sample width mapping: case 20 now maps to WORD_LENGTH_20BIT, case 24 to WORD_LENGTH_24BIT * Remove stray drm_dbg("it6162_bridge_atomic_disable") call * Remove drm_dbg() calls from it6162_display_mode_to_settings() * Drop unused struct it6162 * parameter from it6162_avi_to_video_setting() and it6162_display_mode_to_settings() * Fold it6162_set_default_config() body directly into it6162_reset_init(), removing the wrapper * it6162_infoblock_request_data(): split command complete polling and buffer status check into two steps; use wait_event_timeout() for data_buf_sts since it is updated asynchronously by the interrupt handler; add wait_queue_head_t data_buf_wait to struct it6162 and wake_up() in interrupt handler - Link to v2: https://lore.kernel.org/r/20260309-upstream-6162-v2-0-debdb6c88030@ite.com.tw Changes in v2: - dt-bindings: * Drop Reviewed-by tag due to below changes * Add property "ite,spport-hdcp" to enable HDCP * Add property "lane-polarities" and "clock-noncontinuous" for DSI setting - drm/bridge: * Drop unused element in struct it6162 * Remove regmap wrappers * Use FIELD_PREP for bitfield operations * Update HDCP status with drm_hdcp_update_content_protection() * Add AVI, AUDIO, and SPD infoframe control * Remove conversion from drm_display_mode to videomode * Fix regulator/gpio error handling in it6162_init_pdata() to return proper error codes - MAINTAINERS * squash to driver patch - Link to v1: https://lore.kernel.org/r/20260223-upstream-6162-v1-0-ebcc66ccb1fe@ite.com.tw --- Hermes Wu (2): dt-bindings: display: bridge: Add ITE IT6162 MIPI DSI to HDMI bridge drm/bridge: Add ITE IT6162 MIPI DSI to HDMI bridge driver .../bindings/display/bridge/ite,it6162.yaml | 205 +++ MAINTAINERS | 7 + drivers/gpu/drm/bridge/Kconfig | 16 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6162.c | 1876 ++++++++++++++++++++ 5 files changed, 2105 insertions(+) --- base-commit: 5de4885dae61a0e1708402e1fbf8f9d600ef1f4f change-id: 20260223-upstream-6162-3751e78dfcad Best regards, -- Hermes Wu