#
#asahi-dev · 2026-01-25 10:34
svenall mtp and hid stuff happens in the apple,t8112-mtp-hid node, dockchannel is just a dumb mailbox
#asahi-dev · 2026-01-25 10:34
jannaumaybe aop? the dockchannel-uart node has a 'max-aop-clk' property
#asahi-dev · 2026-01-25 10:33
sveni wonder if something like this describes the hardware better: https://f.svpe.de/a96619430acabb2d85a9a5d54b8c1acbebc8cb3548fb7d7ffb3f94e32d0e02a7_mtp.txt
#asahi-dev · 2026-01-25 10:33
svenpretty sure that's what happens
#asahi-dev · 2026-01-25 10:32
nickchanmaybe the other end is whatever coproc that brings up debug usb
#asahi-dev · 2026-01-25 10:32
nickchani wonder where the dockchannel "uart" go to then
#asahi-dev · 2026-01-25 10:30
svenand doesn't need to be an irq controller
#asahi-dev · 2026-01-25 10:30
sventhe more i look at it the more dockchannel looks like a weird mbox that just needs some callbacks
#asahi-dev · 2026-01-25 10:30
jannaubut I think those are more status flags for mailbox queues than an interrupt controller
#asahi-dev · 2026-01-25 10:29
jannauif you chain devices on like for dockchannel downstream an irq controller is good fit
#asahi-dev · 2026-01-25 10:27
nickchanexample: dwc2 and dwc3
#asahi-dev · 2026-01-25 10:26
nickchanthat does not make them interrupt controllers from the point of linux
#asahi-dev · 2026-01-25 10:26
svendockchannel itself requests the interrupts
#asahi-dev · 2026-01-25 10:26
nickchancause many hardware that's at least moderately complex has a status register that indicate which events are firing
#asahi-dev · 2026-01-25 10:26
svenokay, that's weird
#asahi-dev · 2026-01-25 10:25
svenoh wait, lol
#asahi-dev · 2026-01-25 10:24
svenmaybe i'm blind but i just see the interrupts in the dts for apple,t8112-dockchannel-hid but don't see that code that uses them
#asahi-dev · 2026-01-25 10:24
nickchanintegralpilot: do you expect multiple logically distinct hardware behind dockchannel?
#asahi-dev · 2026-01-25 10:23
svenintegralpilot: sure, is that used for e.g. hid though somehow?
#asahi-dev · 2026-01-25 10:23
integralpilotto my understanding, at least
#asahi-dev · 2026-01-25 10:23
nickchanboth contained a slave id and an address
#asahi-dev · 2026-01-25 10:23
integralpilotsven: it's its own interrupt controller because it only has one interrupt line to AIC (as opposed to the many internal events that can occur) and uses mulitplexing to then indicate which even actually occured, rather than having a sepereate AIC interrupt for each of these
#asahi-dev · 2026-01-25 10:21
nickchanbut maybe that's just an artifact of how spmi is used on apple silicon
#asahi-dev · 2026-01-25 10:20
nickchanabout the generic part the more i look at it the more spmi looks like i2c
#asahi-dev · 2026-01-25 10:19
svenstill not sure about the interrupt-controller part of dockchannel, will have to understand what it actually does and how it's used
#asahi-dev · 2026-01-25 10:19
jannauit wasn't just the atomic context. mailbox was overall a bad fit for asc: https://lore.kernel.org/asahi/20230328-soc-mailbox-v1-0-3953814532fd@marcan.st/
#asahi-dev · 2026-01-25 10:19
svengood point
#asahi-dev · 2026-01-25 10:18
integralpilotwell we've already changed the dts representation so far so will need to change u-boot anyway, so might as well make it perfect
#asahi-dev · 2026-01-25 10:17
svenwe'll also have to take care of downstream u-boot/openbsd if we change the dts representation but we might just be able to keep both variants in our downstream releases
#asahi-dev · 2026-01-25 10:17
svendunno though
#asahi-dev · 2026-01-25 10:17
svenyeah, i wonder if a single "mtp coprocessor" that uses both the asc mailbox and the dockchannel mailbox and also does all the HID stuff is the way to go
#asahi-dev · 2026-01-25 10:16
integralpiloti think we could just have the HID device as a child of soc and then refer to the dockchannel within mboxes
#asahi-dev · 2026-01-25 10:15
svennow i'm not sure we want to use mailbox subsystem again, but i think the issues with the asc mailbox was mostly around atomic context handling iirc
#asahi-dev · 2026-01-25 10:13
svenand we don't do the parent/child node thing for mailboxes either
#asahi-dev · 2026-01-25 10:13
svenhttps://github.com/apple-oss-distributions/xnu/blob/main/pexpert/pexpert/arm/dockchannel.h dockchannel itself seems to be really like some mailbox with multiple channels
#asahi-dev · 2026-01-25 10:13
jannauand dockchannel looks like a mailbox to me as well
#asahi-dev · 2026-01-25 10:13
jannaumy first guess is mtp stands for is multi touch processor
#asahi-dev · 2026-01-25 10:13
sveni'm just trying to understand/discuss what that thing actually is
#asahi-dev · 2026-01-25 10:12
sveni'm not sure yet :D
#asahi-dev · 2026-01-25 10:12
integralpilotwe could change the structure if the current way doesn't look right, what would you propose?
#asahi-dev · 2026-01-25 10:12
integralpiloti don't think MTP does anything non-HID, i think it's point is to just regular internal HID events, though might be wrong
#asahi-dev · 2026-01-25 10:11
sveni think dockchannel is actually something a bit similar to a mailbox
#asahi-dev · 2026-01-25 10:11
svenbecause i've been looking into what dockchannel actually is (because of that new dockchannel uart) and that dockchannel as a parent node with children nodes seems rather unusual to me at this point
#asahi-dev · 2026-01-25 10:10
svendo we know if MTP does anything else that's not hid btw?
#asahi-dev · 2026-01-25 10:05
integralpilotdoing SMC power stuff now and will send v4 on list shortly
#asahi-dev · 2026-01-25 10:05
integralpilotjust posted updated dockchannel/MTP draft to branch
#asahi-dev · 2026-01-25 10:05
integralpilotyay for shell, great work fl0_id! :)
#asahi-dev · 2026-01-25 00:45
fl0_id__not all of those changes might be necessary, but in earlier attempts cpufreq for example was necessary. not sure if asahi-wip or device tree might mean it works without those changes, will test tomorrow probably
#asahi-dev · 2026-01-25 00:44
fl0_id__I compiled the current device tree and other changes I have here: https://gist.github.com/step21/7433ac5471d0eb8f67308fc6deca9202
#asahi-dev · 2026-01-25 00:32
fl0_id__up to initramfs shell

plus ›