2021-12-14
00:30jannauI shoud have looked at things more carefully instead assuming things when the touchpad started working in multi touch mode
00:51jannaumarcan: https://github.com/jannau/linux/tree/dev/spi-hid-apple keyboard works via hid-apple, mouse via hid-generic
01:19slicey has quit [Quit: zzz]
01:22DarkShadow44 has quit [Quit: ZNC - https://znc.in]
01:22DarkShadow44 has joined #asahi-dev
01:35minecrell has quit [Quit: Ping timeout (120 seconds)]
01:42minecrell has joined #asahi-dev
01:47bps has quit [Ping timeout: 480 seconds]
02:01slicey has joined #asahi-dev
02:10King_InuYasha has quit [Remote host closed the connection]
02:11slicey has quit [Quit: zzz]
02:12DarkShadow44 has quit [Quit: ZNC - https://znc.in]
02:19slicey has joined #asahi-dev
02:22DarkShadow44 has joined #asahi-dev
02:29slicey has quit [Quit: zzz]
02:31slicey has joined #asahi-dev
02:59riker77_ has joined #asahi-dev
03:04riker77 has quit [Ping timeout: 480 seconds]
03:04riker77_ is now known as riker77
03:08phiologe has joined #asahi-dev
03:11PhilippvK has quit [Ping timeout: 480 seconds]
04:08Hinata[m] has joined #asahi-dev
05:50yuyichao has joined #asahi-dev
07:44the_lanetly_052___ has joined #asahi-dev
08:31povikshould be sending out NCO today, anyone wants to be CCed on that? (marcan has a default opt-in)
08:32slicey has quit [Quit: cya]
09:22marcanpovik: awesome! remind me again, what's the state of the audio stuff? works on the mini, have we tested the headphones jack or speakers on anything else?
09:22marcanI'm writing the progress report, so if you think the jack should trivially work everywhere I might as well test it and color that entire row green (yes I'm doing a table thing this time)
09:24marcanjannau: if it works well enough to use I might just merge it into asahi in its current state, might as well :)
09:28marcanI basically want linux-asahi to be a testing ground for drivers headed in the right direction, even if they're rough, at least at this point in the game
09:38marcanI think he means hid-generic works in multitouch *mode* because it still picks up the first few bytes of the reports?
09:43marcan_jannau_: btw, I do have access to an older Intel MacBook with SPI touchpad, so I can test that when we get there
09:44marcanI also noticed the Touch Bar multitouch is also ostensibly HID over SPI, but possibly a different protocol? unclear
09:47povikmarcan: playback through speakers and jack works on the mini. haven't been tested elsewhere
09:47povikjack should work everywhere (if the codec on t6000 macs isn't too different from the one on t8103 macs)
09:53marcanWIP report is here if anyone wants to look (still not proofread): https://github.com/AsahiLinux/AsahiLinux.github.io/commit/fbfa2ed93d040b20bd984d1e5d1dff8699820fcb
09:54marcansince it has the fancy table you'll probably want to run it locally; just install hugo and `hugo serve` at the repo root
09:56povikthere's some rough edges with how the jack is presented to userspace (pulseaudio isn't happy with it, and you need to set a knob in alsamixer for jack not to be muted)
10:02kettenismarcan: maybe mention that basic M1 support (USB type-C only) has been upstreamed in U-Boot now as well and will be part of U-Boot 2022.01?
10:03marcanpovik: the userspace stuff is a whole different story anyway (there's profiles and stuff, we'll probably have to create some on top of figuring out what to do for the speaker crossovers)
10:10kettenisI did a bit more exploring of the battery-related SMC keys yesterday and added stuff to the wiki page
10:11kettenisfunny thing is that most values are native-endian, but the remaining capacity seems to be reverse endian
10:14svenmarcan: the usb quirk stuff is still pending fwiw (and i need to submit a follow up for the binding), not sure it'll make it to 5.17
10:19svenand regarding nvme... there's still at least one annoying problem. for some reason anything that uses random writes with sync (fsync, sync, etc.) is incredibly slow (<1MB/s). not sure that counts as "works well"
10:22povikmarcan: re: the report. s/supporting the various codec chips/supporting the various codec configurations/
10:28svenit goes from 300 MB/s down to like 1MB/s. and testing the same setup with e.g. fio on macos doesn't do that
10:36_jannau_marcan: I think there are only two drivers for for the touchpad report format, hid-magicmouse will not work out of the box. but I really need to start looking at the reports in detail
10:41kettenis"raw" mode just extends the packet with touch information (which isn't really HID-compliant)
10:42KDDLB has quit [Quit: Ping timeout (120 seconds)]
10:42KDDLB has joined #asahi-dev
11:08timokrgr has quit [Quit: User left the chat]
11:11svenwell, the previous nvme driver would kernel panic if you just poked it enough. that's probably not good enough ;)
11:12kettenisI'd say the write cache buffer flushing slowness is something folks could live with for a while
11:14marcanpovik: https://github.com/povik/linux/commit/f5685ae510d5e9cce34c66666e9b5d335c99e848 FWIW since these are actually separate domains intended to be driven independently, you'd want "proper" PD support eventually (which involves a funny hack the PM code does for you of making up virtual devices)
11:18timokrgr has joined #asahi-dev
11:22marcanI think we're better off with fixed frequency clocks since we don't know; that way, if something ends up being dynamic or changing, we can teach m1n1 to propagate frequencies from the ADT
11:23marcanI imagine if refclk changes (though I get the feeling it never will) they'd change all the multipliers anyway
12:11marcanre MAINTAINERS, you can add a new entry and volunteer yourself, or you can shove it under the apple SoC stuff; depends on how much you want to commit ;)
12:18jnhmmm, a bit more theory-of-operation would (IMO) be nice to have in the driver, specifically an explanation of the role that the LFSR stuff plays
12:24svenmarcan: speaking of which, we never merged the dart entry to the general apple soc one, did we?
12:27marcanI'm trying to get the audio jack to work on t6000... and getting an unhandled IRQ... on the DART fault handler IRQ?!
12:29sventhere's also this thing apple calls SMMU (not the ARM one) but that's only for the disp dart and i don't even know if it can create interrupts
12:30sventhe SIO DART also has a DAPF but i think its errors also go the normal DART error status :/
12:32povikanyway i forgot about one thing. i don't know what the MCA and ADMAC drivers will do on t6000
12:35marcan0x39b004000+000040 ERROR = 0x9000000 (FLAG=0, STREAM=0x9, CODE=0x0, NO_DAPF_MATCH=0, WRITE=0, SUBPAGE_PROT=0, PTE_READ_FAULT=0, READ_FAULT=0, WRITE_FAULT=0, NO_PTE=0, NO_PMD=0, NO_TTBR=0)
12:38povikmarcan: if you didn't do it already you need at minimum to change apple,nclusters in mca and dma-channels in admac on t6000
12:44marcan[cpu6][0xffffc000083d7650] MMIO: W.4 0x39b410010 (admac-sio[0], offset 0x10010) = 0xfffa0000
12:44marcan[cpu6][0xffffc000083d765c] MMIO: W.4 0x39b410010 (admac-sio[0], offset 0x10010) = 0x10000
12:44marcan[DARTTracer@/arm-io/dart-sio] MMIO: R.4 ERROR = 0x1000000 (FLAG=0, STREAM=0x1, CODE=0x0, NO_DAPF_MATCH=0, WRITE=0, SUBPAGE_PROT=0, PTE_READ_FAULT=0, READ_FAULT=0, WRITE_FAULT=0, NO_PTE=0, NO_PMD=0, NO_TTBR=0)
12:44legarts[m] has joined #asahi-dev
12:49marcansven: is this another one of those let's use one DART for some stuff and another DART for other stuff things like USB?
12:54svenbecause they use sid 0 in the first but sid 1 in the second and because they just mirror register writes I think they need that
13:23marcan[ 19.795376] apple-mca 39b600000.mca: unsupported SERDES configuration requested (mask=0x3 slots=2 slot_width=64)
13:58marcancs42l42 (aka cs42l83, apparently) uses a weird banking thing with 8 bits of page address and 8 bits of register address
14:14marcanyeah I get the feeling this is one of those "apple got first dibs on a new chip or got them to make something custom" things
14:26marcanpovik: yeah, this doesn't look like anything I can find, and stringsing the macos driver points in that direction too
14:30marcansome register field names do match 42l42, so it's not like a total from-scratch chip, but if nothing else the addressing is different for one
14:30marcanand there's stuff I can't find a match for in '42, though it does seem apple may be making up register names
14:36yuyichao has quit [Ping timeout: 480 seconds]
14:38marcansome of the plug detect stuff is the same as '42; but there are new concepts: "hi cap" mode, "MSM", some sample rate thing, something called "ccm"
14:40marcanit sounds like this thing got quite a bit smarter about adapting to different headphone types
14:44marcanpovik: so yeah, sounds like there's quite a bit of reversing work here to get this to work properly :/
14:52marcanpovik: the funny thing is the macOS driver has basically verbosely documented all the register reads/writes... it's like they have a macro that stringifies the arguments to write32 mask32 etc and them passes those strings too
14:53yuyichao has joined #asahi-dev
14:53marcanmight be worth extracting just the reg info from the driver (under the premise that register names aren't really copyrightable) and working off of that + HV logs
14:54kettenismakes sense; apple boasted about supporting high-impedance headphones on the m1 max/pro laptops in their marketing
15:23aleasto has joined #asahi-dev
15:44mazmarcan: this is going to hurt with devices with multiple queues where the driver really expects a given queue to be associated with a given CPU and doesn't expect the interrupt anywhere else.
17:09ChaosPrincess has joined #asahi-dev
17:22gladiac has quit [Quit: k thx bye]
17:23gladiac has joined #asahi-dev
18:16the_lanetly_052__ has joined #asahi-dev
18:22the_lanetly_052___ has quit [Ping timeout: 480 seconds]
18:25Graypup_ has quit [Quit: meow]
18:25Graypup_ has joined #asahi-dev
18:34___nick___ has joined #asahi-dev
18:34___nick___ has quit []
18:36___nick___ has joined #asahi-dev
18:38Dcow_ has joined #asahi-dev
18:46the_lanetly_052__ has quit [Ping timeout: 480 seconds]
19:03drwhax[m]1 has joined #asahi-dev
19:04alyssa has joined #asahi-dev
19:05alyssathe corellium patches are AFAIK wifi only and I don't think anyone has looked at bluetooth?
19:08kettenisI don't disagree ;) (we ripped out bluetooth support in OpenBSD years ago since the implementation wasn't up to our standards)
19:10jni haven't installed the bluetooth firmware for my WiFi/Bluetooth module, and i don't miss it :>
19:21kettenison arm64 this uses the device tree and the match functions basically check compatible strings
20:10aleasto has quit [Remote host closed the connection]
20:11King_InuYasha has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:52josipknezovic[m] has joined #asahi-dev
21:59Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:01Dcow_ has joined #asahi-dev
23:08kgarrington has joined #asahi-dev
23:09kgarrington has quit [Remote host closed the connection]
23:44Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]