#asahi · 2021-04-01 10:27
svenDevice addresses seen (unshifted): 0x38, 0x3f#asahi · 2021-04-01 10:22
svenideally get the frequency of some parent clock and then calculate the divisor based on that#asahi · 2021-04-01 10:21
svenyeah#asahi · 2021-04-01 09:51
svenhttps://github.com/svenpeter42/linux/commits/i2c-wip that's the current i2c stuff i have. still needs a lot of work though, like e.g. the device tree bindings for which i'd like to figure out the clocks#asahi · 2021-04-01 09:50
svenbut i got distracted by the clocks :-)#asahi · 2021-04-01 09:50
sveni'll need some gpio controller for the interrupt though#asahi · 2021-04-01 09:49
svenor, well, at least iboot leaves those pins in the correct state#asahi · 2021-04-01 09:49
sventhat's not required#asahi · 2021-04-01 09:49
sventhis is more me being curious than doing something that's directly useful ;)#asahi · 2021-04-01 09:48
svenyeah, agreed#asahi · 2021-04-01 09:48
sveni have i2c working with the pasemi driver. i'd just like to see if i can find the clock that determines the frequency as well#asahi · 2021-04-01 09:47
sveni'm not sure they have added all clocks fwiw#asahi · 2021-04-01 09:41
sven(and all this only started anyway because i was trying to figure out the i2c clock...)#asahi · 2021-04-01 09:41
sveni'll have to some experiments#asahi · 2021-04-01 09:41
svenso if the ADT is to be trusted there is one gating clock (UART0) and two clock-ids that i can't map to anything yet. but i believe these are UART_N and UART_P which could be two baud clocks#asahi · 2021-04-01 08:56
svenand additionally it probably needs UART0 enabled#asahi · 2021-04-01 08:56
svenyeah, there are two clock-ids in the ADT. i think they are gated with UART_P and UART_N#asahi · 2021-04-01 07:41
svenoh, and there some PLLs. so i guess the PLLs generate some base frequencies and the freq clocks can select (or are hardwired) to one of those and allow that base freq to be divided down.#asahi · 2021-04-01 07:38
sventhe frequency clocks are defined in the "arm-io" ADT node but i can't figure out the clock-ids -> clock register mapping and i'm also too scared to flip bits in those registers#asahi · 2021-04-01 07:38
svenand i think uart can be switched to UART_N possibly but testing that is a little bit tricky#asahi · 2021-04-01 07:37
sventhe gated clocks seems to have some dependencies as well (e.g. UART0 seems to depend on UART_P and SIO)#asahi · 2021-04-01 07:37
svenokay, so there are gated clocks and clocks with a configurable frequency probably.#asahi · 2021-03-30 10:46
svendid anyone look at the clocks btw? I know how the clock gating works ("clock-gates" in the ADT) but there are also the real clocks ("clock-ids") that I can't seem to locate#asahi · 2021-03-29 16:29
svenugh.. this usb yak is getting bigger and bigger. looks like the tps6598x gets its interrupt from some gpio block#asahi · 2021-03-29 15:34
svenbut at least it works, heh#asahi · 2021-03-29 15:33
sventhat's... slow#asahi · 2021-03-29 15:33
sven[ 0.892476] tps6598x 0-0038: probe done#asahi · 2021-03-29 15:33
sven[ 0.147318] tps6598x 0-0038: probe start#asahi · 2021-03-29 08:46
svenhah, I was just wondering why the tps6598x code failed with "failed to register partner" and tracked it down to some struct being too long. was about to fix it when I found https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3cac9104bea41099cf622091f0c0538bcb19050d :-)#asahi · 2021-03-28 11:21
svenmarcan: you'll do nvme next, right? any objections if i take a stab at i2c and that ti chip then to get closer to working usb? or is there anything else you think should come first?#asahi · 2021-03-27 17:54
svenor maybe i'm just doing something very dumb again :)#asahi · 2021-03-27 17:53
svenhuh. i think the dart even has some kind of feature to protect a range *within* a page#asahi · 2021-03-27 16:24
svenbut i can also leave it out if you think that's a bad idea as well#asahi · 2021-03-27 16:22
sventhis won't be another property in the device tree. it's really just if (domain->mode != BYPASS) force_aperture_to_32bit()#asahi · 2021-03-27 16:21
svenso essentially dma-ranges would be empty because in bypass mode 0x811112222 is a completely valid iova there. but once the iommu is switched to translate mode it's suddenly invalid#asahi · 2021-03-27 16:21
sventhe way i understand it is that dma-ranges is done completely outside of the DART driver anyway. this domain->geometry.force_aperture is on top of that and can just further limit the dma window.#asahi · 2021-03-27 15:46
svenhah :)#asahi · 2021-03-27 15:46
svenah, right.#asahi · 2021-03-27 15:46
svendidn't you also use that to figure out that weird paddr ^ 0x40 quirk? or was that just the nand hw?#asahi · 2021-03-27 15:36
svenbut once i figure out why that dart doesn't like my pagetables it should be good enough to get simple view into the iova space :)#asahi · 2021-03-27 15:35
sveni don't think you can just not set encrypt/decrypt here though. so it's not that great for memcpying stuff around#asahi · 2021-03-27 15:34
svenmarcan: totally not the wii days, i swear! :P#asahi · 2021-03-27 13:21
svenkettenis: but if this worked we could essentially pretend the AES engine is a DMA engine and actually figure out which addresses are good and what this pio stuff is all about#asahi · 2021-03-27 13:20
svenkettenis: i always gets fault no matter what pagetables i setup in the DART. might be something rather dumb on my side.#asahi · 2021-03-27 13:19
svenkettenis: https://f.svpe.de/70fb5357bea78c2e50f0017f563907ebe775cd731861d37751346a1eb8ad61c9_aes.py#asahi · 2021-03-27 13:14
svenuh, no#asahi · 2021-03-27 13:10
sveni just reverse engineered the kext. i won't ever write any aes code for linux anyway :)#asahi · 2021-03-27 13:03
svenit complains that my TTBR is invalid but also sets another bit I don't know about in the error stage register#asahi · 2021-03-27 13:01
sveni can't seem to setup pagetables for it though. something's certainly strange there#asahi · 2021-03-27 13:01
svenheh, so it looks the aes engine works in bypass mode when i set yet another bit in the TCR