On Thu, Jun 30, 2022 at 4:21 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote: > > Quoting Prashant Malani (2022-06-28 13:56:22) > > On Tue, Jun 28, 2022 at 1:40 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote: > > > > > > I suppose none of those things matter though as long as there is some > > > typec switch registered here so that the driver can be informed of the > > > pin assignment. Is it right that the "mode-switch" property is only > > > required in DT if this device is going to control the mode of the > > > connector, i.e. USB+DP, or just DP? Where this device can't do that > > > because it doesn't support only DP. > > > > If the anx7625 is used just to route all lanes from 1 usb-c-connector (i.e > > the USB+DP case), a mode-switch wouldn't be of much use, since one > > would also route the CC lines to the built-in PD controller; so it will > > already have knowledge of what mode the switch is in. > > > > The mode-switch is likely only relevant for this hardware configuration( > > it's "DP only" in the sense that the USB pins to the SoC never go anywhere). > > One only has 2 SS lanes each (from each usb-c-connector). > > > > Since there is no CC-line, the anx7625 needs to know which one has DP > > enabled on it. > > Can the CC line be "captured" and not actually sent to the anx7625? That's what happens on Chrome OS. The cc line goes to the EC (and is "consumed" by the TCPM (Type C Port Manager)) and signals are then sent to the AP over the Host command interface to `cros-ec-typec`. The signals here being all the PD messages communicated between the peripheral and the port. > I imagine if that is possible, maybe the CC lines would go to some > micro-controller or something that did more typec management things and > then the anx7625 driver would need to do software control of the mode > and orientation control. I _guess_ that is possible (though it would seem odd to not use all the PD control hardware in that configuration)? If an system implements it in such a way then: 1. mode-switch: Can be updated to do something when num_typec_switches == 1 ( in the mux_set function imp.l I haven't looked into what registers need to be configured, since we don't have this hardware implementation. 2. orientation-switch: This should be registered, and then flip the lanes when the port driver tells it the orientation is one way or another. So, if someone uses it that way, I think the driver needs only minor updates to support it.