#
✕ nick:marcan
#asahi · 2021-09-17 11:17
marcansure
#asahi · 2021-09-17 11:17
marcan*type c
#asahi · 2021-09-17 11:17
marcanthat's aleready exposed on debug pins on the typ c
#asahi · 2021-09-17 11:17
marcanj_ey: I don't need a new mini for the i2c bus
#asahi · 2021-09-17 11:17
marcanthen you end up with a situation where you can wedge a type A adapter and need to reconnect the type C side
#asahi · 2021-09-17 11:16
marcanhowever, if "whatever" the PD controller is doing on the PD lines can wedge the PHY... then an external device can also do that
#asahi · 2021-09-17 11:16
marcanyeah, but the thing is... if you do a type A reconnect, the PD controller does not notice
#asahi · 2021-09-17 11:15
marcanshould I place an order for another Mini for victim purposes? maybe it's time to bring out the oscilloscope...
#asahi · 2021-09-17 11:15
marcanI don't really get why this happens at this point
#asahi · 2021-09-17 11:15
marcanbut why
#asahi · 2021-09-17 11:15
marcanunless it does something dodgy with D+/D-
#asahi · 2021-09-17 11:14
marcanlike why would dwc/the phy care about what the PD controller does
#asahi · 2021-09-17 11:14
marcanwhich is why this is weird
#asahi · 2021-09-17 11:13
marcanit's clearly something to do with the PD chip
#asahi · 2021-09-17 11:12
marcanhubs don't count
#asahi · 2021-09-17 11:12
marcanit's one dwc3 controller per type C port AIUI
#asahi · 2021-09-17 11:12
marcandottedmag: you can't plug two things into one port
#asahi · 2021-09-17 11:11
marcanlooks like all M1 *and* A14 devices use at least the same MCC performance mode setting
#asahi · 2021-09-17 10:59
marcanyeah, of course
#asahi · 2021-09-17 10:59
marcanthen we really need DT properties
#asahi · 2021-09-17 10:59
marcanmain thing is if these ever vary between devices for a single SoC
#asahi · 2021-09-17 10:58
marcanmight be
#asahi · 2021-09-17 10:57
marcanmaybe I should look at some iOS ADTs and compare... that might give us some good hints of what to expect
#asahi · 2021-09-17 10:57
marcanthough we're kind of guessing here, since this is the first device of its class
#asahi · 2021-09-17 10:57
marcanideally yes, to make this more likely to work on other platforms
#asahi · 2021-09-17 10:55
marcanbut for the memory controller, yeah, I need magic values
#asahi · 2021-09-17 10:55
marcanso OPP tables work for that in that I'd just use the state index
#asahi · 2021-09-17 10:55
marcanfwiw, for the CPU the actual hardware interface is just a pstate index
#asahi · 2021-09-17 10:54
marcanwonders if there's some way to figure out what these magic values actually mean
#asahi · 2021-09-17 10:54
marcanyeah, genpd should be able to do that but I don't know if it uses the OPP stuff or something else
#asahi · 2021-09-17 10:54
marcanah, makes sense to use that then
#asahi · 2021-09-17 10:53
marcanbut I don't know how to tie that in with the memory controller; I also saw the genpd stuff can describe things like voltage requirements IIRC
#asahi · 2021-09-17 10:53
marcanI intend to do it that way
#asahi · 2021-09-17 10:53
marcankettenis: yeah, I saw that, for CPUs at least
#asahi · 2021-09-17 10:53
marcanI'm considering bumping that to at least 2GHz in m1n1 on SMP startup, just so that if another OS without cpufreq gets loaded it gets at least some reasonable performance
#asahi · 2021-09-17 10:52
marcanthe default state is low perf for the p-cores
#asahi · 2021-09-17 10:52
marcangood excuse to look into that
#asahi · 2021-09-17 10:52
marcan(probably using the genpd stuff at this point)
#asahi · 2021-09-17 10:52
marcansince there's one MCC and likely to be multiple p-clusters in the future, that's probably worth considering for architecting this as a separate driver (multiple consumer one producer)
#asahi · 2021-09-17 10:50
marcan(I guess that depends on whether *other* things, like e.g. GPU usage, can trigger this performance state; I should do some tests along those lines...)
#asahi · 2021-09-17 10:50
marcan(that's another question, whether this magic should just be in the cpufreq driver or whether we should describe a separate mcc and split it into a different driver)
#asahi · 2021-09-17 10:49
marcani.e. when the p-cores are above a threshold, the MCC gets kicked into a higher perf
#asahi · 2021-09-17 10:49
marcanthe perf state tracks the p-core perf state (at least that's how macos does it)
#asahi · 2021-09-17 10:48
marcanto me it would make more sense to describe both states (in an array), but I'd like opinions :)
#asahi · 2021-09-17 10:47
marcanbut that seems flimsy in the face of things like kexec or just bootloaders wanting to switch perf modes
#asahi · 2021-09-17 10:47
marcanI'm thinking of the memory controller performance state thing, where macos (and the corellium take on this) apparently just read the registers to determine the default state, and the (A)DT only describes the magic value to replace it with for performance mode
#asahi · 2021-09-17 10:46
marcanmaz, kettenis: on the subject of DT properties vs autodiscovery stuff, how do you feel about things that have a "default state" and an "alternate state" described by magic constants? should the DT describe both, or let the driver consider the boot state the default and only describe the alternate?
#asahi · 2021-09-17 07:26
marcanyay
#asahi · 2021-09-17 06:02
marcan(hardware bug)
#asahi · 2021-09-17 06:01
marcan< sven> looks like macos does a full xhci reset whenever a new device is plugged in fwiw <- smells like a bug

plus ›