devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip
@ 2020-03-18  7:07 Enric Balletbo i Serra
  2020-03-18  7:07 ` [PATCH v4 3/4] dt-bindings: Add ANX7688 HDMI to DP bridge binding Enric Balletbo i Serra
  2020-03-30 22:58 ` [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2020-03-18  7:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Collabora Kernel ML, Andrzej Hajda, icenowy, anarsoul,
	Neil Armstrong, matthias.bgg, drinkcat, hsinyi, megous, Lee Jones,
	Mark Rutland, Rob Herring, devicetree

The ANX7688 chip is a Type-C Port Controller, HDMI to DP converter and
USB-C mux between USB 3.0 lanes and the DP output.

For our use case a big part of the chip, like power supplies, control
gpios and the usb-c part is managed by an Embedded Controller, hence,
this is its simplest form of the binding. We'd prefer introduce these
properties for someone with a different use case so they can test
on their hardware.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

Changes in v4: None
Changes in v3:
- Add binding for ANX7688 multi-function device.

Changes in v2: None

 .../bindings/mfd/analogix,anx7688.yaml        | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml

diff --git a/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml b/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml
new file mode 100644
index 000000000000..bb95a4e87188
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/analogix,anx7688.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analogix ANX7688 HDMI to USB Type-C Bridge (Port Controller with MUX)
+
+maintainers:
+  - Nicolas Boichat <drinkcat@chromium.org>
+  - Enric Balletbo i Serra <enric.balletbo@collabora.com>
+
+description: |
+  ANX7688 converts HDMI 2.0 to DisplayPort 1.3 Ultra-HDi (4096x2160p60)
+  including an intelligent crosspoint switch to support USB Type-C (USB-C).
+  The integrated crosspoint switch supports USB 3.1 data transfer along with
+  the DisplayPort Alternate Mode signaling over USB Type-C. Additionally,
+  an on-chip microcontroller (OCM) is available to manage the signal switching,
+  Channel Configuration (CC) detection, USB Power Delivery (USB-PD), Vendor
+  Defined Message (VDM) protocol support and other functions as defined in the
+  USB TypeC and USB Power Delivery specifications.
+
+  As a result, a multi-function device is exposed as parent of the video
+  bridge, TCPC and MUX blocks.
+
+properties:
+  compatible:
+    const: analogix,anx7688
+
+  reg:
+    maxItems: 1
+    description: I2C address of the device
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        anx7688: anx7688@2c {
+            compatible = "analogix,anx7688";
+            reg = <0x2c>;
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v4 3/4] dt-bindings: Add ANX7688 HDMI to DP bridge binding
  2020-03-18  7:07 [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Enric Balletbo i Serra
@ 2020-03-18  7:07 ` Enric Balletbo i Serra
  2020-03-30 22:58 ` [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2020-03-18  7:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Collabora Kernel ML, Andrzej Hajda, icenowy, anarsoul,
	Neil Armstrong, matthias.bgg, drinkcat, hsinyi, megous,
	Daniel Vetter, David Airlie, Mark Rutland, Rob Herring,
	devicetree, dri-devel

From: Nicolas Boichat <drinkcat@chromium.org>

Add documentation for DT properties supported by the ANX7688 HDMI-DP
converter.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

Changes in v4: None
Changes in v3:
- Adapt the bridge bindings for the multi-function device.

Changes in v2:
- Improve a bit the descriptions using the info from the datasheet.
- Convert binding to yaml.
- Use dual licensing.

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

diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7688-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7688-bridge.yaml
new file mode 100644
index 000000000000..c56da3f39dd8
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7688-bridge.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/analogix,anx7688-bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analogix ANX7688 HDMI to DisplayPort Bridge
+
+maintainers:
+  - Nicolas Boichat <drinkcat@chromium.org>
+  - Enric Balletbo i Serra <enric.balletbo@collabora.com>
+
+description: |
+  The ANX7688 bridge describes the HDMI 2.0 to DisplayPort 1.3 bridge block
+  included in the ANX7688 chip controller. These are meant to be used for
+  controlling display-related signals.
+
+  The node of this device should be under an analogix,anx7866 node. Please refer
+  to Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml for the ANX7688
+  core bindings.
+
+properties:
+  compatible:
+    const: analogix,anx7688-bridge
+
+  ports:
+    type: object
+
+    properties:
+      port@0:
+        type: object
+        description: |
+          Video port for HDMI input
+
+      port@1:
+        type: object
+        description: |
+          Video port for DP output
+
+    required:
+      - port@0
+
+required:
+  - compatible
+  - ports
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        anx7688: anx7688@2c {
+            compatible = "analogix,anx7688";
+            reg = <0x2c>;
+
+            bridge {
+                compatible = "analogix,anx7688-bridge";
+
+                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 = <&typec0_connector>;
+                       };
+                    };
+                };
+            };
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip
  2020-03-18  7:07 [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Enric Balletbo i Serra
  2020-03-18  7:07 ` [PATCH v4 3/4] dt-bindings: Add ANX7688 HDMI to DP bridge binding Enric Balletbo i Serra
@ 2020-03-30 22:58 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-03-30 22:58 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Collabora Kernel ML, Andrzej Hajda, icenowy,
	anarsoul, Neil Armstrong, matthias.bgg, drinkcat, hsinyi, megous,
	Lee Jones, Mark Rutland, devicetree

On Wed, Mar 18, 2020 at 08:07:27AM +0100, Enric Balletbo i Serra wrote:
> The ANX7688 chip is a Type-C Port Controller, HDMI to DP converter and
> USB-C mux between USB 3.0 lanes and the DP output.
> 
> For our use case a big part of the chip, like power supplies, control
> gpios and the usb-c part is managed by an Embedded Controller, hence,
> this is its simplest form of the binding. We'd prefer introduce these
> properties for someone with a different use case so they can test
> on their hardware.

I'm not sure this is a move in the right direction from the prior 
version. Just because you have multiple functions that doesn't mean 
the DT has multiple child nodes. What's a 'function' exactly may vary 
by OS (or in time). Are the USB-C functions separate h/w? Are there 
separate resources for each sub-function that need to be defined in DT?

We do need to be able to construct a graph with this device, HDMI 
output, USB host, and USB connector. That may dictate what does or 
doesn't work here.

> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
> Changes in v4: None
> Changes in v3:
> - Add binding for ANX7688 multi-function device.
> 
> Changes in v2: None
> 
>  .../bindings/mfd/analogix,anx7688.yaml        | 48 +++++++++++++++++++
>  1 file changed, 48 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml b/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml
> new file mode 100644
> index 000000000000..bb95a4e87188
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/analogix,anx7688.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/analogix,anx7688.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analogix ANX7688 HDMI to USB Type-C Bridge (Port Controller with MUX)
> +
> +maintainers:
> +  - Nicolas Boichat <drinkcat@chromium.org>
> +  - Enric Balletbo i Serra <enric.balletbo@collabora.com>
> +
> +description: |
> +  ANX7688 converts HDMI 2.0 to DisplayPort 1.3 Ultra-HDi (4096x2160p60)
> +  including an intelligent crosspoint switch to support USB Type-C (USB-C).
> +  The integrated crosspoint switch supports USB 3.1 data transfer along with
> +  the DisplayPort Alternate Mode signaling over USB Type-C. Additionally,
> +  an on-chip microcontroller (OCM) is available to manage the signal switching,
> +  Channel Configuration (CC) detection, USB Power Delivery (USB-PD), Vendor
> +  Defined Message (VDM) protocol support and other functions as defined in the
> +  USB TypeC and USB Power Delivery specifications.
> +
> +  As a result, a multi-function device is exposed as parent of the video
> +  bridge, TCPC and MUX blocks.
> +
> +properties:
> +  compatible:
> +    const: analogix,anx7688
> +
> +  reg:
> +    maxItems: 1
> +    description: I2C address of the device
> +
> +required:
> +  - compatible
> +  - reg

If this does stay like this, then you need to define the child node(s) 
here and reference their bindings.

> +
> +examples:
> +  - |
> +    i2c0 {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        anx7688: anx7688@2c {
> +            compatible = "analogix,anx7688";
> +            reg = <0x2c>;
> +        };
> +    };
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-30 22:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-18  7:07 [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Enric Balletbo i Serra
2020-03-18  7:07 ` [PATCH v4 3/4] dt-bindings: Add ANX7688 HDMI to DP bridge binding Enric Balletbo i Serra
2020-03-30 22:58 ` [PATCH v4 1/4] dt-bindings: Add binding for the Analogix ANX7688 chip Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).