#
✕ nick:marcan
#asahi-re · 2021-09-13 07:34
marcanhttps://github.com/torvalds/linux/blob/master/drivers/extcon/extcon-usb-gpio.c a simple GPIO one
#asahi-re · 2021-09-13 07:33
marcanwe should look into how thunderbolt/etc muxing is done
#asahi-re · 2021-09-13 07:33
marcanbut this sounds like something generally useful for Type C, except I assume Linux already has some Type C shenanigans?
#asahi-re · 2021-09-13 07:33
marcanhttps://github.com/torvalds/linux/blob/master/drivers/extcon/extcon-palmas.c uses it for vbus notifications
#asahi-re · 2021-09-13 07:32
marcanheh
#asahi-re · 2021-09-13 07:28
marcanI imagine some systems have a separate VBUS GPIO and the like
#asahi-re · 2021-09-13 07:28
marcanI assume this hasn't been done before for other USB PHYs?
#asahi-re · 2021-09-13 07:28
marcancould be a gpio thing too, perhaps
#asahi-re · 2021-09-13 07:13
marcanand then we just need to make sure we don't mask the wrong IRQs
#asahi-re · 2021-09-13 07:13
marcanthat would make a lot of sense, yeah
#asahi-re · 2021-09-13 05:35
marcanre 2 i2c buses, I saw two exposed externally via those debug PD modes and now I wonder if they're those two
#asahi-re · 2021-09-13 05:34
marcanI do expect us to expose i2c to userspace; people want that for monitor control
#asahi-re · 2021-09-13 05:34
marcannothing terribly wrong with a monolithic driver like that, and considering how many hacks Apple has in their model, if we tried to modularize it we'd probably have a bunch of abstraction breaks anyway...
#asahi-re · 2021-09-13 05:34
marcanit can still expose whatever zillion interfaces we feel like to userspace or other drivers
#asahi-re · 2021-09-13 05:33
marcanI don't think we have a good reason to do that; all the endpoints can be bundled together in dcp.ko
#asahi-re · 2021-09-13 05:33
marcanthe rtkit node is about us having multiple *drivers* (potentially different modules) bind to rtkit directly
#asahi-re · 2021-09-13 05:33
marcansven: even if it were a separate i2c bus to expose to other drivers, that could just be provided by the dcp node
#asahi-re · 2021-09-05 06:11
marcanI don't think they're particularly seriously trying to make them resilient to AP meddling, at least not yet
#asahi-re · 2021-09-05 06:11
marcandougall: I think the idea of locking down coprocessor firmwares in iBoot is kind of an afterthought in this iteration
#asahi-re · 2021-09-05 03:15
marcanlol
#asahi-re · 2021-09-04 15:46
marcanhopefully read-only? if you can map its own locked-down area with its own DART and have it write there, that's... kind of a big hole in the entire carveout system
#asahi-re · 2021-09-04 15:45
marcansven: is it an interesting part of the data section? :)
#asahi-re · 2021-08-30 03:31
marcanbbl, lunch :p
#asahi-re · 2021-08-30 03:29
marcanapple seriously doesn't care, they have drivers poking other devices' registers *everywhere*
#asahi-re · 2021-08-30 03:29
marcansee what I said about the regs being a mess?
#asahi-re · 2021-08-30 03:29
marcanI did some snooping on the reg ranges
#asahi-re · 2021-08-30 03:29
marcansee the big comment at the top of dcp.py
#asahi-re · 2021-08-30 03:29
marcan0x230000000..... is disp0
#asahi-re · 2021-08-30 03:29
marcan0x231800000.... is DCP
#asahi-re · 2021-08-30 03:28
marcanI don't see that in disp0?
#asahi-re · 2021-08-30 03:27
marcanyes
#asahi-re · 2021-08-30 03:27
marcancould just be an offset from disp0 base or some disp0 subrange or whatever
#asahi-re · 2021-08-30 03:27
marcanyeah, however we choose to represent it
#asahi-re · 2021-08-30 03:26
marcanlike {4, <reference to what we call that range>} and then the map call can just check that what is being mapped is something in that table (resolved)
#asahi-re · 2021-08-30 03:26
marcaneventually I'd probably want a mapping table
#asahi-re · 2021-08-30 03:26
marcanbut for now you can just use the same ranges, sure
#asahi-re · 2021-08-30 03:26
marcanalso we *might* end up doing hacks on disp0 regs eventually
#asahi-re · 2021-08-30 03:25
marcanlike mapping pmgr stuff in every goddamn device
#asahi-re · 2021-08-30 03:25
marcanapple do some insane stuff with reg ranges
#asahi-re · 2021-08-30 03:25
marcandepends on what they do and what sense they make
#asahi-re · 2021-08-30 03:25
marcangood :)
#asahi-re · 2021-08-30 03:25
marcanin this case it's disp0 index 4, though for us that might be a different index, in which case we'd want a mapping table anyway
#asahi-re · 2021-08-30 03:24
marcanpossibly a subset
#asahi-re · 2021-08-30 03:24
marcanso we should just check that it's one of the disp0 ranges I guess
#asahi-re · 2021-08-30 03:23
marcanwhich is looking up disp0, yes
#asahi-re · 2021-08-30 03:23
marcanit only call it right after sr_mapDeviceMemoryWithIndex(PROV, 4, 256, 0x23b3d0000, 0x4000)
#asahi-re · 2021-08-30 03:22
marcanfor mappings?
#asahi-re · 2021-08-30 03:21
marcan(just they make a mess of it)
#asahi-re · 2021-08-30 03:21
marcanthere's prior art there too :p
#asahi-re · 2021-08-30 03:21
marcanthis is how apple does it anyway so...

plus ›