Skip to contentSkip to conversation

Add initial support for slimport anx7625

PATCH Superseded Xin Ji 2 participants 4 messages Sep 16, 2020

Subsystems (4)

v15 of 17 Superseded Latest is v17 →

lore
Share & tools
lore

Xin Ji

author
#0 lore raw

v15 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 v15 version, any mistakes, please let me know, I will fix it in the next series.

Change history:
v15: Fix comments from Sam and Hsin-Yi Wang
- Remove connector
- Allocate memory for edid at ".get_edid()"

v14: Fix comments from Sam and Nicolas
- Check flags at drm_bridge_attach
- Use panel_bridge instead of drm_panel
- Fix not correct return value

v13: Fix comments from Launrent Pinchart and Rob Herring
- Picked up Rob's Reviewed-By
- Add .detect and .get_edid interface in bridge funcs.

v12: Fix comments from Hsin-Yi Wang
- Rebase the code on kernel 5.7, fix DRM interface not match issue.

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

 .../bindings/display/bridge/analogix,anx7625.yaml  |   95 +
 drivers/gpu/drm/bridge/analogix/Kconfig            |    9 +
 drivers/gpu/drm/bridge/analogix/Makefile           |    1 +
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 1848 ++++++++++++++++++++
 drivers/gpu/drm/bridge/analogix/anx7625.h          |  390 +++++
 5 files changed, 2343 insertions(+)
 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 v15 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
author
#2 lore raw

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

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.

---
 drivers/gpu/drm/bridge/analogix/Kconfig   |    9 +
 drivers/gpu/drm/bridge/analogix/Makefile  |    1 +
 drivers/gpu/drm/bridge/analogix/anx7625.c | 1848 +++++++++++++++++++++++++++++
 drivers/gpu/drm/bridge/analogix/anx7625.h |  390 ++++++
 4 files changed, 2248 insertions(+)
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c
 create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h
drivers/gpu/drm/bridge/analogix/Kconfig +9 -0
index e1fa7d8..024ea2a 100644
@@ -25,3 +25,12 @@ config DRM_ANALOGIX_ANX78XX
 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 97669b3..44da392 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o analogix-i2c-dptx.o
 obj-$(CONFIG_DRM_ANALOGIX_ANX6345) += analogix-anx6345.o
+obj-$(CONFIG_DRM_ANALOGIX_ANX7625) += anx7625.o
 obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o
 obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o
drivers/gpu/drm/bridge/analogix/anx7625.c new file +1848 -0

1,848 lines not on this page · raw message

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

390 lines not on this page · raw message

Signature · 1 line
2.7.4
#3 lore raw

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

Thank you for the patch! Yet something to improve:

Hi Xin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.9-rc5 next-20200916]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xin-Ji/Add-initial-support-for-slimport-anx7625/20200916-172800
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fc4f28bb3daf3265d6bc5f73b497306985bb23ab
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/bridge/analogix/anx7625.c:1636:16: error: initialization of 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' from incompatible pointer type 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_mode *)' [-Werror=incompatible-pointer-types]
    1636 |  .mode_valid = anx7625_bridge_mode_valid,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/bridge/analogix/anx7625.c:1636:16: note: (near initialization for 'anx7625_bridge_funcs.mode_valid')
cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/894859cbb786436c47d020d5569de7019776174c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Ji/Add-initial-support-for-slimport-anx7625/20200916-172800 git checkout 894859cbb786436c47d020d5569de7019776174c
vim +1636 drivers/gpu/drm/bridge/analogix/anx7625.c

1631
1632 static const struct drm_bridge_funcs anx7625_bridge_funcs = {
1633 .attach = anx7625_bridge_attach,
1634 .detach = anx7625_bridge_detach,
1635 .disable = anx7625_bridge_disable,

> 1636		.mode_valid = anx7625_bridge_mode_valid,

1637 .mode_set = anx7625_bridge_mode_set,
1638 .mode_fixup = anx7625_bridge_mode_fixup,
1639 .enable = anx7625_bridge_enable,
1640 .detect = anx7625_bridge_detect,
1641 .get_edid = anx7625_bridge_get_edid,
1642 };
1643

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org