#
…

2021-11-23

00:02gladiac is now known as Guest6553
00:02gladiac has joined #asahi-dev
00:04gladiac is now known as Guest6554
00:04gladiac has joined #asahi-dev
00:07Guest6553 has quit [Ping timeout: 480 seconds]
00:10Guest6554 has quit [Ping timeout: 480 seconds]
00:39gladiac is now known as Guest6556
00:39gladiac has joined #asahi-dev
00:45Guest6556 has quit [Ping timeout: 480 seconds]
01:12gladiac is now known as Guest6559
01:12gladiac has joined #asahi-dev
01:15gladiac is now known as Guest6560
01:15gladiac has joined #asahi-dev
01:18Guest6559 has quit [Ping timeout: 480 seconds]
01:21Guest6560 has quit [Ping timeout: 480 seconds]
01:50gladiac is now known as Guest6563
01:50gladiac has joined #asahi-dev
01:56Guest6563 has quit [Ping timeout: 480 seconds]
02:39gabuscus_ has joined #asahi-dev
02:46gabuscus has quit [Ping timeout: 480 seconds]
02:49Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
02:54gladiac is now known as Guest6569
02:54gladiac has joined #asahi-dev
03:00Guest6569 has quit [Ping timeout: 480 seconds]
03:01skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:14PhilippvK has joined #asahi-dev
03:18phiologe has quit [Ping timeout: 480 seconds]
03:50kov has quit [Quit: Coyote finally caught me]
04:25gabuscus has joined #asahi-dev
04:25gabuscus_ has quit [Read error: Connection reset by peer]
04:40loki_val has joined #asahi-dev
04:43crabbedhaloablut has quit [Ping timeout: 480 seconds]
05:07kov has joined #asahi-dev
05:10chadmed has quit [Quit: Konversation terminated!]
05:28yuyichao_ has joined #asahi-dev
05:37daniels has quit [Ping timeout: 480 seconds]
05:38daniels has joined #asahi-dev
05:41marcanjannau: so that's fun. i2c3 times out on j274-1gbe.
05:42marcanwhat ends up happening is a mystery bit 30 lights up in XFSTA (doesn't exist on pasemi), and the transfer state machine never moves at all
05:42marcanI compared registers and can't find any differences with the other instances; I also tried a reset via PMGR but that didn't work
05:42marcanI suspect it's missing a clock, but I can't find per-i2c clock regs anywhere
05:48VinDuv_ has joined #asahi-dev
05:50marcanoh, it's the hardware, lol
05:51marcanjannau: so on non-1gbe mac minis, the i2c port is weakly pulled down, which jams the bus
05:51marcanif I turn on the GPIO strong pull-up on sda/scl, that unjams it
05:52VinDuv has quit [Ping timeout: 480 seconds]
05:52VinDuv_ is now known as VinDuv
05:53marcanweak does it too
06:29jannaufun. given that the 1ge mac mini is more common it would make sense to disable it by default on j274 and enable it only if present in the ADT
06:33marcanwell, if I make a generic "disable things not in the ADT" function, we can just enable it by default
06:33marcancould migrate the dwc3 logic to that
06:37jannauit would work but the stealed usb device is somewhat of a special case. We would not expect random devices from the ADT missing
06:38jannauit would make sense to document known HW differences in the dts
06:39jannauotoh verification that the ADT matches what we expect wouldn't be a bad idea
08:10kettenisenabling/disabling hardware in the DT based on what hardware is actually configured/present is standard practice
08:11kettenisfor example on the various rasberry pi boards or the Turris MOX
08:12austriancoder has quit [Read error: Connection reset by peer]
08:13austriancoder has joined #asahi-dev
09:02Dcow has joined #asahi-dev
09:08chadmed has joined #asahi-dev
09:34crabbedhaloablut has joined #asahi-dev
09:36gabuscus has quit [Ping timeout: 480 seconds]
09:37loki_val has quit [Ping timeout: 480 seconds]
09:41loki_val has joined #asahi-dev
09:44crabbedhaloablut has quit [Ping timeout: 480 seconds]
10:34minecrell has quit [Quit: :( ]
10:47kenzie41 has quit []
10:48kenzie41 has joined #asahi-dev
11:16minecrell has joined #asahi-dev
11:27minecrell has quit [Quit: :( ]
11:30minecrell has joined #asahi-dev
11:38povikmodified my m1n1 to ignore payload if connected to a usb host
11:38povikso i don't need to pay 1TR a visit to switch linux/proxy
11:56Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
12:05gabuscus has joined #asahi-dev
12:09Dcow has joined #asahi-dev
12:16chadmed has quit [Quit: Konversation terminated!]
12:51mini has quit [Quit: ZNC closing...]
12:53mini has joined #asahi-dev
13:05marcanpovik: not exactly how I'd do it, but I like the concept. I'll probably do something like that on top of the verbose flag gate once we start shipping this with u-boot pre-bundled
13:26nkaretnikov has quit [Read error: Connection reset by peer]
13:26nkaretnikov has joined #asahi-dev
13:36Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
13:52WhyNotHugo has quit [Read error: Connection reset by peer]
13:52WhyNotHugo has joined #asahi-dev
14:03aleasto has joined #asahi-dev
14:15Dcow has joined #asahi-dev
14:15Dcow has quit []
14:33jbowen has joined #asahi-dev
14:33marcanjannau: pushed a change to disable the missing i2c devices (and it's generalized, so I use it for USB too and got rid of the old function for that)
14:36marcan... whoops, broke the build, but apparently not with my compiler. repushed.
14:37yuyichao_ has quit [Ping timeout: 480 seconds]
14:54yuyichao_ has joined #asahi-dev
15:10_jannau_I would have simply disabled the i2c busses by default until we have a target using bus. This would have postponed this problem until someone starts implementing lights out management for the 10ge mac mini
15:13Dcow has joined #asahi-dev
15:13maz*blink* does the 10GbE mini have LOM?
15:20maz"PowerON, PowerOFF, Reset". that's a pretty limited LOM, but hey, I'd take that.
15:24svenand that obviously requires a fancy protocol! "The Controller in turn sends the command to the Mac Pro or Mac mini using a secured and proprietary protocol."
15:25dottedmag"slapped a signature on it and didn't bother documenting"
15:26marcanI think there's AOP I2C to it, so in principle they could implement fancier stuff
15:27marcan_jannau_: hey, you know we shave all the yaks over here ;)
15:27mazsven: yeah, that. yet another thing to RE, and I'm not holding my breath. Nothing a controlled PDU can't work around.
15:27marcanhave I ever shared that comment my old boss wrote on the whiteboard when I was at Google with this crowd?
15:29marcanspeaking of yaks shaved, I think I'm done with almost the ones I wanted to shave before sending the PMGR series
15:29marcanthere's one more potential one
15:30marcansven: think it's worth throwing PMGR reset support into the rtkit/ans stuff, so we can recover from a wedged ANS and exercise that feature in the pmgr stuff?
15:30sveninto ans, yes
15:31sveni'm working on a nvme driver that actually uses it
15:31marcanfwiw, I added shutdown support to the m1n1 client stuff; tested with SMC at least a few times until it crashes with an overflow (I think we aren't fully initializing/polling something)
15:31marcansven: the reset stuff?
15:32svenyeah. and also doing some other stuff in a saner way and getting rid of all the PCI cruft
15:32marcandid you actually try using it yet? if so that's good enough for me
15:32marcanjust want to know the code isn't made of fail :)
15:33svenuh, maybe. i can try later
15:33sveni have code in there, i just don't remember if I actually tries with a DT that uses it
15:33sven*tried
15:33marcangot a branch>
15:33svennot really. right now it crashes just after initializing the admin queue
15:34sveni'll give it a try after $work
15:34marcanI'll get the pmgr branch ready then, as soon as you give me the OK on that I'll fire it off
15:34marcan(probably when I wake up tomorrow)
15:34svensounds good to me
15:35marcanoh also, the m1n1 rtkit stuff now parses crashlogs partially
15:35marcanat least the message and mailbox log and some misc stuff
15:35svenah, nice
15:35sveni've just been reading them using xxd :D
15:35marcanyeah, same, but you know :p
15:35svenyeah, it's useful
15:36marcanI was hoping to be able to crash DCP early enough to get a nice log of everything iBoot does, but it doesn't quite fit in 128 entries :(
15:36marcanthough I have mostly figured out that it initializes about 4 of the EPIC endpoints (the ones we haven't looked at yet beyond the ring buffer...), and one of them, DISP0 I believe, is actually the iBoot protocol
15:36marcan(yay confusing name)
15:37marcanso if it comes down to it, we can *probably* implement a client for that in m1n1 to kick the display on the Mac Mini
15:37marcanshouldn't be as insane as the DCPEP stuff, but we'd still need the RTKit parts...
15:37svenunrelated, but fwiw SMC actually isn't reset by iBoot but just put into some low power state
15:37marcanyes, that's what I do now in m1n1
15:37marcanthe .stop() thing
15:37marcansame with DCP
15:37svensounds good
15:38marcanit actually sends the start command with another arg, which I guess makes that command the "set power/mode" command
15:38sven0x6 and 0xb
15:38svenor something like that
15:38marcanb is for syslog, yeah
15:38svenboth of them are somehow power state related
15:38svenpretty sure 0x6 is for the co-processor
15:39sveni think 0xb is to report the AP power state
15:39marcanwe have 6 as "start" and b as "start syslog" but that might be total BS
15:39svenyeah :D
15:39svensee -re
15:42svenso i think we should remove the "poke the CPU START" bit out of the rtkit library
15:42marcanor at least make it a separate function
15:42sventhe thunderbolt processors don't even have it
15:43svenso maybe just have a function to poke that bit and another function to wake up SMC or something like that
15:43marcanI also do wonder if DCP can actually be reset properly
15:43svenoh, and ANS firmware text also seems to be inside the same region the DCP firmware also uses. it's just the data section that seems to be inside the region that SErrors if we try to read it
15:43marcanmakes sense
15:44marcanand yeah, I thought so
15:44marcanwhich also means we can also *censored*... :p
15:44svenyup :D
15:45marcan(I still don't understand why they lock down DCP firmware and then put the entire data section in writable memory...)
15:45sveni guess i should push my current rtkit changes somewhere if you want to start with SMC
15:45marcanplease do
15:46svenat least those work and don't crash anything :>
15:46sveni'll push them later as well then
15:46marcanalso, I don't think SMC is even in a low power state?
15:46marcanit has to keep running even without the OS
15:46marcanin fact it dies a bad death on t6000 if I kill SPMI
15:46marcanthough that might've been when I was initializing it...
15:46svenhrm, do you remember which command iBoot sends?
15:47svenmaybe it just uses 0xb which may just be "notify co-processor that AP power state is 0x0 now" and maybe that disables all messages it tries to send?
15:47sven0x0 is completely shut down and requires a hard reset but 0x10 allows recovery by just sending that wake-up message
15:48marcanfor DCP it does this (you have to imagine the directions)
15:48marcan #104 @ 0x7ab9b39 ep= 0x0 0xb0000000000010
15:48marcan #105 @ 0x7aba484 ep= 0x0 0xb0000000000010
15:48marcan #107 @ 0x7ac0268 ep= 0x0 0x70000000000010
15:48marcan #106 @ 0x7abfb8d ep= 0x0 0x60000000000010
15:48marcanafter having stopped all the EPs
15:48svenhrm, so it uses both
15:48marcanfor SMC, let's see
15:48sveniirc for ANS it uses 0x6 but with power state = 0x0
15:49marcanSMC is the same as DCP
15:49marcanit doesn't even bother shutting down the EP
15:50kettenissending ANS2 the 0x600...220 message doesn't seem to hurt
15:50sventhe only thing you can't do is send the same power state twice
15:50svenit'll panic then
15:50marcanwait no I'm dumb
15:51svenyeah, that's obviously a reasonable action to take when you get an invalid argument! *sigh*
15:51marcanok yeah, it is b/6
15:52sveni'm pretty sure 6 is "set co-processor power state" then
16:01svenmarcan: where's the latest code for the reset/pmgr stuff? inside the t6000 branch?
16:01marcangoing to rebase it out now
16:03kettenismeanwhile pali noted that PERST really should be active low
16:03kettenisso that'll need to be sneaked into the DT
16:05mazI'll post patches for that tomorrow (can't really drop the branch merging nightmare I'm in the middle of...)
16:06Ariadne has quit [Ping timeout: 480 seconds]
16:06jkkm has quit [Ping timeout: 480 seconds]
16:06austriancoder has quit [Ping timeout: 480 seconds]
16:06arnd_ has quit [Read error: Connection reset by peer]
16:06cptcobalt has quit [Ping timeout: 480 seconds]
16:06jabashque has quit [Ping timeout: 480 seconds]
16:06austriancoder has joined #asahi-dev
16:06arnd_ has joined #asahi-dev
16:07Chainsaw has quit [Ping timeout: 480 seconds]
16:07Ariadne has joined #asahi-dev
16:07jabashque has joined #asahi-dev
16:08jkkm has joined #asahi-dev
16:08cptcobalt has joined #asahi-dev
16:08Chainsaw has joined #asahi-dev
16:10kettenismaz: I'll push the u-boot change to the branch once I've seen that hit the mailing list
16:11mazkettenis: cheers.
16:11Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
16:11marcansven: pushed as pmgr/dev
16:12marcankettenis: feel free to take a look before I fire it off :)
16:15j_eymarcan: first commit has conflict markers
16:15j_ey0c503762d5d353945c0e16bcf14dbd8ffdf9e1e4
16:17Dcow has joined #asahi-dev
16:17kettenismarcan: still reads ok
16:28marcanj_ey: lol, of course I screwed up the one file that doesn't break the build :p
16:35_jannau_make dtbs_check will complain a lot since aic/pinctrtrl/dart bindings don't allow "power-domains" properties
16:36_jannau_it also complains about the length of some power-maanagement nodes
16:37_jannau_at least it did that in t6000/bringup-work
16:43marcanreally? I thought power-domains was a global thing
16:45* marcanruns the checker...
16:51Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
16:52Dcow has joined #asahi-dev
17:03Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
17:20Dcow has joined #asahi-dev
17:44gladiac has quit [Quit: k thx bye]
17:44gladiac has joined #asahi-dev
17:46Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
17:47X-Scale has joined #asahi-dev
17:48svenmarcan: pushed my current WIP rtkit stuff to rtkit/dev
17:49X-Scale` has quit [Ping timeout: 480 seconds]
17:50svenif you're also working on it i can stop rebasing/squashing and instead just adding commits on top of that
17:54mazkettenis: fired.
17:54j_eysven: apple_rtkit_management_rx_epmap, why are bitmap and base inside that for loop?
17:55sven🤷‍♂️
17:55fredix771 has joined #asahi-dev
18:05fredix771 has quit [Ping timeout: 480 seconds]
18:05jbowen has quit [Read error: Connection reset by peer]
18:28Dcow has joined #asahi-dev
18:30aleasto has quit [Quit: Konversation terminated!]
18:31aleasto has joined #asahi-dev
18:54nafod has quit [Remote host closed the connection]
19:01marcan_jannau_: you're right, I'll take a look at the bindings tomorrow.
19:03marcanI don't know why power-domains needs to be explicitly specified; that really feels like it should've been globally available (robher_?) given that at least single-PD modes are automatically handled by the driver layer, and work even for drivers with no runtime-pm support (where it just keeps the domain on)
19:10nafod has joined #asahi-dev
19:10nafod has quit [Remote host closed the connection]
19:12nafod has joined #asahi-dev
19:27firefox317_ has joined #asahi-dev
19:28firefox317_sven: in the Kconfig file in the 'WIP: soc: apple: rtkit: Add RTKit library' commit, you misspelled protocol (protocl)
19:34firefox317_in case you will upstream this ;p
19:48svensee "WIP" at the start of the commit
19:48robher_marcan: That's all kernel implementation details and we want to define how many power domains a device has.
19:48sventhis is not remotely ready for review yet
19:53marcanrobher_: for >1 I agree, it just feels like one domain is quite a generic situation
19:55robher_marcan: also allowing in any and every node would not be well defined. We do have that for pinctrl, but it's weird.
19:56kettenisbeing explicit probably is a good thing though, since it allows automated checking of the actual device trees
19:59marcanand yeah, I noticed the pinctrl thing which is weird
20:00marcanexpect a few patches adding those to the bindings tacked on to the series tomorrow then :)
20:00* marcanoff to sleep
20:09aleasto has quit [Remote host closed the connection]
20:09firefox317_ has quit [Quit: Page closed]
21:37gabuscus_ has joined #asahi-dev
21:40gabuscus has quit [Ping timeout: 480 seconds]
21:41povikwrote a (mostly untested) driver for the cherished NCO peripheral
21:52m6wiq has joined #asahi-dev
22:26m6wiq has quit [Quit: Leaving]
22:33phiologe has joined #asahi-dev
22:35PhilippvK has quit [Read error: No route to host]
23:42yuyichao_ has quit [Ping timeout: 480 seconds]
…