Feature request: GPIO support in USBSDMuxDriver
Description
The current USBSDMuxDriver only exposes basic mode control:
However, the underlying usbsdmux tool already supports GPIO operations:
gpio <n> get
gpio <n> high/low
These capabilities are not currently exposed in the driver.
Problem
This limitation prevents using the GPIOs of the USB-SD-Mux in HIL setups. In practice, this blocks use cases such as:
- resetting the DUT
- controlling power lines
- synchronizing external hardware during tests
In our case, this is particularly needed to simulate SD card insertion and removal events in our automated tests.
As a result, additional external tools or workarounds are required, even though the hardware already supports it.
Proposed solution
Extend USBSDMuxDriver with minimal GPIO support, for example:
gpio_get(gpio: int) -> int
gpio_set(gpio: int, value: int)
This would directly map to the existing usbsdmux CLI without introducing additional complexity.
Benefits
- Enables simulation of SD card insertion/removal in automated HIL tests
- Unlocks more advanced hardware control scenarios
- Aligns the driver capabilities with the underlying tool
- Keeps the implementation simple and backward-compatible
Additional context
GPIO support is already implemented and stable in the usbsdmux tool, so this would mainly be an exposure of existing functionality in Labgrid.
Contribution
I’d be happy to implement this as a PR if this is considered useful and if I’m not missing any existing mechanism or design constraint.
Please let me know if this aligns with the project direction.
Feature request: GPIO support in USBSDMuxDriver
Description
The current
USBSDMuxDriveronly exposes basic mode control:set_modeget_modeHowever, the underlying
usbsdmuxtool already supports GPIO operations:gpio <n> getgpio <n> high/lowThese capabilities are not currently exposed in the driver.
Problem
This limitation prevents using the GPIOs of the USB-SD-Mux in HIL setups. In practice, this blocks use cases such as:
In our case, this is particularly needed to simulate SD card insertion and removal events in our automated tests.
As a result, additional external tools or workarounds are required, even though the hardware already supports it.
Proposed solution
Extend
USBSDMuxDriverwith minimal GPIO support, for example:gpio_get(gpio: int) -> intgpio_set(gpio: int, value: int)This would directly map to the existing
usbsdmuxCLI without introducing additional complexity.Benefits
Additional context
GPIO support is already implemented and stable in the
usbsdmuxtool, so this would mainly be an exposure of existing functionality in Labgrid.Contribution
I’d be happy to implement this as a PR if this is considered useful and if I’m not missing any existing mechanism or design constraint.
Please let me know if this aligns with the project direction.