All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kyle Tso <kyletso@google.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, dianders@chromium.org,
	swboyd@chromium.org, quic_subbaram@quicinc.com,
	Kuogee Hsieh <quic_khsieh@quicinc.com>
Subject: [PATCH/RFC] dt-bindings: connector: Add port for OOB notifications
Date: Fri, 20 May 2022 09:48:10 -0700	[thread overview]
Message-ID: <20220520164810.141400-1-bjorn.andersson@linaro.org> (raw)

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 --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
 
-- 
2.35.1


                 reply	other threads:[~2022-05-20 16:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220520164810.141400-1-bjorn.andersson@linaro.org \
    --to=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kyletso@google.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_khsieh@quicinc.com \
    --cc=quic_subbaram@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    --subject='Re: [PATCH/RFC] dt-bindings: connector: Add port for OOB notifications' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.