[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <10f48a9b-d66a-439e-80d3-54f8e01f015e@rock-chips.com>
Date: Wed, 5 Jun 2024 11:05:59 +0800
From: Frank Wang <frank.wang@...k-chips.com>
To: bjorn.andersson@...aro.org
Cc: andriy.shevchenko@...ux.intel.com, devicetree@...r.kernel.org,
djrscally@...il.com, gregkh@...uxfoundation.org, hdegoede@...hat.com,
heikki.krogerus@...ux.intel.com, krzysztof.kozlowski+dt@...aro.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, rafael@...nel.org, robh+dt@...nel.org,
sakari.ailus@...ux.intel.com, 吴良峰
<william.wu@...k-chips.com>, yubing.zhang@...k-chips.com, wmc@...k-chips.com
Subject: Re: [PATCH v5 5/7] usb: typec: mux: Allow multiple mux_devs per mux
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@...ux.intel.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---
>
> Changes since v4:
> - None
>
> drivers/usb/typec/mux.c <https://lore.kernel.org/all/20220422222351.1297276-6-bjorn.andersson@linaro.org/#Z31drivers:usb:typec:mux.c> | 128 ++++++++++++++++++++++++++++++++--------
> 1 filechanged <https://lore.kernel.org/all/20220422222351.1297276-6-bjorn.andersson@linaro.org/#related>, 102 insertions(+), 26 deletions(-)
With this commit, TCPC device shall match *two* endpoint port both for switch device and mux device
if they have the same parent node like the following DT. It causes the callback funtion 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
Powered by blists - more mailing lists