#
…

2021-09-20

01:19___nick___ has joined #asahi-dev
01:29alyssaand now have all the modes visible in modetest
02:13boardwalk has joined #asahi-dev
02:47PhilippvK has joined #asahi-dev
02:51phiologe has quit [Ping timeout: 480 seconds]
03:29quarkyalice__ has joined #asahi-dev
03:37quarkyalice__ has quit [Ping timeout: 480 seconds]
05:52marcanah, this is interesting
05:52marcan[0xfffffe0012f2ca64] PMGR: W.4 0x23b700358 (MMX.pstate + 0x00) = 0x1400034f -> 0x400004f
05:52marcan[0xfffffe0012f2ca64] PMGR: W.4 0x23b700358 (MMX.pstate + 0x00) = 0xf0003ff -> 0x4000340
05:53marcanso there's a device that is in requested active, but actually clockgated
05:53marcanthen macos clears bit 28, and it goes active
05:53marcanlooks like that's some kind of autosleep feature
06:05marcanbits 8,9 are weird... they are sometimes set when written to 1 and sometimes cleared?
06:15maor26 has joined #asahi-dev
06:33marcanahh... I have an idea of what they mean
06:33marcanI bet they are status flags. bit9 = clock was gated, bit8 = power was gated, write 1 to clear
06:34marcanwhich indeed suggests the UARTs don't get power gated (you only ever see 0x2xx there)
06:35marcanbit 10 seems to be a "block" bit or something, it makes accessing the peripheral fail even when it's ostensibly powered up
06:45marcanbit 31 is definitely reset, at least on the UARTs it clears all registers and, while set, makes all MMIO ignored
06:45marcanhowever... this only works when powered on!
06:45marcanso it's a synchronous reset
06:45marcanif you power it off (pstate < 15), reset it, and power it back on, it's not reset
06:45marcan(assuming you deassert reset before powering back on)
06:53marcanI can't figure out how to get the auto-pm thing to work though
07:05aleasto has joined #asahi-dev
07:16quarkyalice has quit [Remote host closed the connection]
07:42quarkyalice has joined #asahi-dev
07:42quarkyalice_ has joined #asahi-dev
07:50quarkyalice has quit [Ping timeout: 480 seconds]
08:05gabuscus_ has joined #asahi-dev
08:08gabuscus has quit [Ping timeout: 480 seconds]
08:26chadmed has quit [Quit: Konversation terminated!]
09:08quarkyalice has joined #asahi-dev
09:10quarkyalice__ has joined #asahi-dev
09:14unrelentingtech has quit []
09:14quarkyalice_ has quit [Ping timeout: 480 seconds]
09:15quarkyalice_ has joined #asahi-dev
09:17quarkyalice has quit [Ping timeout: 480 seconds]
09:20quarkyalice has joined #asahi-dev
09:21quarkyalice__ has quit [Ping timeout: 480 seconds]
09:26quarkyalice_ has quit [Ping timeout: 480 seconds]
09:37frode_0xa has joined #asahi-dev
10:28marcantfw Linux power domain init fails because I described the same topology as Apple and it's either a lie or iBoot misconfigures it
10:28marcan(APCIE_ST claims to depend on ANS2, but ANS2 is powered down and APCIE_ST is not)
10:28marcan(linux rightly detects that and fails creating the relationship)
10:32marcanj_ey: pushed proper parent/child support for the genpd stuff
10:33marcanthe apcie_st domain fails to add, I left it like that for now. We should probably just have the actual ans driver depend on both instead
11:12chadmed has joined #asahi-dev
11:49leah2 has quit [Remote host closed the connection]
11:51leah2 has joined #asahi-dev
12:01alyssamarcan: to make sure i understand, apple,t8103-pmgr-pstate and the corresponding driver wholly replaces the clock gates driver from sven I'm carrying?
12:02alyssa clk: add support for gate clocks on Apple SoCs
12:02alyssa^ that one
12:03alyssa(and apple,t8103-gate-clock-controller compatible)
12:28kettenisthis also means that "clock" properties of devices such as NVMe and PCIe need to be replaced with appropriate "power-domains" properties
12:54frode_0xa has quit [Quit: leaving]
13:19jbowen has joined #asahi-dev
13:43X-Scale has joined #asahi-dev
13:49X-Scale` has quit [Ping timeout: 480 seconds]
14:43alyssafun. thanks
14:57kettenisyou might be able to get away with keeping the clock stuff and just adding the power-domain stuff if you want to have a DT that works with older kernels as well
14:59skipwich has joined #asahi-dev
15:04alyssakettenis: no interest in older kernels, just need to know what to splice in and out of my tree
15:06skipwich has quit [Remote host closed the connection]
15:07skipwich has joined #asahi-dev
15:08kettenisheh, then forget what I said
15:13alyssaI love forgetting advice people give me :-p
15:15tophevich[m]Ha, you know what is even better, ignoring your own advice ,_`o`O_,
15:21marcankettenis: won't work, without the clock driver stuff would fail
15:21marcan(e.g. uart wants working clocks)
15:22marcanbut current DTs should largely work with older kernels *if* those devices start out ungated
15:22alyssamarcan: also to clarify this is the same as the pmgr enable /arm-io/foo stuff in m1n1?
15:22marcan(which is the case for UART but not e.g. ANS, though that might change as I'm considering adding pmgr code to m1n1 to clean up after iBoot's stupidity)
15:22marcanalyssa: yes
15:26alyssa(I have a `u.pmgr_enable("/arm-io/ans")` in my linux.py right now 😅)
15:27marcanyeah, thanks to the magic of the pm framework, you can remove that and just add the domains... except the sample dt right now fails *without* that exact line because iBoot sucks
15:28marcanyou can either change the relationship to remove ans2 from the power domains of apcie_st and add apcie_st and ans2 to the power domains of the ans device node
15:28marcanor you can leave that in and just have apcie_st as the only power domain of the ans device node
15:29marcanI think the relationship is BS anyway so might as well just change it, but i'm also considering adding a cleanup pass to m1n1 to ensure everything is consistent
15:29marcan(the problem is the ADT claims apcie_st depends on ans2, yet ans2 is powered down and apcie_st is powered up, which is a contradiction, and Linux' sanity checking catches that)
15:30marcan(the sample DT in my tree right now mirrors the ADT relationships, but I think they're BS anyway)
15:47leah2 has quit [Remote host closed the connection]
15:47leah2 has joined #asahi-dev
16:00alyssaI have very little confidence in the accuracy of the ADT, it has bullshitted us before and will bullshit us again 🤷
16:02marcanhard to say with the power hardware what's real and what isn't
16:03marcanI know there is some level of true relationships because enabling a child without enabling a parent, in at least some cases, sets an error flag
16:03marcan(not that case)
16:03marcanbut it's also not impossible that there are "hidden" relationships, who knows
16:03marcananyway... it doesn't *really* matter as long as it works
16:03marcantoday I did find a relatinship between devices, clocks, power domains, and events and a pile of consecutive registers, which is if nothing else curious
16:04marcan*relationship
16:04marcanif I can at least get *feedback* as things get turned on and off on what real clocks/pds get toggled, that'd be useful
16:04marcanbut I have no idea what those registers actually do (something that is somehow homogenerous between all those categories? events is the only thing that makes sense...)
16:16kettenismarcan: I think your pmgr driver should only match on "apple,pmgr-pstate"
16:17kettenisthe "apple,t8103-pmgr-pstate" compatible is only there as a safety in case the hardware isn't as generic as we think it is
16:43yuyichao has quit [Ping timeout: 480 seconds]
16:53yuyichao has joined #asahi-dev
16:59quarkyalice__ has joined #asahi-dev
17:00quarkyalice__ has quit [Remote host closed the connection]
17:52maor has joined #asahi-dev
17:59maor26 has quit [Ping timeout: 480 seconds]
20:49jbowen has quit [Quit: leaving]
21:57aleasto has quit [Quit: Konversation terminated!]
22:01aleasto has joined #asahi-dev
22:03aleasto has quit []
22:04aleasto has joined #asahi-dev
22:10aleasto has quit [Remote host closed the connection]
22:13aleasto has joined #asahi-dev
22:31aleasto has quit [Quit: Konversation terminated!]
23:06psykose has quit [Ping timeout: 480 seconds]
23:08psykose has joined #asahi-dev
23:21yuyichao has quit [Ping timeout: 480 seconds]
23:33yuyichao has joined #asahi-dev
23:46maor has quit [Ping timeout: 480 seconds]
…