pleroma.debian.social

pleroma.debian.social

how hard would it be to diy a usb c docking station

get controllers ics, make a pcb, hm

@navi depends what features you're after and how much experience you have designing electronics
you're very likely to need more than one revision so it's not going to be cheap

@novenary so far:

usb-pd input power
usb-pd output to laptop
two usb-c alt dp for monitor output (though i could settle for two display port ports instead)
two usb-a 2.0 for mouse and keyboard (or maybe 3 for a controller too), 2.0 to not use up the SS pins
10 gbit ethernet would be nice, otherwise just 1 gbit
lastly, as many usb-c 3.0 (3.1?) ports as i can fit up to capacity

if i read wikipedia correctly, using a single SS lane for display port 1.3 or 2.0 should be enough throughput for two 1440@120hz monitors i have, leaving 3 lanes for data and networking (though all alt mode muxers i've found so far only do 2dp x 2usb or 4dp)

i have zero actual experience with design but i learn stuff fast

no dock i found online has all the features i want, without some compromise i really don't like, and they were all quite expensive anyway, so i think i'm fine spending quite a bit of money if it turns to be a fun hobby thing to do

@navi USB3 always uses lanes in pairs because it's full duplex, you need one for TX and one for RX
single lane displayport is extremely funky (requires mst) so I'd recommend avoiding it if you can, though I have no idea if you can treat two lanes as separate outputs
that feature set is squarely in thunderbolt territory tbh

anyway if you have zero experience I'd strongly recommend starting small, this isn't necessarily a *hard* project, at least design-wise, but you should keep complexity reasonable for your first go around

@novenary i was going by a graph but now i realize the graph probably meant DP{0..3} as the DP main link lanes, not... display port connectors themselves

but that would mean if i want two display port outputs out of one cable, i'd need mst/daisy-chaining, and ig i could do that in the hub itself

> that feature set is squarely in thunderbolt territory tbh

yeag but i have an usb 4 amd laptop (fw13) so afaik i can't just go with thunderbolt, i have to go with "those usb 4 features that are basically thunderbolt"

> anyway if you have zero experience I'd strongly recommend starting small

maybe i'll first make just a usb-c hub (aka 1 port to 4 ports or whatever) as a test, so i can get familiar with components, working with ICs, and reading data sheets

then try to do the full thing after, or go adding things to the minimal hub bit by bit

@navi @novenary I actually have some WIP on that. To also power the whole thing with PD is more complicated than I'd imagined, and I need to ask more knowledgeable people. DP alt mode is also not that trivial, I think I know how though. Also, you can only have one Displayport sink; for more you need MST, and ICs for that are unobtainium. @mntmn maybe knows how to power a circuit from PD and provide charging, too?

@navi USB 4 is basically thunderbolt, point is you want to use that instead of DP alt mode but I think it's a lot more expensive

@novenary i really thought thunderbolt alt mode would only work with thunderbolt (intel) laptop ports

hmm... ig i'll look into that as well

@werdahias @novenary @navi in practice i haven't yet managed to get a single 1440p@120mhz working stable over _2_ lanes because of SI issues, so i'm def. interested if you manage to do that (i'll probably have to use a redriver). what's the upside of single lane? also one of the hardest part is impementing the state machine for PD incl VDM, except if you use a all-in-one chip for that, but haven't looked into any, as i had to implement the other side (laptop)

@werdahias @novenary @navi here's my still quite messy code, still need to figure out why power role swap doesn't work, but it manages to switch a bunch of docks and monitors into dp alt mode https://source.mnt.re/reform/pocket-reform/-/blob/main/pocket-reform-sysctl-fw/src/pd_com.c?ref_type=heads

@mntmn @novenary @navi thanks. my plan would be USB-C in (PD), USB-A 3.0 out, DP out (sink), and USB-C out with all those.

@werdahias @novenary @navi DP out would be a source (or in USB-C alt-mode a DFP-D), or how do you mean?

@mntmn @novenary @navi from the dock side, a sink (to the monitor)

@werdahias @novenary @navi ok, that's different terminology than i'm used to (input/sink = receiving end, output/source = the thing that outputs the image (DP), or the current (PD))

@mntmn @novenary @navi yeah, I found that also confusing, but according to VESA, the sink is what receives the image

@mntmn @werdahias @novenary

there's no upside for a single lane i just didn't know yet how it worked, first time designing a hardware project by myself so

ill probably try to get it to do two 1440@120 over two lanes with mst in the final design

i've found a few PD chips that did the whole display port alt mode negotiation (one even with hotplugging support, and controls via gpio), so that seemed promising

idk if any of this is that interesting to you but if so i can leave a ping on the final result once it's done and working (will probably take some months though)

@navi @novenary @mntmn yes please, can also do a layout / circuit review if you like. Which chip could do PD/DP alt mode?

@werdahias @novenary @navi please do ping, this is quite interesting to me, also for being able to test both sides of negotiation

@mntmn @novenary @navi can do. FYI this is my WIP:
A screenshot from kicad showing a circuit WIP
replies
1
announces
0
likes
2

@mntmn @navi @novenary Updated plan:

https://people.debian.org/~werdahias/dock.png

Will need to verify if this is correct with someone who knows more than I do; this is mostly based on TI's TIDA-01243