diff mbox series

[PATCH/RFC] dt-bindings: connector: Add port for OOB notifications

Message ID 20220520164810.141400-1-bjorn.andersson@linaro.org
State New
Headers show
Series [PATCH/RFC] dt-bindings: connector: Add port for OOB notifications | expand

Commit Message

Bjorn Andersson May 20, 2022, 4:48 p.m. UTC
In USB Type-C altmode hot plug interrupts are transferred using sideband
channels. Introduce an additional port in the usb-c-connector to allow
referencing the recipient of these notifications.

A typical node to be referred is a DisplayPort controller.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

I have a USB Type-C port manager with two usb-c-connector child nodes and I
have two display-port controller nodes. I need a way to link each port with
it's related displayport controller, for the purpose of passing hot-plug events
from USB PD to the dp driver.

The displayport binding [1] specifies port@1 as "Output endpoint of the
controller" and in case of being connected to an eDP panel or a dp-controller
this links the node with whatever the output is.

It has been suggested by some to describe the link from the usb-c-connector add
a displayport = <&phandle> to each usb-c-connector node, but the proposed
solution here would make the usb-c-connector case follow the same scheme as
these other cases.

Also, using the graph would allow an implementation of either the tcpm just
notifying the referenced displayport-controller, or following the dp-controller
implementation in Linux implement a drm_bridge and use the reference in the
other direction.

To clarify the end result would look something like:

tcpm {
	connector@0 {
		compatible = "usb-c-connector";
		reg = <0>;

		ports {
			port@0 {
				reg = <0>;
				endpoint {
					remote-endpoint = <&usb0_hs_mux>;
				};
			};

			port@1 {
				reg = <1>;
				endpoint {
					remote-endpoint = <&usb0_ss_mux>;
				};
			};

			port@2 {
				reg = <2>;
				endpoint {
					remote-endpoint = <&usb0_sbu_switch>;
				};
			};

			connector0_dp0: port@3 {
				reg = <1>;
				endpoint {
					remote-endpoint = <&dp0_connector0>;
				};
			};
		};
	};

	connector@1 {
		compatible = "usb-c-connector";
		reg = <1>;

		ports {
			port@0 {
				reg = <0>;
				endpoint {
					remote-endpoint = <&usb1_hs_mux>;
				};
			};

			port@1 {
				reg = <1>;
				endpoint {
					remote-endpoint = <&usb1_ss_mux>;
				};
			};

			port@2 {
				reg = <2>;
				endpoint {
					remote-endpoint = <&usb1_sbu_switch>;
				};
			};

			connector1_dp1: port@3 {
				reg = <1>;
				endpoint {
					remote-endpoint = <&dp1_connector1>;
				};
			};
		};
	};
}

displayport-controller@0 {
	reg = <0x0>;
	ports {
		port@1 {
			reg = <1>;
			dp0_connector0: endpoint {
				remote-endpoint = <&connector0_dp0>;
			};
		};
	};
};

displayport-controller@1 {
	reg = <0x1>;
	ports {
		port@1 {
			reg = <1>;
			dp1_connector1: endpoint {
				remote-endpoint = <&connector1_dp1>;
			};
		};
	};
};

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/msm/dp-controller.yaml

 .../devicetree/bindings/connector/usb-connector.yaml        | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 0420fa563532..99d4aeb233e5 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -189,6 +189,12 @@  properties:
         description: Sideband Use (SBU), present in USB-C. This describes the
           alternate mode connection of which SBU is a part.
 
+      port@3:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: Out-of-band notifications. This describes the logical
+          connection to e.g. a DisplayPort controller that should be notified
+          about hot plug events.
+
     required:
       - port@0