mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>, Tom Rini <trini@konsulko.com>,
	Marek Vasut <marex@denx.de>,
	u-boot@lists.denx.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] add support for gpio-usb-b-connector
Date: Wed, 18 Jun 2025 14:21:18 -0700	[thread overview]
Message-ID: <20250618212120.1548575-1-tharvey@gateworks.com> (raw)

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


             reply	other threads:[~2025-06-18 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 21:21 Tim Harvey [this message]
2025-06-18 21:21 ` [PATCH 1/2] usb: common: allow dr_mode to come from gpio-id based usb-connector Tim Harvey
2025-06-18 21:21 ` [PATCH 2/2] imx8mp-venice: enable USB device mode Tim Harvey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250618212120.1548575-1-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=sbabic@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®