[PATCH 0/2] add support for gpio-usb-b-connector

Tim Harvey tharvey at gateworks.com
Wed Jun 18 23:21:18 CEST 2025


Linux has a driver for gpio-usb-b-connector that uses a GPIO to
determine host vs peripheral role. This can be useful for USB Type-B
OTG connectors which have an ID pin that is grounded on OTG-to-host
cables and floating on OTG-to-device cables as well as USB power switch
controllers such as the TPS25821 which manages cc pins and has a SINK#
output.

Both scenarios are used for various imx8mp-venice boards.

This series addes support for usb controllers in otg mode
(dr_mode="otg") which have a remote endpoint connector with compatible
'gpio-usb-b-connector' with an id-gpios property.

The first patch adds this capability to the usb_get_dr_mode() function
and the second disables the workarounds used for various imx8mp-venice
boards to default the usb dual-role controllers to host mode. 

Tim Harvey (2):
  usb: common: allow dr_mode to come from gpio-id based usb-connector
  imx8mp-venice: enable USB device mode

 .../dts/imx8mp-venice-gw71xx-2x-u-boot.dtsi   |  5 -
 .../dts/imx8mp-venice-gw72xx-2x-u-boot.dtsi   |  5 -
 .../dts/imx8mp-venice-gw73xx-2x-u-boot.dtsi   |  5 -
 arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi |  5 -
 configs/imx8mp_venice_defconfig               |  7 ++
 drivers/usb/common/common.c                   | 96 ++++++++++++++++++-
 6 files changed, 102 insertions(+), 21 deletions(-)

-- 
2.25.1



More information about the U-Boot mailing list