Skip to contentSkip to conversation

Add initial support for slimport anx7625

PATCH Superseded Xin Ji 3 participants 6 messages May 15, 2020 – Jun 4, 2020

Subsystems (4)

v11 of 17 Superseded Latest is v17 →

lore
Share & tools
lore

Xin Ji

author
#0 lore raw

v11 cover Add initial support for slimport anx7625

Hi all,

The following series add support for the Slimport ANX7625 transmitter, a ultra-low power Full-HD 4K MIPI to DP transmitter designed for portable device.

This is the v11 version, any mistakes, please let me know, I will fix it in the next series.

Change history:
v11: Fix comments from Rob Herring
- Update commit message.
- Remove unused label.

v10: Fix comments from Rob Herring, Daniel.
- Fix dt_binding_check warning.
- Update description.

v9: Fix comments from Sam, Nicolas, Daniel
- Remove extcon interface.
- Remove DPI support.
- Fix dt_binding_check complains.
- Code clean up and update description.

v8: Fix comments from Nicolas.
- Fix several coding format.
- Update description.

v7:
- Fix critical timing(eg:odd hfp/hbp) in "mode_fixup" interface, enhance MIPI RX tolerance by setting register MIPI_DIGITAL_ADJ_1 to 0x3D.

Xin Ji (2):
dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

 .../bindings/display/bridge/analogix,anx7625.yaml  |   95 +
 drivers/gpu/drm/bridge/Makefile                    |    2 +-
 drivers/gpu/drm/bridge/analogix/Kconfig            |    8 +
 drivers/gpu/drm/bridge/analogix/Makefile           |    1 +
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 1961 ++++++++++++++++++++
 drivers/gpu/drm/bridge/analogix/anx7625.h          |  397 ++++
 6 files changed, 2463 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v11 1/2 dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema

anx7625: MIPI to DP transmitter DT schema

---
 .../bindings/display/bridge/analogix,anx7625.yaml  | 95 ++++++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml new file +95 -0
new file mode 100644
index 0000000..60585a4
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Analogix Semiconductor, Inc.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/display/bridge/analogix,anx7625.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Analogix ANX7625 SlimPort (4K Mobile HD Transmitter)
+
+maintainers:
+  - Xin Ji <[email protected]>
+
+description: |
+  The ANX7625 is an ultra-low power 4K Mobile HD Transmitter
+  designed for portable devices.
+
+properties:
+  compatible:
+    items:
+      - const: analogix,anx7625
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: used for interrupt pin B8.
+    maxItems: 1
+
+  enable-gpios:
+    description: used for power on chip control, POWER_EN pin D2.
+    maxItems: 1
+
+  reset-gpios:
+    description: used for reset chip control, RESET_N pin B7.
+    maxItems: 1
+
+  ports:
+    type: object
+
+    properties:
+      port@0:
+        type: object
+        description:
+          Video port for MIPI DSI input.
+
+      port@1:
+        type: object
+        description:
+          Video port for panel or connector.
+
+    required:
+        - port@0
+        - port@1
+
+required:
+  - compatible
+  - reg
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        encoder@58 {
+            compatible = "analogix,anx7625";
+            reg = <0x58>;
+            enable-gpios = <&pio 45 GPIO_ACTIVE_HIGH>;
+            reset-gpios = <&pio 73 GPIO_ACTIVE_HIGH>;
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                mipi2dp_bridge_in: port@0 {
+                    reg = <0>;
+                    anx7625_in: endpoint {
+                        remote-endpoint = <&mipi_dsi>;
+                    };
+                };
+
+                mipi2dp_bridge_out: port@1 {
+                    reg = <1>;
+                    anx7625_out: endpoint {
+                        remote-endpoint = <&panel_in>;
+                    };
+                };
+            };
+        };
+    };
Signature · 1 line
2.7.4
maintainer Reviewed-by on v11 1/2
#2 lore raw

Re: [PATCH v11 1/2] dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema

Quoted 8 lines · Xin Ji

anx7625: MIPI to DP transmitter DT schema

---
 .../bindings/display/bridge/analogix,anx7625.yaml  | 95 ++++++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author
#3 lore raw

PATCH v11 2/2 drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

In reply to Xin Ji

The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K.

The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI to DP feature. This driver only enabled MIPI DSI/DPI to DP feature.

---
 drivers/gpu/drm/bridge/Makefile           |    2 +-
 drivers/gpu/drm/bridge/analogix/Kconfig   |    8 +
 drivers/gpu/drm/bridge/analogix/Makefile  |    1 +
 drivers/gpu/drm/bridge/analogix/anx7625.c | 1961 +++++++++++++++++++++++++++++
 drivers/gpu/drm/bridge/analogix/anx7625.h |  397 ++++++
 5 files changed, 2368 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h
drivers/gpu/drm/bridge/Makefile +1 -1
index 4934fcf..bcd388a 100644
@@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o
 obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o
 obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o
 obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o
-obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/
 obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/
 obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o
 obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o
+obj-y += analogix/
 obj-y += synopsys/
drivers/gpu/drm/bridge/analogix/Kconfig +8 -0
index e930ff9..c772be2 100644
@@ -2,3 +2,11 @@
 config DRM_ANALOGIX_DP
 	tristate
 	depends on DRM
+
+config DRM_ANALOGIX_ANX7625
+	tristate "Analogix Anx7625 MIPI to DP interface support"
+	depends on DRM
+	depends on OF
+	help
+		ANX7625 is an ultra-low power 4K mobile HD transmitter designed
+		for portable devices. It converts MIPI/DPI to DisplayPort1.3 4K.
drivers/gpu/drm/bridge/analogix/Makefile +1 -0
index fdbf3fd..b6c4a19 100644
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_DRM_ANALOGIX_ANX7625) += anx7625.o
 analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o
 obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o
drivers/gpu/drm/bridge/analogix/anx7625.c new file +1961 -0

1,961 lines not on this page · raw message

drivers/gpu/drm/bridge/analogix/anx7625.h new file +397 -0

397 lines not on this page · raw message

Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH v11 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

drivers/gpu/drm/bridge/analogix/anx7625.c line 1469

Quoted 2 lines · Xin Ji
drivers/gpu/drm/bridge/analogix/anx7625.c new file +2 -0
+
+static int anx7625_bridge_attach(struct drm_bridge *bridge)

Latest drm_bridge api:

int (*attach)(struct drm_bridge *bridge,

     enum drm_bridge_attach_flags flags);

https://elixir.bootlin.com/linux/v5.7-rc7/source/include/drm/drm_bridge.h#L70

Quoted 3 lines
drivers/gpu/drm/bridge/analogix/anx7625.c new file +3 -0
+{
+       struct anx7625_data *ctx = bridge_to_anx7625(bridge);
+       int err;
author
#5 lore raw

Re: [PATCH v11 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

Quoted 7 lines · Hsin-Yi Wang

drivers/gpu/drm/bridge/analogix/anx7625.c line 1469

Quoted 2 lines · Xin Ji
drivers/gpu/drm/bridge/analogix/anx7625.c new file +2 -0
+
+static int anx7625_bridge_attach(struct drm_bridge *bridge)

Latest drm_bridge api:

Quoted 8 lines

int (*attach)(struct drm_bridge *bridge,

     enum drm_bridge_attach_flags flags);

https://elixir.bootlin.com/linux/v5.7-rc7/source/include/drm/drm_bridge.h#L70

Quoted 3 lines
drivers/gpu/drm/bridge/analogix/anx7625.c new file +3 -0
+{
+       struct anx7625_data *ctx = bridge_to_anx7625(bridge);
+       int err;

Hi Hsin-Yi, thanks for the comment, I'll fix it in the version v12

Thanks,
Xin