#
…

2021-09-19

00:44boardwalk has joined #asahi-dev
00:55boardwalk has quit [Ping timeout: 480 seconds]
01:22boardwalk has joined #asahi-dev
01:42boardwalk has quit [Ping timeout: 480 seconds]
01:56boardwalk has joined #asahi-dev
02:05boardwalk has quit [Quit: Ping timeout (120 seconds)]
02:05boardwalk has joined #asahi-dev
02:17boardwalk has quit [Quit: Ping timeout (120 seconds)]
02:17boardwalk has joined #asahi-dev
02:31boardwalk has quit [Quit: Ping timeout (120 seconds)]
02:31boardwalk has joined #asahi-dev
02:35chadmed has joined #asahi-dev
02:48chadmed has quit [Read error: Connection reset by peer]
02:48phiologe has joined #asahi-dev
02:52PhilippvK has quit [Ping timeout: 480 seconds]
02:56boardwalk has quit [Remote host closed the connection]
02:56boardwalk has joined #asahi-dev
03:00boardwalk has quit []
03:01boardwalk has joined #asahi-dev
03:26boardwalk has quit [Ping timeout: 480 seconds]
03:43quarkyalice has joined #asahi-dev
03:51boardwalk has joined #asahi-dev
03:54boardwalk has quit []
03:54boardwalk has joined #asahi-dev
03:58quarkyalice has quit [Ping timeout: 480 seconds]
04:01quarkyalice_ has joined #asahi-dev
04:10boardwalk has quit [Ping timeout: 480 seconds]
05:02X-Scale` has quit [charon.oftc.net liquid.oftc.net]
05:02brentr123[m] has quit [charon.oftc.net liquid.oftc.net]
05:02jato has quit [charon.oftc.net liquid.oftc.net]
05:02d4ve has quit [charon.oftc.net liquid.oftc.net]
05:02mariogrip[m] has quit [charon.oftc.net liquid.oftc.net]
05:02SocioProphet[m] has quit [charon.oftc.net liquid.oftc.net]
05:02spot[m] has quit [charon.oftc.net liquid.oftc.net]
05:02stelleg[m] has quit [charon.oftc.net liquid.oftc.net]
05:02nico_32_ has quit [charon.oftc.net liquid.oftc.net]
05:02cfleming has quit [charon.oftc.net liquid.oftc.net]
05:02bngs[m] has quit [charon.oftc.net liquid.oftc.net]
05:02arnidg[m] has quit [charon.oftc.net liquid.oftc.net]
05:02_alice has quit [charon.oftc.net liquid.oftc.net]
05:02izzyisles[m] has quit [charon.oftc.net liquid.oftc.net]
05:02ah-[m] has quit [charon.oftc.net liquid.oftc.net]
05:02perigoso[m] has quit [charon.oftc.net liquid.oftc.net]
05:02AkihikoOdaki[m] has quit [charon.oftc.net liquid.oftc.net]
05:02YichaoYu[m] has quit [charon.oftc.net liquid.oftc.net]
05:02svenpeter[m] has quit [charon.oftc.net liquid.oftc.net]
05:02msmith12[m] has quit [charon.oftc.net liquid.oftc.net]
05:02HaoYanQi[m] has quit [charon.oftc.net liquid.oftc.net]
05:02joerosenberg[m] has quit [charon.oftc.net liquid.oftc.net]
05:02daftfrog[m] has quit [charon.oftc.net liquid.oftc.net]
05:02alexanderwillner[m] has quit [charon.oftc.net liquid.oftc.net]
05:02jeh[m] has quit [charon.oftc.net liquid.oftc.net]
05:02thunfisch has quit [charon.oftc.net liquid.oftc.net]
05:02PthariensFlame[m] has quit [charon.oftc.net liquid.oftc.net]
05:02Eighth_Doctor has quit [charon.oftc.net liquid.oftc.net]
05:02rowang077[m] has quit [charon.oftc.net liquid.oftc.net]
05:02landscape15[m] has quit [charon.oftc.net liquid.oftc.net]
05:02xerpi[m] has quit [charon.oftc.net liquid.oftc.net]
05:12quarkyalice has joined #asahi-dev
05:18quarkyalice__ has joined #asahi-dev
05:24quarkyalice has quit [Ping timeout: 480 seconds]
05:26boardwalk has joined #asahi-dev
05:32d4ve has joined #asahi-dev
05:32arnidg[m] has joined #asahi-dev
05:32X-Scale` has joined #asahi-dev
05:32thunfisch has joined #asahi-dev
05:32nico_32_ has joined #asahi-dev
05:32cfleming has joined #asahi-dev
05:32jeh[m] has joined #asahi-dev
05:32alexanderwillner[m] has joined #asahi-dev
05:32landscape15[m] has joined #asahi-dev
05:32HaoYanQi[m] has joined #asahi-dev
05:32stelleg[m] has joined #asahi-dev
05:32daftfrog[m] has joined #asahi-dev
05:32brentr123[m] has joined #asahi-dev
05:32joerosenberg[m] has joined #asahi-dev
05:32msmith12[m] has joined #asahi-dev
05:32svenpeter[m] has joined #asahi-dev
05:32bngs[m] has joined #asahi-dev
05:32spot[m] has joined #asahi-dev
05:32SocioProphet[m] has joined #asahi-dev
05:32AkihikoOdaki[m] has joined #asahi-dev
05:32YichaoYu[m] has joined #asahi-dev
05:32xerpi[m] has joined #asahi-dev
05:32PthariensFlame[m] has joined #asahi-dev
05:32rowang077[m] has joined #asahi-dev
05:32Eighth_Doctor has joined #asahi-dev
05:32izzyisles[m] has joined #asahi-dev
05:32perigoso[m] has joined #asahi-dev
05:32mariogrip[m] has joined #asahi-dev
05:32ah-[m] has joined #asahi-dev
05:32_alice has joined #asahi-dev
05:32jato has joined #asahi-dev
05:34quarkyalice__ has quit [Ping timeout: 480 seconds]
05:48boardwalk has quit [Quit: Ping timeout (120 seconds)]
05:49boardwalk has joined #asahi-dev
06:29boardwalk has quit [Quit: Ping timeout (120 seconds)]
06:29boardwalk has joined #asahi-dev
06:36boardwalk has quit [Quit: Ping timeout (120 seconds)]
06:36boardwalk has joined #asahi-dev
06:57svenuh, yeah
06:58sveni've started atcphy a bit but there's not a lot there
06:58svenand smc j_ey is correct. the base works but it needs to hooked up to everything
06:58svenand +be
06:58* svenjust woke up *yawn*
07:10boardwalk has quit [Ping timeout: 480 seconds]
07:23boardwalk has joined #asahi-dev
07:34boardwalk has quit [Quit: Ping timeout (120 seconds)]
07:34boardwalk has joined #asahi-dev
08:00boardwalk has quit [Remote host closed the connection]
08:00boardwalk has joined #asahi-dev
08:22boardwalk has quit [Quit: Ping timeout (120 seconds)]
08:22boardwalk has joined #asahi-dev
08:37boardwalk has quit [Ping timeout: 480 seconds]
09:07boardwalk has joined #asahi-dev
09:17aleasto has joined #asahi-dev
09:23marcansven: https://mrcn.st/p/XL1vnLuS the notes from this
09:23marcanso I'm glad I found the real clock registers :p
09:23marcanbut it seems we don't really have to mess with them
09:23sveniirc xnu doesn't even load these clock-frequency-regs property from the device tree
09:23marcanso it mightheh
09:24svenohhhh... you figure out how the real registers work. nice.
09:24sven*figured
09:26marcanyeah I used the UART to measure clocks
09:26marcanthanks glasgow autobaud :D
09:26svenhah, nice!
09:27svenstill waiting for my glasgow to arrive from that crowdfunding campaign. it's a pity the chip shortage happened just after that
09:27marcanbut yeah, the clocks gate automatically depending on the pstate reg configs
09:27marcanso indeed the pstate interface is higher level
09:28j_eyso the current clock driver is actually using pstates (0x23b700000 - p-state registers)
09:28svennice. so essentially most of low-level power management is magic we can essentially ignore?
09:28marcanj_ey: yes, so that's getting rewritten as a genpd driver with 3 pstates (0, 4, 15 in pstate reg terms)
09:29marcanand 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
09:29svenok. so for i2c i can e.g. just ignore the "clock gate" that actually a pstate and just add a fixed reference clock?
09:29sven*that's
09:30marcanyeah, I think so
09:30j_eybut it needs some other property?
09:30marcanaccording to the ADT, the i2c is hardcoded to refclk anyway
09:30marcanyes, it'd reference the genpd stuff
09:30marcan(fwiw, 24M is the xtal frequency)
09:31svenso clocks = <&clk24>; or however it's called just in case they ever connect that to another clock
09:31marcanthinking of renaming it to refclk perhaps
09:31marcansince we now know it's the root of the clock tree
09:32svenmakes sense
09:42boardwalk has quit [Quit: Ping timeout (120 seconds)]
09:42boardwalk has joined #asahi-dev
09:50boardwalk has quit [Quit: Ping timeout (120 seconds)]
09:50boardwalk has joined #asahi-dev
10:02boardwalk has quit [Ping timeout: 480 seconds]
10:14boardwalk has joined #asahi-dev
10:18boardwalk has quit []
10:18boardwalk has joined #asahi-dev
10:22boardwalk has quit []
10:22boardwalk has joined #asahi-dev
10:55boardwalk has quit [Quit: Ping timeout (120 seconds)]
10:55boardwalk has joined #asahi-dev
11:08boardwalk has quit [Quit: Ping timeout (120 seconds)]
11:08boardwalk has joined #asahi-dev
11:19chadmed has joined #asahi-dev
11:35boardwalk has quit [Quit: Ping timeout (120 seconds)]
11:35boardwalk has joined #asahi-dev
12:03boardwalk has quit [Quit: Ping timeout (120 seconds)]
12:03boardwalk has joined #asahi-dev
12:11boardwalk has quit [Quit: Ping timeout (120 seconds)]
12:11boardwalk has joined #asahi-dev
12:25boardwalk has quit [Quit: Ping timeout (120 seconds)]
12:25boardwalk has joined #asahi-dev
12:43* alyssahas been looking at the corellium SPMI code
12:44alyssabeen cherry-picking SPMI+RTC and doing low-hanging cleanup (checkpatch --fix is a nice one ;) )
12:44alyssait's not ready for upstream as-is, but there's nothing obviously wrong with the code that would warrant a total rewrite
12:44alyssa(so I think iterative cleanup on that code, like j_ey is doing with pinctrl, is the way to go)
12:45alyssathe RTC driver is nice and simple
12:48alyssaDT bindings need work but that's more bikeshedding than engineering at that point :)
12:48svenhttps://github.com/AsahiLinux/linux/commits/i2c/v1 - that hack commit to verify the pci driver still builds + marcan's genpd code if required should be good enough for the first i2c submission
12:48sven(note that it needs a slightly changed dt instantiation than the code in the tipd-i2c-WIP branch)
13:12alyssacherry-pick SPMI+RTC and did some basic cleanup
13:12alyssaso ~500 lines of corellium code added to my tree and now real time clock works
13:12alyssa(also, fixed a locking issue. did they not use lockdep?)
13:15alyssa...don't answer that
13:16j_eyI was a bit unsure of some of the locks in SPI too
13:23aleasto has quit [Ping timeout: 480 seconds]
13:31X-Scale has joined #asahi-dev
13:37X-Scale` has quit [Ping timeout: 480 seconds]
13:44X-Scale` has joined #asahi-dev
13:49X-Scale has quit [Ping timeout: 480 seconds]
13:52boardwalk has quit [Quit: Ping timeout (120 seconds)]
13:52boardwalk has joined #asahi-dev
14:01boardwalk has quit [Quit: Ping timeout (120 seconds)]
14:01boardwalk has joined #asahi-dev
14:10j_eyalyssa: can you delete the 'writel(0, pctl->base + REG_LOCK);' line in pinctrl and test pcie?
14:32boardwalk has quit [Quit: Ping timeout (120 seconds)]
14:32boardwalk has joined #asahi-dev
14:55boardwalk has quit [Quit: Ping timeout (120 seconds)]
14:55boardwalk has joined #asahi-dev
15:11boardwalk has quit [Quit: Ping timeout (120 seconds)]
15:11boardwalk has joined #asahi-dev
15:16boardwalk has quit [Quit: Ping timeout (120 seconds)]
15:16boardwalk has joined #asahi-dev
15:21aleasto has joined #asahi-dev
15:33alyssaj_ey: isn't it already if 0'd?
15:36alyssayeah it's if 0'd in the version I have and pcie works fine
15:50aleasto has quit [Quit: Konversation terminated!]
15:52j_eyalyssa: oh ok, thanks
16:00boardwalk has quit [Ping timeout: 480 seconds]
17:10yuyichao has quit [Remote host closed the connection]
17:13yuyichao has joined #asahi-dev
17:19maor26 has joined #asahi-dev
17:32marcansven: see pmgr/dev
17:34* marcanoff to sleep
17:34marcanhad to add runtime PM support to the samsung uart driver because of course it didn't have it
17:34marcan(I guess nobody needs power management for UARTs...)
17:34marcanbut I think this is the right way to go here
17:35marcanI added UART2 to have a better test target that isn't the boot console
17:35marcan(that's the wifi debug thing)
17:35svenso what happens if a driver doesn't have runtime pm support? will it still get enabled if you just add that power-domains property?
17:35marcanyeah, it gets enabled, just never disabled
17:35svenalright. sounds great
17:36marcanalso any unused PDs get disabled
17:36marcanso we should list all the things that we don't use
17:36marcan(should probably be an include at that point...)
17:36svenyeah. guess i can also submit i2c in the next days then :)
17:36marcan(this includes all the devices that don't even exist in the ADT, e.g. the other 6 UARTs...)
17:36marcanyeah, and also since runtime pm is totally standard stuff, you can add it now or later
17:37marcanwon't break anything
17:37marcan(unlike the clocks which are more explicit)
17:37j_eyso the device tree in 94e8103b55a6ab85563883921c1b2d5ff02636ec looks pretty much like the one in the clock gate code, which means hopefully it's easy to try out with the keyboard branch I ahve
17:37svensounds great
17:38marcanit's even more generic than the clock gate approach, because the pm stuff works fine if either side is missing
17:38marcana driver with no PM will just keep it enabled; a driver with no associated power domain will just do nothing.
17:38marcanno failing clock ops or anything to care about there
17:38marcanalso you get some nice stuff in debugfs
17:39marcanI think I'm not doing the nesting properly yet, I'll look into that tomorrow
17:40marcanbut you shouldn't care too much about that for leaf drivers
17:40svenyeah, that sounds good
17:40svenso just a single clock for the i2c driver that's essentially clk24 will be fine
17:40sven(to calculate the i2c clock div)
17:40marcanalso 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
17:40marcanyeah, exactly
17:42marcanfwiw the cpufreq stuff can be done, AIUI, with the same framework
17:42marcani.e. there is already a generic cpufreq -> this bridge
17:42marcanso it'll just be a cluster-pstate driver along very similar lines, except that one will support OPP to set different active states
17:43marcanand 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)
17:46marcanI was a bit worried about clocks and DT compat, but with this there's no issue there
17:46marcanin principle we're keeping full compat with the first submission DT by doing it like this
17:46marcan(the uart also shouldn't care about a missing clock; I added the second baudclk we discovered)
17:47marcansven: 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
17:49svenso i2c divides the clock by 16 before the clock div. i can either add a fixed-factor clock to the DT that does that or just do that statically in the driver
18:01marcansven: I think usually drivers do that, the UART is the same (1.5mbaud is the actual base baudrate)
18:01marcan(due to oversampling etc)
18:02marcanjust pushed dump_pmgr.py to m1n1 too
18:02j_eymarcan: what's APPLE_PMGR_PS_CLKGATE?
18:02svensounds good
18:02marcana power state that, in theory, clock gates but does not power gate
18:03marcanit's unclear what devices that actually makes a difference for, and whether the timings are different
18:03marcanit is very rarely used by macos
18:03svenoh, let me also push my dwc3/xhci/phy tracer
18:03svenmight be useful once you start looking at those usb pd lines
18:03marcanok, off to sleep :)
18:04marcanj_ey: pretty sure e.g. the uarts aren't individually power-gateable so it should be the same for those
18:04marcanbut some blocks would be
18:04marcanneeds more research
18:05j_eylooks good as a first approach (or 3rd :p)
18:05svenessentially only makes the register names readbale
18:05sven*readable
18:06j_eyah yes, GDBGLSP, very readable :p
18:06svenugh. looks like vscode messed up the indentation again *sigh*
18:06j_eyGDBGLTSSM GDBGFIFOSPACE :p
18:07svenGlobal Debug LSP MUX Register
18:07svendunno why you can't read that :-P
18:08sven-MUX actually
18:13svenalright, will probably submit https://github.com/AsahiLinux/linux/commits/i2c/v1 tomorrow then
19:31kettenislooks like u-boot handles powerdomains automagically is well
19:40quarkyalice has joined #asahi-dev
19:42quarkyalice_ has quit [Ping timeout: 480 seconds]
20:43balrog has quit [Quit: Bye]
20:47balrog has joined #asahi-dev
21:19crucifix has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:02yrlf has joined #asahi-dev
22:22crucifix has quit [Remote host closed the connection]
22:56skoobasteeve_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
22:57skoobasteeve has joined #asahi-dev
23:04skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:17skoobasteeve has joined #asahi-dev
23:29maor26 has quit [Ping timeout: 480 seconds]
23:56alyssaported today's code into kernelspace
23:56alyssaso now have mode enumeration happening on live data from the DCP 👍
…