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@xxxxxxxxxxxxxxx>
Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
---
Changes since v4:
- None
drivers/usb/typec/mux.c <https://lore.kernel.org/all/20220422222351.1297276-6-bjorn.andersson@xxxxxxxxxx/#Z31drivers:usb:typec:mux.c> | 128 ++++++++++++++++++++++++++++++++--------
1 filechanged <https://lore.kernel.org/all/20220422222351.1297276-6-bjorn.andersson@xxxxxxxxxx/#related>, 102 insertions(+), 26 deletions(-)