Add support for ANX7688
Subsystems (6)
v6 cover Add support for ANX7688
ANX7688 is a typec port controller that also converts HDMI to DP. ANX7688 is found on Acer Chromebook R13 (elm) and on Pine64 PinePhone.
On Acer Chromebook R13 (elm), the device is powered-up and controller by the Embedded Controller. Therefore its operation is transparent
to the SoC. It is used in elm only as a display bridge driver. The bridge driver only reads some values using i2c and use them to implement the mode_fixup cb.
On v5 we added the full dt-binding of the generic Analogix anx7688 device. The problem is that for elm, most of the fields are not needed since the anx7688 sits behind the EC. After a discussion on v5 (see [1])
we decided to go back to the original approach and send the dt binding as specific to the elm. So in this version we rename the device to cros_ec_anx7688 and use the compatible 'google,cros-ec-anx7688'.
[1] https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Changes since v5:
* treat the device as a specific combination of an ANX7688 behind the EC and call it 'cros-ec-anx7688'
Changes since v4:
In v4 of this set, the device was added as an 'mfd' device and an additional 'bridge' device for the HDMI-DP conversion, see [2].
[2] https://lkml.org/lkml/2020/3/18/64
Dafna Hirschfeld (1):
dt-bindings: display: add google,cros-ec-anx7688.yaml
Enric Balletbo i Serra (1):
drm/bridge: Add ChromeOS EC ANX7688 bridge driver support
.../bridge/google,cros-ec-anx7688.yaml | 82 ++++++++ drivers/gpu/drm/bridge/Kconfig | 12 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/cros-ec-anx7688.c | 191 ++++++++++++++++++ 4 files changed, 286 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yaml create mode 100644 drivers/gpu/drm/bridge/cros-ec-anx7688.c
Signature · 1 line
2.17.1
PATCH v6 1/2 dt-bindings: display: add google,cros-ec-anx7688.yaml
ChromeOS EC ANX7688 is a display bridge that converts HDMI 2.0 to DisplayPort 1.3 Ultra-HDi (4096x2160p60). It is an Analogix ANX7688 chip which is connected to and operated by the ChromeOS Embedded Controller (See google,cros-ec.yaml). It is accessed using I2C tunneling through the EC and therefore its node should be a child of an EC I2C tunnel node (See google,cros-ec-i2c-tunnel.yaml).
ChromOS EC ANX7688 is found on Acer Chromebook R13 (elm)
--- .../bridge/google,cros-ec-anx7688.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yaml
Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yaml new file +82 -0
@@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/google,cros-ec-anx7688.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ChromeOS EC ANX7688 HDMI to DP Converter through Type-C Port + +maintainers: + - Nicolas Boichat <[email protected]> + - Enric Balletbo i Serra <[email protected]> + +description: | + ChromeOS EC ANX7688 is a display bridge that converts HDMI 2.0 to + DisplayPort 1.3 Ultra-HDi (4096x2160p60). It is an Analogix ANX7688 chip + which is connected to and operated by the ChromeOS Embedded Controller + (See google,cros-ec.yaml). It is accessed using I2C tunneling through + the EC and therefore its node should be a child of an EC I2C tunnel node + (See google,cros-ec-i2c-tunnel.yaml). + +properties: + compatible: + const: google,cros-ec-anx7688 + + reg: + maxItems: 1 + description: I2C address of the device. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Video port for HDMI input. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: USB Type-c connector. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - ports + +additionalProperties: false + +examples: + - | + i2c_tunnel_b: i2c-tunnel1 { + compatible = "google,cros-ec-i2c-tunnel"; + google,remote-bus = <1>; + #address-cells = <1>; + #size-cells = <0>; + + anx7688: anx7688@2c { + compatible = "google,cros-ec-anx7688"; + reg = <0x2c>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + anx7688_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + port@1 { + reg = <1>; + anx7688_out: endpoint { + remote-endpoint = <&typec_connector>; + }; + }; + }; + }; + }; +
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v6 1/2] dt-bindings: display: add google,cros-ec-anx7688.yaml
Quoted 7 lines · Dafna Hirschfeld
ChromeOS EC ANX7688 is a display bridge that converts HDMI 2.0 to DisplayPort 1.3 Ultra-HDi (4096x2160p60). It is an Analogix ANX7688 chip which is connected to and operated by the ChromeOS Embedded Controller (See google,cros-ec.yaml). It is accessed using I2C tunneling through the EC and therefore its node should be a child of an EC I2C tunnel node (See google,cros-ec-i2c-tunnel.yaml).
Quoted 8 lines
ChromOS EC ANX7688 is found on Acer Chromebook R13 (elm)
Signed-off-by Dafna Hirschfeld <[email protected]>--- .../bridge/google,cros-ec-anx7688.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yaml
PATCH v6 2/2 drm/bridge: Add ChromeOS EC ANX7688 bridge driver support
In reply to Dafna HirschfeldFrom: Enric Balletbo i Serra <[email protected]>
This driver adds support for the ChromeOS EC ANX7688 HDMI to DP converter
For our use case, the only reason the Linux kernel driver is necessary is to reject resolutions that require more bandwidth than what is available on the DP side. DP bandwidth and lane count are reported by the bridge via 2 registers and, as far as we know, only chips that have a firmware version greater than 0.85 support these two registers.
--- drivers/gpu/drm/bridge/Kconfig | 12 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/cros-ec-anx7688.c | 191 +++++++++++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 drivers/gpu/drm/bridge/cros-ec-anx7688.c
drivers/gpu/drm/bridge/Kconfig +12 -0
@@ -37,6 +37,18 @@ config DRM_CHRONTEL_CH7033 If in doubt, say "N". +config DRM_CROS_EC_ANX7688 + tristate "ChromeOS EC ANX7688 bridge" + depends on OF + select DRM_KMS_HELPER + select REGMAP_I2C + help + ChromeOS EC ANX7688 is an ultra-low power + 4K Ultra-HD (4096x2160p60) mobile HD transmitter + designed for ChromeOS devices. It converts HDMI + 2.0 to DisplayPort 1.3 Ultra-HD. It is connected + to the ChromeOS Embedded Controller. + config DRM_DISPLAY_CONNECTOR tristate "Display connector support" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o +obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o
drivers/gpu/drm/bridge/cros-ec-anx7688.c new file +191 -0
191 lines not on this page · raw message
Signature · 1 line
2.17.1
Hi, pinging here, can one of the kernel bridge maintainers review this patchset?
Thanks,
Dafna
Quoted 42 lines · Dafna Hirschfeld
ANX7688 is a typec port controller that also converts HDMI to DP. ANX7688 is found on Acer Chromebook R13 (elm) and on Pine64 PinePhone.
On Acer Chromebook R13 (elm), the device is powered-up and controller by the Embedded Controller. Therefore its operation is transparent
to the SoC. It is used in elm only as a display bridge driver. The bridge driver only reads some values using i2c and use them to implement themode_fixupcb.On v5 we added the full dt-binding of the generic Analogix anx7688 device. The problem is that for elm, most of the fields are not needed since the anx7688 sits behind the EC. After a discussion on v5 (see [1])
we decided to go back to the original approach and send the dt binding as specific to the elm. So in this version we rename the device tocros_ec_anx7688and use the compatible 'google,cros-ec-anx7688'.[1] https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Changes since v5:
* treat the device as a specific combination of an ANX7688 behind the EC and call it 'cros-ec-anx7688'Changes since v4:
In v4 of this set, the device was added as an 'mfd' device and an additional 'bridge' device for the HDMI-DP conversion, see [2].[2] https://lkml.org/lkml/2020/3/18/64
Dafna Hirschfeld (1):
dt-bindings: display: add google,cros-ec-anx7688.yamlEnric Balletbo i Serra (1):
drm/bridge: Add ChromeOS EC ANX7688 bridge driver support.../bridge/google,cros-ec-anx7688.yaml | 82 ++++++++ drivers/gpu/drm/bridge/Kconfig | 12 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/cros-ec-anx7688.c | 191 ++++++++++++++++++ 4 files changed, 286 insertions(+)create mode 100644
Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yamlcreate mode 100644drivers/gpu/drm/bridge/cros-ec-anx7688.c