#asahi · 2021-04-13 16:51
svenbut there's also | <0x00000009 0xe6e84000 0x00000000 0x19000000> (/chosen) from which i get data aborts#asahi · 2021-04-13 16:51
sventhere's e.g. | <0x00000009 0xffffc000 0x00000000 0x00004000> (/chosen) in there from which i can read just fine#asahi · 2021-04-13 16:50
svenmarcan: sven: this reminds me, on paper we prooobably need to unmap some high RAM at some point, need to figure out what the sane way of determining what the hole is <-- it's... weird. there's a carveout node in the ADT but it looks like not all ranges are protected in there#asahi · 2021-04-12 12:04
sveniirc I couldn't attach it while running Mac OS (resource busy) and there was nothing when using linux but that might just be because I didn't bring up pcie or the wifi module#asahi · 2021-04-11 19:20
sventhe mux registers are in a different mmio block fwiw#asahi · 2021-04-11 19:05
sventhere's also some "power domain" stuff but i haven't looked into that yet#asahi · 2021-04-11 19:05
svenyeah, they are part of two larger blocks#asahi · 2021-04-11 18:58
sventhere are also many more regs in the pmgr node. who knows what's hidden there as well#asahi · 2021-04-11 18:55
sven(i think these "clock-ids" clocks are actually mux clocks pre-configured by iboot. but that's an educated guess)#asahi · 2021-04-11 18:55
sven("clock-ids" in the ADT which maps to clock-frequencies in the arm-io node)#asahi · 2021-04-11 18:54
sventhese clocks are only used to enable access to mmio regions essentially. there are additional clocks that actually have a rate associated with them, which we mostly ignore for now#asahi · 2021-04-11 18:32
svenit's a little weird :)#asahi · 2021-04-11 18:32
svenand that "devices" property contains the whole hierarchy#asahi · 2021-04-11 18:32
sventheir nodes have a "clock-gates" property which indexes into a binary array that's passes as "devices" of the "arm-io/pmgr" node#asahi · 2021-04-11 18:31
svenit is#asahi · 2021-04-11 18:15
svenso the uart node just gets a clocks = <&clk-controller 25>; or something like that. but that clock with the id 25 needs clock 13 which in turn needs clock 7#asahi · 2021-04-11 18:14
svenand the uart needs one of these clocks#asahi · 2021-04-11 18:14
sventhe clock controller is separate. but the clocks which are children of that controller have a hierarchy#asahi · 2021-04-11 18:11
svenit's in some clock controller device with a bunch of clocks#asahi · 2021-04-11 18:11
sventhe second one#asahi · 2021-04-11 18:10
svenlet me look at some gic bindings though :)#asahi · 2021-04-11 18:09
sveni'm not sure i understand#asahi · 2021-04-11 18:00
svenbut how do we represent that?#asahi · 2021-04-11 18:00
svenoh, sure#asahi · 2021-04-11 17:59
svenno, they are not on any other device afaict.#asahi · 2021-04-11 17:54
svenand the question is how and where to encode that toplogy. afaict most drivers just hardcode it in some .c file#asahi · 2021-04-11 17:54
svento enable access to e.g. the uart mmio region we need to ungate a clock called uart0. but that clock itself is a child of uart_p which is a child of sio which is a child of sio_busif in apple's device tree. if any of the parents are disabled you can't enable the uart0 clock#asahi · 2021-04-11 14:57
svenheh, now that would be too easy :-P#asahi · 2021-04-11 14:57
sventhey seem to all use clock-indices together with hardcoded parents in the driver#asahi · 2021-04-11 14:56
svensure, it's just that no other soc seems to do that afaict#asahi · 2021-04-11 14:39
svenif i want a single clock controller node i think i either have to hardcode the parents in the driver or invent some new dt property#asahi · 2021-04-11 14:38
svenyeah, assigned-clock-parents won't work#asahi · 2021-04-11 13:34
svenwell, two actually because they seem to have two. but same thing#asahi · 2021-04-11 13:34
svengood thing i kept my original code where it was just a single controller ;)#asahi · 2021-04-11 13:33
svenyeah#asahi · 2021-04-11 13:33
svenmakes sense#asahi · 2021-04-11 13:33
svenright.. so essentially pretend that the controller is a consumer of itself and do it there#asahi · 2021-04-11 13:33
svenoh, i thought assigned-clocks was just for the consumers#asahi · 2021-04-11 13:30
sventhere's a general gpio gate clock driver but that's based on the gpio subssytem. the closest one is renesas,r7s72100-mstp-clocks i think#asahi · 2021-04-11 13:24
svenand i haven't found any other driver doing the second thing#asahi · 2021-04-11 13:24
svenfor the first one i'd then have to hardcode child/parent relationships in the driver itself#asahi · 2021-04-11 13:24
svenyeah, i thought about that#asahi · 2021-04-11 13:20
svenmarcan: https://github.com/svenpeter42/linux/commits/apple-clk here's what i have for the gate clocks. i'll send it to the lists later if that's fine with you#asahi · 2021-04-10 21:05
sveni think the CI workflow should also just give you a diff to make clang-format happy otherwise#asahi · 2021-04-10 20:49
svenso i was just spamming chainload over and over again to trigger it#asahi · 2021-04-10 20:48
sveni think it was a missing dma barrier so the bug only happened *sometimes*#asahi · 2021-04-10 20:48
svenyeah, that's usually what happens to me as well#asahi · 2021-04-10 20:47
svenwhen working on the usb code trying to track down some heisenbug#asahi · 2021-04-10 20:47
svenonly once :d#asahi · 2021-04-10 20:47
sven*chianloading