linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: linux-usb@vger.kernel.org
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Philippe Schenker <philippe.schenker@toradex.com>,
	Stefan Agner <stefan.agner@toradex.com>,
	Max Krummenacher <max.krummenacher@toradex.com>,
	Oleksandr Suvorov <oleksandr.suvorov@toradex.com>,
	Igor Opaniuk <igor.opaniuk@toradex.com>,
	Fabio Estevam <festevam@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v1 2/2] ARM: dts: colibri-imx6ull: add extcon for usbotg1
Date: Mon, 21 Oct 2019 19:16:54 +0300	[thread overview]
Message-ID: <20191021161654.14353-2-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20191021161654.14353-1-igor.opaniuk@gmail.com>

From: Igor Opaniuk <igor.opaniuk@toradex.com>

Add extcon usb gpio configuration for support dual roles for usbotg1.

USB host/gadget switching test (1. USB NIC emulation; 2. USB storage):

[   52.491957] ci_hdrc ci_hdrc.1: switching to gadget role
[   52.502911] mxs_phy 20c9000.usbphy: vbus is not valid
[   56.749160] using random self ethernet address
[   56.758637] using random host ethernet address
[   65.768968] usb0: HOST MAC 00:14:2d:ff:ff:fe
[   65.887980] usb0: MAC 00:14:2d:ff:ff:ff
[   66.294961] configfs-gadget gadget: high-speed config #1: c
[   78.741971] ci_hdrc ci_hdrc.1: switching to host role
[   78.747522] ci_hdrc ci_hdrc.1: EHCI Host Controller
[   78.790174] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus
number 2
[   78.868498] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
index a78849fd2afa..988f1a800d5a 100644
--- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
@@ -29,6 +29,14 @@
 		clock-frequency = <16000000>;
 	};
 
+	extcon_usbc_det: usbc_det {
+		compatible = "linux,extcon-usb-gpio";
+		debounce = <25>;
+		id-gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_snvs_usbc_det>;
+	};
+
 	panel: panel {
 		compatible = "edt,et057090dhu";
 		backlight = <&bl>;
@@ -150,6 +158,7 @@
 };
 
 &usbotg1 {
+	extcon = <&extcon_usbc_det &extcon_usbc_det>;
 	status = "okay";
 };
 
-- 
2.17.1


  reply	other threads:[~2019-10-21 16:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 16:16 [PATCH v1 1/2] usb: chipidea: use of extcon framework to work for non OTG case Igor Opaniuk
2019-10-21 16:16 ` Igor Opaniuk [this message]
2019-10-28  6:09   ` [PATCH v1 2/2] ARM: dts: colibri-imx6ull: add extcon for usbotg1 Shawn Guo
2019-10-22  2:11 ` [PATCH v1 1/2] usb: chipidea: use of extcon framework to work for non OTG case Peter Chen
2019-10-22 13:54   ` Igor Opaniuk
2019-10-23  8:28     ` Peter Chen

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=20191021161654.14353-2-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=igor.opaniuk@toradex.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=mark.rutland@arm.com \
    --cc=max.krummenacher@toradex.com \
    --cc=oleksandr.suvorov@toradex.com \
    --cc=philippe.schenker@toradex.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan.agner@toradex.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;
as well as URLs for NNTP newsgroup(s).