Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the USB connector abstractions so ESD protection is generated as part of common USB connector blocks, and adds a USB link-speed model to catch incompatible endpoint speeds and passives that would constrain a link.
Changes:
- Move USB ESD diode generation into USB connector blocks (and update example netlists/layout exports accordingly).
- Add USB speed capability modeling (host/device endpoints) plus validation that passives don’t constrain the negotiated link speed.
- Make USB-C receptacle footprint metadata generic (“USB-C Receptacle”) instead of a specific SparkFun part descriptor.
Reviewed changes
Copilot reviewed 84 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| examples/UsbUart/UsbUart.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/UsbUart/UsbUart.net.ref | Updates reference netlist for in-connector USB ESD and generic USB-C receptacle descriptors. |
| examples/UsbFpgaProgrammer/UsbFpgaProgrammer.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/UsbFpgaProgrammer/UsbFpgaProgrammer.net.ref | Updates reference netlist for in-connector USB ESD and generic USB-C receptacle descriptors. |
| examples/TestBlinkyWithSchematicImport/TestBlinkyWithSchematicImport.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/TestBlinkyWithModeledSchematicImport/TestBlinkyWithModeledSchematicImport.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/TestBlinkyWithLibraryExport/TestBlinkyWithLibraryExport.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/TestBlinkyWithLibrary/TestBlinkyWithLibrary.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/TestBlinkyRgb/TestBlinkyRgb.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyRgb/TestBlinkyRgb.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyRegulated/TestBlinkyRegulated.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyRegulated/TestBlinkyRegulated.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyPinned/TestBlinkyPinned.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyPinned/TestBlinkyPinned.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyPacked/TestBlinkyPacked.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/TestBlinkyImplicit/TestBlinkyImplicit.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyImplicit/TestBlinkyImplicit.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/TestBlinkyArray/TestBlinkyArray.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/test_usb_uart.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_usb_source_measure.py | Removes explicit USB ESD diode block and updates grouping strings accordingly. |
| examples/test_usb_key.py | Adds a local USB-A plug pads footprint block (since library export was removed). |
| examples/test_usb_fpga_programmer.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_tofarray.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_swd_debugger.py | Removes explicit USB ESD diode block(s) and connects USB directly (ESD now in connector). |
| examples/test_pcbbot.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_multimeter.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_lora.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_keyboard.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_iot_thermal_camera.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_iot_iron.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_iot_display.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_esp_programmer.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/test_ble_joystick.py | Removes explicit USB ESD diode block and connects USB directly (ESD now in connector). |
| examples/SwdDebugger/SwdDebugger.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/ProtectedCharger/ProtectedCharger.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/LedMatrix/LedMatrix.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/Keyboard/Keyboard.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/IotFan/IotFan.net.ref | Updates USB-C receptacle descriptor to generic naming. |
| examples/EspProgrammer/EspProgrammer.svgpcb.js | Updates generated layout export for in-connector USB ESD and refdes/net renumbering. |
| examples/EspProgrammer/EspProgrammer.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| examples/EspLora/EspLora.net.ref | Updates reference netlist for in-connector USB ESD and refdes/net renumbering. |
| edg/parts/power/converter/Mp2722.py | Constrains charger IC USB port speed (per new USB speed modeling). |
| edg/parts/microcontroller/Stm32l432.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/microcontroller/Stm32g431.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/microcontroller/Stm32f103.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/microcontroller/Rp2040.py | Marks MCU USB device port as full-speed-only and documents host/device speed capability. |
| edg/parts/microcontroller/nRF52840.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/microcontroller/Lpc1549.py | Declares MCU USB device port as supporting low + full speed. |
| edg/parts/microcontroller/Esp32s3.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/microcontroller/Ch32v203.py | Marks MCU USB device port as full-speed-only. |
| edg/parts/interface/UsbUart_Cp2102.py | Constrains CP2102 interface USB device speed to full-speed-only. |
| edg/parts/interface/UsbInterface_Ft232h.py | Constrains FT232H interface USB device speed to full + high speed. |
| edg/parts/connector/UsbPorts.py | Moves/generated ESD diode into USB connector blocks; adds speed constraints to connector USB ports; makes USB-C descriptor generic. |
| edg/parts/connector/init.py | Removes export of UsbAPlugPads from connector module exports. |
| edg/electronics_interfaces/UsbPort.py | Implements USB link speed modeling and passive speed-limit validation; propagates speed through bridges. |
| edg/electronics_interfaces/test_usb_link.py | Adds unit tests for USB speed compatibility and passive speed limiting behavior. |
| edg/circuits/UsbSeriesResistor.py | Propagates USB speed/passive-speed constraints through the series-resistor subcircuit. |
| edg/circuits/UsbBitBang.py | Constrains bit-banged USB port speed to low/full-speed. |
| edg/abstract_parts/UsbConnectors.py | Adds generate_esd_diode parameter to USB connector abstract bases (enabling in-connector ESD generation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move USB ESD diode into USB connector, since most designs have this part. Simplifies example designs to eliminate the explicit ESD diode.
Add USB speed modeling to ensure that passives do not limit link speed, eg for a low-speed USB diode (which none are in the library, yet). Many microcontrollers are full speed only (PHY not low-speed capable, especially in device mode).
Other changes:
This changes a lot of netlists since the ESD diode gets moved to the USB connector, shifting its refdes up.