2023-04-16
00:17newiz has joined #asahi-dev
01:09___nick___ has quit []
01:11___nick___ has joined #asahi-dev
01:12___nick___ has quit []
01:15___nick___ has joined #asahi-dev
01:25user982492 has joined #asahi-dev
01:32sefidel has quit [Remote host closed the connection]
01:33sefidel has joined #asahi-dev
01:39cylm has quit [Ping timeout: 480 seconds]
01:42hightower4 has joined #asahi-dev
01:46user982492_ has joined #asahi-dev
01:49hightower3 has quit [Ping timeout: 480 seconds]
01:51user982492 has quit [Ping timeout: 480 seconds]
02:00gabuscus has quit []
02:05___nick___ has quit [Ping timeout: 480 seconds]
02:08cylm has joined #asahi-dev
02:13gabuscus has joined #asahi-dev
04:05kettenis has quit [Remote host closed the connection]
04:05kettenis has joined #asahi-dev
04:46kl has quit [Quit: ZNC - https://znc.in]
04:46kilolima has joined #asahi-dev
04:54stipa is now known as Guest11221
04:54stipa has joined #asahi-dev
04:56Guest11221 has quit [Ping timeout: 480 seconds]
05:16user982492_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:49nicolas17 has quit [Quit: Konversation terminated!]
05:57raveling has joined #asahi-dev
06:19pthariensflame has joined #asahi-dev
06:30pthariensflame has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:44raveling has quit [Ping timeout: 480 seconds]
06:49pthariensflame has joined #asahi-dev
06:58pthariensflame has quit [Quit: Textual IRC Client: www.textualapp.com]
07:06raveling has joined #asahi-dev
07:09jannauwhere did we get the SPI pins from? I'm trying to hook the touchbar touchscreen and we don't have the pins for spi3
07:14ChaosPrincessOn t8103 i randomly guessed them by getting the cs pin from adt and taking 4 pins down from that.
07:14ChaosPrincessMight also work for t8112
07:22raveling has quit [Ping timeout: 480 seconds]
07:33jannauChaosPrincess: the touchbar turned out more popular than I assumed judging by the reaction on my posts yesterday
07:33raveling has joined #asahi-dev
07:35ChaosPrincessI had a work-issued intel macbook from before they got a hardware esc key. Now _that_ was terrible :P
07:35chadmedit could have been cool but not as a total replacement of real F keys, and no developers took it up except ones paid by apple to do so
07:36ChaosPrincesschadmed: Yea. And the macos api for it isnt great.
07:39marcanonly CS since we do use that one differently from Apple (I think they use direct GPIO for that instead of the native CS?)
07:40ChaosPrincessI use cs as gpio in the z2 driver too.
07:40ChaosPrincessDont remember exactly why, think using it from the controller didnt work or sth
07:41ChaosPrincessDont think so
07:42raveling has quit [Ping timeout: 480 seconds]
07:44jannauyou use it just for "cs-gpios". that seems to be a well establish dt property and seems to get picked up by gpiolib-of for us
07:49ChaosPrincessWell, thats just me being bad at writing drivers :P i since got told that i should move it to the parent dt node, and rip out all the manual code and it will be done automatically
07:50kettenisfigured out that the board function to fixup the device tree runs before just before u-boot adds the initrd properties for an initrd it loaded itself
07:50raveling has joined #asahi-dev
07:51newiz has quit [Quit: Konversation terminated!]
07:58raveling has quit [Ping timeout: 480 seconds]
08:04kettenismarcan: so your idea was for the installer to build a separate cpio with selected firmware for u-boot?
08:06darkapex1 has quit []
08:06darkapex has joined #asahi-dev
08:07raveling has joined #asahi-dev
08:07jannauChaosPrincess: have you checked if the 200m clock is correct for the touchbar spi? according to macos logs it uses a 24 MHz clock on j493
08:15raveling has quit [Ping timeout: 480 seconds]
08:34raveling has joined #asahi-dev
08:37nsklaus has joined #asahi-dev
08:42raveling has quit [Ping timeout: 480 seconds]
08:57marcanpovik: reproduced the cs42l83 issue that altdistros are hitting. it clearly has to do something with kernel config, timing, or something like that.
09:01kit_ty_kate has quit [Quit: WeeChat 3.6]
09:03kettenisthe cs42l83 is a bit quirky and needs to have the SCLK running before switching away from the internal oscillator
09:21raveling has joined #asahi-dev
09:29raveling has quit [Ping timeout: 480 seconds]
09:38raveling has joined #asahi-dev
09:46raveling has quit [Ping timeout: 480 seconds]
09:55marcanpovik: https://github.com/AsahiLinux/linux/commit/93065f7023fbe738d733b4c5a96f87c653301c81 (in that branch because lazy)
09:57marcanI suspect the clock shutdown might take a while or there is some other timing nuance that makes it work for my usual kernel builds, and also it works for me the first time on my repro kernel
10:15raveling has joined #asahi-dev
10:16i509vcb has quit [Quit: Connection closed for inactivity]
10:16jannaumarcan: did you test dockchannel/mtp with 13.3? it's broken on the j493. one obvious problem is that the sram requested by rtkit is 2 pages further down. but even after adjusting the sram size in the devicetree it is still broken without error logged
10:17jannaudriver core complains about failing to create a device link to the smc gpio but that appears also with 12.3 and working mtp
11:02raveling has quit [Ping timeout: 480 seconds]
11:15roxfan has quit [Ping timeout: 480 seconds]
11:16raveling has joined #asahi-dev
11:19jannaulet's see if I can refactor the linux driver to make the link up check not as ugly as it is now
11:20hightower4 has quit []
11:20cylm has quit [Quit: WeeChat 3.6]
11:22cylm has joined #asahi-dev
11:25jannauyes, it is intertwined with the other port setup stuff. I currently just added 'if link up's which makes the code hard to read/follow
11:33marcandoes anyone remember what we added oslog for? the current behavior seems patently wrong as far as MTP goes, but I have no idea why it's there at all
11:35sveni vaugely remember someone adding it to get some co-processor to boot (or not hang after a while)
11:46svenohh... didn't jannau (?) notice that the endpoint was also required for nvme in some firmware version?
11:48svendunno, it always worked without oslog for me but I don't even know what firmware I'm running
12:07jannaubut based on the time I added it it would have been required on m1 with macos 12.x with x < 3
12:12kettenis(I'm considering submitting the bindings upstream to prevent myself from getting burned again)
12:15marcanm1n1 uses it for what looks like a bug workaround which *may* be needed in linux eventually but I'm not sure, we can always add it later
12:41jannauseems to be dead after display init. I removed it completely though, i.e. not even starting the endpoint
12:41ChaosPrincessmarcan: is there a way to make m1n1 reliably survive sleep
12:44marcanjannau: seems to work for me with what's in m1n1:main (drop the logic, keep the ep start)
12:47jannauyes, works with main. without it I need to power cycle it. it's still dead after power cycle via usb-pd
12:49marcankettenis: if you feel like implementing oslog in u-boot, https://github.com/AsahiLinux/linux/commit/ea40aa13292f59a90688955bee581dbc3037fdd0
12:49marcanit's like the other buffer requests except the field defs are different and the address is in 4K pages
12:52marcanthey already had 44 bits, which is enough for current machines with up to 42-bit address space everywhere
12:53marcanoh yeah, APPLE_RTKIT_BUFFER_REQUEST_IOVA should be 43, 0 (you don't care, only the GPU cares about those high bits, but just out of technicality)
12:56marcanthey did increase the init message lengths though, I hope we aren't going to overflow the fifo with our trick for that...
12:59marcanand yeah, I need to clean up the shutdown path and submit this to linux, *however*, I'm partially slacking on that on purpose so we can figure out the Fn key story
12:59marcanbecause right now the keyboards don't work *at all*, which means doing whatever I want with Fn is not a regression
12:59marcanif we add this driver, I think the keyboard will work to some extent even without other patches, and then we might end up in trouble
13:00roxfan has joined #asahi-dev
13:00marcanOTOH I could just upstream the keyboard stuff with the no Fn emulation idea to begin with, even if we still carry downstream patches to add emulation until the xkb stuff is ready
13:07jannauI don't think so. iirc the product ids are unique even if the vendor id would matches across different busses
13:26raveling has quit [Ping timeout: 480 seconds]
13:48raveling has joined #asahi-dev
13:56raveling has quit [Ping timeout: 480 seconds]
14:05raveling has joined #asahi-dev
14:11gabuscus has quit [Ping timeout: 480 seconds]
14:15gabuscus has joined #asahi-dev
15:00povikthat would still mean it's ok to turn off the clock there since hw_params happens *before* prepare
15:01marcanhw_free is an ioctl that userspace can send at any time AIUI, and which does not trigger a mute
15:01marcanso if you want to do it that way the codec drivers would have to mute on hw_free too (I think some do)
15:02marcanhw_free is getting called from the ioctl path, while the mute and later shutdown are getting called from the device close path
15:03marcanso clearly hw_free alone isn't going to work unless we add an explicit mute path in there
15:03marcanI won't claim to know what the "right" thing is here but that's what's happening right now
15:15marcanpovik: cs43130.c has a hw_free callback that switches to internal clock, so maybe that's the right way
15:39roxfan has quit [Ping timeout: 480 seconds]
15:40chipxxx has joined #asahi-dev
16:22svenbah.. so either the fuses need to be re-applied for thunderbolt mode or I just re-introduced that old bug where the first plug event doesn't work *sigh*
16:29marcanOK, so that's what the old logic was for, pre-assigned addresses. so we need to check for dva != 0 and reintroduce the old code.
16:30sosys has joined #asahi-dev
16:30roxfan has joined #asahi-dev
16:48sosys has quit [Ping timeout: 480 seconds]
16:48jannauerr, oslog is probably not the problem. there are two EPIC errors. I ignored them since at least one happens with 13.2 as well
17:14sosys has joined #asahi-dev
17:26sosys has quit [Quit: leaving]
17:48raveling has quit [Ping timeout: 480 seconds]
18:11raveling has joined #asahi-dev
18:14user982492 has joined #asahi-dev
18:16i509vcb has joined #asahi-dev
18:42zalyx0 has quit [Quit: later alligator]
19:00drubrkletern has joined #asahi-dev
19:29landscape15 has joined #asahi-dev
19:32landscape15 has quit []
19:38c10l has quit [Ping timeout: 480 seconds]
19:40c10l has joined #asahi-dev
19:52user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:56user982492 has joined #asahi-dev
19:59raveling has quit [Ping timeout: 480 seconds]
20:13user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:21raveling has joined #asahi-dev
20:29raveling has quit [Ping timeout: 480 seconds]
20:37raveling has joined #asahi-dev
20:45raveling has quit [Ping timeout: 480 seconds]
20:46newiz has joined #asahi-dev
20:51raveling has joined #asahi-dev
20:51drubrkletern has quit [Remote host closed the connection]
20:51kaazooHi, I'm trying out asahi-installer current main branch directly via test.sh on 13" M2 Pro. I switched the m1n1 Git submodule to point to t602x/bringup branch before, in order to have the latest changes. Basic installation seems to have worked, but m1n1 doesn't have required devicetree: "ERROR: Kernel found but no devicetree for apple,j414s available" during boot.
21:00kaazooI guess I need to tell m1n1 to bake in https://github.com/AsahiLinux/linux/blob/t602x/bringup/arch/arm64/boot/dts/apple/t6020-j414s.dts somehow.
21:04jannauthat will you get you only marginally farther. you will have also to update u-boot and the kernel
21:05jannaudo to the missing devicetree m1n1 will be in proxy mode and you can boot a kernel via usb: https://github.com/AsahiLinux/docs/wiki/Tethered-Boot-Setup-%28For-Developers%29
21:50user982492 has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:02yrlf has joined #asahi-dev
22:14pbsds has quit [Ping timeout: 480 seconds]
22:17raveling has quit [Ping timeout: 480 seconds]
22:40raveling has joined #asahi-dev
22:45zalyx0 has joined #asahi-dev
22:48raveling has quit [Ping timeout: 480 seconds]
22:56zalyx0 has quit [Quit: later alligator]
23:00raveling has joined #asahi-dev
23:04zalyx0 has joined #asahi-dev
23:05zalyx0 has quit []
23:08raveling has quit [Ping timeout: 480 seconds]
23:11chadmed_ has joined #asahi-dev
23:16zalyx0 has joined #asahi-dev
23:47hightower2 has joined #asahi-dev
23:48nsklaus has quit [Quit: ZZZzzz…]
23:53sosys has joined #asahi-dev
23:58nicolas17 has joined #asahi-dev