#
…

2022-09-06

00:07e1eph4nt has quit [Ping timeout: 480 seconds]
00:26blazra[m]j`ey: I have played a bit with the PWM control register bits (for the keyboard backlight) and I think that bit2 is stopping the counter and then you can start just one PWM period using bit9 (like a single-shot mode).
00:26blazra[m]Maybe we can add these to the list of bits we "know" what they do :D
00:27blazra[m]Although I am not sure if any of this is actually useful for a driver which controls keyboard backlight.
00:28e1eph4nt has joined #asahi-dev
00:36e1eph4nt has quit [Ping timeout: 480 seconds]
00:41off^ has joined #asahi-dev
01:00e1eph4nt has joined #asahi-dev
01:08e1eph4nt has quit [Ping timeout: 480 seconds]
01:17e1eph4nt has joined #asahi-dev
01:25e1eph4nt has quit [Ping timeout: 480 seconds]
01:27e1eph4nt has joined #asahi-dev
02:38e1eph4nt has quit [Ping timeout: 480 seconds]
03:00skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:04e1eph4nt has joined #asahi-dev
03:12e1eph4nt has quit [Ping timeout: 480 seconds]
03:20marcanblazra[m]: excellent! it's not useful for a keyboard, but documenting bits is important since it means our understanding of the hardware is more complete and we avoid magic numbers :)
03:21e1eph4nt has joined #asahi-dev
03:53atipls has joined #asahi-dev
04:03chadmed_ has joined #asahi-dev
04:18atipls has quit [Remote host closed the connection]
04:23atipls has joined #asahi-dev
04:25eshmaki has joined #asahi-dev
04:34CatDentures has joined #asahi-dev
04:45atipls has quit [Quit: My laptop probably went to sleep.]
05:43e1eph4nt has quit [Ping timeout: 480 seconds]
05:46e1eph4nt has joined #asahi-dev
05:54e1eph4nt has quit [Ping timeout: 480 seconds]
05:55e1eph4nt has joined #asahi-dev
06:03e1eph4nt has quit [Ping timeout: 480 seconds]
06:10e1eph4nt has joined #asahi-dev
06:18e1eph4nt has quit [Ping timeout: 480 seconds]
06:19Glanzmann has quit [Quit: leaving]
06:26e1eph4nt has joined #asahi-dev
06:26the_lanetly_052__ has joined #asahi-dev
06:37chadmed_ has quit [Quit: Konversation terminated!]
07:02duban has quit [Quit: I'm out]
07:02duban has joined #asahi-dev
07:23j`eyblazra[m]: nice!
07:26j`eyblazra[m]: if you find out anything else let me know!
07:30povikcould BIT(10) we a blanket invert?
07:30poviks/we/be
07:37dottedmagblazra[m]: I wouldn't be surprised if this is just a copy-paste from, say, iphone buzzer
07:38e1eph4nt has quit [Ping timeout: 480 seconds]
07:41blazra[m]povik: I don't know what that means exactly. However, bit(10) works only in single-shot mode - it didn't do anything in continuous. But maybe it needs reload using bit(5)? I don't know. I can try again after work.
07:47poviki mean, does that simply invert the pwm output
07:47povikbut it seems like it doesn't from what you write
07:47povikmimochodem, zdravím!
07:50blazra[m]taky zdravím :D
07:50rmkmarcan: I've just spotted some other issues in the gpio irq code - there's a few places where X > MAX_GPIO is tested to determine whether X is a valid gpio number - I believe they should be >= MAX_GPIO, since the range is 0..63 with 64 being excluded.
07:50marcanrmk: good catch
07:51rmkoh and good morning :)
07:51marcangood morning :)
07:51marcanqueuing up some local system maintenance to run while I go into kernel merge mode
07:51AnushervonTabarov[m] has quit [Quit: Client limit exceeded: 20000]
08:02* rmkkeeps typing "macsec" rather than "macsmc"... clearly I've spent too much time in networking stuff recently :/
08:03e1eph4nt has joined #asahi-dev
08:07marcanincidentally, I'm not a super fan of the name, but "applesmc" was taken and I couldn't come up with anything better
08:07marcaneven though it's kind of backwards, since "applesmc" only works on Macs while macsmc could hypothetically work on iOS devices
08:08rmkI don't think we should care about it too much at this point
08:09rmkI mean, it's more important to try to get this upstream so that mainline gains functionality on these platforms
08:10the_lanetly_052__ has quit [Ping timeout: 480 seconds]
08:10marcanof course, just commenting :)
08:10marcanmacsmc works
08:12e1eph4nt has quit [Ping timeout: 480 seconds]
08:13j`eywhat tree/subsystem does this go through? arnd's?
08:21e1eph4nt has joined #asahi-dev
08:23rmkI think it'll go through LinusW's gpio tree
08:36leitao has joined #asahi-dev
08:37rmkkettenis: how big a problem would it be if we merged the SMC sub-nodes so they were all under the main "smc" node? Could OpenBSD check for the presence of e.g. the "gpio" node and if it's not present, just use the "smc" node?
08:42ketteniswe could, but it requires a 6 month transition period
08:42kettenisalso, I think it is a bad idea
08:43kettenisthe current binding nicely splits hardware description (main node) from the firmware-provided functionality (sub-nodes)
08:45kettenisthe problem is that the smc gpio is needed for wifi
08:45marcanyeah, I don't like the idea of merging everything into one node
08:45marcanwhile it's true that it's all "the same hardware", it is an mfd after all, and it makes sense to split off individual pieces of functionality into individual nodes in my opinion
08:45marcanthink of it as "firmware services"
08:46marcanworth noting that macos *doesn't* do this and their device tree is a mess ;)
08:46kettenisif there are good technical reasons for doing this I have no issues with changing openbsd and coming up with some sort of transition mechanism for asahi/openbsd
08:46marcanbut they have that arbitrary function call mechanism that lets them hack around stuff instead of thinking about how to provide proper bindings
08:47marcanalso, there is one extra detail: node absence can be used to gate probing, for things where that makes sense
08:47marcanso I would very much prefer subnodes + compatibles over just merging everything
08:48marcanalso, there *is* a hardware angle
08:48marcangpio right now is master PMU GPIO
08:48kettenisrobh's motivation seemed to be that the subnodes nly contained one or two properties
08:49marcanthe slave PMU also has GPIO and SMC exposes a couple pins there. we don't implement that since I don't think we'll ever need it on current machines, but if we ever do, that should be a separate gpio node
08:49kettenisbut gpio may get the interrupt-related properties
08:49marcanand then we have two gpio nodes
08:49rmkI don't see number of properties should have a bearing on how something is described
08:49marcanyeah, I even have some empty nodes IIRC in the MTP binding since they describe HID interfaces
08:49kettenismarcan: right I saw some hints for a "second" gpio controller in the list of enumerated keys
08:49marcanyup, that's the second PMU
08:49CatDentures has quit [Quit: Konversation terminated!]
08:50marcandifferent key prefix, so different driver instance makes sense IMO
08:50marcaninstead of trying to add a dimension or something
08:50marcannot going to bother until we need it, but we have to consider the possibility
08:51marcan#1201: gP18 = (ui32, 0xf0) 862549252
08:51marcan#1202: gP19 = (ui32, 0xf0) 862549252
08:51marcan#1203: gP1a = (ui32, 0xf0) 862549252
08:51marcan#1205: gp0b = (ui32, 0xf0) 862549252
08:51marcan#1204: gp08 = (ui32, 0xf0) 862549252
08:51marcan#1206: gp0e = (ui32, 0xf0) 862549252
08:51marcangP?? is MPMU, gp?? is SPMU
08:51marcan(apple terminology fwiw)
08:53CatDentures has joined #asahi-dev
08:54marcanrmk: re compatibles, one thing to consider is how this will probe on non-OF platforms
08:54marcanright now the idea is that the services shared with x86 machines (e.g. hwmon) wouldn't have a hard requirement on a DT node, and we just check at probe time whether they exist in the SMC
08:55marcanas long as we can hard-code a list of compatibles (or some similar logic) to trigger probing on non-OF platforms that works for me
08:56svenpretty sure I’ve seen stuff like that in various places
08:57svennot exactly the same but the last thing I saw was in the typec subsystem: something created graph connections between fake fwnodes to make the core happy
08:59rmkmarcan: one point Rob missed is that the reason it works today is that module autoloading and binding has mechanisms outside of firmware to do it - with platform drivers, that's driver name to device name matching and modaliases that can match
09:00marcanyup, that all works with mfd already without compatibles
09:00marcanthat was how I designed it :)
09:01marcan(and that approach works on x86 too)
09:02marcanI made a point to build everything practical as modules on our arch images (though macsmc-gpio and deps aren't because that's a hard dep of the framebuffer via backlight-gpios, but all the other smc sub-drivers are)
09:02marcan(that fb dep will go away once DCP is in and we stop supporting/depending on dumb GPIO backlight support
09:06leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:09c10l has quit [Quit: Bye o/]
09:09c10l has joined #asahi-dev
09:12jluthra has quit [Remote host closed the connection]
09:12jluthra has joined #asahi-dev
09:14leitao has joined #asahi-dev
09:27marcanaside: confirmed that btcoex is reproducibly terrible with my Sony earbuds, and the code I wrote yesterday doesn't fix it (maybe helps a bit?)
09:27marcanso, more research needed :p
09:29e1eph4nt has quit [Ping timeout: 480 seconds]
09:30svenmaybe it actually needs something on the bt side as well then?
09:30sveni should update that BT tracer with that new pcie tracer you wrote
09:32armarcan: on different (non apple) hardware, my worst btcoex experience was with sony headphones on ldac codec (chosen only because of bandwidth usage/bitrate in this case) while wifi was in ap mode on 2.4GHz radio
09:33marcansven: yeah, I was wondering. but I also need to make sure I didn't screw the wifi side up nor miss anything :)
09:34marcanar: ha, good point. it's LDAC that does it, why my speakers were okay
09:34marcanit's about as bad as the speakers on SBC, maybe a bit worse
09:34marcanon LDAC it just dies, completely, when the wifi is on 2.4
09:35marcanI wonder if Apple does anything special in LDAC mode (do they even support it?)
09:35arafaik ios/macos don't support ldac
09:37marcanSBC is still worse than the speakers so that would still be a usable test
09:37CatDentures has quit [Quit: Konversation terminated!]
09:40CatDentures has joined #asahi-dev
09:55e1eph4nt has joined #asahi-dev
09:56skrzyp has quit [Remote host closed the connection]
10:00marcanlol, there is a patent
10:00marcansven: this implies there is a BT-side btc_mode (though that var is in the wlan nvram, but maybe at runtime it comes from BT?)
10:01svenI didn’t see anything specific but there are lots of vendor specific commands that macOS sends
10:02marcanthe nvram defaults to btc_mode=1 which is lowprio for a2dp, not good
10:02marcanlet me try just patching that...
10:02marcan(assuming this is the same btc_mode)
10:04e1eph4nt has quit [Ping timeout: 480 seconds]
10:05marcanhmm, nope
10:21e1eph4nt has joined #asahi-dev
11:05atipls has joined #asahi-dev
11:06leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:37e1eph4nt has quit [Ping timeout: 480 seconds]
11:45e1eph4nt has joined #asahi-dev
11:52leitao has joined #asahi-dev
12:45povikmarcan: doing the merge? i could exchange mca driver for the exact version in linux-next, and do one other thing
12:47povikor not, the diff is just formatting of the head comment :D
12:57marcanpovik: going to do it nowish (today has been full of distractions...)
12:57marcanso feel free :)
12:59e1eph4nt has quit [Ping timeout: 480 seconds]
13:06povikyou know what you will be basing on?
13:09jannauI'd guess rc4, I haven't seen any conflicts since rc1 so keeping that as base for the bits/branches shouldn't be an issue
13:09e1eph4nt has joined #asahi-dev
13:10povikok, i will base it on rc4 on my end
13:10poviksome of the fixes could have made it in
13:17e1eph4nt has quit [Ping timeout: 480 seconds]
13:19leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:20leitao has joined #asahi-dev
13:21povikpushed and doing a test build
13:21povikgot couple 'patch contents already upstream', always a nice sight
13:24mpsdo we have new kernel to build for distros end users, or it is still development
13:24povikthis will probably be in the asahi-dev channel of the reference distro, when the merge is done
13:24povikso a new 'testing kernel' i guess
13:24povikor rather the 'testing testing kernel' :p
13:25e1eph4nt has joined #asahi-dev
13:25povikbuild seems ok, let's find headphones with a mic
13:27povikit passed my superficial QA
13:27mpspovik: which branch?
13:27leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:29povikmarcan: i say it's ready to merge before i find some other nit for me to improve on it
13:30leitao has joined #asahi-dev
13:30mipi[m] has left #asahi-dev [#asahi-dev]
13:30mpspovik: thanks
13:31poviklook how many faces showed up on the PR in the right bar when i rebased to rc4 :D
13:31povikcrowded
13:31j`eypovik wants to merge 1,211 commits into"
13:31j`eyyouve been busy :P
13:32povikwell... what can i say, they are small commits
13:32mpsyes, a lot
13:34marcanpovik: thanks!
13:34poviknow let's write the UCM
13:34povikdoes anyone volunteer to write the PKGBUILD for it?
13:36povikmarcan: i think we want a fork ^ under AsahiLinux
13:38povikyeah, we need to point it to our source
13:39povikah, great, it can take an archive directly off github
13:40poviknot sure how github feels being a CDN for everything
13:42mpsiirc there is separate ucm PKGBUILD for gru-kevin chromebook on alarm
13:42mpsmaybe it could be used as template for asahi UCM
13:43povikthe UCM itself i have written for mini already, now i should extrapolate
13:48jannauan asahi specific ucm pkg would be easier to handle. no race for the highest package version when the alarm pkg is updated
13:49poviki think it's the only sane option until the kernel driver is upstream
13:49povikthen the ucm should head upstream too
13:50povikjannau: or had you in mind some patch/overlay as an alternative?
13:51jannauand the package manager should handle file collision gracefully once the configs are moved to upstream
13:51jannaupovik: I had an overlay in mind which would only contain the asahi specific files
13:51povikah, you mean not forking the package, but an additional package with the asahi configs
13:52jannaualsa-ucm-conf-asahi which contains just the asahi configs
13:52mpsI'll do same for alpine
13:53jannauif it depends on something in alsa-ucm-conf it should just depend on the package
13:57poviksounds good to me
13:57povikit does depend on the top dispatch configs in alsa-ucm-conf
13:58povikthey refer to lower-level configs based on card models
14:06povikthat is some speed on the smc v2 patchset
14:06povikit's not even an hour old and there's a whole bunch of tags on it
14:06povikrmk: do you do upstreaming-as-a-service? :p
14:07j`eyaudio probably isnt a priority :P
14:10leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:15rmkpovik: Oracle has asked me to help you guys get this stuff upstream - ultimately, they want Oracle Linux running on the M1, so eventually that also means their UEK kernels as well. That's what is behind my involvement with this effort.
14:16CatDentures has quit [Ping timeout: 480 seconds]
14:17atipls has quit [Quit: My laptop probably went to sleep.]
14:18leitao has joined #asahi-dev
14:18leitao has quit []
14:19povikah, interesting
14:19poviki thought it's your personal initiative
14:19poviknice that you are getting paid for it then
14:19jim has joined #asahi-dev
14:19leitao has joined #asahi-dev
14:20svenhah, nice!
14:32e1eph4nt has quit [Ping timeout: 480 seconds]
14:32jim has quit [Quit: Konversation terminated!]
14:37off^ has quit [Remote host closed the connection]
14:40leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:41leitao has joined #asahi-dev
14:42e1eph4nt has joined #asahi-dev
14:43leitao has quit []
14:50e1eph4nt has quit [Ping timeout: 480 seconds]
14:51leitao has joined #asahi-dev
14:51svenalright, will send https://github.com/AsahiLinux/linux/commits/bluetooth-v2 as bluetooth v2 tomorrow
14:53leitao has quit []
14:58leitao has joined #asahi-dev
15:01e1eph4nt has joined #asahi-dev
15:01mpspovik: thanks
15:06povikit goes with the new kernel and i expect we will find bunch of issues to fix in it
15:07povikbut we can start writing the packages at least
15:08mpswhen the new things are merged in kernel I will test UCM with it
15:10e1eph4nt has quit [Ping timeout: 480 seconds]
15:17e1eph4nt has joined #asahi-dev
15:43rmkis there a story behind the brcmfmac patches? I see LinusW has acked them at some point. Have they already been merged?
15:43* rmkchecks the net-next tree...
15:44_jannau_they are afaik not merged, someone complained about the size of the patcset 30-40 patches
15:45rmkI count 12 patches, including the dt-binding update and dts update
15:45_jannau_it was then splitted and only the first preparation set was sent but not merged
15:46marcanI think it was merged?
15:46marcanthat was the fixes series
15:46marcanand I never got around to sending the rest because the reaction to the submission got me in a bad mood and I moved onto other things
15:47rmkdoesn't seem to be in net-next
15:47marcanthe fixes have been merged for a while
15:47marcanthe actual support series is 29 patches and I never resubmitted it after the fixes part went in
15:48rmkwhat I'm using here are:
15:48rmkarm64: dts: apple: Add WiFi module and antenna properties
15:48rmkbrcmfmac: pcie: Add IDs/properties for BCM4378
15:48rmkbrcmfmac: firmware: Handle per-board clm_blob files
15:49rmkdt-bindings: net: bcm4329-fmac: Add Apple properties & chips
15:49rmkwhich seems to be enough to get it functional (along with the gpio and pcie patches)
15:50marcanrmk: if your device has a 4378, you don't need the patches after that
15:51marcanas I explained in my original submission, the series was incremental and could be merged in chunks / reviewed as such
15:51rmkmine's the mini m1
15:51marcanand what I got back from the maintainer was "if you don't send it in chunks it will go to the bottom of my pile"
15:51marcanyeah then you don't care about newer chips
15:52marcanhttps://lore.kernel.org/all/87fspvln3u.fsf@tynnyri.adurom.net/ that reply was what made upstreaming this drop to the bottom of *my* queue ;)
15:52rmkthat's a common requirement for netdev (which is one reason why I have more patches in my tree for phylink than I can get into mainline...)
15:52marcanas is reverse christmas tree, as I found
15:52marcan(and the funny comment style)
15:53marcannetdev seems to be rather special
15:53rmknetdev is special, it has its own different rules
15:53marcanI'm working on wifi right now, so I was thinking of finally resubmitting this soon (with even more stuff tacked on, but maybe in chunks this time *sigh*)
15:54rmkdavem, being the second Linux developer, has a lot of say on how networking is treated
15:54rmkor at least I think he was the 2nd.
15:54rmkit's annoying that it's different, but...
15:55marcanunfortunately, special snowflake rules really don't help people who want to contribute...
15:55marcananyway, I have a meeting in 5 minutes ;)
15:55rmkso, were all the review comments from that submission addressed, or do I need to go through the last submission?
15:55rmkme too. it's not the same meeting is it? I hope not, its supposed to be a 1:1 :D
15:56marcanI *think* it was all addressed and the review tags applied. At least I have everything marked as done here.
15:56marcanI hope not! :D
15:56marcananyway, feel free to submit up to 4378 if you want
15:56rmkok, let me see what happens when I resubmit it in a bit.
15:56marcandon't bother with the dt changes of course, since that depends on the pcie power thing
15:57marcanI'll be redoing that next
15:57marcansince yesterday I discovered how to put these chips to sleep finally :)
15:57marcanand we already had a discussion on how to do the power-enable stuff (differently to how it's done now)
15:57kettenisnote that according to the leaked schematics the gpio actually control an internal regulator
15:58kettenisso modelling it as a PCIe voltage rail (if that is the proper terminology) would be kinda wrong...
15:58leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:00leitao has joined #asahi-dev
16:24e1eph4nt has quit [Ping timeout: 480 seconds]
16:33e1eph4nt has joined #asahi-dev
16:43rmkmarcan: that BUG_ON() in brcmf_fw_add_macaddr() probably ought to be cleaned up, that causes a checkpatch to complain, and will get picked up by netdev folk (patchwork runs checkpatch on submissions and flags stuff)
16:46rmkmaybe also scnprintf() rather than snprintf() for the number of characters actually written to the buffer?
16:47rmkbut I think the question is - why must snprintf() return exactly BRCMF_FW_MACADDR_LEN characters?
16:49leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:54marcanrmk: because the nvram buffer is sized to be able to hold exactly that many extra characters for the MAC address (in the worst case), and either way the format string should be constant length, so any discrepancy there means someone introduced a bug
16:54marcanit's impossible for that BUG_ON to fire unless someone screwed up the code later
16:55marcanI added that after a review discussion with our friend Andy where he claimed the existing code was somehow error-prone
16:56leitao has joined #asahi-dev
16:56leitao has quit [Remote host closed the connection]
16:56marcannobody else commented on that, so if you want to drop the BUG_ON, I don't care; it wasn't in v2 either
16:56rmkoh dear
16:56leitao has joined #asahi-dev
16:57rmkyea, BUG_ON() is generally not a great idea, because it panics the kernel, and if it were to fire, it means users struggle to know why their kernel doesn't boot!
16:57rmkand Linus T doesn't like it being used as an assert() replacement
16:57marcanyeah, that was a BUG_ON() basically because if it fires someone did something very wrong with that driver
16:57marcanbut feel free to remove it or replace it with something else
16:57marcan(to be fair, he had some actual useful feedback that patch series - this wasn't one of them, though)
17:28leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:54SSJ_GZ has joined #asahi-dev
18:17jannaualsa-ucm-conf-asahi PKGBUILD
18:19povikwoo! thanks
18:26mpsjannau: also thanks, will make it for alpine using your PKGBUILD as template
18:31e1eph4nt has quit [Remote host closed the connection]
18:32e1eph4nt has joined #asahi-dev
18:40e1eph4nt has quit [Ping timeout: 480 seconds]
18:41mpsjannau: built it for alpine, thank you
18:42mpswill not yet push it to official repo, first need some time to test it
18:42mpsI mean, alpine repo
18:43jannauyou also need a kernel which doesn't exist yet
18:44mpsjannau: yes, waiting for it
18:49e1eph4nt has joined #asahi-dev
19:54e1eph4nt has quit [Ping timeout: 480 seconds]
19:58e1eph4nt has joined #asahi-dev
20:12e1eph4nt has quit [Ping timeout: 480 seconds]
20:16e1eph4nt has joined #asahi-dev
21:09jannaupovik: it seems work with pipewire
21:13JohnTaylor[m] has joined #asahi-dev
21:13JohnTaylor[m] is now known as cyphh[m]
21:18IcaroDextris[m]<jannau> "povik: it seems work with..." <- Don’t know if can help but pipewire made my AirPods Pro works fine
21:25atipls has joined #asahi-dev
21:39SSJ_GZ has quit [Ping timeout: 480 seconds]
22:23johey_ has joined #asahi-dev
22:27johey has quit [Ping timeout: 480 seconds]
22:34e1eph4nt has quit [Ping timeout: 480 seconds]
22:57atipls has quit [Quit: My laptop probably went to sleep.]
22:58e1eph4nt has joined #asahi-dev
22:58Manouchehri has joined #asahi-dev
23:06e1eph4nt has quit [Ping timeout: 480 seconds]
23:25zamadatix has joined #asahi-dev
23:25riker77 has quit [Ping timeout: 480 seconds]
23:31zamadatix has quit [Quit: Leaving]
23:33riker77 has joined #asahi-dev
23:35e1eph4nt has joined #asahi-dev
23:39Race has joined #asahi-dev
…