#
…

2021-12-12

00:08c10l has joined #asahi-dev
00:11riker77 has joined #asahi-dev
00:37slicey has joined #asahi-dev
01:44marcansven: also sent you a couple housekeeping DT patches (they apply on asahi-soc/dt on top of your watchdog patch) :)
02:05riker77_ has joined #asahi-dev
02:08riker77 has quit [Ping timeout: 480 seconds]
02:08riker77_ is now known as riker77
03:11phiologe has joined #asahi-dev
03:13PhilippvK has quit [Ping timeout: 480 seconds]
05:35Dcow_ has quit [Read error: Connection reset by peer]
05:36Dcow has joined #asahi-dev
06:00marcanfyi, this fixes the capslock thing too: https://mrcn.st/p/KWBR4tV8 (I think I mentioned that before but I just tried it)
06:00marcanalso somewhere along the way touchpad started working in X
06:22slicey has quit [Quit: zzz]
07:04marcansigh, I screwed up the emailing on the sdhci series v2 again... (first time I forgot a Cc, second time I screwed up the cover letter subject)
07:06marcanhopefully they forgive me for that one (patches themselves are fine) :)
07:06marcansent that out and the DRM series v3, I think that's everything I had in the queue?
07:06marcanmaz: I still need to review your PMU stuff and I think you need to review my AICv2 stuff :p
07:17Glanzmann has joined #asahi-dev
07:18jannaumarcan: yes, I tried using cs_inactive yesterday and https://github.com/jannau/linux/commit/f3e786d16121516 works well with the SPI core DT change
07:21chadmed has joined #asahi-dev
07:32marcanwhere'd 245 come from? I saw 250 in the plist
07:32marcanand setup/hold are 20us per the magic reg blob
08:06jannauthe 245 are an error. the 45 come from the plist: CS to Clock Us and Clock to CS Us
08:08marcanI guess apple themselves are inconsistent...
08:19jannau20us seems to work fine, I'll use 20us and leave a comment that those might be 45 us
09:25the_lanetly_052___ has joined #asahi-dev
10:13thunfisch has quit [Read error: No route to host]
11:04thunfisch has joined #asahi-dev
11:13mazmarcan: yeah, that's on my long list of things to do. let me shake off this hangover first! ;-)
11:18bps2 has joined #asahi-dev
11:20bps3 has joined #asahi-dev
11:24timokrgr has quit [Quit: User left the chat]
11:26bps2 has quit [Ping timeout: 480 seconds]
11:27timokrgr has joined #asahi-dev
11:44j`eymarcan: oh nice, just saw you submitted the spi driver
11:51aleasto has joined #asahi-dev
12:33marcanmaz: :-)
12:37bps3 has quit [Ping timeout: 480 seconds]
13:06Glanzmann has quit [Quit: leaving]
13:08m6wiq has joined #asahi-dev
13:14Glanzmann has joined #asahi-dev
13:17m6wiq has quit [Quit: Leaving]
13:17m6wiq has joined #asahi-dev
13:30m6wiq has quit [Quit: Leaving]
13:51VinDuv has joined #asahi-dev
14:18kumoko has joined #asahi-dev
14:26alyssa has joined #asahi-dev
14:26alyssa....M1 Mini headphone jack support you say?
14:26* alyssarebases kernel
14:27alyssa$ git pull linux-next...
14:30Glanzmannalyssa: Long time no see. If you have a dcp driver for me to try on mini or macbook air, let me know. I'm excited to try your new tree.
14:31alyssaLet's see
14:31alyssaI've been doing Mali stuff for the past few months
14:31alyssaI really had two goals with the M1, GPU bring-up and making linux-on-m1 my main machine
14:32alyssawaiting on marcan to reverse the GPU register/firmware stuff before either of us can tackle GPU kernel, and as for the latter?
14:32alyssaI mean, my asahi box *has* been my main machine for months now :)
14:32Glanzmannalyssa: Btw, we noticed that on 'simple drm' firefox does not work with the xorg modsetting driver, but it does with the fbdev driver, any idea why? (does not work means the gui doesn't come up. With konquerer the gui comes up but if you browse to the website the page display array stays empty).
14:33Glanzmannalyssa: I'm also waiting for that. He promised GPU accelerated desktop within one year. He still has plenty of time. :-)
14:33marcanI didn't *promise* anything :p
14:33marcanI know better than that
14:33GlanzmannYes, I'm looking for that twitter post.
14:33alyssamarcan: Oh, so you will do it! Thanks!
14:34marcanI said "challenge accepted"
14:34alyssaI'm on holiday next week, I expect to have m1n1 reference code waiting for me 🙃
14:34marcanalyssa: I've got things to get merged into 5.17!
14:34alyssaAnd I've got new shiny Malis to play with
14:34marcanand a wifi patchset to rewrite!
14:35marcanseriously though, my current goal is to tie up all these loose ends by EOY, so that *next* I can get working on the GPU kernel driver
14:35marcanalso at least we have feature parity on the new laptops, that's gotta be worth something right? :>
14:35j`eymarcan: for wifi, you want a real smc driver, or ok with just doing the gpio poke via m1n1?
14:36marcanj`ey: we need a real SMC driver anyway, I'll be doing that once I take care of the wifi firmware situation
14:36alyssathe two tasks are orthogonal, though
14:36marcanthey are
14:36alyssaotoh, the wifi firmware situation is the much harder one
14:36marcanI know what needs to be done
14:37marcanI can crank out a v1 this coming week
14:37marcanand maybe even get started on SMC
14:37j`eymarcan: and also progress report
14:37alyssaOK so why does linux build so slowly on my chromebook (targetting the M1) but so fast on my M1 (targetting the Chromebook)
14:37marcanyes, I was going to do that today but alas... kinda crashed this afternoon since I had to wake up early for something
14:38j`eyalyssa: I wonder!
14:38marcanalso, tbh, just running KDE on the M1 Pro MBP with the keyboard/touchpad patches feels silly, as in silly how well it works on a damn framebuffer
14:38alyssamarcan: 💯
14:39alyssaGNOME + M1 Mini + DCP here but still
14:39alyssait should not work this well
14:39marcanI tried DCP but alas it's not quite there :p
14:39j`eymarcan: that's running ALARM off the NVMe?
14:39marcanOTOH the PMGR fixups I should send out to SoC tomorrow unborked it :p
14:39marcanj`ey: yes
14:39alyssaright now the only useful thing the DCP driver does (over simpledrm) is mode sets
14:39marcan(I accidentally broke DCP with PMGR, turns out DCP needs a special snowflake feature)
14:40marcanalyssa: and vsync hopefully
14:40alyssamarcan: ostensibly, but you still get tearing because software rasterizer borked
14:40j`eymarcan: so right now: watchdog, dt fixups, pmgr (2 sets), PMU, AICv2, SPI
14:40j`eymarcan: anything else on the mailing list?
14:40alyssaanyway as-is DCP is a must-have on the Mini and useless on the laptops
14:40marcanj`ey: SDHCI quirks are in review too
14:41marcanalyssa: right
14:41j`eymarcan: Hey folks,
14:41marcanj`ey: yeah I know I know
14:41j`eymarcan: :D
14:41marcancopypasta fail and I totally missed it
14:41alyssawhat's this?
14:41marcanI sent out a v2 with subject "Hey folks," on the cover letter
14:41alyssa(That would change with ATCPHY nonsense taken care of to get displayport on the type-C ports..)
14:42marcanI normally copy and paste from subject to end of cover letter when re-spinning the .patch files, but something went horribly wrong
14:43bps3 has joined #asahi-dev
14:44jannauj`ey: dart-t6000 and apple-dwc3 reset quirk. the latter semi-hard requirement for adding the usb-c ports to the dts
14:46marcanj`ey: that one is applied, I think you mean the other t6k support patch?
14:47j`eyoh, I didn't know that got applied, great!
14:47j`eyoh sorry yeah, i meant the other ones. too many patches
14:48kumoko has quit [Quit: Leaving]
14:50the_lanetly_052__ has joined #asahi-dev
14:56the_lanetly_052___ has quit [Ping timeout: 480 seconds]
15:06alyssald: drivers/gpu/drm/bridge/display-connector.o:(.rodata+0x68): undefined reference to `drm_atomic_helper_bridge_duplicate_state'
15:06alyssawhat did alyssa break today
15:09alyssaoh was missing kms helper due to rebasing funny
15:22povikoh hey alyssa
15:22Glanzmannalyssa: The DCP driver can also do screen rotation, run firefox and does not burn the lid down when closed.
15:22povikyou may still be the first other person to try out the sound driver for all i know
15:22poviki can send the .config options you need if you are interested
15:23Glanzmannpovik: I'm also interested.
15:23povikokay then, i will put them up somewhere
15:23Glanzmannalyssa: And DCP can change the resolution on the mini.
15:24Glanzmannalyssa: Without DCP you can not turn the screen off as a result, when the lid is closed it gets hot as hell.
15:26Glanzmannpovik: Have you tried to run your patches on top of jannau's patchset?
15:28povikno i haven't, if it has pmgr with all the domains then i don't expect issues
15:30jannauit's just applespi patches on top of asahi (potentially rebased onto 5.16-rc4)
15:30povikokay then that should work just fine
15:31Glanzmannjannau: mps and I also have rebased it on top of git head from torvalds, also works.
15:31Glanzmannrebased, is to much. We applied the patch and it works.
15:32jannaukeyboard works with spi-hid-apple
15:32Glanzmannjannau: I worked the whole day with the air with your latest patchset, it works really well, no caps lock hangs, I was able to switch meta and alt and the touchpad also works great (no random jumps, when I type).
15:35j`eyjannau: !!
15:41alyssaUgh rebase conflicts etc
15:42alyssaok, that one was easy
15:43alyssaNeeded to backport changes from pci.c to apple-ans.c b84ba30b6c7a ("block: remove the gendisk argument to blk_execute_rq")
15:43alyssabut that was a 2 line fix
15:44alyssaGlanzmann: er, does my DCP driver turn the screen off when the lid closed? I assume that needs a lot more driver work?
15:44alyssaor are there patches to it floating around?
15:44alyssaI've been off in Mali land
15:44ketteniswon't it automatically blank the screen after a little while?
15:45alyssaI guess that's userspace's job
15:45alyssaI guess "lid closed" is an event from the SMC or something
15:46kettenisevent_name-bit8 = lid
15:48alyssaok, rebased on linux-next. let's see if I broke anything
15:49alyssabroke wi-fi
15:49alyssano I think I know what I did
15:50alyssawhat happened to my wifi blob
15:51alyssa...where did I put the initramfs
15:52alyssano that should have work
15:52alyssaoh, the firmware naming changed
15:58povikconfig options for audio on mini: https://pastebin.com/CiWfU77z
15:59poviknow you can tell me if there's a nice way to apply such list ^
15:59povikhaving kernel enable the options and their parents, taking the list from file/stdin
16:00alyssais menuconfig nice? :-p
16:00poviknot for this purpose :-p
16:01poviki'm looking for something that needs less work
16:03alyssaI believe ChromeOS has scripts for this downstream
16:04alyssadoes linux want to rebuld the world again? :V
16:05alyssaIt does but ccache is coming to the rescue. K
16:07kumoko has joined #asahi-dev
16:07kumoko has quit [Remote host closed the connection]
16:11* alyssacherry-picks sound patches
16:12Glanzmannalyssa: Well it does screen blanking, that means after 10 minutes it is off.
16:13GlanzmannToday I left my macbook air 3 hours with lid closed when I opened it up the handrest was pretty warm.
16:14alyssapovik: Looks like power domains device trees have changed a lot uhh
16:15alyssaDid pwrstate stuff land upstream when I wasn't looking
16:15alyssaoh I see
16:15Glanzmannpovik: You can put it in your config and run make olddefconfig, kernel infrastructure does take care of the rest, doesn't it?
16:19sveni think pwrstate is almost upstream
16:19alyssasven: ack
16:23alyssagod this is too broken I give in
16:24* alyssarebases povik's branch on linux-next and eats the Yet Another compiler
16:24alyssa*compile of the full kernel
16:26alyssa 115852 alyssa 20 0 5184392 836704 405668 R 84.2 21.5 2:11.36 git
16:26alyssagit how hard is it to do a rebase
16:34kettenisalyssa: the asahi branch in https://github.com/AsahiLinux/linux/ now has all the diffs that marcan deems (close to) upstreamable
16:36kettenisbut it is getting frequent forced pushes, so maybe it isn't useful to rebase on
16:44Glanzmannalyssa / povik: Which branch in https://github.com/povik/linux for the audi jack thing?
16:45Glanzmannalyssa: I know we're not supposed to use it or talk about it, but did you fix wifi and can you tell me what the new names for the firmware are?
16:46alyssaaaaand I broke DCP
16:46alyssakettenis: ack
16:47povikmine is based on that asahi branch
16:47povik(or was few days ago)
16:48povikGlanzmann: asahi-sound
16:48alyssapovik: I'm attempting to rebase yours on linux-next and add back the few extra things it's missing compared to my old branch
16:48Glanzmannpovik: I see, perfect.
16:48alyssaor would be, currently wondering why DCP is unhappy
16:48povikcould be that power state issue marcan mentioned?
16:48alyssagah I need serial
16:50alyssapovik: I mean it used to work ...
16:50povikyes, because some power domain the driver didnt know about
16:50povikand now it does
16:51alyssaYou have "arm64: dts: apple: t8103: Add apple,min-ps to DCP PMGR nodes" in your tree ...
16:51povikokay it's not that
16:51alyssaoh, but I probably need to update my device tree bindings for DCP to specify the appropriate domains, duh.
16:52alyssaUmmm in the mean time I would love to know why simpledrm isn't working .
16:52alyssa---right because disp dart
16:52alyssai haven't touched this in a while
16:53alyssa-----because I didn't cherrypick DCP right
16:53alyssaGod I'm slow today
16:53bps2 has joined #asahi-dev
16:54alyssaKernels are hard ..
16:55alyssaOkay, simple-drm is ok
16:55matthewayers[m]Yeah, I’m waiting until my final exams are over to really dive into this stuff on my own machine
16:56alyssaapple-pmgr-pwrstate 23b700000 power-manager:power-controller@2c0 failed to add parent domain -22
16:56alyssathat seems .. sus
16:57alyssa0x2c0 is ps_mca1
16:57alyssapovik: ^
16:58alyssaI assume that has to do with the hack on the tip of the tree
16:59bps3 has quit [Ping timeout: 480 seconds]
17:00alyssaDCP not booting regardless, uhh I assume I need those DT changes
17:02alyssaI don't see a power domain for dcp
17:03alyssaat least not separate from disp0 which is marked always-on
17:04sventhat should be the correct domain
17:04alyssaoh the driver isn't even probing
17:05alyssa...why not? :X
17:06alyssay'know I would really have liked you to call my probe function, linux
17:09alyssaOh it's errr trying to probe apple but not dcp..
17:09alyssaEvidently my DT is really screwed up then
17:11povikrip your DT
17:12alyssaoh I think I know
17:12alyssagod linux
17:14alyssano that shouldn't matter
17:15alyssai swear tg
17:15alyssaYep there we go one line DT change
17:16alyssa....and why won't Xorg start
17:16alyssaPremature celebration
17:18alyssaoh, a kernel crash fun
17:18Glanzmannpovik: I just tried to compile you tree, so what I did is the following: I extracted your commits, than I took v5.16-rc4, applied the tree from jannau and than applied your patches (all but 562e8c388a6976ef472d17cda7b252c1bca9dccd bceause it was already in I think). Than I set the kernel options, but everytime I run olddefconfig all of your kernel options (with the exception of
17:18GlanzmannCONFIG_COMMON_CLK_APPLE_NCO=y) get thrown out, any ideas?
17:19alyssaoh, because coprocessor crashed.
17:20povikGlanzmann: yes, dependencies of those options are disabled
17:20povikthat's why make olddefconfig doesn't do the trick
17:20povikor whatever that command is
17:21GlanzmannI see, so what should I do?
17:21povikmake menuconfig can tell you what those dependencies are, you should enable them
17:21GlanzmannI see, than I go hunting and let you know how it went.
17:21alyssaWhy would the DCP crash on asahi-sound+DCP :|
17:25Glanzmannpovik: When I do a 'git grep CONFIG_APPLE_ADMAC', I get only one hit (drivers/dma/Makefile:obj-$(CONFIG_APPLE_ADMAC) += apple-admac.o) but it doesn't seem to be in any kernel config file, how can that work?
17:26povikhmm, i may be missig something, let's see
17:26j`eyGlanzmann: it's APPLE_ADMAC'
17:26j`eyin Kconfig it doesnt have the CONFIG_
17:26Glanzmannj`ey: Just found it, I shut up and go hunting.
17:26Glanzmannpovik: This was my fault.
17:27povikhey we all do them
17:27* alyssais feeling pretty dumb herself
17:31alyssaSo far things are strictly more broken than they were this morning :V
17:31alyssasven: what happened with tx_prepare / dma_wmb
17:31alyssaand with BUFFER_REQUEST_IOVA changing
17:31povikGlanzmann: i think you can look up dependencies in make menuconfig, searching by option name
17:32svenwhat do you mean 'what happened'?
17:32GlanzmannThank you for the tip. I was searching for it. Just found the first one.
17:32alyssasven: I'm looking for changes between my branch and povik's to figure out why DCP broke
17:32alyssaI notice rtkit had those changes, wanted to know if that might have been relevnat
17:33svenuhh.... dunno?
17:33poviki swear i didn't change anything! :-p
17:33j`eysven: the mailbox doesnt have the dmb anymore
17:33svenj`ey: yeah, so?
17:34j`eyso rtkit needs them, or is it users of rtkit?
17:35alyssawhat gets me is that the breakage is only when starting Xorg
17:35alyssathe initial modeset in fbcon works fine, and weston starts ok
17:38alyssaapple mbox was changed substantially between mainline and the old version I had, maybe that was implicated
17:39alyssano functional changes other than compatible strings which I already fixed
17:44alyssait's crashing during set_digital_out_mode
17:45alyssaIt successfully did a mode set (fbcon) to 96, 34
17:45alyssaIt successfully did a mode set (fbcon) to 90, 72
17:46alyssaStarting X tries to make it mode set to 96, 34 which fails
17:47Glanzmannpovik: I selected every option, but I can't select this one: CONFIG_COMMON_CLK_APPLE_NCO=y - It does now show up in th menu, see screnshot: Are you compiling using a cross compiler or native? - https://ab34.de/u/screenshot-t490-2021-12-12-18_47_40.png
17:48alyssa96, 34 is 1024x768, 90,72 is 3840x2160
17:48alyssabut that doesn't make sense
17:48j`eyGlanzmann: press / then type 'COMMON_CLK_APPLE_NCO'
17:49j`eyGlanzmann: it will show you what deps ae needed
17:49alyssaunless this is a soft resolution
17:49Glanzmannj`ey: I see. I'll check them again.
17:49alyssaDCP what are you doing
17:51alyssa...so funny story that broke things worse
17:51Glanzmannj`ey / povik: From my point of view all dependencies are met: https://pbot.rmdir.de/u/zAdl2VXqxon4fpmABoVsbA
17:51povikyeah ARCH_APPLE you need
17:52j`eyARCH_APPLE [=n]
17:52povikare you crosscompiling? do you invoke menuconfig with ARCH=arm64? (i think that's needed)
17:53Glanzmannpovik: I'm cross compiling and I'm invoking it like that. But let me try to set ARCH_APPLE and see if the options show up, but then there is probably a mistake in the dependencies.
17:54alyssaI should strongly consider getting food
17:54j`eynot sure how you have ARCH_APPLE=n, its in defconfig
17:54svenuh, without ARCH_APPLE many thing won't work
17:54j`eysven: many thing => anything :D
17:54GlanzmannNow it shows up, compiling.
17:55Glanzmannsven: Somewhat, deselected it.
17:55alyssaOkay that hack should not have fixed it. Um.
17:56alyssaGlanzmann: Now about audio. Should I see be seeing any ALSA devices?
17:56* alyssasweats
17:57povikyou should
17:57povikaplay -l
17:57alyssano soundcards found
17:57povikpost your dmesg
17:58Glanzmannalyssa: You need to search for every of these options:
17:59alyssaGlanzmann: got them all
17:59poviknow i will let you on a little secret
17:59poviki have been compiling with clang lately
17:59GlanzmannOkay, are you sure? Have you checked /proc/config.gz?
18:00Glanzmannpovik: No issue, I just had to comment out one line: https://pbot.rmdir.de/Z0PMPqRBpNeBPHGaDcaKnw
18:00j`eypovik: me too :p
18:01alyssaGlanzmann: Positive.
18:01povikGlanzmann: yeah, me using clang is probably why i didn't see that
18:01aleasto has quit [Quit: Konversation terminated!]
18:02alyssaand me setting WERROR=n
18:03Glanzmannpovik: It booted up, started X and I think it crashed but it could also mean that it deselected more stuff in the config and I just don't have any device drivers for usb and network
18:05GlanzmannI have autostart X
18:05aleasto has joined #asahi-dev
18:05aleasto has quit []
18:06Glanzmannpovik: Do you have a kernel and dtb with nvme and network in it, than I can try to boot your binary blob.
18:06GlanzmannI also still have macos 11 on that system, maybe I should upgrade to macos 12.1.
18:08slicey has joined #asahi-dev
18:09povikGlanzmann: i do have such blob
18:09povikmacos version should be irrelevant for audio hw
18:11bps2 has quit [Ping timeout: 480 seconds]
18:13aleasto has joined #asahi-dev
18:14the_lanetly_052___ has joined #asahi-dev
18:15bps2 has joined #asahi-dev
18:16the_lanetly_052__ has quit [Read error: Connection reset by peer]
18:35alyssaI admit working sound on Linux+M1 is pretty magical
18:35alyssapovik: props
18:44bps2 has quit [Ping timeout: 480 seconds]
18:45povikthese should be blobs from asahi-sound, possibly with some insignificant changes
18:47the_lanetly_052___ has quit [Ping timeout: 480 seconds]
18:51Glanzmannpovik: Thank you, I try them now.
18:51povikokay, some notes:
18:52povik- hw:0,0 will be speakers, hw:0,1 is jack
18:52povik- you need to change MIXER volume in alsamixer before jack comes alive
18:52povik- once pulseaudio gets in the picture, things can go wrong
18:53Glanzmannpovik: I have the latest m1n1, is that fine?
18:53povikyes it is
18:53Glanzmannpovik: I see I probably have pulseaudio.
18:53povikalyssa: how is your pulseaudio mileage once you set MIXER?
18:55GlanzmannX does not come up, console does not come up but I have network card and log in via ssh.
18:57GlanzmannI don't see any sound devices, but your kernel obviously has all 6 options set.
18:59Glanzmannalyssa: Did you manage to get sound working?
19:00povik[ 3.166647] ALSA device list:
19:00povik[ 3.174354] #0: Mac mini integrated audio
19:00povikwhat does aplay -l show? i expect it's there
19:04alyssapovik: pulseaudio + headphone is borked
19:04Glanzmannpovik: It is working. I heard some sound from the internal speakers.
19:05alyssapovik: regardless of alsamixer
19:05alyssaPulseaudio doesn't seem to know about 0,1 at all
19:07alyssaRebooting via the watchdog driver seems broken for me
19:08alyssaso let's see, today I...
19:08jannauI found the 3rd driver for the raw events from the touchpad: drivers/hid/hid-magicmouse.c
19:08alyssa+ got speaker working in my kernel thanks to povik
19:08alyssa- broke wifi
19:08alyssa- broke reboot
19:08alyssa- broke modesetting
19:08alyssano wait reboot is ok
19:08alyssanvm, so only 2 steps back not 3
19:08jannauin other news touchpad is working with spi hid as well
19:08alyssajannau: woo!
19:08alyssawhat do you mean 3rd?
19:09j`eyjannau: puuussshh
19:11jannaulinux has 3 distinct drivers for the touchpad events. applespi (used by corellium), kettenis found bcm5974 (input device), hid-magicmouse is convenient since it is already hid
19:12kettenisah, yes, there's that one as well
19:14kettenisi believe that code supports the apple magick trackpad
19:14ketteniswhich probably uses the same hardware as the laptops
19:18kettenisthe bcm5974 driver looked cleaner to me
19:22* alyssagives up
19:22alyssait was worth a try
19:23alyssai guess i'll try again when more of this stuff is mainlined because i just cant
19:23bps2 has joined #asahi-dev
19:36alyssa has left #asahi-dev [#asahi-dev]
19:39bps2 has quit [Ping timeout: 480 seconds]
19:46bps2 has joined #asahi-dev
19:52unrelentingtechkettenis: maybe the same hardware on the actual touch handling side but the external "magic" devices do their own processing so the packets are quite different. touches on magic already have IDs assigned
19:53unrelentingtechjannau: yeah, applespi authors copy-pasted pieces of bcm5974 instead of making their driver a HID transport for bcm5974 to run on
19:57unrelentingtechand how they pull the model number from the 107th byte of what they described as "touchpad_info_protocol with 105 unknown bytes" but really is the HID descriptor
19:58unrelentingtechon the 2015 MBP (the one with both USB and SPI) the descriptor literally is the exact same over USB and SPI
19:58unrelentingtechand the "model number" in that byte is 3, which makes sense, it's the previous one to the one applespi started with (4)
20:01unrelentingtechso with my WIP FreeBSD SPI-apple-HID driver (for Intel Macs) I did this https://github.com/DankBSD/base/blob/13f7569173ece71578c4c4e7ffc0b21597352cf2/sys/dev/hid/bcm5974.c#L349-L384 - the transport extracts that byte and presents it as the HID version for our bcm5974 to match on..
20:03unrelentingtechoh btw that byte in the decoded HID descriptor is part of: '0x96, 0xDF, 0x03, // Report Count (991)' ← the 0x03 here. that's the report count for the vendor-defined collection
20:08jannauunrelentingtech: hid-magicmouse works out of the box with my WIP SPI HID transport driver
20:10unrelentingtechhm yeah, looks like they use INPUT_MT_TRACK for trackpad2 (only)
20:10jannauit even uses the same payload to switch on multitouch
20:11kettenisunrelentingtech: so the touchpad on the M1 macbook pro has 0x96, 0xd7, 0x06
20:13unrelentingtechah well the x,y look right, they do decode a 16-bit number there
20:13unrelentingtechbut the further down things in magicmouse just use 1-byte values, while the bcm5974 struct is all le16
20:14unrelentingtechkettenis: cool, so it's the same "model 6" applespi already knows about from /* MBP13,3 MBP14,3 */
20:14kettenisyup, so that's the variant of the packet that works
20:15yuyichao has joined #asahi-dev
20:18unrelentingtechwait wh.. what are they doing in that magic trackpad2 code with `tdata[1]`. why is that byte in both X and Y o_0
20:21kettenisso the numbers are decoded as two 13-bit numbers encoded in 4 bytes
20:22unrelentingtechwait are they getting the same result as ` c->y.min + c->y.max - raw2int(f->abs_y)` from bcm5974 with.. this
20:24povikGlanzmann: pushed DTs with added jack codec across all M1 devices, it's in asahi-sound, so if you get it compiled, you can try that on the air
20:25Glanzmannpovik: Thank you, I'll try and let you know.
20:25povikthank you too :)
20:27GlanzmannBtw. I have now another problem with my mini. I updated it to macos 12.1. And now the mini does not produce an output on my eizo or hdmi grabber. But I can chainload using proxy and boot linux using proxy. If I boot macos by pressing the poewr button long, no issue. I tried dozens of power cycles and reinstalled m1n1 twice. I also put my self compiled m1n1. Any ideas?
20:27j`eyyes, apple broke something
20:28Glanzmannj`ey: I see, what did you do? Did you downgrade the 'm1n1' Linux 2.5 GB partition to an older macos version?
20:30j`eyI'm not sure if that is possible, maybe you have to make another partition
20:30j`eyor maybe you cant even downgrade like that at all?
20:30j`eyif the system firmware is 12.0, you might not be able to sinstall 11
20:30j`ey(I just stuck with 11 so far)
20:31svenyou can't downgrade SMC, ANS and uhhh.. SEP.
20:31svenbut the rest can be downgraded from 1TR
20:32GlanzmannSo this is a known problem?
20:32GlanzmannHas soemone managed to get it running again?
20:32svenno idea
20:33GlanzmannI see, thank you.
20:33j`eyI think you can run dcp.py to fix it
20:34Glanzmannj`ey: Good idea, I'll try this right now. Btw. do you know how you change the resolution using dcp.py? Alyssa once told me, but I probably no longer have the code.
20:36Glanzmanndcp.py did not do the trick. I now try to downgrade using the asahi installer.
20:37j`eyI dont
20:38GlanzmannI see, thanks.
20:40Glanzmannsven: I once accidently deleted my 1tr partition and had to survive the mac using a second mac, does that maybe pull the trick?
20:40svendo what trick?
20:41GlanzmannTo revert the firmware so that I have hdmi output on the mini again.
20:41svenwe'll probably have to speak the iBoot DCP protocol in m1n1 to make that work
20:43GlanzmannI see. That will be interesting.
20:53Glanzmannsven: I did the following. I deleted the 2.5 GB stub partion, ran the installer again and installed macos 11.4 (first option) after that I have a visual again on the mini.
20:54GlanzmannSo my mini is back usable (m1n1, xorg and so on).
20:54svenyeah, just like i said
20:54Glanzmannsven: I missed that, sorry.
20:54GlanzmannI thought there was no solution so far.
20:55sventhat's hardly a solution
20:55svenit's a workaround at best
20:55GlanzmannI thought once the firmware was updated to 12.1 you could not go back.
20:55sven21:31:37 <sven> but the rest can be downgraded from 1TR
20:55Glanzmannsven: I agree, but it lets me use my device for the time being.
20:55Glanzmannsven: I see.
20:57jmr2 has joined #asahi-dev
20:57jmr2sven: just trying to understand that last bit. The wiki says "iBoot2 (per-OS copy) loads auxiliary CPU engine firmwares from OS APFS Preboot partition".
20:57jmr2There's an exception for SMC/ANS/SEP? Where's the firmware stored for those?
20:57svenexactly
20:57svenANS is stored on the NOR flash
20:58kettenisANS is needed to load firmware from NVMe
20:58svenno idea about the rest but i'd assume the rest is stored in there as well
20:59svenSEP is where all their security is, they probably don't want you to ever downgrade that ;)
20:59jmr2kettenis: It makes a lot of sense once you put it that way.... Woops...
20:59aleasto has quit [Quit: Konversation terminated!]
20:59j`eywhat about custom SEP firmware sven? :P
21:00svensure, just find me a secure boot bypass for that one :P
21:00aleasto has joined #asahi-dev
21:00jmr2I'm wondering whether the NOR flash could be backed-up and restored, but I'd bet that their online authentication would foil that.
21:00aleasto has quit [Remote host closed the connection]
21:00jmr2Once again, thanks !
21:01svenSEP also has (limited) internal non-volatile memory afaik
21:01svenand i'm pretty sure they store a anti-replay counter in there
21:02svenit also doesn't really matter to us. it probably even helps since it means that ANS and SEP will be backward-compatible
21:02j`eysven: https://support.apple.com/en-gb/guide/security/secac71d5623/web "To help prevent replay of any previous LocalPolicy, LLB must look up a nonce from the Secure Enclave–attached Secure Storage Component."
21:02svenah yes, so something even more fancy that just memory :D
21:12Glanzmann has quit [Quit: leaving]
21:19bps2 has quit [Remote host closed the connection]
21:28x56 has quit [Quit: Ծ-Ծ]
21:36jmr2 has quit [Remote host closed the connection]
21:56x56 has joined #asahi-dev
22:12bpye has joined #asahi-dev
22:23bpye has quit [Ping timeout: 480 seconds]
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-dev
23:38marcanyes, it's a secure element
23:38marcanthey used to use a plain EEPROM but that was attackable just like NAND :p
23:38marcanI think SEP firmware is in the iSCPreboot partition though, or at least a copy; not sure if it's in NOR too or not
23:38marcanNOR is pretty small so it might not fit
23:40j`eymarcan: if you missed it, jannau got apple-spi-hid working
23:40slicey has quit [Quit: zzz]
23:40marcansven: you also can't downgrade DCP phase 1 and other things (ATC etc)
23:41marcanwell, I mean, you can with a full restore (then you can downgrade everything)
23:41marcanif you have 12.0+ SFR and an older partition, then on the Mini display will begin to work when iBoot2 boots
23:41marcanthen you get no apple logo :D
23:41marcan(even with macos!)
23:41marcan(just a progress bar)
23:56akemin_dayo has quit [Remote host closed the connection]
23:58akemin_dayo has joined #asahi-dev
23:58blasty has quit [Remote host closed the connection]
23:58blasty has joined #asahi-dev
…