main
John Lauer Complete exact catalog links for all purchased PCB references and screen library pin sets e3249a7
from pathlib import Path
import sys,copy,json,shutil,hashlib
root=Path(__file__).resolve().parents[2];sys.path.insert(0,str(root/'tools'));import sexp
slug='usb4105-gf-a';mpn=slug.upper();p=root/'components'/slug
sch=sexp.parse((root/'kicad/digital.kicad_sch').read_text());s=copy.deepcopy(next(x for x in sexp.find(sexp.first(sch,'lib_symbols'),'symbol') if x[1]=='Load:J8'));s[1]=mpn
names={'A1':'GND','A4':'VBUS','A5':'CC1','A6':'D+','A7':'D-','A8':'SBU1','A9':'VBUS','A12':'GND','B1':'GND','B4':'VBUS','B5':'CC2','B6':'D+','B7':'D-','B8':'SBU2','B9':'VBUS','B12':'GND','SH':'SHIELD'}
for x in sexp.find(s,'symbol'):
 x[1]=x[1].replace('J8',mpn)
 for pin in sexp.find(x,'pin'):sexp.first(pin,'name')[1]=names[sexp.first(pin,'number')[1]]
for pr in sexp.find(s,'property'):
 if pr[1]=='Reference':pr[2]='J'
 if pr[1]=='Value':pr[2]=mpn
for key,value in [('Footprint',mpn+':USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal'),('Datasheet','https://gct.co/files/drawings/usb4105.pdf'),('Manufacturer','GCT'),('MPN',mpn),('DigiKey','2073-USB4105-GF-ACT-ND'),('Adom Wiki','https://wiki.adom.inc/adom/'+slug)]:s.append(sexp.parse(f'(property "{key}" "{value}" (at 0 0 0) (hide yes) (effects (font (size 1.27 1.27))))'))
(p/(slug+'.kicad_sym')).write_text('(kicad_symbol_lib (version 20231120) (generator "adom-component-audit")\n'+sexp.dump(s)+'\n)\n')
f=sexp.parse((p/(slug+'.kicad_mod')).read_text());print('Pads',[(x[1],sexp.first(x,'at')) for x in sexp.find(f,'pad')])
for m in sexp.find(f,'model'):m[1]='${KIPRJMOD}/'+slug+'.step'
# Library uses S1 shell designator; project uses SH. Keep the reusable symbol in lockstep.
for pad in sexp.find(f,'pad'):
 if str(pad[1]).startswith('S'):pad[1]='SH'
(p/(slug+'.kicad_mod')).write_text(sexp.dump(f)+'\n')
for src,dst in [('kicad/3d/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal.step',slug+'.step'),('components/stm32g0b1kct6/LICENSE-KICAD.md','LICENSE-KICAD.md'),('components/m20-9990246/LICENSE','LICENSE')]:shutil.copyfile(root/src,p/dst)
d=json.loads((root/'components/fts-105-01-l-s/page.json').read_text());d.update(slug=slug,title=mpn+' USB-C receptacle',description='USB 2.0 Type-C top-mount receptacle with explicit signal and shell mapping.',brief='Sixteen signal contacts plus shell; no USB Power Delivery controller implied.',license='MIT AND CC-BY-SA-4.0',tags=['USB-C','USB2','GCT'],source={'name':'GCT','url':'https://gct.co/connector/usb4105'})
c=d['component'];c.update(mpn=mpn,manufacturer='GCT',package='USB4105 top-mount right-angle',pin_count=17,datasheet='https://gct.co/files/drawings/usb4105.pdf',wiki_url='https://wiki.adom.inc/adom/'+slug,distributor_links={'digikey':'2073-USB4105-GF-ACT-ND'},pins=[{'number':k,'name':v,'type':'passive'} for k,v in names.items()]);c['parts']={k:v.replace('fts-105-01-l-s',slug) for k,v in c['parts'].items()};c['qualification']={'status':'provisional','model':'Attributed KiCad package model','assembly':'Native footprint comparison and physical qualification pending'}
(p/'page.json').write_text(json.dumps(d,indent=2)+'\n');d.update(name='@adom/'+slug,files=['README.md','LICENSE','LICENSE-KICAD.md','THIRD_PARTY.md','page.json','package.json','provenance.json',slug+'*','symbol.html','footprint.html','hero.png','skills/**'],dependencies={});(p/'package.json').write_text(json.dumps(d,indent=2)+'\n')
(p/'README.md').write_text('''# USB4105-GF-A USB-C receptacle

GCT USB 2.0 Type-C receptacle, top-mounted and right-angle. GF is gold flash; A is tape-and-reel; absent stake suffix specifies nominal 0.95 mm shell stakes. Preserve this exact mechanical variant.

There are 16 signal contacts and four shell stakes. The catalog symbol has 17 electrical terminals: the 16 named contacts plus SH shared by the shell stakes. It is not a 17-contact USB connector. The KiCad footprint and catalog preserve SH for shell stakes; no contact number is changed.

A1/A12/B1/B12 are GND; A4/A9/B4/B9 VBUS; A5 CC1; B5 CC2; A6/B6 D+; A7/B7 D−; A8 SBU1; B8 SBU2. GND and VBUS pairs share physical solder lands in the recommended pattern. Both names are retained. Shield connectivity is a separate circuit/EMC decision; do not silently merge SH and signal ground when importing a generic component.

The manufacturer's drawing B4, 2023-12-18, specifies 8.94 mm width, 7.35 mm depth and 3.31 mm height above seating, with nominal 0.95 mm stakes. The included KiCad package model is an attributed nominal model, not manufacturer CAD or a complete tolerance model. Inspect actual seating, board-edge clearance, retention slots and 0.65 mm locating holes before assembly.

The catalog footprint is derived from the current official KiCad library. Shell slots are plated; locating holes are unplated. Compare all pad positions, sizes, rotations and slot dimensions with the actual board before adoption. Mixed surface-mount and plated-slot manufacturing requirements remain subject to 3rdPartyFab qualification.

A connector rating does not authorize USB voltage or current. This electronic-load USB interface does not acquire Power Delivery support from this part. Preserve the existing CC resistors, VBUS protection and firmware/power architecture. Test both plug orientations, enumeration, disconnect handling, shield behavior and output shutdown on actual hardware.

[Manufacturer drawing](https://gct.co/files/drawings/usb4105.pdf) · [Product specification](https://gct.co/files/specs/usb4105-spec.pdf) · [Exact distributor identity](https://www.digikey.com/en/products/detail/gct/USB4105-GF-A/11198441)

STEP uses mm and GLB meters. Use the clean model in assemblies; the annotated hero is reference artwork. The component remains provisional, with live wiki review and physical qualification pending.
''')
(p/'THIRD_PARTY.md').write_text('Footprint derived from official KiCad kicad-footprints Connector_USB.pretty/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal.kicad_mod. STEP is KiCad StepUp model dated 2022-11-18, retained from project source. Both and derived GLB are CC-BY-SA4.0 with KiCad design exception. Original Adom symbol and documentation are MIT. Manufacturer drawings are linked, not bundled.\n')
(p/'provenance.json').write_text(json.dumps({'part':mpn,'reviewDate':'2026-10-11','drawing':{'url':'https://gct.co/files/drawings/usb4105.pdf','localReview':'datasheets/usb4105.pdf, B4 2023-12-18'},'footprint':{'source':'https://gitlab.com/kicad/libraries/kicad-footprints/-/raw/master/Connector_USB.pretty/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal.kicad_mod','modification':'Bind local STEP; preserve existing SH shell pad names','license':'CC-BY-SA-4.0 with KiCad exception'},'model':{'source':'Existing project KiCad StepUp 2022-11-18 package STEP','license':'CC-BY-SA-4.0 with KiCad exception','classification':'Nominal package model, not manufacturer CAD'},'qualification':'provisional','visualReview':{'local':'pending','wiki':'pending; browser closed'},'assetSha256':{}},indent=2)+'\n')
q=p/'skills'/slug;q.mkdir(parents=True,exist_ok=True);(q/'SKILL.md').write_text('''---
name: usb4105-gf-a
description: Import the exact USB-C receptacle while preserving signal pairs, shell connectivity and mechanical variant.
---
# USB4105-GF-A

Parent skill: wiki-component.

Read README.md and provenance.json. Preserve GF plating, A packaging and the default 0.95 mm stakes. This is a USB 2.0 connector, not a USB-PD controller.

Keep all 16 contact labels and SH. Four shell stakes share SH; overlapping VBUS/GND paired solder lands retain both physical contact names. Verify CC1/CC2, D+/D− and both orientations. Do not silently connect shell to signal ground in a generic import.

Use clean CAD in assemblies, not the annotated hero. Review mounting slots, locating holes, board edge and solder process. Keep KiCad attribution. Component ratings do not authorize negotiated USB voltage/current; preserve circuit and hardware acceptance gates.
''')