2021-10-03
00:15tylo has joined #asahi-dev
00:18povik has quit [Quit: Page closed]
00:30tylo1 has joined #asahi-dev
00:30tylo has quit [Read error: No route to host]
00:45tylo1 has quit [Ping timeout: 480 seconds]
01:03riker77_ has joined #asahi-dev
01:07riker77 has quit [Ping timeout: 480 seconds]
01:07riker77_ is now known as riker77
02:29robinp has quit [Ping timeout: 480 seconds]
02:35PhilippvK has joined #asahi-dev
02:38phiologe has quit [Ping timeout: 480 seconds]
04:38robinp has joined #asahi-dev
05:36psykose has quit [Remote host closed the connection]
05:36psykose has joined #asahi-dev
06:10austriancoderHi. I should soon get my hands on an M1 and I am interested if someone started to look at audio on the Air? I have some re experience and might want to help out.
06:15ar has quit [Ping timeout: 480 seconds]
06:28nepeat has quit [Ping timeout: 480 seconds]
06:31nepeat has joined #asahi-dev
06:41tylo1 has joined #asahi-dev
06:55tylo1 has quit [Ping timeout: 480 seconds]
07:58ar has joined #asahi-dev
08:02austriancoderj_ey: okay.. thanks.. I think I will find an area to hack on
08:04j_eyaustriancoder: https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/experiments/speaker_amp.py
08:09povik has joined #asahi-dev
08:12povikj_ey: https://gitlab.arm.com/linux-arm/jg-open/-/blob/pinctrl_apple_v2/drivers/pinctrl/pinctrl-apple-gpio.c#L466
08:14j_eyI forgot to clean that bit up, I set npins to 512 too, which is a thing i leftover by accident
08:18j_eythe v2 was a bit rushed, wanted to get it out before I went away and lost access to the m1 for a week
08:20povik> /include/linux/compiler_types.h:322:38: error: call to ‘__compiletime_assert_370’ declared with attribute error: FIELD_PREP: value too large for the field
08:27poviki replaced it with equivalent shift-and-mask expression, but would like to know how to make it go away properly
08:31j_eyIm confused now, how can that be a compile time check... it has FIELD_PREP(REG_GPIOx_MODE_MASK, irqtype), where irqtype is runtime
08:34povikit's strange it hasnt triggered anywhere else, if i patch that that particular expression it builds
08:42tylo1 has joined #asahi-dev
08:53nepeat has quit [Remote host closed the connection]
08:55aleasto has joined #asahi-dev
08:59tylo1 has quit [Ping timeout: 480 seconds]
09:00povikit also compiles if irqtype is s32, but only if i dont comment out the irqtype<0 return branch
09:40nepeat has joined #asahi-dev
09:45povik has quit [Quit: Page closed]
09:52tylo1 has joined #asahi-dev
10:01tylo1 has quit [Ping timeout: 480 seconds]
11:19gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
11:19gabuscus has joined #asahi-dev
11:29nico_32 has quit [Ping timeout: 480 seconds]
11:29nico_32 has joined #asahi-dev
12:48alyssa(I split it up into separate commits, and dropped the useless commits, and now it's a lot smaller.)
12:49nico_32 has quit [Ping timeout: 480 seconds]
12:51nico_32 has joined #asahi-dev
12:58alyssaOkay, I am not sure where that code came from. But it didn't make sense on the surface, made less sense after thinking about it, and then wifi still works fine after dropping the commit.
13:07alyssaNot sure if this dance is necessary and not sure I want to find out without a Faraday cage :-p
13:07marcanwell, you do need the MAC, but maybe there's an easier way since after all linux can change the mac...
13:08alyssaso this is a legitimate hardware/firmware difference and not "macOS does it so Corellium does it so we do it"?
13:08aleasto has quit [Quit: Konversation terminated!]
13:09aleasto has joined #asahi-dev
13:09marcanit stands to reason that since Linux can just outright set the MAC via standard APIs, there might be a way to do it like that without having to add the whole nvram mess
13:09alyssamaz has a commit to do it for Ethernet, and that was a DT-only change and tg3 just 'magically' worked I think
13:09marcanyes, but what I mean is maybe instead of sticking it in nvram you can just call set_mac() on driver startup
13:10alyssaack. I think there will still be some nvram munging but a heck of a lot less than corellium has.
13:10aleasto has quit [Remote host closed the connection]
13:11aleasto has joined #asahi-dev
13:16marcanthat sounds like a prime place to call eth_platform_get_mac_address and do a *set* instead if that is available
13:16aleasto has quit [Remote host closed the connection]
13:16aleasto has joined #asahi-dev
13:17aleasto has quit [Remote host closed the connection]
13:17aleasto has joined #asahi-dev
13:19aleasto has quit [Remote host closed the connection]
13:19aleasto has joined #asahi-dev
13:19marcanbtw, it should be the installer's job to pull the firmware out of osx and into somewhere useful
13:20marcanany ideas? I guess if nowhere else it should go in the FAT32 EFI partition I will (eventually) be setting up
13:20aleasto has quit [Remote host closed the connection]
13:21aleasto has joined #asahi-dev
13:21aleasto has quit []
13:23alyssaThere /is/ a somewhat invovled dance required to /find/ which firmware your hw actually needs, though
13:29aleasto has joined #asahi-dev
13:44jeh[m]Ah! Sorry my bad here! Don't think Apple specifics which chipset they're using but I also assume that should be same across all devices can't say though - they've historically used Broadcom.
13:48alyssajeh[m]: sven: There are a /lot/ of different firmware files in the 4378 directory on macOS
14:01marcancorellium embedded one in their kernel (did they get a license?) and apparently it worked for people? :')
14:03alyssamarcan: If I'm reading the corellium kernel code correctly, I believe they have a pile of hacks in userspace to select the fw, set module parameters to point to it, and then re-load the wifi driver.
14:04vup2 has quit [Remote host closed the connection]
14:05vup has joined #asahi-dev
14:07alyssalike, it seems like a genuine race we lose every time but if so, why isn't every other brcmfmac user in existence broken
14:08alyssaon BCM4378 at least, we get a very early interrupt => NULL dereference in the IRQ handler
14:13alyssameanwhile I'm cranky that I need to build brcmfmac as a module if I don't want to bundle the blob with the kernel ..
14:14nsklfwiw, i have a 2015 mbp, with arch on it, and both the wifi and bluetooth are under performing. especialy bluetooth. although they both 'technically' work, their signal is very poor. bluetooth i must stand within 1meter of the laptop to have functionning headset, and wifi signal reception is poor too. (it's using brcmfmac.. BCM43602)
14:15nsklmarcan: i tested many distro on it since 2015, it was always like that.. well to be fair, in the beginning it was way worse, and today it's barely usable
14:16nskljeh[m]: even if you compare with macos ? for me the signal reception is quite good in macos and not that great in linux
14:17nsklmarcan: my distro of choice is artix (arch without systemd) but i tried plain arch too, and many debian derivatives and tons of other exotic distros
14:17jeh[m]nskl: Yes even compared to macOS! open source broadcom driver is bad that is b43 iirc. broadcom-wl works perfectly fine!
14:20marcanso there are, among all the M1 variants out there so far, 2 actual firmwares (each model symlinks one of those), and then 2 nvram variants for each model
14:21marcanI would just put this info in the devicetree and add some plumbing to brcmfmac to get it from there
14:22marcanalternatively we could just make the installer pull the right variant for *your* machine, but that makes the rootfs nonportable once it gets copied, which is kind of icky
14:29alyssamarcan: ok, stuck the firmware in an initramfs (with nothing else) and passed that to linux.py and built brcmfmac=y and now it's happy
14:29alyssastill stupid that linux can't tell "hmmm I need firmware but have no filesystem maybe I should not try to load that driver before NVMe"
14:34marcanalyssa: so it does look like the specific version info is in OTP only, so we need to copy all nvram variants and then have the driver choose one
14:35marcan-rw-r--r-- 1 root root 1884 Sep 1 06:10 brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
14:37marcanyeah but it's not j274... the devicetree IDs this using a different naming scheme, which is in the ADT, so we ought to follow that unless we want to maintain a mapping table in the installer
14:39marcansince we need a script to copy this over anyway, I guess we should dump out the mapping/symlink stuff in a text file anyway
14:43marcanactually it looks like the nvrams are the same for every module revision, only there are two vendors
14:44marcanI'm thinking we basically want something like brcmfmac4378-pcie.apple,atlantisb-RASP-m-6.2.txt but with fallback requests
14:44marcanso the driver would try brcmfmac4378-pcie.apple,atlantisb-RASP-m-6.2.txt then brcmfmac4378-pcie.apple,atlantisb-RASP-m.txt then brcmfmac4378-pcie.apple,atlantisb-RASP.txt then brcmfmac4378-pcie.apple,atlantisb.txt
14:46marcanso brcmfmac4378-pcie.apple,atlantisb-RASP-m-6.2-X2.txt first, then everything with X2 but removing components, then without X2
14:55marcanyeah, but that doesn't work for us because we have at least two different nvram files per board
14:57ketteniswell, you could just have the installer install the set of files that you actually need
15:04marcanif we can get that from OTP too, it would make this whole scheme work for the x86 macs too
15:16kettenis(that's the license somebody put on the .txt file for some ARM board in the Linux firmware repository)
15:25kettenisanyway, your challenge is to convince the Linux brcmfmac driver maintainers of the firmware naming scheme ;)
15:32minecrellkettenis: There were long attempts to get Broadcom to clarify the licensing for the NVRAM stuff, of course they didn't. The Linaro copyright is basically some strange way around it, they posted some GPL licensed NVRAM and now everyone seems to copy that with some device-specific values (from the "proprietary" config) adjusted
16:19kov has joined #asahi-dev
16:26alyssamarcan: "if we can get that from OTP too, it would make this whole scheme work for the x86 macs"
16:26alyssanone of this works on the T2 Macs so yes they would appreciate a proper solution for this :)
16:31tylo1 has joined #asahi-dev
17:41alyssamarcan: OTOH if we don't care about t2 macs, we could stick all the OTP parsing stuff in m1n1 and just passing the firmware path that way
17:46vup has quit [Ping timeout: 480 seconds]
18:43kettenissigh, I used get_maintainer.pl for v2 of my u-boot upstream diff, but it touches enough code for the list of recipients to get too long for the mailing list :(
19:22confusom1 has joined #asahi-dev
19:51minecrellkettenis: This is mostly get_maintainers.pl being overly verbose though, most of the people you're Cc-ing just added a few lines (e.g. drivers) in the files you're touching (:
21:10vup has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:02yrlf has joined #asahi-dev
22:55aleasto has quit [Quit: Konversation terminated!]