#asahi-dev · 2021-09-19 18:03
marcanit is very rarely used by macos#asahi-dev · 2021-09-19 18:03
marcanit's unclear what devices that actually makes a difference for, and whether the timings are different#asahi-dev · 2021-09-19 18:02
marcana power state that, in theory, clock gates but does not power gate#asahi-dev · 2021-09-19 18:02
marcanjust pushed dump_pmgr.py to m1n1 too#asahi-dev · 2021-09-19 18:01
marcan(due to oversampling etc)#asahi-dev · 2021-09-19 18:01
marcansven: I think usually drivers do that, the UART is the same (1.5mbaud is the actual base baudrate)#asahi-dev · 2021-09-19 17:47
marcansven: for any other devices that need clock rates, we can refer to the adt clocks where available (and the freqs from iboot) and just model them as static clocks#asahi-dev · 2021-09-19 17:46
marcan(the uart also shouldn't care about a missing clock; I added the second baudclk we discovered)#asahi-dev · 2021-09-19 17:46
marcanin principle we're keeping full compat with the first submission DT by doing it like this#asahi-dev · 2021-09-19 17:46
marcanI was a bit worried about clocks and DT compat, but with this there's no issue there#asahi-dev · 2021-09-19 17:43
marcanand then those states can depend, in the case of the pcores, on some fake-ish mcc pstate driver (it's not *really* doing that, but we can model the MCC configuration change as two pstates)#asahi-dev · 2021-09-19 17:42
marcanso it'll just be a cluster-pstate driver along very similar lines, except that one will support OPP to set different active states#asahi-dev · 2021-09-19 17:42
marcani.e. there is already a generic cpufreq -> this bridge#asahi-dev · 2021-09-19 17:42
marcanfwiw the cpufreq stuff can be done, AIUI, with the same framework#asahi-dev · 2021-09-19 17:40
marcanyeah, exactly#asahi-dev · 2021-09-19 17:40
marcanalso I'm not implementing the 2 power states yet; that is a thing in genpd, but I'm not going to bother until we find a device where there's a good reason to go into non-full poweroff#asahi-dev · 2021-09-19 17:40
marcanbut you shouldn't care too much about that for leaf drivers#asahi-dev · 2021-09-19 17:39
marcanI think I'm not doing the nesting properly yet, I'll look into that tomorrow#asahi-dev · 2021-09-19 17:39
marcanhttps://mrcn.st/p/cd5uLWsM#asahi-dev · 2021-09-19 17:38
marcanalso you get some nice stuff in debugfs#asahi-dev · 2021-09-19 17:38
marcanno failing clock ops or anything to care about there#asahi-dev · 2021-09-19 17:38
marcana driver with no PM will just keep it enabled; a driver with no associated power domain will just do nothing.#asahi-dev · 2021-09-19 17:38
marcanit's even more generic than the clock gate approach, because the pm stuff works fine if either side is missing#asahi-dev · 2021-09-19 17:37
marcan(unlike the clocks which are more explicit)#asahi-dev · 2021-09-19 17:37
marcanwon't break anything#asahi-dev · 2021-09-19 17:36
marcanyeah, and also since runtime pm is totally standard stuff, you can add it now or later#asahi-dev · 2021-09-19 17:36
marcan(this includes all the devices that don't even exist in the ADT, e.g. the other 6 UARTs...)#asahi-dev · 2021-09-19 17:36
marcan(should probably be an include at that point...)#asahi-dev · 2021-09-19 17:36
marcanso we should list all the things that we don't use#asahi-dev · 2021-09-19 17:36
marcanalso any unused PDs get disabled#asahi-dev · 2021-09-19 17:35
marcanyeah, it gets enabled, just never disabled#asahi-dev · 2021-09-19 17:35
marcan(that's the wifi debug thing)#asahi-dev · 2021-09-19 17:35
marcanI added UART2 to have a better test target that isn't the boot console#asahi-dev · 2021-09-19 17:34
marcanbut I think this is the right way to go here#asahi-dev · 2021-09-19 17:34
marcan(I guess nobody needs power management for UARTs...)#asahi-dev · 2021-09-19 17:34
marcanhad to add runtime PM support to the samsung uart driver because of course it didn't have it#asahi-dev · 2021-09-19 17:34
marcanoff to sleep#asahi-dev · 2021-09-19 17:32
marcan:)#asahi-dev · 2021-09-19 17:32
marcansven: see pmgr/dev#asahi-dev · 2021-09-19 09:31
marcansince we now know it's the root of the clock tree#asahi-dev · 2021-09-19 09:31
marcanthinking of renaming it to refclk perhaps#asahi-dev · 2021-09-19 09:31
marcanyeah#asahi-dev · 2021-09-19 09:30
marcan(fwiw, 24M is the xtal frequency)#asahi-dev · 2021-09-19 09:30
marcanyes, it'd reference the genpd stuff#asahi-dev · 2021-09-19 09:30
marcanaccording to the ADT, the i2c is hardcoded to refclk anyway#asahi-dev · 2021-09-19 09:30
marcanyeah, I think so#asahi-dev · 2021-09-19 09:29
marcanand as for clocks... I'd say we can get away with fixed clocks for everything, seeing as macos touches none of this, even though we kind of now know how the clock selects actually work#asahi-dev · 2021-09-19 09:28
marcanj_ey: yes, so that's getting rewritten as a genpd driver with 3 pstates (0, 4, 15 in pstate reg terms)#asahi-dev · 2021-09-19 09:27
marcanyeah...#asahi-dev · 2021-09-19 09:27
marcanso indeed the pstate interface is higher level