drm/bridge: Add Lontium LT9721 HDMI to eDP bridge support
Subsystems (4)
v2 cover drm/bridge: Add Lontium LT9721 HDMI to eDP bridge support
This series adds Device Tree binding documentation and a DRM bridge driver for the Lontium LT9721 HDMI 1.4 to 1/2/4-lane eDP 1.4 bridge chip.
The LT9721 accepts an HDMI 1.4 TMDS video stream (up to 3.4 Gbps/lane) and drives a 1-, 2-, or 4-lane eDP 1.4 output at RBR (1.62 Gbps) or HBR (2.7 Gbps) per lane, controlled over a paged I2C register interface.
Patch 1 documents the "lontium,lt9721" binding, including power supplies, reset GPIO, OF graph input/output endpoints with lane/polarity remapping, and the DisplayPort AUX bus.
Patch 2 implements the atomic DRM bridge driver, registering the DP AUX channel (supporting both Native AUX for DPCD and I2C-over-AUX for EDID) and populating downstream eDP panels via devm_of_dp_aux_populate_bus().
Hardware-tested on an NXP i.MX8MP-based platform on a v5.10 kernel (driving a 2-lane 1080p eDP panel with dynamic EDID mode discovery over DP AUX), and forward-ported and build-/schema-tested against linux-next.
Changes in v2:
- Use of_drm_get_bridge_by_endpoint() instead of deprecated devm_drm_of_get_bridge() so bridge.next_bridge holds an owned reference
- Fix off-by-one byte count on partial I2C-over-AUX writes in lt9721_aux_transfer_i2c()
- Set DRM_BRIDGE_OP_DETECT unconditionally so fixed panel detection
overrides upstream HDMI bridge detect ops
- Use designated initializer in lt9721_i2c_ids[], switch to
devm_mutex_init(), and drop unused client field and headers
- Link to v1: https://lore.kernel.org/r/[email protected]
Gianfranco Mariotti (2):
dt-bindings: display: bridge: Add Lontium LT9721 HDMI to eDP bridge drm/bridge: Add Lontium LT9721 HDMI to eDP bridge driver
.../display/bridge/lontium,lt9721.yaml | 169 ++ MAINTAINERS | 8 + drivers/gpu/drm/bridge/Kconfig | 16 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9721.c | 1637 +++++++++++++++++ 5 files changed, 1831 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml create mode 100644 drivers/gpu/drm/bridge/lontium-lt9721.c
Signature · 1 line
2.25.1
PATCH v2 1/2 dt-bindings: display: bridge: Add Lontium LT9721 HDMI to eDP bridge
Document the Lontium LT9721 HDMI 1.4 to 1/2/4-lane eDP 1.4 bridge device tree binding, including power supplies, reset GPIO, OF graph input/output endpoints with lane/polarity remapping, and the DP AUX bus.
--- .../display/bridge/lontium,lt9721.yaml | 169 ++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 176 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml
Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml new file +169 -0
@@ -0,0 +1,169 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/lontium,lt9721.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Lontium LT9721 HDMI 1.4 to eDP 1.4 Bridge + +maintainers: + - Gianfranco Mariotti <[email protected]> + +description: + The Lontium LT9721 is a bridge device that converts an HDMI 1.4 input + (up to 3.4 Gbps/lane) to a 1-, 2-, or 4-lane eDP 1.4 output (1.62 Gbps + RBR or 2.7 Gbps HBR per lane), controlled over I2C. + +properties: + compatible: + const: lontium,lt9721 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: Active-low GPIO connected to the RST_N pin. + + vcc-supply: + description: Regulator for 3.3V analog and I/O power (VCC33_RX, VCC33_TX). + + vdd-supply: + description: Regulator for 1.8V analog and core power (VCC18_RX, VCC18_TX, VDD). + + aux-bus: + $ref: /schemas/display/dp-aux-bus.yaml# + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: HDMI 1.4 input port. + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + lane-polarities: + minItems: 4 + maxItems: 4 + items: + enum: [0, 1] + description: + TMDS pair P/N polarity inversion for clock and data lanes. + The LT9721 applies P/N inversion globally across all four + TMDS pairs, so all entries must match. + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: eDP 1.4 output port. + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + oneOf: + - minItems: 1 + maxItems: 1 + items: + enum: [0, 1, 2, 3] + - minItems: 2 + maxItems: 2 + uniqueItems: true + items: + enum: [0, 1, 2, 3] + - minItems: 4 + maxItems: 4 + uniqueItems: true + items: + enum: [0, 1, 2, 3] + + lane-polarities: + minItems: 1 + maxItems: 4 + items: + enum: [0, 1] + + dependencies: + lane-polarities: [data-lanes] + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - vcc-supply + - vdd-supply + - ports + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + bridge@33 { + compatible = "lontium,lt9721"; + reg = <0x33>; + reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + vcc-supply = <®_3v3>; + vdd-supply = <®_1v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lt9721_in: endpoint { + remote-endpoint = <&hdmi_out>; + lane-polarities = <1 1 1 1>; + }; + }; + + port@1 { + reg = <1>; + + lt9721_out: endpoint { + remote-endpoint = <&edp_panel_in>; + data-lanes = <0 1>; + }; + }; + }; + + aux-bus { + panel { + compatible = "edp-panel"; + power-supply = <®_panel_3v3>; + backlight = <&backlight>; + no-hpd; + + port { + edp_panel_in: endpoint { + remote-endpoint = <<9721_out>; + }; + }; + }; + }; + }; + }; +...
MAINTAINERS +7 -0
@@ -15790,6 +15790,13 @@ S: Maintained F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml F: drivers/gpu/drm/bridge/lontium-lt8912b.c +LONTIUM LT9721 HDMI TO EDP BRIDGE +M: Gianfranco Mariotti <[email protected]> +L: [email protected] +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml + LOONGARCH M: Huacai Chen <[email protected]> R: WANG Xuerui <[email protected]>
Signature · 1 line
2.25.1
PATCH v2 2/2 drm/bridge: Add Lontium LT9721 HDMI to eDP bridge driver
In reply to Gianfranco MariottiAdd a DRM bridge driver for the Lontium LT9721 HDMI 1.4 to 1/2/4-lane eDP 1.4 bridge chip.
The driver supports:
- Atomic DRM bridge chain integration (DRM_BRIDGE_ATTACH_NO_CONNECTOR)
- DP AUX channel registration (Native AUX for DPCD and I2C-over-AUX for EDID) with DP AUX bus panel population via devm_of_dp_aux_populate_bus()
- 1-, 2-, and 4-lane eDP 1.4 link training at RBR (1.62 Gbps) and HBR (2.7 Gbps) with per-lane voltage swing and pre-emphasis adjustment
- HDMI 1.4 RX CDR, adaptive equalization, PLL lock, and RGB/YCbCr format handling
- Standard OF graph data-lanes and lane-polarities remapping on RX and TX ports, plus power supply and reset sequencing
---
Changes in v2:
- Use of_drm_get_bridge_by_endpoint() instead of deprecated devm_drm_of_get_bridge() so bridge.next_bridge holds an owned reference
- Fix off-by-one byte count on partial I2C-over-AUX writes in lt9721_aux_transfer_i2c()
- Set DRM_BRIDGE_OP_DETECT unconditionally so fixed panel detection overrides upstream HDMI bridge detect ops
- Use designated initializer in lt9721_i2c_ids[], switch to devm_mutex_init(), and drop unused client field and headers
MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 16 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9721.c | 1637 +++++++++++++++++++++++ 4 files changed, 1655 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9721.c
MAINTAINERS +1 -0
@@ -15796,6 +15796,7 @@ L: [email protected] S: Maintained T: git https://gitlab.freedesktop.org/drm/misc/kernel.git F: Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml +F: drivers/gpu/drm/bridge/lontium-lt9721.c LOONGARCH M: Huacai Chen <[email protected]>
drivers/gpu/drm/bridge/Kconfig +16 -0
@@ -191,6 +191,22 @@ config DRM_LONTIUM_LT9611UXC HDMI signals Please say Y if you have such hardware. +config DRM_LONTIUM_LT9721 + tristate "Lontium LT9721 HDMI/eDP bridge" + depends on OF + select DRM_DISPLAY_DP_AUX_BUS + select DRM_DISPLAY_DP_HELPER + select DRM_DISPLAY_HELPER + select DRM_KMS_HELPER + select DRM_PANEL_BRIDGE + select REGMAP_I2C + help + Driver for Lontium LT9721 HDMI 1.4 to eDP 1.4 bridge chip. + Please say Y if you have such hardware. + + Say M here if you want to support this hardware as a module. + The module will be named "lontium-lt9721". + config DRM_LONTIUM_LT8713SX tristate "Lontium LT8713SX DP MST bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -17,6 +17,7 @@ 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_LT9611UXC) += lontium-lt9611uxc.o +obj-$(CONFIG_DRM_LONTIUM_LT9721) += lontium-lt9721.o obj-$(CONFIG_DRM_LONTIUM_LT8713SX) += lontium-lt8713sx.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o
drivers/gpu/drm/bridge/lontium-lt9721.c new file +1637 -0
1,637 lines not on this page · raw message
Signature · 1 line
2.25.1