#
✕ nick:sven
#asahi-dev · 2022-11-25 14:46
svenhrm, actually that interface seems to be about changing some "internal" policy so that something like SMC can tweak all these things together
#asahi-dev · 2022-11-25 14:45
svenno idea if I'm missing anything though
#asahi-dev · 2022-11-25 14:45
svenI think most other things are controlled by SMC and I don't think we have control over them
#asahi-dev · 2022-11-25 14:44
svenbut that interface seems to be used when multiples knobs are to be turned together (cpufreq + fan speed + whatever else) - do we have anything except for cpufreq that can even be tweaked?
#asahi-dev · 2022-11-25 14:44
svenno idea!
#asahi-dev · 2022-11-25 14:43
svensounds good!
#asahi-dev · 2022-11-25 14:40
svenmy point really only is that the maintainer of that project should be aware that the driver isn't quite upstream yet
#asahi-dev · 2022-11-25 14:40
svensure
#asahi-dev · 2022-11-25 14:37
svenwould just be annoying if it got merged and then the kernel interface unexpectedly changes
#asahi-dev · 2022-11-25 14:36
svenyeah, draft pr sounds good
#asahi-dev · 2022-11-25 14:36
sven(for merging into tools it that is, not necessarily for starting to work on)
#asahi-dev · 2022-11-25 14:35
sveni'd still wait until it's at least in linux-next. i don't expect things to change but you never know
#asahi-dev · 2022-11-25 14:34
svenand are there even other things we can tweak? fans and all that is done by SMC anyway
#asahi-dev · 2022-11-25 14:33
svenis cpufreq already upstream? might be wise to wait for that before adding support to other software
#asahi-dev · 2022-11-25 11:34
svenwhich doesn’t go very well ;)
#asahi-dev · 2022-11-25 11:33
sventhe race is also present in vanilla kernels. it’s incredibly tight but you can get dwc3 into a state where ptrcap is set to device but dwc3 sets up xhci
#asahi-dev · 2022-11-25 10:34
svenurgh. but we can't lock a mutex there because that function might be called from an extcon interrupt handler :/
#asahi-dev · 2022-11-25 10:02
svenlocking dwc->mutex instead of dwc->lock in dwc3_set_mode seems to fix it for me
#asahi-dev · 2022-11-25 10:01
svenjannau: I think it's a race between dwc3_set_mode and __dwc3_set_mode
#asahi-dev · 2022-11-24 19:38
sven*sigh* maybe it’s time to rethink that role switch quirk. It worked great for usb2 but the interactions with atcphy are a bit annoying :(
#asahi-dev · 2022-11-24 18:10
svenhrm, maybe it’s related to the additional role switch without a mux update
#asahi-dev · 2022-11-24 18:04
svenit doesn’t happen every time here though
#asahi-dev · 2022-11-24 18:04
svenlet’s see why that happens
#asahi-dev · 2022-11-24 18:04
svenjannau: okay, i can reproduce it now
#asahi-dev · 2022-11-24 15:17
svenif your .config is correct (CONFIG_USB_ROLE_SWITCH + CONFIG_USB_DWC3_DUAL_ROLE iirc) you can also just patch out the error in dwc3/core.c
#asahi-dev · 2022-11-24 15:16
svensure
#asahi-dev · 2022-11-24 14:38
sven*complaints
#asahi-dev · 2022-11-24 14:38
svenI really just wanted to prevent complains about "dwc3 not working" when someone built a kernel without drd support
#asahi-dev · 2022-11-24 14:38
sveni'll fix the check
#asahi-dev · 2022-11-24 13:58
sventhat check is really only there in case people mess up .config again and build dwc3 without role switch support
#asahi-dev · 2022-11-24 13:57
sven*change
#asahi-dev · 2022-11-24 13:57
svenyeah, my check is a bit too early. at that point mode can still be USB_DR_MODE_UNKNOWN which will only later changed to USB_DR_MODE_OTG
#asahi-dev · 2022-11-24 13:51
svenhrm, could be that I check that the mode is actually otg a bit too early
#asahi-dev · 2022-11-24 08:02
sven*otg
#asahi-dev · 2022-11-24 08:02
sventpw_rules: I think the old kernels should still work with org, dunno why it was ever set to host since they technically already needed dual role as well
#asahi-dev · 2022-11-24 08:01
sventpw_rules: uh, if you updated the device tree you also updated stage 2
#asahi-dev · 2022-11-23 19:42
sven*that drops
#asahi-dev · 2022-11-23 19:41
svenif that mux_set_work is already there it should be the latest code. guess I still have a bug somewhere that’s drop a role change event
#asahi-dev · 2022-11-23 18:52
sveni'm about to head out but i'll see if I can reproduce it tomorrow with the power button here
#asahi-dev · 2022-11-23 18:50
svenasahi-wip doesn't have atcphy_mux_set_work yet
#asahi-dev · 2022-11-23 18:50
svenand it did shut down xhci just before afaict. weird.
#asahi-dev · 2022-11-23 18:49
svenuh, but you have the atcphy changes because it WARNed in atcphy_mux_set_work
#asahi-dev · 2022-11-23 18:46
svens/chance/changes/
#asahi-dev · 2022-11-23 18:46
svenbecause at least when tying "reboot" in shell.py that didn't trigger anything here
#asahi-dev · 2022-11-23 18:46
svenso to reproduce this you just connect a m1n1 device and then shut it down?
#asahi-dev · 2022-11-23 18:46
sventhe chance in phy/apple are quite important ;)
#asahi-dev · 2022-11-23 18:15
svenand iirc most of spi goes through this weird SmartIO coprocessor
#asahi-dev · 2022-11-23 18:15
svencan you paste the tracer you use somewhere?
#asahi-dev · 2022-11-23 18:14
svenreboots usually happen when you do something either the soc itself or xnu really doesn’t like
#asahi-dev · 2022-11-23 17:04
sven(note that the role switch quirk changed a bit again, the tipd typec_set_mode path changed and the DTs have svid = <0xff01>; for now because that's what the mux code expects)

plus ›