Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions Documentation/devicetree/bindings/display/bridge/lontium,lt8713sx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/bridge/lontium,lt8713sx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Lontium LT8713SX Type-C/DP1.4 to Type-C/DP1.4/HDMI2.0/DP++ bridge-hub

maintainers:
- Tony <syyang@lontium.com>

description:
The Lontium LT8713SX is a Type-C/DP1.4 to Type-C/DP1.4/HDMI2.0 converter
that integrates one DP input and up to three configurable output interfaces
(DP1.4 / HDMI2.0 / DP++), with SST/MST functionality and audio support.

properties:
compatible:
enum:
- lontium,lt8713sx

reg:
maxItems: 1

vcc-supply:
description: Regulator for 3.3V vcc.

vdd-supply:
description: Regulator for 1.1V vdd.

reset-gpios:
description: GPIO connected to active low RESET pin.

ports:
$ref: /schemas/graph.yaml#/properties/ports

properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description:
DP port for DP input from soc to bridge chip

port@1:
$ref: /schemas/graph.yaml#/properties/port
description:
DP port for DP output from bridge

port@2:
$ref: /schemas/graph.yaml#/properties/port
description:
Additional DP port for DP output from bridge

required:
- port@0

required:
- compatible
- reg
- ports

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

i2c {
#address-cells = <1>;
#size-cells = <0>;
bridge@4f {
compatible = "lontium,lt8713sx";
reg = <0x4f>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
lt8713sx_dp_in: endpoint {
remote-endpoint = <&mdss_dp0_out>;
};
};

port@1 {
reg = <1>;
lt8713sx_dp0_out: endpoint {
remote-endpoint = <&dp0_connector_in>;
};
};

port@2 {
reg = <2>;
lt8713sx_dp1_out: endpoint {
remote-endpoint = <&dp1_connector_in>;
};
};
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
$id: http://devicetree.org/schemas/display/bridge/lontium,lt9211.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Lontium LT9211 DSI/LVDS/DPI to DSI/LVDS/DPI bridge.
title: Lontium LT9211/LT9211C DSI/LVDS/DPI to DSI/LVDS/DPI bridge.

maintainers:
- Marek Vasut <marex@denx.de>

description: |
The LT9211 are bridge devices which convert Single/Dual-Link DSI/LVDS
The LT9211 and LT9211C are bridge devices which convert Single/Dual-Link DSI/LVDS
or Single DPI to Single/Dual-Link DSI/LVDS or Single DPI.

properties:
compatible:
enum:
- lontium,lt9211
- lontium,lt9211c

reg:
maxItems: 1
Expand Down Expand Up @@ -91,6 +92,43 @@ examples:

vccio-supply = <&lt9211_1v8>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

endpoint {
remote-endpoint = <&dsi0_out>;
};
};

port@2 {
reg = <2>;

endpoint {
remote-endpoint = <&panel_in_lvds>;
};
};
};
};
};
- |
#include <dt-bindings/gpio/gpio.h>

i2c {
#address-cells = <1>;
#size-cells = <0>;

lvds-bridge@3b {
compatible = "lontium,lt9211c";
reg = <0x3b>;

reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

vccio-supply = <&lt9211c_1v8>;

ports {
#address-cells = <1>;
#size-cells = <0>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ examples:
<0x0aec2000 0x1c8>;

clocks = <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_AUX_CLK>,
<&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>;
<&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
<&gcc GCC_EDP_REF_CLKREF_EN>;
clock-names = "aux",
"cfg_ahb";
"cfg_ahb",
"ref";

#clock-cells = <1>;
#phy-cells = <0>;
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/phy/qcom,edp-phy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ allOf:
compatible:
enum:
- qcom,glymur-dp-phy
- qcom,sa8775p-edp-phy
- qcom,x1e80100-dp-phy
then:
properties:
Expand Down
10 changes: 10 additions & 0 deletions drivers/gpu/drm/bridge/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ config DRM_LONTIUM_LT9611UXC
HDMI signals
Please say Y if you have such hardware.

config DRM_LONTIUM_LT8713SX
tristate "Lontium LT8713SX DP MST bridge"
depends on OF
select REGMAP_I2C
help
Driver for Lontium LT8713SX DP MST bridge
chip firmware upgrade, which converts Type-C/DP1.4
to 3 configurable Type-C/DP1.4/HDMI2.0 outputs
Please say Y if you have such hardware.

config DRM_ITE_IT66121
tristate "ITE IT66121 HDMI bridge"
depends on OF
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/bridge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_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
obj-$(CONFIG_DRM_MICROCHIP_LVDS_SERIALIZER) += microchip-lvds.o
Expand Down
36 changes: 36 additions & 0 deletions drivers/gpu/drm/bridge/display-connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/workqueue.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
Expand All @@ -25,6 +26,8 @@ struct display_connector {

struct regulator *supply;
struct gpio_desc *ddc_en;

struct work_struct hpd_work;
};

static inline struct display_connector *
Expand Down Expand Up @@ -87,6 +90,34 @@ display_connector_bridge_detect(struct drm_bridge *bridge, struct drm_connector
return display_connector_detect(bridge);
}

static void display_connector_hpd_enable(struct drm_bridge *bridge)
{
struct display_connector *conn = to_display_connector(bridge);

enable_irq(conn->hpd_irq);

if (conn->bridge.type == DRM_MODE_CONNECTOR_DisplayPort)
schedule_work(&conn->hpd_work);
}

static void display_connector_hpd_disable(struct drm_bridge *bridge)
{
struct display_connector *conn = to_display_connector(bridge);

if (conn->bridge.type == DRM_MODE_CONNECTOR_DisplayPort)
cancel_work_sync(&conn->hpd_work);

disable_irq(conn->hpd_irq);
}

static void display_connector_hpd_work(struct work_struct *work)
{
struct display_connector *conn = container_of(work, struct display_connector, hpd_work);
struct drm_bridge *bridge = &conn->bridge;

drm_bridge_hpd_notify(bridge, display_connector_detect(bridge));
}

static const struct drm_edid *display_connector_edid_read(struct drm_bridge *bridge,
struct drm_connector *connector)
{
Expand Down Expand Up @@ -178,6 +209,8 @@ static u32 *display_connector_get_input_bus_fmts(struct drm_bridge *bridge,
static const struct drm_bridge_funcs display_connector_bridge_funcs = {
.attach = display_connector_attach,
.detect = display_connector_bridge_detect,
.hpd_enable = display_connector_hpd_enable,
.hpd_disable = display_connector_hpd_disable,
.edid_read = display_connector_edid_read,
.atomic_get_output_bus_fmts = display_connector_get_output_bus_fmts,
.atomic_get_input_bus_fmts = display_connector_get_input_bus_fmts,
Expand Down Expand Up @@ -307,6 +340,7 @@ static int display_connector_probe(struct platform_device *pdev)
NULL, display_connector_hpd_irq,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING |
IRQF_NO_AUTOEN |
IRQF_ONESHOT,
"HPD", conn);
if (ret) {
Expand Down Expand Up @@ -378,6 +412,8 @@ static int display_connector_probe(struct platform_device *pdev)
conn->bridge.ops |= DRM_BRIDGE_OP_DETECT;
if (conn->hpd_irq >= 0)
conn->bridge.ops |= DRM_BRIDGE_OP_HPD;
if (conn->hpd_irq >= 0 && type == DRM_MODE_CONNECTOR_DisplayPort)
INIT_WORK(&conn->hpd_work, display_connector_hpd_work);

dev_dbg(&pdev->dev,
"Found %s display connector '%s' %s DDC bus and %s HPD GPIO (ops 0x%x)\n",
Expand Down
Loading