Fix Exynos USB on kernels with USB Gadget support
Subsystems (3)
v3 cover Fix Exynos USB on kernels with USB Gadget support
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 adds similar updates for Arndale Octa as reported by Andreas F?rber. Last patch enables gadget mode in the default exynos config to more easily catch/trigger issues like these.
I suspect the Samsung SMDK5420 DTS might need similar changes, so it would be great if users of those board could verify this.
Changes in v2: alphabetically sort the dts entries Changes in v3: Add DTS updates for arndale octa
Sjoerd Simons (3):
ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
ARM: dts: exynos: Explicitly set dr_mode on arndale-octa
ARM: exynos_defconfig: enable USB gadget support
arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-)
Signature · 1 line
2.1.0
PATCH v3 1/3 ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
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 explicitly configure the dual role mode as host
---
Changes in v2: alphabetically sort the dts entries Changes in v3: Fix typo in commit message
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(-)
arch/arm/boot/dts/exynos5420-peach-pit.dts +8 -0
@@ -427,6 +427,14 @@ status = "okay"; }; +&usbdrd_dwc3_0 { + dr_mode = "host"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +}; + &usbdrd_phy0 { vbus-supply = <&usb300_vbus_reg>; };
arch/arm/boot/dts/exynos5420.dtsi +2 -2
@@ -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>;
arch/arm/boot/dts/exynos5800-peach-pi.dts +8 -0
@@ -425,6 +425,14 @@ status = "okay"; }; +&usbdrd_dwc3_0 { + dr_mode = "host"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +}; + &usbdrd_phy0 { vbus-supply = <&usb300_vbus_reg>; };
Signature · 1 line
2.1.0
PATCH v3 2/3 ARM: dts: exynos: Explicitly set dr_mode on arndale-octa
In reply to Sjoerd SimonsExplicitly set the dr_mode for the second dwc3 controller on the Arndale Octa board to host mode. This is required to ensure the controller is initialized in the right mode if the kernel is build with USB gadget support
---
Changes in v3: new patch
arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/exynos5420-arndale-octa.dts +4 -0
@@ -375,3 +375,7 @@ }; }; }; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +};
Signature · 1 line
2.1.0
PATCH v3 3/3 ARM: exynos_defconfig: enable USB gadget support
In reply to Sjoerd SimonsEnable 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.
--- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/exynos_defconfig +1 -0
@@ -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
Signature · 1 line
2.1.0
v3 cover Fix Exynos USB on kernels with USB Gadget support
In reply to Sjoerd SimonsHey Kukjin,
It's been almost a month since I posted the first iteration of this patchset on the list, with only trivial cosmetic changes and an addition of a similar fix for Arndale Octa boards. Do you feel it needs more review from specific folks before pulling it in or ?
Seems a bit of a shame if this would fail to make it for 3.18 (one could even argue the dt patches are 3.17 RC material!) as it fixes USB functionality being broken depending on the kernel configuration used.
Quoted 22 lines · 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 adds similar updates for Arndale Octa as reported by Andreas F?rber. Last patch enables gadget mode in the default exynos config to more easily catch/trigger issues like these.
I suspect the Samsung SMDK5420 DTS might need similar changes, so it would be great if users of those board could verify this.
Changes in v2: alphabetically sort the dts entries Changes in v3: Add DTS updates for arndale octa
Sjoerd Simons (3):
ARM: dts: exynos: Explicitly setdr_modeon peach-pit and peach-pi
ARM: dts: exynos: Explicitly setdr_modeon arndale-octa
ARM:exynos_defconfig: enable USB gadget support
Quoted 7 lines
arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6170 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140919/b4464251/attachment.bin>
v3 cover Fix Exynos USB on kernels with USB Gadget support
Quoted 2 lines · Sjoerd Simons
Hey Kukjin,
Hi,
Sorry for late response...
Quoted 5 lines
It's been almost a month since I posted the first iteration of this patchset on the list, with only trivial cosmetic changes and an addition of a similar fix for Arndale Octa boards. Do you feel it needs more review from specific folks before pulling it in or ?
Quoted 35 lines
Seems a bit of a shame if this would fail to make it for 3.18 (one could even argue the dt patches are 3.17 RC material!) as it fixes USB functionality being broken depending on the kernel configuration used.
Quoted 29 lines · 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 adds similar updates for Arndale Octa as reported by Andreas F?rber. Last patch enables gadget mode in the default exynos config to more easily catch/trigger issues like these.
I suspect the Samsung SMDK5420 DTS might need similar changes, so it would be great if users of those board could verify this.
Changes in v2: alphabetically sort the dts entries Changes in v3: Add DTS updates for arndale octa
Sjoerd Simons (3):
ARM: dts: exynos: Explicitly setdr_modeon peach-pit and peach-pi
ARM: dts: exynos: Explicitly setdr_modeon arndale-octa
ARM:exynos_defconfig: enable USB gadget supportarch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-)
I have no objection on this series but needs to be rebased on my tree, can you please respin on top of my tree?
Thanks,
Kukjin
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
v4 cover Fix Exynos USB on kernels with USB Gadget support
Same patches as v3 but rebased on
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
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 adds similar updates for Arndale Octa as reported by Andreas F?rber. Last patch enables gadget mode in the default exynos config to more easily catch/trigger issues like these.
I suspect the Samsung SMDK5420 DTS might need similar changes, so it would be great if users of those board could verify this.
Changes in v2: alphabetically sort the dts entries Changes in v3: Add DTS updates for arndale octa Changes in v4: Rebased on todays linux-samsungs for-next branch
Sjoerd Simons (3):
ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
ARM: dts: exynos: Explicitly set dr_mode on arndale-octa
ARM: exynos_defconfig: enable USB gadget support
arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-)
Signature · 18 lines
2.1.0 Sjoerd Simons (3): ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi ARM: dts: exynos: Explicitly set dr_mode on arndale-octa ARM: exynos_defconfig: enable USB gadget support arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-) -- 2.1.0
PATCH v4 1/3 ARM: dts: exynos: Explicitly set dr_mode on peach-pit and peach-pi
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 explicitly configure the dual role mode as host
---
Changes in v2: alphabetically sort the dts entries Changes in v3: Fix typo in commit message Changes in v4: Rebased on linux-samsung for-next
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(-)
arch/arm/boot/dts/exynos5420-peach-pit.dts +8 -0
@@ -841,6 +841,14 @@ status = "okay"; }; +&usbdrd_dwc3_0 { + dr_mode = "host"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +}; + &usbdrd_phy0 { vbus-supply = <&usb300_vbus_reg>; };
arch/arm/boot/dts/exynos5420.dtsi +2 -2
@@ -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>;
arch/arm/boot/dts/exynos5800-peach-pi.dts +8 -0
@@ -829,6 +829,14 @@ status = "okay"; }; +&usbdrd_dwc3_0 { + dr_mode = "host"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +}; + &usbdrd_phy0 { vbus-supply = <&usb300_vbus_reg>; };
Signature · 1 line
2.1.0
PATCH v3 2/3 ARM: dts: exynos: Explicitly set dr_mode on arndale-octa
In reply to Sjoerd SimonsExplicitly set the dr_mode for the second dwc3 controller on the Arndale Octa board to host mode. This is required to ensure the controller is initialized in the right mode if the kernel is build with USB gadget support
---
Changes in v3: new patch
Changes in v4: Rebased on linux-samsung for-next
arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/exynos5420-arndale-octa.dts +4 -0
@@ -367,3 +367,7 @@ }; }; }; + +&usbdrd_dwc3_1 { + dr_mode = "host"; +};
Signature · 1 line
2.1.0
PATCH v3 3/3 ARM: exynos_defconfig: enable USB gadget support
In reply to Sjoerd SimonsEnable 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.
---
Changes in v4: Rebased on linux-samsung for-next
arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/exynos_defconfig +1 -0
@@ -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
Signature · 1 line
2.1.0
Kukjin Kim
Appliedv4 cover Fix Exynos USB on kernels with USB Gadget support
In reply to Sjoerd SimonsQuoted 3 lines · Sjoerd Simons
Same patches as v3 but rebased on
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
Thanks, applied.
- Kukjin
Quoted 29 lines
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 adds similar updates for Arndale Octa as reported by Andreas F?rber. Last patch enables gadget mode in the default exynos config to more easily catch/trigger issues like these.
I suspect the Samsung SMDK5420 DTS might need similar changes, so it would be great if users of those board could verify this.
Changes in v2: alphabetically sort the dts entries Changes in v3: Add DTS updates for arndale octa Changes in v4: Rebased on todays linux-samsungs for-next branch
Sjoerd Simons (3):
ARM: dts: exynos: Explicitly setdr_modeon peach-pit and peach-pi
ARM: dts: exynos: Explicitly setdr_modeon arndale-octa
ARM:exynos_defconfig: enable USB gadget supportarch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ 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 + 5 files changed, 23 insertions(+), 2 deletions(-)