gokul/usb3-sd-hub
Engineering draft: four-layer, computer-powered USB 3 hub with one USB-C host socket, two USB-C and two USB-A accessory sockets, and a full-size SD slot. Board and three schematic previews are available. Routing and production checks are incomplete; not fabrication ready.
- Version
- 0.1.5
- License
- MIT
- Stars
- 0
design/pinouts.ts
// USB5816C: Microchip DS00003186C, Table 3.2 (physical pin numbering).
export const hubPinNames = [
"RBIAS",
"VDD33_2",
"XTALI",
"XTALO",
"VDD33_5",
"D1_DP",
"D1_DM",
"D1_TXP",
"D1_TXN",
"VDD12_10",
"D1_RXP",
"D1_RXN",
"D6_DP",
"D6_DM",
"D1B_TXP",
"D1B_TXN",
"VDD12_17",
"D1B_RXP",
"D1B_RXN",
"CFG_STRAP",
"NC21",
"NC22",
"TESTEN",
"VBUS_DET",
"RESET_N",
"VDD12_26",
"VDD33_27",
"D2_DP",
"D2_DM",
"D2_TXP",
"D2_TXN",
"VDD12_32",
"D2_RXP",
"D2_RXN",
"D3_DP",
"D3_DM",
"D3_TXP",
"D3_TXN",
"VDD12_39",
"D3_RXP",
"D3_RXN",
"VDD33_42",
"D4_DP",
"D4_DM",
"D4_TXP",
"D4_TXN",
"VDD12_47",
"D4_RXP",
"D4_RXN",
"AB1",
"PWR5",
"PWR4",
"HOST_TYPE0",
"VDD33_54",
"HOST_TYPE1",
"C_ATTACH2",
"PWR3",
"PWR2",
"VDD12_59",
"GPIO3",
"CC_POL",
"PWR6",
"ALT_MUX_EN",
"VDD33_64",
"SPI_CLK",
"SPI_DO",
"SPI_DI_CFG_BC",
"SPI_CS_CFG_NONREM",
"GPIO69",
"PWR1",
"GPIO66",
"VDD33_72",
"C_ATTACH1",
"SMBDATA",
"SMBCLK",
"C_ATTACH0",
"SUSP_IND",
"VDD12_78",
"NC79",
"NC80",
"NC81",
"NC82",
"VDD12_83",
"NC84",
"NC85",
"D5_DP",
"D5_DM",
"D5_TXP",
"D5_TXN",
"VDD12_90",
"D5_RXP",
"D5_RXN",
"VDD33_93",
"UP_DP",
"UP_DM",
"UP_TXP",
"UP_TXN",
"VDD12_98",
"UP_RXP",
"UP_RXN",
"EP",
] as const;
export const hubPinLabels = Object.fromEntries(
hubPinNames.map((label, index) => [`pin${index + 1}`, label]),
);
// USB2642: Microchip DS00001578C, Figure 3-1 and Table 5-1.
export const readerPinNames = [
"DN2_DM",
"DN2_DP",
"DN3_DM",
"DN3_DP",
"VDDA33_5",
"PRTCTL2",
"PRTCTL3",
"SPI_CS",
"EEP_SCL",
"EEP_SDA",
"SPI_DI",
"VDD33_12",
"SD_WP",
"SD_CD_N",
"VDD18",
"VDD33_16",
"SD_D1",
"SD_D0",
"SD_D7",
"SD_D6",
"SD_CLK",
"REG_EN",
"SD_D5",
"SD_CMD",
"VDD33_25",
"VDD33_OTP",
"TEST1",
"TEST2",
"I2C_SDA",
"SD_D4",
"NC31",
"SD_D3",
"SD_D2",
"VDD33_34",
"CRD_PWR",
"I2C_SCL",
"GPO1",
"RESET_N",
"VBUS_DET",
"TEST0",
"VDDA33_41",
"USB_DP",
"USB_DM",
"XTAL2",
"XTAL1",
"VDD18PLL",
"RBIAS",
"VDDA33_48",
"EP",
] as const;
export const readerPinLabels = Object.fromEntries(
readerPinNames.map((label, index) => [`pin${index + 1}`, label]),
);
export const usbCPinLabels = Object.fromEntries([
...Array.from({ length: 12 }, (_, index) => [
`pin${index + 1}`,
`A${index + 1}`,
]),
...Array.from({ length: 12 }, (_, index) => [
`pin${index + 13}`,
`B${index + 1}`,
]),
["pin25", ["S1", "SHIELD"]],
]);
export const usbAPinLabels = {
pin1: "VBUS",
pin2: "DM",
pin3: "DP",
pin4: "GND",
pin5: "RXN",
pin6: "RXP",
pin7: "GND_DRAIN",
pin8: "TXN",
pin9: "TXP",
pin10: "SHIELD",
} as const;
export const sdPinLabels = {
pin1: "DAT3",
pin2: "CMD",
pin3: "VSS1",
pin4: "VDD",
pin5: "CLK",
pin6: "VSS2",
pin7: "DAT0",
pin8: "DAT1",
pin9: "DAT2",
pin10: "CD",
pin11: "WP",
pin12: "SWITCH_COMMON",
pin13: "SHIELD1",
pin14: "SHIELD2",
pin15: "SHIELD3",
pin16: "SHIELD4",
} as const;
export const hubPinAttributes = Object.fromEntries(
hubPinNames.map((label) => [
label,
label.startsWith("VDD")
? {
requiresPower: true,
requiresVoltage: label.startsWith("VDD12") ? "1.2V" : "3.3V",
requiredVoltageTolerance: "5%",
}
: label === "EP"
? { requiresGround: true }
: label.startsWith("NC")
? { doNotConnect: true }
: {},
]),
);
export const readerPinAttributes = Object.fromEntries(
readerPinNames.map((label) => [
label,
label.startsWith("VDD33") || label.startsWith("VDDA33")
? {
requiresPower: true,
requiresVoltage: "3.3V",
requiredVoltageTolerance: "5%",
}
: label === "EP"
? { requiresGround: true }
: label === "VDD18" || label === "VDD18PLL"
? { providesPower: true, providesVoltage: "1.8V" }
: {},
]),
);