devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sanchayan Maity <maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Peter.Chen-3arQi8VN3Tc@public.gmane.org
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	stefan-XLVq0VzYD2Y@public.gmane.org,
	ivan.ivanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	marcel-mitwqZ+T+m9Wk0Htik3J/w@public.gmane.org,
	Sanchayan Maity
	<maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [RFC PATCH 4/4] ARM: dts: vf-colibri: USB device/host switch using extcon gpio
Date: Tue, 15 Mar 2016 14:08:30 +0530	[thread overview]
Message-ID: <b5960001225698c620f1236bc053df7e7127f9e3.1458030082.git.maitysanchayan@gmail.com> (raw)
In-Reply-To: <cover.1458030082.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
In-Reply-To: <cover.1458030082.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Use USBC_DET feature of standard Colibri SODIMM pin 137 for USB
device/host switching using the generic extcon USB gpio implementation.

Signed-off-by: Sanchayan Maity <maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 12 ++++++++++++
 arch/arm/boot/dts/vf-colibri.dtsi         |  7 +++++++
 2 files changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 4d8b7f6..794c02e 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -50,6 +50,14 @@
 		clock-frequency = <16000000>;
 	};
 
+	extcon_usbc_det: usbc_det {
+		compatible = "linux,extcon-usb-gpio";
+		debounce = <25>;
+		id-gpio = <&gpio3 6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbc_det>;
+	};
+
 	reg_3v3: regulator-3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "3.3V";
@@ -146,6 +154,10 @@
 	status = "okay";
 };
 
+&usbdev0 {
+	extcon = <&extcon_usbc_det>, <&extcon_usbc_det>;
+};
+
 &usbh1 {
 	vbus-supply = <&reg_usbh_vbus>;
 };
diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
index fda7f28..551b6a1 100644
--- a/arch/arm/boot/dts/vf-colibri.dtsi
+++ b/arch/arm/boot/dts/vf-colibri.dtsi
@@ -171,6 +171,7 @@
 
 &usbdev0 {
 	disable-over-current;
+	dr_mode = "otg";
 	status = "okay";
 };
 
@@ -326,6 +327,12 @@
 			>;
 		};
 
+		pinctrl_usbc_det: gpio_usbc_det {
+			fsl,pins = <
+				VF610_PAD_PTC29__GPIO_102		0x22ed
+			>;
+		};
+
 		pinctrl_usbh1_reg: gpio_usb_vbus {
 			fsl,pins = <
 				VF610_PAD_PTD4__GPIO_83			0x22ed
-- 
2.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-03-15  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  8:38 [RFC PATCH 0/4] Implement USB device/host switch for Vybrid Sanchayan Maity
     [not found] ` <cover.1458030082.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-15  8:38   ` [RFC PATCH 1/4] usb: chipidea: Do not rely on OTG while using extcon Sanchayan Maity
     [not found]     ` <a3dc1c8adc4266d36267901ce6e975ddfca09abb.1458030082.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-17  6:15       ` Chanwoo Choi
2016-03-15  8:38   ` Sanchayan Maity [this message]
2016-03-15  8:38 ` [RFC PATCH 2/4] usb: chipidea: ci_hdrc_imx: Introduce CI_HDRC_DUAL_ROLE_NOT_OTG for Vybrid Sanchayan Maity
2016-03-15  8:38 ` [RFC PATCH 3/4] ARM: dts: vfxxx: Make Vybrid match only on it's own compatible string Sanchayan Maity
2016-03-25  7:40 ` [RFC PATCH 0/4] Implement USB device/host switch for Vybrid Peter Chen
2016-03-28 15:28   ` Stefan Agner
     [not found]     ` <3c2e72efc8cae93ff31be1b44f9a02b3-XLVq0VzYD2Y@public.gmane.org>
2016-03-29  0:24       ` Peter Chen
     [not found]         ` <HE1PR04MB1450691A838973845B7AD16F8B870-6LN7OEpIatVC+P/YwrXEHc9NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-03-30  6:32           ` maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w
2016-03-30  8:07             ` 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=b5960001225698c620f1236bc053df7e7127f9e3.1458030082.git.maitysanchayan@gmail.com \
    --to=maitysanchayan-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Peter.Chen-3arQi8VN3Tc@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ivan.ivanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcel-mitwqZ+T+m9Wk0Htik3J/w@public.gmane.org \
    --cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stefan-XLVq0VzYD2Y@public.gmane.org \
    /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).