dm: Add GPIO support and tests