#
✕ nick:marcan
#asahi-re · 2021-09-13 08:03
marcan description: Sideband Use (SBU), present in USB-C. This describes the
#asahi-re · 2021-09-13 08:03
marcan $ref: /schemas/graph.yaml#/properties/port
#asahi-re · 2021-09-13 08:03
marcan port@2:
#asahi-re · 2021-09-13 08:01
marcanheh yeah
#asahi-re · 2021-09-13 07:59
marcanwhere are altmodes in this thing...
#asahi-re · 2021-09-13 07:58
marcanthough those are just audio/debug
#asahi-re · 2021-09-13 07:58
marcanlol the ti driver
#asahi-re · 2021-09-13 07:58
marcan desc.accessory = TYPEC_ACCESSORY_NONE; /* XXX: handle accessories */
#asahi-re · 2021-09-13 07:58
marcanI'm volunteering for displayport *if* I get power to work :p
#asahi-re · 2021-09-13 07:57
marcanand on paper should be handled the same way
#asahi-re · 2021-09-13 07:57
marcanbut displayport alt mode should already be a thing
#asahi-re · 2021-09-13 07:57
marcanI'm guessing there are no devicetrees with thunderbolt, seeing as, well, intel monopolized that and it's ACPI-mediated...
#asahi-re · 2021-09-13 07:57
marcanand displayport
#asahi-re · 2021-09-13 07:57
marcanyeah
#asahi-re · 2021-09-13 07:56
marcanmight as well use it with a smallish patch and move on :p
#asahi-re · 2021-09-13 07:56
marcanit's there
#asahi-re · 2021-09-13 07:56
marcanwhy not
#asahi-re · 2021-09-13 07:56
marcanI don't know if anyone else actually relies on the roleswitch for hotplugs within a mode, but well
#asahi-re · 2021-09-13 07:56
marcanthis is probably the least friction way, since it's an existing subsystem
#asahi-re · 2021-09-13 07:56
marcanyeah
#asahi-re · 2021-09-13 07:55
marcanand it should just be a matter of making sure it actually works as intended, and that dwc3 can use the HOST -> NONE -> HOST transition to reset itself
#asahi-re · 2021-09-13 07:55
marcanso if all the right configs and DT links are set up, that should all already work
#asahi-re · 2021-09-13 07:55
marcanand tipd calls it (see tps6598x_set_data_role)
#asahi-re · 2021-09-13 07:55
marcandwc3 is a role switch provider (see dwc3_setup_role_switch)
#asahi-re · 2021-09-13 07:54
marcanthe call path is ti -> dwc3
#asahi-re · 2021-09-13 07:54
marcansure, but I mean
#asahi-re · 2021-09-13 07:54
marcanand that should be enough to get hotplug to work
#asahi-re · 2021-09-13 07:54
marcanthat's what this role switch stuff is for
#asahi-re · 2021-09-13 07:54
marcanbut the mode should be automatic anyway
#asahi-re · 2021-09-13 07:54
marcanvbus presence should be somewhere
#asahi-re · 2021-09-13 07:53
marcanwell, we should
#asahi-re · 2021-09-13 07:53
marcanif the typec controller correctly sets the role to none on disconnect, and dwc3 correctly uses that trigger to reset itself, I bet that'd work
#asahi-re · 2021-09-13 07:53
marcanhowever, it just does some lame default mode thing on disconnect
#asahi-re · 2021-09-13 07:53
marcanthat role switch stuff, dwc3 uses it, see CONFIG_USB_ROLE_SWITCH and dwc3_usb_role_switch_set
#asahi-re · 2021-09-13 07:52
marcansven: I found a thing though
#asahi-re · 2021-09-13 07:50
marcansven: I already took over the power management stuff, I should probably stay here for a while :>
#asahi-re · 2021-09-13 07:49
marcanj_ey: zsh user \o/
#asahi-re · 2021-09-13 07:49
marcanok ok :)
#asahi-re · 2021-09-13 07:48
marcansee also include/linux/usb/role.
#asahi-re · 2021-09-13 07:45
marcanI'm getting the feeling very few drivers actually *use* those connector relationships
#asahi-re · 2021-09-13 07:42
marcansome typec drivers do extcon, but not this one
#asahi-re · 2021-09-13 07:42
marcanit sure sounds like the typec stuff and extcon overlap
#asahi-re · 2021-09-13 07:42
marcan:p
#asahi-re · 2021-09-13 07:42
marcanwell, I'm just wondering if this is one of "there are two competing ways to do this in linux" cases
#asahi-re · 2021-09-13 07:41
marcanthe one existing dt user of the TI chips uses that to link to dwc3
#asahi-re · 2021-09-13 07:41
marcansven: have you seen Documentation/devicetree/bindings/connector/usb-connector.yaml ?
#asahi-re · 2021-09-13 07:36
marcanincluding some dwc3 wrappers
#asahi-re · 2021-09-13 07:35
marcanvarious PHYs support using this API to get the state
#asahi-re · 2021-09-13 07:34
marcanmaybe this *is* the thing to use? but if so, shouldn't the TI driver already be using it?
#asahi-re · 2021-09-13 07:34
marcanoh https://github.com/torvalds/linux/blob/master/drivers/extcon/extcon-usbc-cros-ec.c uses it for typec

plus ›