* [PATCH 0/2] Fix Exynos peach USB on kernels with USB Gadget support
@ 2014-08-22 20:56 ` Sjoerd Simons
0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:56 UTC (permalink / raw)
To: Kukjin Kim; +Cc: linux-arm-kernel, linux-samsung-soc, Sjoerd Simons
When building a kernel with support for both USB host and USB Gadget support on
the dwc3 controller on the Exynos5 soc will go into USB OTG mode unless
otherwise specified in the dtb, which is unhelpful for boards hooked up to run
as USB host.
First patch in this set explicitely set the dual-role mode for the dwc3
controller on Peach pi and Peach pit boards to host mode. Second patch enables
gadget mode in the default exynos config to more easily catch/trigger issues
like these.
I suspect other boards base using exynos5420/5800 might need the similar fixes
(Arndale Octa and Samsung SMDK5420) to their dts files, so would be great if
folks with those board could verify this.
Sjoerd Simons (2):
ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
ARM: exynos_defconfig: enable USB gadget support
arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
arch/arm/configs/exynos_defconfig | 1 +
4 files changed, 19 insertions(+), 2 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] Fix Exynos peach USB on kernels with USB Gadget support
@ 2014-08-22 20:56 ` Sjoerd Simons
0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:56 UTC (permalink / raw)
To: linux-arm-kernel
When building a kernel with support for both USB host and USB Gadget support on
the dwc3 controller on the Exynos5 soc will go into USB OTG mode unless
otherwise specified in the dtb, which is unhelpful for boards hooked up to run
as USB host.
First patch in this set explicitely set the dual-role mode for the dwc3
controller on Peach pi and Peach pit boards to host mode. Second patch enables
gadget mode in the default exynos config to more easily catch/trigger issues
like these.
I suspect other boards base using exynos5420/5800 might need the similar fixes
(Arndale Octa and Samsung SMDK5420) to their dts files, so would be great if
folks with those board could verify this.
Sjoerd Simons (2):
ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
ARM: exynos_defconfig: enable USB gadget support
arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
arch/arm/configs/exynos_defconfig | 1 +
4 files changed, 19 insertions(+), 2 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
2014-08-22 20:56 ` Sjoerd Simons
@ 2014-08-22 20:57 ` Sjoerd Simons
-1 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:57 UTC (permalink / raw)
To: Kukjin Kim; +Cc: linux-arm-kernel, linux-samsung-soc, Sjoerd Simons
In case the optional dr_mode property isn't set in the dwc3 nodes the
the controller will go into OTG mode iff both USB host and USB gadget
functionality are enabled in the kernel configuration. Unfortunately this
results in USB not working on exynos5420-peach-pit and
exynos5800-peach-pi with such a kernel configuration unless manually
change the mode. To resolve that explicitely configure the dual role
mode as host
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 228a6b1..6c22610 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -427,10 +427,18 @@
status = "okay";
};
+&usbdrd_dwc3_0 {
+ dr_mode = "host";
+};
+
&usbdrd_phy0 {
vbus-supply = <&usb300_vbus_reg>;
};
+&usbdrd_dwc3_1 {
+ dr_mode = "host";
+};
+
&usbdrd_phy1 {
vbus-supply = <&usb301_vbus_reg>;
};
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index bfe056d..8617a03 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -815,7 +815,7 @@
#size-cells = <1>;
ranges;
- dwc3 {
+ usbdrd_dwc3_0: dwc3 {
compatible = "snps,dwc3";
reg = <0x12000000 0x10000>;
interrupts = <0 72 0>;
@@ -841,7 +841,7 @@
#size-cells = <1>;
ranges;
- dwc3 {
+ usbdrd_dwc3_1: dwc3 {
compatible = "snps,dwc3";
reg = <0x12400000 0x10000>;
interrupts = <0 73 0>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index f3ee48b..166b352 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -425,10 +425,18 @@
status = "okay";
};
+&usbdrd_dwc3_0 {
+ dr_mode = "host";
+};
+
&usbdrd_phy0 {
vbus-supply = <&usb300_vbus_reg>;
};
+&usbdrd_dwc3_1 {
+ dr_mode = "host";
+};
+
&usbdrd_phy1 {
vbus-supply = <&usb301_vbus_reg>;
};
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
@ 2014-08-22 20:57 ` Sjoerd Simons
0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:57 UTC (permalink / raw)
To: linux-arm-kernel
In case the optional dr_mode property isn't set in the dwc3 nodes the
the controller will go into OTG mode iff both USB host and USB gadget
functionality are enabled in the kernel configuration. Unfortunately this
results in USB not working on exynos5420-peach-pit and
exynos5800-peach-pi with such a kernel configuration unless manually
change the mode. To resolve that explicitely configure the dual role
mode as host
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 228a6b1..6c22610 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -427,10 +427,18 @@
status = "okay";
};
+&usbdrd_dwc3_0 {
+ dr_mode = "host";
+};
+
&usbdrd_phy0 {
vbus-supply = <&usb300_vbus_reg>;
};
+&usbdrd_dwc3_1 {
+ dr_mode = "host";
+};
+
&usbdrd_phy1 {
vbus-supply = <&usb301_vbus_reg>;
};
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index bfe056d..8617a03 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -815,7 +815,7 @@
#size-cells = <1>;
ranges;
- dwc3 {
+ usbdrd_dwc3_0: dwc3 {
compatible = "snps,dwc3";
reg = <0x12000000 0x10000>;
interrupts = <0 72 0>;
@@ -841,7 +841,7 @@
#size-cells = <1>;
ranges;
- dwc3 {
+ usbdrd_dwc3_1: dwc3 {
compatible = "snps,dwc3";
reg = <0x12400000 0x10000>;
interrupts = <0 73 0>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index f3ee48b..166b352 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -425,10 +425,18 @@
status = "okay";
};
+&usbdrd_dwc3_0 {
+ dr_mode = "host";
+};
+
&usbdrd_phy0 {
vbus-supply = <&usb300_vbus_reg>;
};
+&usbdrd_dwc3_1 {
+ dr_mode = "host";
+};
+
&usbdrd_phy1 {
vbus-supply = <&usb301_vbus_reg>;
};
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: exynos_defconfig: enable USB gadget support
2014-08-22 20:56 ` Sjoerd Simons
@ 2014-08-22 20:57 ` Sjoerd Simons
-1 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:57 UTC (permalink / raw)
To: Kukjin Kim; +Cc: linux-arm-kernel, linux-samsung-soc, Sjoerd Simons
Enable USB gadget support without support for any specific gadgets to
more easily catch cases where a devices dts doesn't specify the usb
controllers dr_mode while it should.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
arch/arm/configs/exynos_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index fc7d168..3664120 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -54,6 +54,7 @@ CONFIG_SMSC911X=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_SMSC75XX=y
CONFIG_USB_NET_SMSC95XX=y
+CONFIG_USB_GADGET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_CROS_EC=y
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: exynos_defconfig: enable USB gadget support
@ 2014-08-22 20:57 ` Sjoerd Simons
0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2014-08-22 20:57 UTC (permalink / raw)
To: linux-arm-kernel
Enable USB gadget support without support for any specific gadgets to
more easily catch cases where a devices dts doesn't specify the usb
controllers dr_mode while it should.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
arch/arm/configs/exynos_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index fc7d168..3664120 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -54,6 +54,7 @@ CONFIG_SMSC911X=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_SMSC75XX=y
CONFIG_USB_NET_SMSC95XX=y
+CONFIG_USB_GADGET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_CROS_EC=y
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
2014-08-22 20:57 ` Sjoerd Simons
@ 2014-08-22 21:30 ` Andreas Färber
-1 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2014-08-22 21:30 UTC (permalink / raw)
To: Sjoerd Simons; +Cc: Kukjin Kim, linux-arm-kernel, linux-samsung-soc
Hi,
Am 22.08.2014 22:57, schrieb Sjoerd Simons:
> In case the optional dr_mode property isn't set in the dwc3 nodes the
> the controller will go into OTG mode iff both USB host and USB gadget
> functionality are enabled in the kernel configuration. Unfortunately this
> results in USB not working on exynos5420-peach-pit and
> exynos5800-peach-pi with such a kernel configuration unless manually
> change the mode. To resolve that explicitely configure the dual role
> mode as host
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> ---
> arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
> arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
> arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
> 3 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> index 228a6b1..6c22610 100644
> --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
> +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> @@ -427,10 +427,18 @@
> status = "okay";
> };
>
> +&usbdrd_dwc3_0 {
> + dr_mode = "host";
> +};
> +
> &usbdrd_phy0 {
> vbus-supply = <&usb300_vbus_reg>;
> };
>
> +&usbdrd_dwc3_1 {
> + dr_mode = "host";
> +};
The sort order should be alphabetical here, which means dwc before phy.
> +
> &usbdrd_phy1 {
> vbus-supply = <&usb301_vbus_reg>;
> };
[...]
> diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
> index f3ee48b..166b352 100644
> --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
> +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
> @@ -425,10 +425,18 @@
> status = "okay";
> };
>
> +&usbdrd_dwc3_0 {
> + dr_mode = "host";
> +};
> +
> &usbdrd_phy0 {
> vbus-supply = <&usb300_vbus_reg>;
> };
>
> +&usbdrd_dwc3_1 {
> + dr_mode = "host";
> +};
Dito.
> +
> &usbdrd_phy1 {
> vbus-supply = <&usb301_vbus_reg>;
> };
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
@ 2014-08-22 21:30 ` Andreas Färber
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2014-08-22 21:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Am 22.08.2014 22:57, schrieb Sjoerd Simons:
> In case the optional dr_mode property isn't set in the dwc3 nodes the
> the controller will go into OTG mode iff both USB host and USB gadget
> functionality are enabled in the kernel configuration. Unfortunately this
> results in USB not working on exynos5420-peach-pit and
> exynos5800-peach-pi with such a kernel configuration unless manually
> change the mode. To resolve that explicitely configure the dual role
> mode as host
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> ---
> arch/arm/boot/dts/exynos5420-peach-pit.dts | 8 ++++++++
> arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
> arch/arm/boot/dts/exynos5800-peach-pi.dts | 8 ++++++++
> 3 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> index 228a6b1..6c22610 100644
> --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
> +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> @@ -427,10 +427,18 @@
> status = "okay";
> };
>
> +&usbdrd_dwc3_0 {
> + dr_mode = "host";
> +};
> +
> &usbdrd_phy0 {
> vbus-supply = <&usb300_vbus_reg>;
> };
>
> +&usbdrd_dwc3_1 {
> + dr_mode = "host";
> +};
The sort order should be alphabetical here, which means dwc before phy.
> +
> &usbdrd_phy1 {
> vbus-supply = <&usb301_vbus_reg>;
> };
[...]
> diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
> index f3ee48b..166b352 100644
> --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
> +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
> @@ -425,10 +425,18 @@
> status = "okay";
> };
>
> +&usbdrd_dwc3_0 {
> + dr_mode = "host";
> +};
> +
> &usbdrd_phy0 {
> vbus-supply = <&usb300_vbus_reg>;
> };
>
> +&usbdrd_dwc3_1 {
> + dr_mode = "host";
> +};
Dito.
> +
> &usbdrd_phy1 {
> vbus-supply = <&usb301_vbus_reg>;
> };
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-22 21:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 20:56 [PATCH 0/2] Fix Exynos peach USB on kernels with USB Gadget support Sjoerd Simons
2014-08-22 20:56 ` Sjoerd Simons
2014-08-22 20:57 ` [PATCH 1/2] ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi Sjoerd Simons
2014-08-22 20:57 ` Sjoerd Simons
2014-08-22 21:30 ` Andreas Färber
2014-08-22 21:30 ` Andreas Färber
2014-08-22 20:57 ` [PATCH 2/2] ARM: exynos_defconfig: enable USB gadget support Sjoerd Simons
2014-08-22 20:57 ` Sjoerd Simons
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.