#
✕ nick:sven
#asahi · 2021-03-11 10:39
sventheir code is at least a good reference as to how parts of the hardware work, but I expect much of it will look very different when upstreaming it
#asahi · 2021-03-11 08:35
svennice article :)
#asahi · 2021-03-08 12:26
sven*designware drd
#asahi · 2021-03-08 12:25
svenpart three is well documented if you just look hard enough. part one is mostly documented as well I think (except for the i2c part) and part 2 is completely custom apple stuff afaict
#asahi · 2021-03-08 12:25
sventhere are really three components to it: That TI chip connected over i2c to select the mode (DFP,UFP), the PHY (apple calls this one "ATC" I think, essentially magic register pokes required before accessing the controller), and this designware did controller (xhci + configuration for host mode, custom stuff for device mode)
#asahi · 2021-03-08 11:21
svenmarcan: nice, I'm pretty sure usb host most is just going to work as well then once you have that i2c figured out
#asahi · 2021-03-08 09:32
svenI then switched to writing usb code for m1n1 because I was tired to wait for my kernels to load over uart
#asahi · 2021-03-08 09:32
sven:-)
#asahi · 2021-03-08 09:31
svenexactly
#asahi · 2021-03-08 09:31
svenyeah, same here
#asahi · 2021-03-08 09:30
svenbut I believe that's unfortunately required for host mode
#asahi · 2021-03-08 09:30
svennot for gadget mode
#asahi · 2021-03-08 09:30
svenyes
#asahi · 2021-03-08 09:29
svenif I do the phy init manually from m1n1 and use my dart driver in linux their dwc3 driver also works without any modifications in gadget mode fwiw
#asahi · 2021-03-08 09:27
svenbut the "USB Device (Peripheral) Programming Model" should be close enough
#asahi · 2021-03-08 09:27
svenyeah, especially the PHY doesn't apply at all.
#asahi · 2021-03-08 07:51
svenyeah, i think once i have enumerating working CDC serial shouldn't be much more complicated
#asahi · 2021-03-08 07:04
sveni'll let you know once i have something that is more useful than just printing what commands it receives over uart :)
#asahi · 2021-03-08 07:03
svennah, no need to get one. i hope that i'll be able to finish at least an initial version of the serial part this week. after that most people probably won't need the pd uart cable anymore
#asahi · 2021-03-08 06:58
svenhttps://www.ti.com/lit/ug/spruhj7a/spruhj7a.pdf this is a user manual for this dwc3 controller fwiw
#asahi · 2021-03-08 06:57
svenotherwise i'd be happy to have some people test this once i make a little more progress and implement the serial class
#asahi · 2021-03-08 06:56
svendo you have a uart cable and feel like reading cursed usb specs? then we could see if there's a way for you to help write serial code.
#asahi · 2021-03-04 06:16
svensounds like someone managed to subscribe their support email to that mailing list
#asahi · 2021-02-25 10:27
svenit probably makes sense to add device/gadget mode to m1n1 to make proxyclient.py more accessible. but linux host mode is going to be a lot more useful ;)
#asahi · 2021-02-22 12:56
sventhere are some more pages mapped in a second master of that display iommu and memsetting that to 0xff sometimes breaks the whole display driver
#asahi · 2021-02-22 12:56
svenI'm pretty sure there's some kind of command/response/whatever thing in there
#asahi · 2021-02-22 12:54
sven(and another thing apple seems to call SMMU which is probably unrelated to the ARM SMMU though)
#asahi · 2021-02-22 12:54
svenit's part of the normal ram but behind at least one iommu
#asahi · 2021-02-22 12:53
svenyeah, I think I pushed it to 5s and the smp still failed
#asahi · 2021-02-22 12:52
svenbut maybe not enough ;)
#asahi · 2021-02-22 12:52
sventhat's what I thought at first but I increased that timeout
#asahi · 2021-02-22 12:52
svenbut it went away the moment I stopped writing to the frame buffer range
#asahi · 2021-02-22 12:52
svenI didn't investigate any further so maybe it was just another strange race that was triggered
#asahi · 2021-02-22 12:51
svenyeah, weird things *unrelated* to the frame buffer started happening.
#asahi · 2021-02-22 11:36
svenI know ;)
#asahi · 2021-02-22 11:35
svensounds like the perfect job for marcan! :P
#asahi · 2021-02-21 13:05
svenI'm not convinced all darts support bypass mode fwiw. I'm rather sure the display one doesn't.
#asahi · 2021-02-12 17:27
svenlol :D
#asahi · 2021-02-12 16:28
svenyeah, that's why I did on my Mac mini and it worked
#asahi · 2021-02-12 12:24
svenin <15 minutes :P
#asahi · 2021-02-10 06:01
svennice :-)
#asahi · 2021-02-06 18:43
sveni should've known better with usb's history of naming things, heh
#asahi · 2021-02-06 18:42
sven*thunderbolt
#asahi · 2021-02-06 18:42
svenmarcan: to make things more confusing: i did check on apple.com and confused their "charging cable" with their "thunerbolt charging cable" which probably would work *sigh*
#asahi · 2021-02-06 18:41
svenGlanzmann: okay, great :)
#asahi · 2021-02-06 18:41
svenand now i have to wait until monday or tuesday for my serial adapter to work :)
#asahi · 2021-02-06 18:40
svenGlanzmann: don't make the same mistake i did and make sure to get a real superspeed usb-c cable. the charging cable delivered with the macbook air doesn't work.
#asahi · 2021-02-02 18:58
svennice :)
#asahi · 2021-01-31 15:36
svenhaha :D
#asahi · 2021-01-27 06:13
svenand because they have this secure enclave/SEP/however-it's-called-these-days they can just lock the keys for their DRM schemes in there before booting an untrusted kernel

plus ›