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: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: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: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: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: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:12e1eph4nt has quit [Ping timeout: 480 seconds]
08:21e1eph4nt has joined #asahi-dev
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:43kettenisthe current binding nicely splits hardware description (main node) from the firmware-provided functionality (sub-nodes)
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: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: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: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:49CatDentures has quit [Quit: Konversation terminated!]
08:53CatDentures has joined #asahi-dev
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: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:59svenhttps://github.com/torvalds/linux/blob/master/drivers/usb/typec/tcpm/fusb302.c#L1659 i think
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: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:29e1eph4nt has quit [Ping timeout: 480 seconds]
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: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: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:04e1eph4nt has quit [Ping timeout: 480 seconds]
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:59e1eph4nt has quit [Ping timeout: 480 seconds]
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: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:24povikthis will probably be in the asahi-dev channel of the reference distro, when the merge is done
13:25e1eph4nt has joined #asahi-dev
13:27leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:30leitao has joined #asahi-dev
13:30mipi[m] has left #asahi-dev [#asahi-dev]
13:37jannauthere's already a PKGBUILD: https://archlinuxarm.org/packages/any/alsa-ucm-conf/files/PKGBUILD
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:51jannauand the package manager should handle file collision gracefully once the configs are moved to upstream
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:19jim has joined #asahi-dev
14:19leitao has joined #asahi-dev
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: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:44_jannau_they are afaik not merged, someone complained about the size of the patcset 30-40 patches
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:47marcanthe actual support series is 29 patches and I never resubmitted it after the fixes part went in
15:48_jannau_original submission (v2) was https://lore.kernel.org/all/20220104072658.69756-1-marcan@marcan.st/
15:49marcanhttps://lore.kernel.org/all/20220117142919.207370-1-marcan@marcan.st/ this was the fixes series that did go in
15:51marcanas I explained in my original submission, the series was incremental and could be merged in chunks / reviewed as such
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: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: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:55marcanunfortunately, special snowflake rules really don't help people who want to contribute...
15:55rmkso, were all the review comments from that submission addressed, or do I need to go through the last submission?
15:56marcanI *think* it was all addressed and the review tags applied. At least I have everything marked as done here.
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: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: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:57marcanyeah, that was a BUG_ON() basically because if it fires someone did something very wrong with that driver
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:16jannaupovik: https://github.com/jannau/PKGBUILDs-1/commit/ed5bc7158f8b75289692baf6b0ab05e1e7241469
18:31e1eph4nt has quit [Remote host closed the connection]
18:32e1eph4nt has joined #asahi-dev
18:40e1eph4nt has quit [Ping timeout: 480 seconds]
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: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