Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
Subsystems (4)
v4 cover Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
From: Sunyun Yang <[email protected]>
This series introduces:
- A device tree binding YAML file describing the hardware
- A new DRM bridge driver implementing the basic functionality
LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0
---
Changes in v4:
- dt-binding:
1. fix commit message [Krzysztof]
- drm/bridge:
1. use lt9611c_fw.bin [Dmitry]
2. use drm_bridge::next_bridge
3. use enum lt9611_chip_type
4. remove *fw from the lt9611c struct
5. "bool hdmi_connected;" variable add comment
6. use read_poll_timeout and -ETIMEDOUT in the "lt9611c_read_write_flow" function
7. replace mutex_lock(<9611c->ocm_lock) with guard(mutex)(<9611c->ocm_lock) in some place
8. switch to ARRAY_SIZE instead of specifying lengths directly
9. use dev_err_probe
10. add clear functions for AVI and audio infoframes
11. add DRM_BRIDGE_OP_HDMI and remove .hpd_notify
12. remove the sample_rate validation code
13. fix MODULE_DESCRIPTION
14. replace "GPL v2" with "GPL"
- Link to v3: https://lore.kernel.org/lkml/[email protected]/
Changes in v3:
- dt-binding:
1. lt9611c(ex/uxd) content merged into lontium,lt9611.yaml
- drm/bridge:
1. Drop the licence text, only use SPDX header
2. Sort the headers
3. Use library functions for crc8
4. Drop i2c_read_byte and i2c_write_byte
5. Lowercase all hex values
6. Use paged writes as implemented for LT9611C(EX/UXD)
7. Drop dev_info, use dev_dbg
8. Modify lt9611c_get_edid_block, don't store EDID in the long-term structures
9. Use HDMI audio helpers.
10.Remove unnecessary flags,Implement proper cleanup path, unwinding resources one by one. 11.Replace devm_kzalloc with devm_drm_bridge_alloc.
12.Remove extra kthread.
- Link to v1: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
1. Forget modify code, operation error, Please disregard this submit.
Changes in v1:
- dt-binding:
1. Submit the first version of the code.
- drm/bridge:
1. Submit the first version of the code.
---
Sunyun Yang (2):
dt-bindings: bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI
driver
drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
.../display/bridge/lontium,lt9611.yaml | 8 +- drivers/gpu/drm/bridge/Kconfig | 18 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9611c.c | 1211 +++++++++++++++++ 4 files changed, 1236 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.c
Signature · 1 line
2.34.1
PATCH v4 1/2 dt-bindings: bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
From: Sunyun Yang <[email protected]>
LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0
--- .../bindings/display/bridge/lontium,lt9611.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml +6 -2
@@ -4,19 +4,23 @@ $id: http://devicetree.org/schemas/display/bridge/lontium,lt9611.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Lontium LT9611(UXC) 2 Port MIPI to HDMI Bridge +title: Lontium LT9611(UXC/C/EX/UXD) 2 Port MIPI DSI to HDMI Bridge maintainers: - Vinod Koul <[email protected]> description: | - The LT9611 and LT9611UXC are bridge devices which convert DSI to HDMI + The LT9611、LT9611UXC、LT9611C、LT9611EX and LT9611UXD + are bridge devices which convert DSI to HDMI properties: compatible: enum: - lontium,lt9611 - lontium,lt9611uxc + - lontium,lt9611c + - lontium,lt9611ex + - lontium,lt9611uxd reg: maxItems: 1
Signature · 1 line
2.34.1
PATCH v4 2/2 drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
In reply to [email protected]From: Sunyun Yang <[email protected]>
LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0
--- drivers/gpu/drm/bridge/Kconfig | 18 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9611c.c | 1211 ++++++++++++++++++++++ 3 files changed, 1230 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.c
drivers/gpu/drm/bridge/Kconfig +18 -0
@@ -177,6 +177,24 @@ config DRM_LONTIUM_LT9611 HDMI signals Please say Y if you have such hardware. +config DRM_LONTIUM_LT9611C + tristate "Lontium LT9611C DSI/HDMI bridge" + select SND_SOC_HDMI_CODEC if SND_SOC + depends on OF + select CRC8 + select FW_LOADER + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_DISPLAY_HELPER + select DRM_DISPLAY_HDMI_STATE_HELPER + select REGMAP_I2C + help + Driver for Lontium DSI to HDMI bridge + chip driver that converts dual DSI and I2S to + HDMI signals + Please say Y if you have such hardware. + config DRM_LONTIUM_LT9611UXC tristate "Lontium LT9611UXC DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOC
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -16,6 +16,7 @@ obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o +obj-$(CONFIG_DRM_LONTIUM_LT9611C) += lontium-lt9611c.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o obj-$(CONFIG_DRM_LONTIUM_LT8713SX) += lontium-lt8713sx.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +1211 -0
1,211 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v4 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
Quoted 87 lines · On Wed, May 06, 2026 at 05:51:00PM +0800, [email protected] wrote:
From: Sunyun Yang <[email protected]>
LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0Signed-off-by Sunyun Yang <[email protected]>--- drivers/gpu/drm/bridge/Kconfig | 18 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9611c.c | 1211 ++++++++++++++++++++++ 3 files changed, 1230 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.cdrivers/gpu/drm/bridge/Kconfig +18
-0@@ -177,6 +177,24 @@ config DRM_LONTIUM_LT9611 HDMI signals Please say Y if you have such hardware. +config DRM_LONTIUM_LT9611C + tristate "Lontium LT9611C DSI/HDMI bridge" + select SND_SOC_HDMI_CODEC if SND_SOC + depends on OF + select CRC8 + select FW_LOADER + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_DISPLAY_HELPER + select DRM_DISPLAY_HDMI_STATE_HELPER + select REGMAP_I2C + help + Driver for Lontium DSI to HDMI bridge + chip driver that converts dual DSI and I2S to + HDMI signals + Please say Y if you have such hardware. + config DRM_LONTIUM_LT9611UXC tristate "Lontium LT9611UXC DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOCdrivers/gpu/drm/bridge/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o +obj-$(CONFIG_DRM_LONTIUM_LT9611C) += lontium-lt9611c.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o obj-$(CONFIG_DRM_LONTIUM_LT8713SX) += lontium-lt8713sx.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.odrivers/gpu/drm/bridge/lontium-lt9611c.c new file +24
-0@@ -0,0 +1,1211 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2026 Lontium Semiconductor, Inc. +*/ + +#include <linux/crc8.h> +#include <linux/firmware.h> +#include <linux/gpio/consumer.h> +#include <linux/i2c.h> +#include <linux/interrupt.h> +#include <linux/media-bus-format.h> +#include <linux/module.h> +#include <linux/mutex.h> +#include <linux/of_graph.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> +#include <linux/regulator/consumer.h> +#include <drm/drm_atomic_helper.h> +#include <drm/drm_bridge.h> +#include <drm/drm_connector.h> +#include <drm/drm_drv.h> +#include <drm/drm_edid.h> +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_modes.h>
drivers/gpu/drm/bridge/lontium-lt9611c.c line 34
Quoted 10 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10
-0+#include <drm/drm_of.h> +#include <drm/drm_print.h> +#include <drm/drm_probe_helper.h> +#include <drm/display/drm_hdmi_audio_helper.h> +#include <drm/display/drm_hdmi_state_helper.h> +#include <sound/hdmi-codec.h> + +#define FW_SIZE (64 * 1024) +#define LT_PAGE_SIZE 256 +#define FW_FILE "lt9611c_fw.bin"
So, this file doesn't have any subdir (like all other Lontium firmware files), but then you submit a file to linux-firmware with the Lontium/ subdir. Could you please settle on one location?
Quoted 3 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +3
-0+#define LT9611C_CRC_POLYNOMIAL 0x31 +#define LT9611C_PAGE_CONTROL 0xff +
[...]
drivers/gpu/drm/bridge/lontium-lt9611c.c line 863
Quoted 6 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +6
-0+ +static const struct drm_bridge_funcs lt9611c_bridge_funcs = { + .attach = lt9611c_bridge_attach, + .detect = lt9611c_bridge_detect, + .edid_read = lt9611c_bridge_edid_read, + .atomic_enable = lt9611c_bridge_atomic_enable,
There is .atomic_enable, but no atomic state management here. Was it actually tested?
Quoted 1 line
+
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v4 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver
Quoted 95 lines · Dmitry Baryshkov <[email protected]> 于2026年5月7日周四 04:06写道:
Quoted 93 lines · On Wed, May 06, 2026 at 05:51:00PM +0800, [email protected] wrote:
From: Sunyun Yang <[email protected]>
LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0Signed-off-by Sunyun Yang <[email protected]>--- drivers/gpu/drm/bridge/Kconfig | 18 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9611c.c | 1211 ++++++++++++++++++++++ 3 files changed, 1230 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.cdrivers/gpu/drm/bridge/Kconfig +18
-0@@ -177,6 +177,24 @@ config DRM_LONTIUM_LT9611 HDMI signals Please say Y if you have such hardware. +config DRM_LONTIUM_LT9611C + tristate "Lontium LT9611C DSI/HDMI bridge" + select SND_SOC_HDMI_CODEC if SND_SOC + depends on OF + select CRC8 + select FW_LOADER + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_DISPLAY_HELPER + select DRM_DISPLAY_HDMI_STATE_HELPER + select REGMAP_I2C + help + Driver for Lontium DSI to HDMI bridge + chip driver that converts dual DSI and I2S to + HDMI signals + Please say Y if you have such hardware. + config DRM_LONTIUM_LT9611UXC tristate "Lontium LT9611UXC DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOCdrivers/gpu/drm/bridge/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o +obj-$(CONFIG_DRM_LONTIUM_LT9611C) += lontium-lt9611c.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o obj-$(CONFIG_DRM_LONTIUM_LT8713SX) += lontium-lt8713sx.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.odrivers/gpu/drm/bridge/lontium-lt9611c.c new file +30
-0@@ -0,0 +1,1211 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2026 Lontium Semiconductor, Inc. +*/ + +#include <linux/crc8.h> +#include <linux/firmware.h> +#include <linux/gpio/consumer.h> +#include <linux/i2c.h> +#include <linux/interrupt.h> +#include <linux/media-bus-format.h> +#include <linux/module.h> +#include <linux/mutex.h> +#include <linux/of_graph.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> +#include <linux/regulator/consumer.h> +#include <drm/drm_atomic_helper.h> +#include <drm/drm_bridge.h> +#include <drm/drm_connector.h> +#include <drm/drm_drv.h> +#include <drm/drm_edid.h> +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_modes.h> +#include <drm/drm_of.h> +#include <drm/drm_print.h> +#include <drm/drm_probe_helper.h> +#include <drm/display/drm_hdmi_audio_helper.h> +#include <drm/display/drm_hdmi_state_helper.h> +#include <sound/hdmi-codec.h>
Quoted 9 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c line 34
Quoted 4 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +4
-0+ +#define FW_SIZE (64 * 1024) +#define LT_PAGE_SIZE 256 +#define FW_FILE "lt9611c_fw.bin"So, this file doesn't have any subdir (like all other Lontium firmware files), but then you submit a file to linux-firmware with the Lontium/ subdir. Could you please settle on one location?
In the next version of the driver (v5),
I will use #define FW_FILE "Lontium/lt9611c_fw.bin".
Quoted 6 lines
Quoted 3 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +3
-0+#define LT9611C_CRC_POLYNOMIAL 0x31 +#define LT9611C_PAGE_CONTROL 0xff +[...]
Quoted 10 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c line 863
Quoted 6 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +6
-0+ +static const struct drm_bridge_funcs lt9611c_bridge_funcs = { + .attach = lt9611c_bridge_attach, + .detect = lt9611c_bridge_detect, + .edid_read = lt9611c_bridge_edid_read, + .atomic_enable = lt9611c_bridge_atomic_enable,There is .atomic_enable, but no atomic state management here. Was it actually tested?
we will fix in next version.
Quoted 5 lines
Quoted 1 line
+
--
With best wishes
Dmitry