devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Wang <frawang.cn@gmail.com>
To: bjorn.andersson@linaro.org, heiko@sntech.de,
	heikki.krogerus@linux.intel.com
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
	devicetree@vger.kernel.org, djrscally@gmail.com,
	hdegoede@redhat.com, krzysztof.kozlowski+dt@linaro.org,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, rafael@kernel.org, robh+dt@kernel.org,
	sakari.ailus@linux.intel.com, william.wu@rock-chips.com,
	yubing.zhang@rock-chips.com, frank.wang@rock-chips.com
Subject: Re: [PATCH v5 5/7] usb: typec: mux: Allow multiple mux_devs per mux
Date: Wed,  5 Jun 2024 15:37:55 +0800	[thread overview]
Message-ID: <20240605073755.17452-1-frawang.cn@gmail.com> (raw)
In-Reply-To: <20220422222351.1297276-6-bjorn.andersson@linaro.org>

Hi Bjorn,

> In the Qualcomm platforms the USB/DP PHY handles muxing and orientation
> switching of the SuperSpeed lines, but the SBU lines needs to be
> connected and switched by external (to the SoC) hardware.
>
> It's therefor necessary to be able to have the TypeC controller operate
> multiple TypeC muxes and switches. Use the newly introduced indirection
> object to handle this, to avoid having to taint the TypeC controllers
> with knowledge about the downstream hardware configuration.
>
> The max number of devs per indirection is set to 3, which account for
> being able to mux/switch the USB HS, SS and SBU lines, as per defined
> defined in the usb-c-connector binding. This number could be grown if
> need arrises at a later point in time.
>
> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Changes since v4:
> - None
>

With this commit, TCPC device shall match *two* endpoint ports both for switch
device and mux device if they have the same parent node like the following
existed DT. It causes the callback function is invoked twice both for switch and
mux in tcpm_mux_set() process.

// arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
&usbdp_phy0 {
        mode-switch;
        orientation-switch;
        [...]
        port {
                #address-cells = <1>;
                #size-cells = <0>;

                usbdp_phy0_orientation_switch: endpoint@0 {
                        reg = <0>;
                        remote-endpoint = <&usbc0_orien_sw>;
                };

                usbdp_phy0_dp_altmode_mux: endpoint@1 {
                        reg = <1>;
                        remote-endpoint = <&dp_altmode_mux>;
                };
        };
};

BR.
Frank

  parent reply	other threads:[~2024-06-05  7:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 22:23 [PATCH v5 0/7] typec: mux: Introduce support for multiple USB TypeC muxes Bjorn Andersson
2022-04-22 22:23 ` [PATCH v5 1/7] device property: Add helper to match multiple connections Bjorn Andersson
2022-04-26 10:15   ` Andy Shevchenko
2022-05-06 18:21     ` Rafael J. Wysocki
2022-04-22 22:23 ` [PATCH v5 2/7] device property: Use multi-connection matchers for single case Bjorn Andersson
2022-04-22 22:23 ` [PATCH v5 3/7] usb: typec: mux: Check dev_set_name() return value Bjorn Andersson
2022-04-26 10:13   ` Andy Shevchenko
2022-04-22 22:23 ` [PATCH v5 4/7] usb: typec: mux: Introduce indirection Bjorn Andersson
2022-04-22 22:23 ` [PATCH v5 5/7] usb: typec: mux: Allow multiple mux_devs per mux Bjorn Andersson
2024-06-05  3:05   ` Frank Wang
2024-06-05  7:37   ` Frank Wang [this message]
2022-04-22 22:23 ` [PATCH v5 6/7] dt-bindings: usb: Add binding for fcs,fsa4480 Bjorn Andersson
2022-04-22 22:23 ` [PATCH v5 7/7] usb: typec: mux: Add On Semi fsa4480 driver Bjorn Andersson
2022-04-25  8:50   ` Heikki Krogerus
2022-04-27 13:38 ` [PATCH v5 0/7] typec: mux: Introduce support for multiple USB TypeC muxes Sakari Ailus

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=20240605073755.17452-1-frawang.cn@gmail.com \
    --to=frawang.cn@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djrscally@gmail.com \
    --cc=frank.wang@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=william.wu@rock-chips.com \
    --cc=yubing.zhang@rock-chips.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).