pixalynx/usb3-hub-10g

A USB 3.2 Gen 2 six-port hub board with USB-C PD power input, regulated 5 V/3.3 V/1.15 V rails, one upstream and four protected downstream USB-A/USB-C ports, SuperSpeed muxes, ESD protection, and controlled port power.

Version
0.0.1
License
unset
Stars
0

parts/Hd3ss3220.tsx

import type { ChipProps } from "tscircuit"
import { JlcFootprint } from "../lib/jlc"
import { CAD } from "../lib/cad-models"

/** TI HD3SS3220RNHR: USB Type-C DRP/DFP/UFP port controller with a 10 Gbps 2:1 SuperSpeed mux, WQFN-30
 * 2.5 x 4.5 mm. Pin table from SLLSES1E "Pin Functions" (research/hd3ss3220.txt), identical to JLC C165155's
 * symbol. GPIO mode (ADDR open): PORT sets the role, CURRENT_MODE the DFP Rp level, ID reports a DFP attach,
 * DIR the plug orientation. TXP/TXN/RXP/RXN face the hub; TX1/RX1/TX2/RX2 face the receptacle. */
export const hd3ss3220Pins = {
  pin1: ["CC2"], pin2: ["CC1"], pin3: ["CURRENT_MODE"], pin4: ["PORT"], pin5: ["VBUS_DET"], pin6: ["TXP"], pin7: ["TXN"],
  pin8: ["VCC33"], pin9: ["RXP"], pin10: ["RXN"], pin11: ["DIR"], pin12: ["ENN_MUX"], pin13: ["GND13"],
  pin14: ["RX1N"], pin15: ["RX1P"], pin16: ["TX1N"], pin17: ["TX1P"], pin18: ["RX2N"], pin19: ["RX2P"], pin20: ["TX2N"], pin21: ["TX2P"],
  pin22: ["ADDR"], pin23: ["OUT3"], pin24: ["VCONN_FAULT_N"], pin25: ["OUT1"], pin26: ["OUT2"], pin27: ["ID"], pin28: ["GND28"],
  pin29: ["ENN_CC"], pin30: ["VDD5"], pin31: ["EP"],
} as const

/** Schematic sides: the receptacle-facing pins (CC, TX1/RX1/TX2/RX2) plus supplies and ground on one side, the hub-facing
 * pairs and the GPIO-mode controls on the other. `connector` says which side the receptacle is drawn on. */
const CONN_SIDE = ["VDD5", "VCC33", "CC1", "CC2", "TX1P", "TX1N", "RX1P", "RX1N", "TX2P", "TX2N", "RX2P", "RX2N", "GND13", "GND28", "EP"] as const
const HUB_SIDE = ["TXP", "TXN", "RXP", "RXN", "DIR", "ID", "PORT", "CURRENT_MODE", "VBUS_DET", "ENN_CC", "ENN_MUX", "ADDR", "OUT1", "OUT2", "OUT3", "VCONN_FAULT_N"] as const

export const Hd3ss3220 = ({ connector, ...props }: ChipProps<typeof hd3ss3220Pins> & { connector: "left" | "right" }) => (
  <chip
    {...props}
    manufacturerPartNumber="HD3SS3220RNHR"
    supplierPartNumbers={{ jlcpcb: ["C165155"] }}
    pinLabels={hd3ss3220Pins}
    footprint={<JlcFootprint part="hd3ss3220" />} cadModel={CAD.hd3ss3220}
    schWidth={2.4}
    schHeight={3.2}
    schPinArrangement={connector === "left"
      ? { leftSide: { direction: "top-to-bottom", pins: [...CONN_SIDE] }, rightSide: { direction: "top-to-bottom", pins: [...HUB_SIDE] } }
      : { leftSide: { direction: "top-to-bottom", pins: [...HUB_SIDE] }, rightSide: { direction: "top-to-bottom", pins: [...CONN_SIDE] } }}
    pinAttributes={{ VDD5: { requiresPower: true }, VCC33: { requiresPower: true }, GND13: { requiresGround: true }, GND28: { requiresGround: true }, EP: { requiresGround: true } }}
  />
)