All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v2 0/2] Adding USB dual-role switching support for colibri-imx6/7 with extcon
@ 2020-07-16 12:58 Philippe Schenker
  2020-07-16 12:58 ` [RESEND PATCH v2 1/2] ARM: dts: colibri-imx6: add usb dual-role switch capability Philippe Schenker
  2020-07-16 12:58 ` [RESEND PATCH v2 2/2] ARM: dts: colibri-imx7: " Philippe Schenker
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Schenker @ 2020-07-16 12:58 UTC (permalink / raw)
  To: devicetree, Shawn Guo, Ahmad Fatoum
  Cc: Philippe Schenker, Fabio Estevam, NXP Linux Team,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer,
	linux-arm-kernel, linux-kernel

Hi Shawn,

This is a friendly reminder as I think the two patches in this patchset
got forgotten to pull back in.

Ahmad pointed out that extcon is legacy and I should better use the new
gpio-usb-b-connector compatible for that purpose. You removed those two
patches upon this recommendation.

In the meantime it turned out that I cannot use the new usb-connector
way of switching usb dual-role. This is due to Chipidea driver not
supporting it and Ahmad is fine using extcon for it.

I would be glad if you could pull those two patches back in.

Thanks,
Philippe


Philippe Schenker (2):
  ARM: dts: colibri-imx6: add usb dual-role switch capability
  ARM: dts: colibri-imx7: add usb dual-role switch capability

 arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 8 ++++++++
 arch/arm/boot/dts/imx6qdl-colibri.dtsi       | 2 +-
 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi  | 9 +++++++++
 arch/arm/boot/dts/imx7-colibri.dtsi          | 4 ++--
 4 files changed, 20 insertions(+), 3 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RESEND PATCH v2 1/2] ARM: dts: colibri-imx6: add usb dual-role switch capability
  2020-07-16 12:58 [RESEND PATCH v2 0/2] Adding USB dual-role switching support for colibri-imx6/7 with extcon Philippe Schenker
@ 2020-07-16 12:58 ` Philippe Schenker
  2020-07-16 12:58 ` [RESEND PATCH v2 2/2] ARM: dts: colibri-imx7: " Philippe Schenker
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Schenker @ 2020-07-16 12:58 UTC (permalink / raw)
  To: devicetree, Shawn Guo, Ahmad Fatoum
  Cc: Philippe Schenker, Fabio Estevam, NXP Linux Team,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer,
	linux-arm-kernel, linux-kernel

Since the runtime-pm wakeup bug was fixed in
drivers/usb/chipidea/core.c usb dual-role host/device switching is
working. So make use of it.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
---

 arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 8 ++++++++
 arch/arm/boot/dts/imx6qdl-colibri.dtsi       | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
index 65359aece950..c978b3f19a2d 100644
--- a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
@@ -45,6 +45,13 @@ clk16m: clock-16m {
 		clock-output-names = "clk16m";
 	};
 
+	extcon_usbc_det: usbc_det {
+		compatible = "linux,extcon-usb-gpio";
+		id-gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbc_det>;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -220,6 +227,7 @@ &usbh1 {
 };
 
 &usbotg {
+	extcon = <0>, <&extcon_usbc_det>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index 240b86d2eb71..34130f23ceaa 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -364,7 +364,7 @@ &uart3 {
 &usbotg {
 	pinctrl-names = "default";
 	disable-over-current;
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	status = "disabled";
 };
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RESEND PATCH v2 2/2] ARM: dts: colibri-imx7: add usb dual-role switch capability
  2020-07-16 12:58 [RESEND PATCH v2 0/2] Adding USB dual-role switching support for colibri-imx6/7 with extcon Philippe Schenker
  2020-07-16 12:58 ` [RESEND PATCH v2 1/2] ARM: dts: colibri-imx6: add usb dual-role switch capability Philippe Schenker
@ 2020-07-16 12:58 ` Philippe Schenker
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Schenker @ 2020-07-16 12:58 UTC (permalink / raw)
  To: devicetree, Shawn Guo, Ahmad Fatoum
  Cc: Philippe Schenker, Fabio Estevam, NXP Linux Team,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer,
	linux-arm-kernel, linux-kernel

Since the runtime-pm wakeup bug was fixed in
drivers/usb/chipidea/core.c usb dual-role host/device switching is
working. So make use of it.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>

---

 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 9 +++++++++
 arch/arm/boot/dts/imx7-colibri.dtsi         | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
index 97601375f264..db56a532a34a 100644
--- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
@@ -20,6 +20,14 @@ clk16m: clk16m {
 		clock-frequency = <16000000>;
 	};
 
+	extcon_usbc_det: usbc_det {
+		compatible = "linux,extcon-usb-gpio";
+		id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbc_det>;
+	};
+
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -174,6 +182,7 @@ &uart3 {
 };
 
 &usbotg1 {
+	extcon = <0>, <&extcon_usbc_det>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index e18e89dec879..caea90d2421f 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -457,7 +457,7 @@ &uart3 {
 };
 
 &usbotg1 {
-	dr_mode = "host";
+	dr_mode = "otg";
 };
 
 &usdhc1 {
@@ -486,7 +486,7 @@ &usdhc3 {
 &iomuxc {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4
-		     &pinctrl_gpio7 &pinctrl_usbc_det>;
+		     &pinctrl_gpio7>;
 
 	pinctrl_gpio1: gpio1-grp {
 		fsl,pins = <
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-16 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 12:58 [RESEND PATCH v2 0/2] Adding USB dual-role switching support for colibri-imx6/7 with extcon Philippe Schenker
2020-07-16 12:58 ` [RESEND PATCH v2 1/2] ARM: dts: colibri-imx6: add usb dual-role switch capability Philippe Schenker
2020-07-16 12:58 ` [RESEND PATCH v2 2/2] ARM: dts: colibri-imx7: " Philippe Schenker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.