Skip to content

chore(usb): migrate all VID/PID catalogue data to FastLED/boards #1047

Description

@zackees

Context

fbuild still carries USB VID/PID knowledge in repository-owned code, fixtures, and the legacy online-data-tools pipeline. The canonical source is now the published FastLED/boards registry, and fbuild must ingest that registry rather than maintain a second catalogue.

A current repository sweep found, among other examples:

  • online-data-tools/fetch_raspberrypi_usb_pids.py and other vendor fetchers with vendor/PID allocation logic
  • online-data-tools/seed_mcu_to_vid.json with board-family VID heuristics
  • crates/fbuild-core/src/usb/embedded.rs and the checked-in vendor archive
  • test fixtures and docs that encode concrete VID/PID rows
  • serial/deploy classification tables and board metadata that may duplicate registry identities

Some literals are legitimate protocol constants or test fixtures; the audit must classify rather than blindly delete them.

Proposal

Scour the entire fbuild repository for USB VID/PID data and classify every occurrence as one of:

  1. canonical board/device data that belongs in FastLED/boards;
  2. a protocol/specification constant that is not a device catalogue entry;
  3. a test-only fixture, which may remain only when clearly isolated and labelled; or
  4. an unsafe runtime duplicate that must be removed.

For category 1, add provenance-backed records to the correct FastLED/boards data branch and regenerate/publish through the boards pipeline. Update fbuild's build/cache ingestion to consume the published boards artifacts. Remove runtime fallbacks and generated/bundled catalogues that duplicate those records. Keep only narrowly-scoped protocol constants and synthetic/test fixtures, with comments explaining why they are not production data.

The audit must include Rust, Python, JSON, docs, generated assets, release packaging, and tests; search case-insensitively for both symbolic names and numeric forms (VID, PID, VID:PID, 0xNNNN, and hex strings).

Acceptance criteria

  • A checked-in audit lists every concrete USB VID/PID occurrence and its classification.
  • All board/device VID/PID records have a corresponding FastLED/boards source/provenance entry; missing records are added there, not fbuild.
  • Production fbuild contains no embedded or hard-coded board/device VID/PID catalogue and does not silently fall back to one.
  • Build/cache ingestion consumes the published FastLED/boards artifact and validates its schema/version.
  • Test-only fixtures are explicitly marked and cannot become runtime defaults.
  • Existing serial/deploy behavior remains covered by tests, including RP2040 BOOTSEL 2e8a:0003, runtime CDC IDs, NXP/LPC identities, and unrelated CP210x negative cases.
  • Remove or deprecate the legacy fbuild online-data USB catalogue path once boards ingestion is proven, with migration notes.
  • CI grep/lint guard prevents new production VID/PID catalogue literals outside approved protocol/test locations.
  • Link the migration PR(s), boards data PR(s), and regenerated publication artifact in this issue.

Related work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions